I cannot get the contourf extended color map ranges to show up in the plot.
the extend option of contourf states:

extend = 'neither', 'both', 'min', 'max'
      Unless this is 'neither' (default), contour levels are
      automatically added to one or both ends of the range so that
      all data are included.  These added ranges are then
      mapped to the special colormap values which default to
      the ends of the colormap range, but can be set via
      Colormap.set_under() and Colormap.set_over() methods

The code at the of this message produces a plot with color bar extensions that are the end colors of the bone colormap and not red and green. The colorMap._rgba_over value is red and the colorMap._rgba_under value is green, but this is not reflected in the plot.
Any idea what I am doing wrong?
I am using matplotlib 0.91.1

--Jim

figure()
colorMap = cm.bone
colorMap.set_over('r')
colorMap.set_under('g')
CS = contourf(X, Y, Z, 10,cmap=colorMap,origin=origin, extend = 'both')
cbar = colorbar(CS)
savefig('contourf_demo1')


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to