Gnuplot is a tool that can generate script-driven graphics, including plots of functions and data samples. Gnuplot contains a useful scripting language that allows you to process raw data files while producing graphics. For example, you can plot ratios of different values contained in raw data files.
If you would like to plot the ratio of data belonging to two different columns in a data file:
1 10 20 2 20 25 . . .
gnuplot> plot "my.txt" using 1:($3/$2) title "ratio of the 3rd col over the 2nd col" with lp
If you would like to plot the ratio of data belonging to two different data files:
1 10 2 20 . . .
1 11 2 30 . . .
gnuplot> plot "< join A.txt B.txt" using 1:($3/$2) "ratio of data in B.txt over data in A.txt" lp
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to back up a WordPress website to remote cloud storage from the Linux command line - November 24, 2015
- How to access Dropbox from the command line in Linux - November 22, 2015
- How to send email notifications using Gmail SMTP server on Linux - November 9, 2015