|
From: John H. <jdh...@ac...> - 2004-11-30 21:00:03
|
>>>>> "Wendell" == Wendell Cropper <wcr...@uf...> writes:
Wendell> I have been trying to use pcolor() to display a grid with
Wendell> discrete values (1-4) that are changing over time. I'm
Wendell> generating a series of saved figures that also include a
Wendell> line graph of the sums of the 4 categories. The problem
Wendell> is that that mapping of numbers to colors isn't constant
Wendell> for the pcolor output. I changed the array from Float32
Wendell> (used out of habit) to integer and got the same type of
Wendell> result. It would also be nice to be able to use the same
Wendell> color mapping for both sub plots.
Wendell> I think (guess) that cmap=cm.jet controls the color
Wendell> scheme, but it isn't clear to me how to change that, what
Wendell> format it has, or why it seems to change with repeated
Wendell> calls to pcolor() inside the program.
It sounds to me like the color limits are being autoscaled with each
call to pcolor. cm.jet does define the color map, but the color
limits define the range of your data that correspond to the min and
max of the colormap.
See help(clim)
If after each call to pcolor, you manually set the clim, you should
have no problems.
JDH
Wendell> -------------------------------------------------------
Wendell> SF email is sponsored by - The IT Product Guide Read
Wendell> honest & candid reviews on hundreds of IT Products from
Wendell> real users. Discover which products truly live up to the
Wendell> hype. Start reading now.
Wendell> http://productguide.itmanagersjournal.com/
Wendell> _______________________________________________
Wendell> Matplotlib-users mailing list
Wendell> Mat...@li...
Wendell> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|