I'm making a whole bunch of separate scatter plots. Each one represents a timestep, so it would be nice to have the color gradient consistent from plot to plot. The default color gradient for a scatter plot depends on the range of values in the plot. Is there a way for me to define the max and min values of the range (so the max and min values in all of my plots combined), and use that as the gradient range for each individual plot?
Right now I just have:
h = scatter(ModelInfo.X(:,1),ModelInfo.X(:,2),50,ModelInfo.y,'filled')
where ModelInfo.y is the "value" assigned to each (X1,X2) pair. I would like to create a gradient from ModelInfo.y=0 to 30.