Matthias Michler wrote: > Hello list, > > playing with the example program (contourf_with_extended_colorbar.py) I also > send in the last email and using random numbers I get the attached picture > (contourf_vs_contour_different_behavior.png), which shows up that contour and > contourf lines don't coinside. I thought that contour and contourf generate > the same lines and differ only in plotting. Is this just due to the random > numbers as an exceptional case or is this a bug?
It is a bug that is inherent in the underlying contouring code. The code for filled contours is quite different, and more complicated, than for unfilled contours. I have been thinking about ways of solving this problem, unifying the line-finding methods for filled and unfilled contours, but it is not at all trivial. > > > Second question: Could it be useful to add two kwargs 'over_color' > and 'under_color' to contourf in order to allow specification of a extended > ListedColormap by kwarg 'colors' and these two colors? > I tried to include this in the attached patch > (added_under_and_over_color_to_ContourSet.patch) and use it in the example > contourf_with_extended_colorbar_new.py. But it dosn't work completely > correct. Although the over color is correctly set to cyan in the cmap > In [14]: my_contourf.cmap._rgba_over > Out[14]: (0.0, 1.0, 1.0, 1.0) > red is used for values above the colormap-bounds. > > Thanks in advance for any comments and hints. I need to look at your patch--but a priori, I am a bit worried about the tendency of APIs to get more and more complicated, with more and more kwargs, as time goes on. Eric > > best regards Matthias > > On Thursday 09 April 2009 13:16:55 Matthias Michler wrote: >> 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.htm >> l 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 ------------------------------------------------------------------------------ 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