I'm still getting used to the new Graphics, but there is one thing that is driving me crazy:
The COLORBAR function needs a "target" Graphics object to figure out which color palette to use. However, although IMAGE and CONTOUR functions have min_value and max_value paramters that you can use to change the dynamic range of color scale in the "target" plot, these changes are not reflected in the colorbar.....it still shows the actual min and max ranges of the original data. Here is a simple example:
1) First, this works OK:
data = dist(300,300)
image = IMAGE(data,rgb_table=13,dimension=[500,500])
cb = COLORBAR(target=image)
2) Now truncate the color range, but the colorbar still ranges from MIN(data) to MAX(data):
image = IMAGE(data,rgb_table=13,dimension=[500,500],min_value=100,max_value=200)
cb = COLORBAR(target=image)
3) And, even worse, expand the color range and the colorbar goes black....
image = IMAGE(data,rgb_table=13,dimension=[500,500],min_value=-100,max_value=500)
cb = COLORBAR(target=image)
I've tricked colorbar for case #2 by clipping the data: data=((data > 100)
Any suggestions appreciated!
|