Obtaining set_under and set_over colors

Hi folks,

Is there a way to get the colors assigned with set_under and set over besides looking at _rgba_set_under and _rgba_set_over?

Sample code fragment:
from pylab import *
cmap = cm.get_cmap('jet')
cmap.set_over('wheat')

# Make some kind of polygon to fill
x = ...
y = ...
# Use the over-the-top color to fill the polygon
clrstr = rgb2hex(cmap._rgba_over[:3])
fill(x,y,clrstr)

···

--
Ms. Carol A. Leger
SRI International Phone: (650) 859-4114
333 Ravenswood Avenue G-273
Menlo Park, CA 94025 e-mail: leger@...392...

Carol Leger wrote:

Hi folks,

Is there a way to get the colors assigned with set_under and set over besides looking at _rgba_set_under and _rgba_set_over?

Sample code fragment:
from pylab import *
cmap = cm.get_cmap('jet')
cmap.set_over('wheat')

# Make some kind of polygon to fill
x = ...
y = ...
# Use the over-the-top color to fill the polygon
clrstr = rgb2hex(cmap._rgba_over[:3])
fill(x,y,clrstr)

There is no better way at present. I could add getters for these properties if there is sufficient need; it never occurred to me that anyone would need getters for them, and I did not want to clutter the API.

Did you resolve the problem you were having earlier with the colorbar diplay of the "under" value?

Eric