load and plot from multiple file

R

rudra

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?
 
T

Tim Harig

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.
 
R

rudra

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top