Colour legend for scatter plot

조회 수: 2 (최근 30일)
Adam Fitchett
Adam Fitchett 2019년 11월 20일
답변: Adam Fitchett 2019년 11월 20일
I created a 2D scatter plot with the vectors X, Y and Z and following code
scatter(X,Y,50,Z)
So that I would have X and Y plotted against one another, and Z would be represented as the graded colour of each marker. It worked fine, but I need a legend that shows the range of Z values represented by the range of marker colours. How do I make this?

채택된 답변

Adam Fitchett
Adam Fitchett 2019년 11월 20일

Ah not to worry I have found the answer. You just type

colorbar

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by