Scatter ColourMap at Z axle

조회 수: 1 (최근 30일)
Orkun OZENER
Orkun OZENER 2017년 9월 16일
댓글: Orkun OZENER 2017년 9월 19일
Hi
I want to change the colour of scatter
scatter(x,y,[],c);
The help indicates "c" is identifying the colour.
I have a one column vector(Z) for each corresponding X and Y. So I want to have a RGB matrix that indicates the magnitude of Z. i.e. Low Values Blue, Mid Values Green and High Values are RED.
So how can I form this RGB vector that changes with the vectors magnitude.
Best Regards
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 9월 17일
Does "low" correspond to the first 1/3 of the way through the possible value range, and does "high" correspond to the last 1/3 of the way through the possible value range, and does "mid" correspond to the middle third of the possible value range?
Are you looking for exactly three different colors, or do you want shades according to how far through the values are?
Orkun OZENER
Orkun OZENER 2017년 9월 17일
편집: Orkun OZENER 2017년 9월 17일
It can be like band three or more colour. Or Two colour. I am adding an two example from another plotting programme.So the colours indicates the magnitude ... Adding a colourbar will make the graphic more and more meaningfull
<<
>>

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2017년 9월 17일
scatter(x,y,[],z);
colormap(YourColorMap);
colorbar()
  댓글 수: 1
Orkun OZENER
Orkun OZENER 2017년 9월 19일
Thank you...I solved it... Kind Regards

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by