« Return to Thread: Plotting exclusive values

Re: Plotting exclusive values

by Thomas Sefzick :: Rate this Message:

Reply to Author | View in Thread

you are plotting 'with filledcurves', that means that the space underneath the
curve down to the x-axis is filled.
if there is no curve, there is no filling, just white space.

to see that gnuplot behaves as expected plot 'with linespoints'

but if you want a connection between points over some undefined
points in between, then you need to filter your data outside gnuplot,
e.g.:

plot "< awk '{if (\$14 == 300) print NR \" \" \$0}' mem.log" using 1:7 linetype 1 title "foo" with filledcurves x1

Stepp wrote:
Hi there

I have data logged from top-command like

13013 name     20   0 16396  12m 1640 R   99  0.1   0:01.20 ./large 200 200 3  
13048 name     20   0 16396  10m 1640 R   99  0.1   0:01.20 ./large 300 300 3  
13052 name     20   0 16396  11m 1640 R   99  0.1   0:01.20 ./large 300 300 3  
13048 name     20   0 16396  15m 1644 R  100  0.1   0:07.20 ./large 300 300 3  
13013 name     20   0 16396  17m 1640 R   99  0.1   0:01.20 ./large 200 200 3  
13013 name     20   0 16396  10m 1640 R   99  0.1   0:01.20 ./large 200 200 3  
13052 name     20   0 16396  11m 1644 R  100  0.1   0:07.20 ./large 300 300 3  
13054 name     20   0 16396  11m 1644 R  100  0.1   0:07.20 ./large 300 300 3  
13048 name     20   0 16396  15m 1652 R  100  0.1   0:22.20 ./large 300 300 3  
13075 name     20   0  7208 4m 1576 R   97  0.0   0:02.90 ./large 500 500 0  
13081 name     20   0  9168 6m 1616 R   96  0.0   0:02.88 ./large 500 500 0  

and I want to plot the memory ($6) only for 200, 300 or 500 ($14) at a time.

I've tried starting with 300:

inp = "mem.log"
set xrange [0:]
plot     inp using ($14==300 ? $6 : 1/0) linetype 1 title "foo" with filledcurves x1

but this plots the not 300 values as 0. I want all not 300 values unplotted in the 300-plot so that there won't be empty places. How to? Need to say instead of '1/0' in using 'don't plot this value'.


I hope you understand and can help me.

Regards
Stepp

 « Return to Thread: Plotting exclusive values