perdido (sent by Nabble.com) wrote:
> I must do a graph like this: x-->packet size, y-->% and i have for
> example this sizes:
>
> 2,3,4,4,2,4,3,4,2,4
You'll have to change that file into a format gnuplot can use: each
number on a line of text of its own.
> The solution is:
>
> 2--->30%
> 3--->20%
> 4--->50%
>
> how can i do this?
Only with help from outside gnuplot. gnuplot isn't meant to be a data
processing program. In the case at hand, you need external tools to
count the number of entries in the file. In the simplest imaginageable
case, this would do it:
count=`wc -l data` # use external tool 'wc' to count items
set boxwidth 1
plot 'data' using 1:(100.0/count) smooth frequency with boxes
|