From: rudra on
Dear friends,
I have several 2 column file which i need to plot in one figure.
I generally do it using gnuplot, but when there is several files, its
hard to do manually.
can you tell me how i can load a file in python and plot several file
in one figure(as it is done via replot in gnuplot)?
I am novice in python, but tried the matplotlib...with no luck.
will u plz help?
From: Tim Harig on
On 2010-07-10, rudra <bnrj.rudra(a)gmail.com> wrote:
> Dear friends,
> I have several 2 column file which i need to plot in one figure.
> I generally do it using gnuplot, but when there is several files, its
> hard to do manually.
> can you tell me how i can load a file in python and plot several file
> in one figure(as it is done via replot in gnuplot)?
> I am novice in python, but tried the matplotlib...with no luck.
> will u plz help?

It would really help to see a representative sample of the data that you
are working with and what you want the plot to look like. Other then that,
you likely just want to load the data from the file into lists (ordered
together, lists with sublists, or potentially into a list ofrepresentative
objects). You can then simply open a pipe to gnuplot and send it the
commands it needs to create your plot. You could also just create a single
comined file with all of the information to plot and then use it to create
you plots.
From: rudra on
On Jul 10, 1:13 pm, Tim Harig <user...(a)ilthio.net> wrote:
> It would really help to see a representative sample of the data that you
> are working with and what you want the plot to look like.

The data looks something like that:
0.70711 -2.57266
1.00000 0.16694
1.22474 -0.15287
1.41421 0.28025
1.58114 -0.03806
1.73205 0.05049
1.87083 -0.01686
2.00000 -0.02918
2.12132 0.00246
2.12132 0.13460
2.23607 -0.01552
2.34521 -0.00033
2.44949 0.00550
2.54951 -0.00827
2.54951 -0.01189
2.73861 0.00397
2.82843 0.04685
2.91548 -0.00115
2.91548 -0.00951
3.00000 0.00069
3.00000 0.00214

and there are several such file.
I need two types of plotting:
1) multiple plot in same figure
2) grid of plots with different data in different grid