Scatter ColourMap at Z axle

1 view (last 30 days)
Orkun OZENER
Orkun OZENER on 16 Sep 2017
Commented: Orkun OZENER on 19 Sep 2017
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 Comments
Walter Roberson
Walter Roberson on 17 Sep 2017
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 on 17 Sep 2017
Edited: Orkun OZENER on 17 Sep 2017
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
<<
>>

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 17 Sep 2017
scatter(x,y,[],z);
colormap(YourColorMap);
colorbar()
  1 Comment
Orkun OZENER
Orkun OZENER on 19 Sep 2017
Thank you...I solved it... Kind Regards

Sign in to comment.

More Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!