From: Mikhail K. <mko...@gm...> - 2012-11-21 21:27:47
|
Hi all. Does anyone by a chance knows a less crude way to get a dataset plotted as "filledcurves" with gradient fill, other than used by me? My code and the plot are attached. With my code only one dataset is possible obviously, and i would like to be able plot more than one. thank you, Mikhail set term pngcairo enhanced font "Helvetica,12" size 500,200 set datafile separator "\t" set xdata time set timefmt "%b %d, %Y %H:%M" set xrange ["Oct 27, 2012 00:00" to "Nov 27, 2012 00:00"] set format x "%b %d" set table set output "/dev/null" set timefmt "%Y-%m-%d %H:%M:%SZ" plot \ "Loven_Wind_data.txt" \ using 1:6 unset table X_MAX=GPVAL_X_MAX X_MIN=GPVAL_X_MIN DATA_X_MAX=GPVAL_DATA_X_MAX DATA_X_MIN=GPVAL_DATA_X_MIN set output "TEST01-10-sensor_data-11-temperature.png" set lmargin at screen 0.1 set rmargin at screen 0.95 set tmargin at screen 0.90 set bmargin at screen 0.10 A = -20 B = 25 set yrange [A to B] set multiplot unset ytics unset y2tics unset xtics set key off set pm3d map set palette defined ( -20.0 "black", -5.0 "blue", 0.0 "white", 10.0 "red", 25.0 "black" ) unset colorbox set isosamples 200 splot y notitle unset pm3d if (X_MAX>DATA_X_MAX) \ set timefmt "%s"; \ set object 1 rectangle from DATA_X_MAX, graph 0 to graph 1, graph 1 fc rgb "white" fs solid 1.0 border; \ plot 0/0 notitle; \ unset object 1 if (X_MIN<DATA_X_MIN) \ set timefmt "%s"; \ set object 1 rectangle from graph 0, graph 0 to DATA_X_MIN, graph 1 fc rgb "white" fs solid 1.0 border; \ plot 0/0 notitle; \ unset object 1 set timefmt "%Y-%m-%d %H:%M:%S" plot \ "Loven_Wind_data.txt" \ using 1:($5>0 ? $5 : 0):(25) w filledcurves below fc rgb "white" notitle, \ "" using 1:($5<=0 ? $ 5 : 0):(-20) w filledcurves above fc rgb "white" notitle set ylabel "Air temperature, C" set border set ytics -20,10 set xtics set grid plot \ "Loven_Wind_data.txt" \ using 1:5 w l lt -1 notitle unset multiplot unset output |