Simple command line plotting tool

I made a simple command line plotting tool : It’s available on my github

To use it you should first install python PyX, a very nice plotting tool for python. PyX is great but sometimes you just want to plot something fast without editing a .py file. Use splot !

The syntax is very simple : file.txt file.txt ylabel='$z$' file.txt ylabel='$z$' color=red file.txt ylabel='$z$' color=red style=_ line=3 file.txt file2.txt file3.txt

It also uses Python’s eval() function to allow for more complex plotting. You can give x and y as a function of the numbers in A, the data stored in your text file. E.g : file.txt x=A[:,0]/A[:,1] y='sqrt(A[:,2]/A[:,4])'

There are also shortcuts : file.txt y=1
is equivalent to file.txt x=0 y=1
itself equivalent to file.txt x=A[:,0] y=[:,1]

This entry was posted in Code, Misc. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *