Here are my notes for how to create data plots using various tools.
plotutils
Make sure it’s installed with something like this:
sudo yum install plotutils
From the package description:
The GNU plotutils package contains software for both programmers and technical users. Its centerpiece is libplot, a powerful C/C++ function library for exporting 2-D vector graphics in many file formats, both vector and raster. It can also do vector graphics animations. Besides libplot, the package contains command-line programs for plotting scientific data. Many of them use libplot to export graphics.
The documentation is in stupid info page format. Some nice person has webified it here.
The simplest usage is something like this:
ls -l /xed | awk '{print $7,$5}' | sort -n | graph -T png > test.png
This plots the size of files against what day of the month they were touched on. Not useful but it illustrates the kind of data that goes to the graph command and how it is used.
-
--bitmap-size="800x300" = Size of finished bitmap file (if bitmap).
-
-[x|y] <Min> <Max> = Limit of plot.
-
-L <Label> = Top label (or title).
-
-I e = Error bars. Data should be in "x y error" format (triples).
-
-[X|Y] <Label> = Axis labels.
-
-m <N> = Line mode (N can be -1=invisible, 1=solid, 2=dotted, 3=dotdash, 4=shortdash, 5=longdashed)
-
-S <n> <s> = Symbol marker (see below)
-
-a = Abscissa values are auto generated. This allows for plotting a single stream of Y values. The X values will just be 1,2,3,…N.
-
-l <x|y> = Logarithmic axis.
-
-g <n> = Grid style (0= none, 1= pair of axis and ticks and labels, 2= add box, 3=add gridlines).
1. dot, 2. plus, (+) 3. asterisk (*) 4. circle 5. cross 6. square 7.
triangle 8. diamond 9. star 10. inverted triangle 11. starburst
12. fancy plus 13. fancy cross 14. fancy square 15. fancy diamond
16. filled circle 17. filled square 18. filled triangle 19. filled
diamond 20. filled inverted triangle 21. filled fancy square
22. filled fancy diamond 23. half filled circle 24. half
filled square
25. half filled triangle 26. half filled diamond 27. half filled
inverted triangle 28. half filled fancy square 29. half filled
fancy diamond 30. octagon 31. filled octagon
outputs_2_columns_of_numbers.py | graph --bitmap-size="2400x1800" \
-L "Example Title" \
-X "seconds" \
-Y "excitement" \
-l y \
-x 0 32 8 -y .1 100 \
-T png \
> latency-c.png
gnuplot
The problem with gnuplot is that it requires that you prepare data files ahead of time. This precludes it from simple use with pipes (as far as I know).