- #1
darkfall13
- 33
- 0
I'm doing some plotting in Matlab where I'm using a third variable of data as a color. For example I have vectors x and y with some sort of values plotted as a scatter plot. I can color the points according to a third vector z by turning on colormap and colorbar (scatter(X,Y,S,C) and use z in place of C) and Matlab will take care of the color range and scaling.
But let's say z contains random values ranging from -25 to 25 then of course the ends of the colormap will be -25 and 25, but what if you want it to just end at say -10 and 10 so that all values outside of that range are the last color of the colormap?
But let's say z contains random values ranging from -25 to 25 then of course the ends of the colormap will be -25 and 25, but what if you want it to just end at say -10 and 10 so that all values outside of that range are the last color of the colormap?