The ColorLegend class has this constructor:
colorscale,n) |
The full value range of the colorscale is divided in n subranges, each half range being divided in n/2 subranges. This sets n+1 limits of the subranges. The n colors of the subranges correspond to the subrange middle value.
ColorLegend objects have the following methods:
oflow=None) |
val) |
The color is that of the subrange holding the value. If the value matches a subrange limit, the lower range color is returned. If the value falls outside the colorscale range, a runtime error is raised, unless the corresponding underflowcolor or overflowcolor attribute has been set, in which case this attirbute is returned. Though these attributes can be set to any not None value, it will usually be set to some color value, that will be used to show overflow values. The returned color is a tuple of three RGB values in the range 0-1.