|
From: Thomas S. <t.s...@fz...> - 2010-04-29 09:47:39
|
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.
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 Hills-2 wrote:
>
> On Wed, 28 Apr 2010, Thomas Sefzick wrote:
>
>>
>> 'filled boxes' may help:
>>
>> set style filled solid
>> plot 'datafilename' using 1:2 with boxes, '' using 1:3 with boxes
>
> Thanks Thomas. With boxes, I am limited to having the points at the
> centre of the box (unlike with fsteps, where it is to the right). Or is
> there another way?
>
> I have the difficulty that my samples are at irregular intervals, so it
> isn't possible to just shift the boxes to the left as a workaround.
>
>>
>> Mark Hills-2 wrote:
>> >
>> > When using steps/fsteps, is it possible to fill the area under the
>> line?
>> >
>> > I am plotting a histogram of resource consumption, and fsteps work
>> well.
>> > It means the area under the line matches the resource consumption over
>> > time.
>> >
>> > Using un-filled fsteps means it is difficult to compare two resources
>> on
>> > the same axes, as frequently one line 'disappears' behind the other.
>> > Unfortunately, filledcurves is not a good aproximation due to the low
>> > number of samples.
>> >
>> > The presence of other filled plots makes this feel like I am missing
>> > something. Is there a way to achieve filled steps/fsteps (or has anyone
>> > planned to implement this?)
>> >
>> > Many thanks
>> >
>> > --
>> > Mark
>> >
>> >
>> ------------------------------------------------------------------------------
>> > _______________________________________________
>> > gnuplot-info mailing list
>> > gnu...@li...
>> > https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>> >
>> >
>>
>>
>
> --
> Mark
>
> ------------------------------------------------------------------------------
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/Filled-steps-fsteps-tp28379369p28398548.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|