Hello Eric, Hello list, On Tuesday 14 April 2009 20:39:06 Eric Firing wrote: > Matthias Michler wrote: [...] > > 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.
You are right too many kwargs can be a problem and I don't claim that this is the right solution at this point, but I was somehow unhappy with my first solution, where one needs to generate ones own ListedColormap. And this is only due to the fact that one needs a colour for upper and lower values otherwise everthing is handled by passing 'colors' to contourf. best regards Matthias ------------------------------------------------------------------------------ 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