can't make filledcurves work

can't make filledcurves work

Post by patpro ~ P » Thu, 20 Aug 2009 19:31:01


Hello,

I'm trying to use 'filledcurves' on a graph, but I can't make it work.
The 'filledcurves' option works on my version of gnuplot, I've tested
few examples successfully.

I'm using:

Version 4.2 patchlevel 3
last modified Mar 2008
System: Darwin 9.8.0

Here is my script:

set terminal png size 1280,800
set output "iopattern.png"
set format xy "%g"
set xdata time
set timefmt "%Y %b %d %H:%M:%S"
set format x "%Hh %d"
set ylabel "%"
set yrange [0:100]
set xlabel "hour day"
set title ""
plot "< awk '! /^TIME/' ~/20090819_iopattern" using 1:($6+$7):($8) \
smooth csplines with filledcurves y1=0 t "Random-access", \
"< awk '! /^TIME/' ~/20090819_iopattern" using 1:7:($8) \
smooth csplines with filledcurves y1=0 t "Sequential-access"

And my data file ~/20090819_iopattern looks like this:

TIME MOUNT %RAN %SEQ COUNT MIN MAX AVG KR KW
2009 Aug 19 12:22:24 / 78 22 97 4096 1048576 95939 12 9076
2009 Aug 19 12:22:34 / 100 0 1 4096 4096 4096 4 0
2009 Aug 19 12:22:44 / 100 0 1 4096 4096 4096 0 4
2009 Aug 19 12:22:54 / 93 7 16 4096 8192 7424 0 116
2009 Aug 19 12:23:04 / 100 0 12 4096 8192 4437 52 0
2009 Aug 19 12:23:14 / 100 0 1 4096 4096 4096 4 0
2009 Aug 19 12:23:24 / 100 0 6 4096 8192 6144 8 28
2009 Aug 19 12:23:34 / 0 0 0 0 0 0 0 0
2009 Aug 19 12:23:44 / 100 0 1 4096 4096 4096 0 4
2009 Aug 19 12:23:54 / 100 0 16 4096 8192 5376 36 48

with the "TIME MOUNT %RAN %SEQ..." line repeating every 10 lines.

Gnuplot returns no error, and iopattern.png shows 2 curves: one for
Random-access and one for Sequential-access. But no filledcurves.

Any idea ?

regards,
patpro

--
A vendre ! http://www.yqcomputer.com/
 
 
 

can't make filledcurves work

Post by Zolta » Thu, 20 Aug 2009 22:48:43

On 19 Aug., 12:31, patpro ~ Patrick Proniewski

> ersion 4.2 patchlevel 3 >> ast modified Mar 2008> > ystem: Darwin 9.8.>
> Here is my script>
> set terminal png size 1280,80>
> set output "iopattern.png>
> set format xy "%g>
> set xdata tim>
> set timefmt "%Y %b %d %H:%M:%S>
> set format x "%Hh %d>
> set ylabel "%>
> set yrange [0:100>
> set xlabel "hour day>
> set title ">
> plo< "< awk '! /^TIME/' ~/20090819_iopattern" using 1:($6+$7):($8) \> > mooth csplines with filledcurves y1=0 t "Random-access>, \ <> < awk '! /^TIME/' ~/20090819_iopattern" using 1:7>($8) \
> mooth csplines with filledcurves y1=0 t "Sequentia>-a>cess"
>
> And my data file ~/20090819_iopattern looks l>ke>this:
>
> TIME MOUNT %RAN %SEQ COUNT IN >MAX VG KR KW
> 2009 Aug 19 12:22:24 / 78 22 7 >096 1048576 5939 12 9076
> 2009 Aug 19 12:22:34 / >0 1 4096 4096 4096
> 2009 Aug 19 12:2>:44 / 00 1 4096 4096 4096
> 2009>Aug 19 12:22:54 / 93 6 4096 8192 7424 >116
> 2009 Aug 19 12:23:04 / 00 2 4096 8192>4437 52
> 2009 Aug 19 12:23:14 / 00 1>4096 4096 4096
> 2009 Aug 19 12:23:24 />00 6 4096 8192 6144 28
> 2009 Aug >9 12:23:34 / 0
>
> with the "TIME MOUNT %RAN %SEQ..." line repeating every 10 l>ne>.
>
> Gnupl>t >eturns no e>ror, and >opattern.png shows 2 curves: one for
> Random-access and one for Sequential-access. But no filledcurves.
>
> Any idea ?
>
> regards,
> patpro
>

I think, as a general remark, I would say that any "error", etc.
should be presented with a minimal script, so that people can track
the problem much more easily. But that's not the real issue. The
problem is that you specified smooth csplines in the plot, and
filledcurves doesn't work with that. (Don't ask me, why!) If you drop
that, you'll get filled curves, though they will have only as many
points as many are in your data file. The way around this obstacle is
to plot the data to file first, by setting
set table 'something.dat'
plot ...
unset table
and then plotting something.dat. Now, you'll get a lot of error
messages, if you use your original plot command, so you should use the
0th column, instead. (Your data are 10 seconds apart, so it shouldn't
be a problem.)
I hope this helps,
Zolt

 
 
 

can't make filledcurves work

Post by patpro ~ P » Thu, 20 Aug 2009 23:51:43

In article
< XXXX@XXXXX.COM >,



yep, it looks like a rendering issue. If I change the fill pattern, the
look of the resulting curve changes.


Ok, I see what you mean.


You say I should drop the whole date&time thing, and rely on the
auto-incrementation of column $0 to provide X?


patpro

--
A vendre ! http://www.yqcomputer.com/
 
 
 

can't make filledcurves work

Post by Zolta » Fri, 21 Aug 2009 00:30:42

> You say I should drop the whole date&time thing, and rely on the

Yes, basically. And I think, it sort of connects to your original
problem. I believe, the problem might be that smooth doesn't work with
time data. But if you use the 0th column, you could set up the xtics
easily, for your times are really regular.
Cheers,
Zolt
 
 
 

can't make filledcurves work

Post by patpro ~ P » Fri, 21 Aug 2009 01:03:31

In article
< XXXX@XXXXX.COM >,



when using smooth bezier, filledcurves works ok.


hmmm well, my times might not be so regular.
I've made many attempts to use the table and the 0th column, but I was
unsuccessful. That's not very important because I realize I might have
to find a better representation for my data.
Even with only one point every 10 sec, it's complicated to find a nice
way to display a full day of sampling on a reasonably sized graph.

thank you,
patpro

--
A vendre ! http://www.yqcomputer.com/