Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scientific Plotting in Python

I have a large data set of tuples containing (time of event, latitude, longitude) that I need to visualize. I was hoping to generate a 'movie'-like xy-plot, but was wondering if anyone has a better idea or if there is an easy way to do this in Python?

Thanks in advance for the help, --Leo

like image 870
user100046 Avatar asked May 03 '09 01:05

user100046


2 Answers

get matplotlib

like image 52
Francis Avatar answered Oct 10 '22 16:10

Francis


The easiest option is matplotlib. Two particular solutions that might work for you are:

1) You can generate a series of plots, each a snapshot at a given time. These can either be displayed as a dynamic plot in matplotlib, where the axes stay the same and the data moves around; or you can save the series of plots to separate files and later combine them to make a movie (using a separate application). There a number of examples in the official examples for doing these things.

2) A simple scatter plot, where the colors of the circles changes with time might work well for your data. This is super easy. See this, for example, which produces this figure alt text http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/ellipse_collection.hires.png

like image 34
tom10 Avatar answered Oct 10 '22 17:10

tom10