gcalderone/Gnuplot.jl

How to plot a data file?

linwaytin opened this issue · 2 comments

I know the existence of gnuplot for a long time, but only started using it recently. It seems more powerful than I thought and still under active development. One complaint is that it cannot deal with two files together. For example it is common that I want to subtract a column from another column from another file. gnuplot cannot do this directly. Thus I'm happy to see a combination of julia and gnuplot. Thank you.

One quick question: What is the standard way to do plot 'datafile' using 1:2 in this package?

Maybe the best way is to first read your datafile and then if you want to use that syntax, follow the documentation as in here:
https://gcalderone.github.io/Gnuplot.jl/v1.4.1/advanced/#Named-datasets

Personally, I prefer to do most of the data handling in Julia and simply pass components to @gp or @gps,
as in the examples here:

https://lazarusa.github.io/gnuplot-examples/dev/examples/generated/2d/lines/line/

Thank you! I also found @gp "plot 'filename' using 1:2" can work, which might work in some simple cases.