I am a very lost gnuplot.py refugee. I hung in there as long as I could but 
sadly, gnuplotpy does not run on my machine so I managed, somehow to install 
new pythons, matplotlib, numpy, etc. and am up and running. Actually now trying 
out Canopy, which was even easier than running from the shell on OS X.

I am trying to plot some data by looking through the examples, finding 
something close to what I need and modifying it to work for the data I want to 
plot but I am lost and overwhelmed. Any pointers at all would be greatly 
appreciated. What I want to do surely is easy but I am really new at this and 
have been away from python a long time. I am reading the docs as fast as I can.

The task at hand:

I have 4 lines that I want to plot on top of each other (different colors) and 
the data, rather than being generated with an algorithm in python would be read 
in from a file.

A plot that looks close is #5 from plotfile_demo.py (seen here: 
http://matplotlib.org/mpl_examples/pylab_examples/plotfile_demo_04.png 
<http://matplotlib.org/mpl_examples/pylab_examples/plotfile_demo_04.png>)

but that is confusing as it seems to open some file that I can’t seem to find 
in my install called 'msft.csv' and I am not sure the way it is doing the plot 
is all that customizable as the code for it is tiny and the routine it calls 
seems to do a lot of formatting automatically.

The easiest way to explain what need to do is to give a simplified task that is 
analogous, such as plot 4 individual simultaneous lines to show how they 
overlap and intersect and also their global motion, much like showing, say, the 
movement and relationship of distinct musical lines in an 4 voice choir(SATB) 
piece (that isn’t what I am doing but it is darned close).

In short I want to have a data file that has:

event_start_time, event_duration, frequency_value(for now midi will do), voice 
(perhaps specified with a number like: 1=soprano, 2=alto, 3=tenor, 4=bass each 
voice in a different color)

So the data would like so (quick & totally random at the moment):

0.0, 2.5, 60, 1 
2.0, 1.5, 62, 4 
4.0, 5.0, 64, 2 
6.0, 3.5, 65, 3 
8.0, 1.5, 67, 1 
10.0, 2.0, 69, 4 
12.0, 5.5, 71, 3 
14.0, 3.0, 70, 2 
16.0, 2.0, 72, 1 
18.0, 1.0, 74, 4 
20.0, 0.5, 75, 3 
22.0, 1.5, 77, 2 
24.0, 0.5, 79, 1 

The legend just like in the above example and the x axis would be time and y 
axis frequency. Then I would have to figure out tic values and all that. I have 
been away from the whole world of python for a long while but I used to do this 
with great easy and flexibility in gnuplot.py even if the graphs did not look 
as lovely as these matlabplotlib ones do but this package is really new to me 
and I am somewhat overwhelmed by the enormity of matlabplotlib. Very sorry for 
such a newbie query but I feel like if i could get this going I would at least 
know which aspects of the package I need to read up on.










------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to