From: John H. <jdh...@ac...> - 2004-04-20 11:58:41
|
>>>>> "Peter" == Peter Juvan <pet...@fr...> writes: Peter> Q: Is it possible to change the default color scale of the Peter> matplotlib.matlab.pcolor plot? How? -Peter You can define your own colormap by subclassing matplotlib.colors.Colormap and then passing this to imshow in the cmap argument. Note that for the most part pcolor and imshow have the same functionality, but imshow is 1000 times faster for large grids. Compare pcolor_demo.py and pcolor_demo2.py in the examples dir which use pcolor and imshow respectively. Note, if you really need the functionality of pcolor over imshow (eg you want to set some properties on the rectangle patches), I can modify the pcolor argument list to use your custom colormap. If you define a new colormap (currently we have only jet and grayscale), please send it back to the list so I can include it. JDH |