I have 2 float arrays of the same dimension which I use to generate a 3rd array, again of the same dimension, containing integers from a small set (I obtain the 3rd array via clustering in the 2 dimensional space of points obtained as values from the same location in the initial 2 arrays). I'd like to do a scatter plot using scatter, with x-axis values as values from the first array, y-values as values from the second array and color of the points corresponding to the integer in the 3rd array (so far so good; I can do that much). Then I'd like to plot an image using imshow of the 3rd array with colors corresponding to those in the scatter plot. I can generate the image with imshow ok but can't the colors to match those in the scatter plot. Here's a snippet (assume array1,array2, and array3 are 2D arrays):
hot() scatter(array1.ravel(), array2.ravel(), c = numpy.array(array3.ravel(),float)) imshow(array3) show() The main problem is that I can't figure out how to force the plot colors for imshow to correspond to those in scatter. Thanks for any thought or suggestions. Cheers, -- KY ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users