How to adjust the zcolor scale in a scatter plot?

25 ビュー (過去 30 日間)
LeChat
LeChat 2017 年 2 月 12 日
編集済み: LeChat 2017 年 2 月 12 日
Hi, I have a data set, contained in three vectors say xx, yy and zz. I want to plot yy vs xx with the marker color face according to zz, so I use the scatter function such as:
scatter(xx,yy,50,zz,'s','filled')
Unfortunately zz has some very extreme values, so I cannot see any difference in the marker face color: all the dots are dark blue!
Is there a possibility to solve this issue? I was thinking of a possibility to impose a lower and an upper value for the color scale, so that any dot with a zz value out of the authorized range would be grey (or of the color of the closest bound)...?
Thank you for your help,
Best,
Adrien

採用された回答

LeChat
LeChat 2017 年 2 月 12 日
編集済み: LeChat 2017 年 2 月 12 日
Ok, found it thanks to il_raffa on Stack Overflow ;) I use the clim option:
set(gca,'clim',[lb ub])
lb and ub being the lower and upper bounds I want to use.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by