[Tutor] plotting several datasets and calling data from afar

Elaina Ann Hyde elainahyde at gmail.com
Mon Mar 26 11:38:25 CEST 2012


Hi everyone,
   I am trying to set up a code to do some plotting and before I get too
far I wanted to ask some structure questions.  Basically I want to tell
python to read 2 datasets, plot them on the same scale on the same x-y axis
, read a third dataset and match the name from the first dataset, then
label certain values from the third... complicating matters is that all
these data are part of much, much larger sets in seperate files, the paths
look like:
pathway1/namered.dat
pathway2/nameblue.dat
matchingfile.txt

so I do fopen on the matchingfile, read it with asciitable, and then I have
a column in that file called 'name' and a column called 'M', I sort the
file, return a subset that is interesting, and get name1, name2, etc for
every subset.  I want to make a plot that looks like:

plot pathway1/namered.dat and pathway2/nameblue.dat with label 'M' for
every value in the subset name1, each row[i] I need to assign to a seperate
window so that I get a multiplot with a shared x-axis, and stacking my
plots up the y-axis.  I do have multiplot working and I know how to plot
'M' for each subset.

The conceptual trouble has come in, how do I match 'name' variable of my
subset 'name1' with the plot I want to do for pathway1/namered.dat and
pathway2/nameblue.dat... the key feature that is the same is the 'name'
variable, but in one instance I have to match the 'name'+'red.dat' and in
the other the 'name'+'blue.dat'

Any ideas would be appreciated, thanks!
~Elaina Hyde

-- 
PhD Candidate
Department of Physics and Astronomy
Faculty of Science
Macquarie University
North Ryde, NSW 2109, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120326/2902dcde/attachment.html>


More information about the Tutor mailing list