7 #ifndef __exam_gnuplot_h__
8 #define __exam_gnuplot_h__
12 #define KEYBOT "inside bottom left vertical reverse Left"
13 #define KEYTOP "inside top right vertical Right"
22 #define GNUPLOT_PDFILE "\
23 set term pdfcairo size %lf,%lf font '%s,%d'\n\
26 #define GNUPLOT_PDFILE_BASE 100
29 #define GNUPLOT_PERBNO "\
30 # begin with the variable stuff that changes per data file\n\
31 if (%d) { fringe='{/:Bold %s}'; }\n\
32 else { fringe='%s'; }\n\
34 set xrange [%lf:%lf]\n\
35 ampn=%lf; ampx=%lf; snrn=%lf; snrx=%lf\n\
36 ampcoh=%lf # 95%% coherence seg. time\n\
37 snrcoh=%lf # max snr seg. time\n\
39 #define GNUPLOT_PERBNO_BASE 300
42 #define GNUPLOT_LINETYPES 9
43 #define GNUPLOT_SETTINGS "\
44 ampytics='%%5.2f' # must be same width so boxes line up\n\
45 snrytics='%%5.0f' # must be same width so boxes line up\n\
47 set xtics border mirror in scale 1,0.5\n\
48 set ytics border mirror in scale 1,0.5\n\
51 set grid xtics ytics nomxtics nomytic\n\
53 # override linetypes for clarity below\n\
54 # 1:amp 2:fitaps 3:fitapo 4:fitaso\n\
55 # 5:snr 6:fitsnr 7:fit2p8 8:fit2p7\n\
56 set lt 1 lw %d %s ps 1 pt 22 lc rgb '%s'\n\
57 set lt 2 lw %d %s ps 1 pt 0 lc rgb '%s'\n\
58 set lt 3 lw %d %s ps 1 pt 22 lc rgb '%s'\n\
59 set lt 4 lw %d %s ps 1 pt 0 lc rgb '%s'\n\
60 set lt 5 lw %d %s ps 1 pt 22 lc rgb '%s'\n\
61 set lt 6 lw %d %s ps 1 pt 0 lc rgb '%s'\n\
62 set lt 7 lw %d %s ps 1 pt 0 lc rgb '%s'\n\
63 set lt 8 lw %d %s ps 1 pt 0 lc rgb '%s'\n\
66 #define GNUPLOT_SETTINGS_BASE 900
69 #define GNUPLOT_TWOPANEL_HEAD_BLK "\
71 set multiplot title fringe\n\
77 unset object; unset label\n\
78 if (%d&&snrcoh>0) {# labels\n\
79 set label 1 'SNR Max. %.1lf' at %lf,%lf left front tc rgb '%s'\n\
80 set object 1 rect from %lf,%lf to %lf,%lf fc rgb '%s' fs solid %lf\\\n\
84 set yrange [snrn:snrx]\n\
85 set xlabel 'Segmentation Time (sec)'\n\
86 set xtics format '%%3.0f'\n\
87 set ytics format snrytics\n\
90 #define GNUPLOT_TWOPANEL_HEAD_BLK_BASE 500
91 #define GNUPLOT_TWOPANEL_PLOT_SNR "\
92 plot df u 1:10 w line %s, \\\n\
93 df u 1:11 w line %s, \\\n\
94 df u 1:12 w line %s, \\\n\
95 df u 1:5:6 w yerrorlines lt 5 tit 'SNR data'\n\
98 #define GNUPLOT_TWOPANEL_PLOT_SNR_BASE 300
99 #define GNUPLOT_TWOPANEL_MID_BLCK "\
101 set size 1.00,0.49\n\
103 unset object; unset label\n\
104 if (%d&&coh>0) {# labels and when plateau-slope best\n\
105 set label 2 'Amp. B.P. %.1lf' at %lf,%lf right front tc rgb '%s'\n\
106 set object 2 rect from %lf,%lf to %lf,%lf fc rgb '%s' fs solid %lf\\\n\
109 if (%d&&coh>0) {# labels\n\
110 set label 3 'Amp. Coh. %.1lf' at %lf,%lf left front tc rgb '%s'\n\
111 set object 3 rect from %lf,%lf to %lf,%lf fc rgb '%s' fs solid %lf\\\n\
114 set ylabel 'Amplitude'\n\
116 set yrange [ampn:ampx]\n\
117 set xtics format ''\n\
118 set ytics format ampytics\n\
122 #define GNUPLOT_TWOPANEL_MID_BLCK_BASE 700
123 #define GNUPLOT_TWOPANEL_PLOT_AMP "\
124 plot df u 1:7 w line %s, \\\n\
125 df u 1:8 w line %s, \\\n\
126 df u 1:9 w line %s, \\\n\
127 df u 1:3:4 w yerrorlines lt 1 tit 'Amp data'\n\
130 #define GNUPLOT_TWOPANEL_PLOT_AMP_BASE 300
133 #define GNUPLOT_CODA "\
140 #define GNUPLOT_CODA_BASE 100
double bot
Definition: exam_gnuplot.h:17
double lft
Definition: exam_gnuplot.h:17
double dens
Definition: exam_gnuplot.h:17
double x
Definition: exam_gnuplot.h:17
char * fc
Definition: exam_gnuplot.h:18
double rgt
Definition: exam_gnuplot.h:17
double top
Definition: exam_gnuplot.h:17
double y
Definition: exam_gnuplot.h:17
Definition: exam_gnuplot.h:16