|
From: Mark H. <ma...@po...> - 2010-04-27 16:51:13
|
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 |
|
From: Thomas S. <t.s...@fz...> - 2010-04-28 10:58:19
|
'filled boxes' may help: set style filled solid plot 'datafilename' using 1:2 with boxes, '' using 1:3 with boxes 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 > > -- View this message in context: http://old.nabble.com/Filled-steps-fsteps-tp28379369p28387260.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2010-04-28 19:54:26
|
Mark Hills wrote: > When using steps/fsteps, is it possible to fill the area under the line? No. > Using un-filled fsteps means it is difficult to compare two resources on > the same axes, as frequently one line 'disappears' behind the other. But if you fill them, you run a significant chance of making them _impossible_ to compare, because a filled bar will completely vanish behind a higher one. |
|
From: Mark H. <ma...@po...> - 2010-04-28 20:10:53
|
On Wed, 28 Apr 2010, Hans-Bernhard Br?ker wrote: > Mark Hills wrote: > > When using steps/fsteps, is it possible to fill the area under the line? > > No. > > > Using un-filled fsteps means it is difficult to compare two resources on the > > same axes, as frequently one line 'disappears' behind the other. > > But if you fill them, you run a significant chance of making them _impossible_ > to compare, because a filled bar will completely vanish behind a higher one. In my case the graph I would like to be filled is always below, or equal to, the other graph. eg. I want to compare total I/O (line) with cached I/O (filled). The result of using a filled graph and a line makes the graph very clear to interpret. Nevertheless, is it not always the case that the ordering can be used to draw the line over the filled area? Thanks -- Mark |
|
From: Mark H. <ma...@po...> - 2010-04-28 20:00:30
|
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 |
|
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.
|
|
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
|