beginner help: color map plot from raw data

I’m attempting to plot the distribution of bond angles in protein structures (the best-known example: http://en.wikipedia.org/wiki/Ramachandran_plot). I have the raw data as a collection of x,y,z data, where x and y are integers between -180 and 180, and z is a floating-point value. (Right now, this data is pure Python objects, but I can convert it to NumPy arrays if that would be easier.) I would like to plot this as a continuous color map inside a wxPython window, and also overlay the discreet data points for a separate protein. It doesn’t really matter what combination of colors I use for this - there appear to be many built-in color maps that would be suitable. I’m pretty sure this is possible, based on looking at the examples, but I have no clue how to go about this - it doesn’t help that all of the examples appear to use the pylab interface. Any suggestions?

thanks,

Nat

Hi Nat

For embedding matplotlib in wx you can have a look at the examples
embedding_in_wx*.py on
http://matplotlib.sourceforge.net/examples/user_interfaces/ .

Furthermore you can have a look a the screenshots/examples of imshow and
contourf for the background and plot / scatter for the discrete data points.
These functions are included in pylab and also available as methods of an
axes instance, e.g.
self.axes = self.figure.add_subplot(111)
self.axes.contourf(X, Y, Z)
# and
self.axes.plot(x, y)

best regards Matthias

···

On Tuesday 16 June 2009 21:29:29 Nathaniel Echols wrote:

I'm attempting to plot the distribution of bond angles in protein
structures (the best-known example:
http://en.wikipedia.org/wiki/Ramachandran_plot). I have the raw data as a
collection of x,y,z data, where x and y are integers between -180 and 180,
and z is a floating-point value. (Right now, this data is pure Python
objects, but I can convert it to NumPy arrays if that would be easier.) I
would like to plot this as a continuous color map inside a wxPython window,
and also overlay the discreet data points for a separate protein. It
doesn't really matter what combination of colors I use for this - there
appear to be many built-in color maps that would be suitable. I'm pretty
sure this is possible, based on looking at the examples, but I have no clue
how to go about this - it doesn't help that all of the examples appear to
use the pylab interface. Any suggestions? thanks,
Nat