Colorbar range and intervals of scatter plot

1 vue (au cours des 30 derniers jours)
Andrew
Andrew le 16 Déc 2013
I am trying to create a scatter plot of points coloured by an attribute. I want to manually edit the range and limits of the data to show points that are within a certain data range. However whenever I try to edit the axis or labels it does not produce the plot I required.
For example I want to set the limits of the data to be -0.45 and 0.45 then set the interval to be 0.15 so that a colour is associated to points that are within the following data;
-0.45 - -0.3 -0.3 - -0.15 -0.15 - 0 0 0 - 0.15 0.15 - 0.3 0.3 - 0.45
I understand using the caxis([min max]) will set the limits of the data range but it doesn't seem to do the intervals of the data.
I then want to relabel these classes of the colormap to be 3,2,1,0,1,2,3 but using colorbar('YTickLabels',{'3','2','1','0','1','2','3'}) cyclically repeats two of the values. I therefore want to change the number of labels from 9 to 7.
Does anybody know how to do this or another solution to this?
Thanks, Andrew

Réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by