Colorbar range and intervals of scatter plot
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!