0

I am trying to plot some simulated data, using a colormap to indicate absolute magnitude, and quiver vector length to indicate relative magnitude of the quantities. What I would like to do is set a threshold value, above which a different colormap will become active, and which can scale based upon the range of data that falls above the threshold.

For example, in the included image I have managed to combine two builtin colormaps into one, but it is still a linear scale that can only be characterized by its maximum and minimum values. What I would like to do is set a constant value to be the max of the blue-green segment, but the range of values in the yellow-red segment should range from this set constant value, to the maximum value in the data set. (Apparently my rep is not high enough to include images, probably making this difficult to understand)

I would also be happy to use two separate color schemes, but I need to find a way to enable each, only within a certain range of data.

Thank you for any help you can provide!

ncoish
  • 343
  • 1
  • 13
  • http://stackoverflow.com/questions/15399095/stacking-colormaps/15399564#15399564 or use `set_under` and `set_over` to do the plotting twice with the out of range values mapped to `alpha=0`. Post a link to the image you want, someone with highenough rep can edit it in for you. – tacaswell Nov 11 '13 at 20:47
  • although, the issue here isn't really the color map, its you want a very non-linear normalization function. You might want to sub-class `matplotlib.colors.Normalize` as well. – tacaswell Nov 11 '13 at 20:48
  • Any code? What have you tried? – FastTrack Nov 11 '13 at 20:49

0 Answers0