Hi Bala, you may want to have a look at the gallery including many example pictures on http://matplotlib.sourceforge.net/gallery.html especially the follwing two examples might be of interest for you http://matplotlib.sourceforge.net/examples/pylab_examples/contourf_demo.html http://matplotlib.sourceforge.net/examples/api/colorbar_only.html
I used these two to set up the attached example, which is very close to what you want. Question for developers: Could it be useful to add two kwargs 'over_color' and 'under_color' to contourf in order to allow specification of a ListedColormap by kwarg 'colors' and these two colors? best regards Matthias On Thursday 09 April 2009 10:34:27 Bala subramanian wrote: > Dear Matthias, > > Thanks a ton. This is a great help for me. Is there any way to specify a > color range. By default it has produced different colors at the interval of > 0.3, i need bit higher range like < 1 , 1 to 1.5, 1.5-2.0, 2-2.5, > 2.5. > Also i need to set this range dynamically. Kindly write me how i can do > this. > > Thanks in advance, > Bala > > On Thu, Apr 9, 2009 at 9:08 AM, Matthias Michler <matthiasmich...@gmx.net>wrote: > > Hi Bala, > > > > I added a small example showing up your matrix in order to have a running > > example, where you can specify your needs. > > > > In the program contourf could be replaced by contour or imshow - see > > help / > > docu / examples on the web > > The colormap can be specified with the kwarg "cmap" : e.g. > > pyplot.cm.gray. > > > > regards Matthias > > > > On Wednesday 08 April 2009 14:08:13 Bala subramanian wrote: > > > Friends, > > > > > > I have a pairwise comparison of 50 data points. The comparison is based > > > > on > > > > > the mean square deviation between the points. I want to plot this data > > > by specifying different colors for diffrent ranges of mean square > > > deviation. Any suggestion would be of much help to me. I have attached > > > the data file with the mail. > > > > > > Thanks, > > > Bala > > > > ------------------------------------------------------------------------- > >----- This SF.net email is sponsored by: > > High Quality Requirements in a Collaborative Environment. > > Download a free trial of Rational Requirements Composer Now! > > http://p.sf.net/sfu/www-ibm-com > > _______________________________________________ > > Matplotlib-users mailing list > > Matplotlib-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
contourf_with_extended_colorbar.py
Description: application/python
------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users