|
From: Mark H. <ma...@po...> - 2010-05-04 11:54:56
|
On Thu, 29 Apr 2010, Thomas Sefzick wrote:
> generate the internal data, which is used when plotting with 'fstep', by hand
> and
> write the datapoints into temporary files, which are then used for the final
> plot command.
Thanks for the tip. I'll try this when I get a moment.
Whilst pre-processing the input data could be made to work, in the long
term it would be beneficial if gnuplot were able to do this. Is anyone
working on implementing filled steps/fsteps within gnuplot? I would very
much like to see this feature.
Alternatively, does anyone have any advice if someone were to begin to
look at the source code with a view to implementing it?
> assuming, that you have one datafile with three columns (x,y1,y2):
>
> set term push
> set term dumb
> plot 'datafilename' using 1:($0>0?PLOT=PLOT.sprintf("%f %f\n%f
> %f\n",xlast,$2,$1,$2):PLOT=sprintf("%f %f\n",$1,$2), xlast=$1, $2)
> set print 'tempfile1.dat'
> print PLOT
> unset print
> plot 'datafilename' using 1:($0>0?PLOT=PLOT.sprintf("%f %f\n%f
> %f\n",xlast,$3,$1,$3):PLOT=sprintf("%f %f\n",$1,$3), xlast=$1, $3)
> set print 'tempfile2.dat'
> print PLOT
> unset print
> set term pop
> plot 'tempfile1.dat' using 1:2 with filledcurves x1, 'tempfile2.dat' using
> 1:2 with filledcurves x1
>
> for 'steps' use
>
> ...
> plot 'datafilename' using 1:($0>0?PLOT=PLOT.sprintf("%f %f\n%f
> %f\n",$1,ylast,$1,$2):PLOT=sprintf("%f %f\n",$1,$2), ylast=$2, $2)
> ...
> plot 'datafilename' using 1:($0>0?PLOT=PLOT.sprintf("%f %f\n%f
> %f\n",$1,ylast,$1,$3):PLOT=sprintf("%f %f\n",$1,$3), ylast=$3, $3)
> ...
>
> instead.
--
Mark
|