Colour legend for scatter plot

3 ビュー (過去 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 Center および File ExchangeLegend についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by