From 4a389ccbb54f27bb6d9bbfd384778aa52f911744 Mon Sep 17 00:00:00 2001 From: othocaeS Date: Wed, 13 Jul 2016 11:09:20 -0400 Subject: [PATCH] It appears the plots are being created more-or-less correctly. --- scripts/create_plots.sh | 7 +++++-- scripts/templates/psd_freq.gp | 10 +++++----- scripts/templates/timelag_freq.gp | 13 ++++++++++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/scripts/create_plots.sh b/scripts/create_plots.sh index c0b5618..ec5cd0a 100755 --- a/scripts/create_plots.sh +++ b/scripts/create_plots.sh @@ -21,17 +21,19 @@ do # Output curves to temporary files using perl script, move tables to # permanent location. This just assumes there are no conflicts. - scripts/create_tables.pl $analysis + scripts/create_tables.pl $analysis > /dev/null mv tmp.echoPSD $echoPSD_tabfile mv tmp.refPSD $refPSD_tabfile mv tmp.timelag $timelag_tabfile # Plot PSD and save using gnuplot cat scripts/templates/psd_freq.gp| - sed "s@%TITLE@Power Spectrum for Lightcurves $echo_band & $ref_band@"| + sed "s@%TITLE@Power Spectrum for Lightcurves $echo_band \& $ref_band@"| sed "s@%SUBTITLE@as reported by Fausnaugh et. al, STORM III, 2016@"| sed "s@%FILE1@$refPSD_tabfile@"| + sed "s@%LABEL1@${ref_band} PSD@"| sed "s@%FILE2@$echoPSD_tabfile@"| + sed "s@%LABEL2@${echo_band} PSD@"| sed "s@%OUTPUTFILE@$PSD_plotfile@" > tmp.gp gnuplot tmp.gp @@ -40,6 +42,7 @@ do sed "s@%TITLE@Time Lag for Lightcurve $echo_band relative to $ref_band@"| sed "s@%SUBTITLE@as reported by Fausnaugh et. al, STORM III, 2016@"| sed "s@%FILE1@$timelag_tabfile@"| + sed "s@%LABEL1@${echo_band} Lag@"| sed "s@%OUTPUTFILE@$timelag_plotfile@" > tmp.gp gnuplot tmp.gp done diff --git a/scripts/templates/psd_freq.gp b/scripts/templates/psd_freq.gp index b397807..cd7f092 100644 --- a/scripts/templates/psd_freq.gp +++ b/scripts/templates/psd_freq.gp @@ -3,7 +3,7 @@ set terminal png set output "%OUTPUTFILE" -set title "%TITLE\n{/*0.5 %SUBTITLE}" +set title "%TITLE\n{/*0.7 %SUBTITLE}" set xlabel "Temporal Frequency [days^{-1}]" set xrange [0.005:0.603] @@ -11,12 +11,12 @@ set xrange [0.005:0.603] # set logscale xy # set ylabel "PSD" # set yrange [0.0005:100] -# plot '%FILE1' using 1:(10**($2+2)):3:4 with xyerrorbars, \ -# '%FILE2' using 1:(10**($2+2)):3:4 with xyerrorbars +# plot '%FILE1' using 1:(10**($2+2)):3:4 with xyerrorbars title "%LABEL1", \ +# '%FILE2' using 1:(10**($2+2)):3:4 with xyerrorbars title "%LABEL2" # Use this if you want to show the log value of the PSD set logscale x set ylabel "log_{10} PSD" set yrange [-5.5:0.5] -plot '%FILE1' using 1:2:3:4 with xyerrorbars, \ -'%FILE2' using 1:2:3:4 with xyerrorbars +plot '%FILE1' using 1:2:3:4 with xyerrorbars title "%LABEL1", \ +'%FILE2' using 1:2:3:4 with xyerrorbars title "%LABEL2" diff --git a/scripts/templates/timelag_freq.gp b/scripts/templates/timelag_freq.gp index bdf5b3f..3c48b32 100644 --- a/scripts/templates/timelag_freq.gp +++ b/scripts/templates/timelag_freq.gp @@ -2,8 +2,15 @@ set terminal png set termoption dash set output "%OUTPUTFILE" - -plot '%FILE1' using 1:2:3:4 with xyerrorbars\ -set logscale x +set title "%TITLE\n{/*0.7 %SUBTITLE}" +set xlabel "Temporal Frequency [days^{-1}]" set xrange [0.005:0.603] +set logscale x + +set ylabel "Lag [days]" + +# Draw line at origin set arrow from 0.005,0 to 0.603,0 nohead lt 3 lc rgb 'black' + + +plot '%FILE1' using 1:2:3:4 with xyerrorbars title "%LABEL1"