Hi all,
It’s a basic question but I struggle to find the answer on the Internet...
I have a matrix with x,y and z colum, representing the c-coordinate, the y-coordinate and depth (z).
I’d like to plot (x,y) but that those points show a colorscale depending on the depth value (just the point colors I don’t want an interpolation).
Can somebody help me please?

댓글 수: 1

Caoimhe Madine
Caoimhe Madine 2020년 3월 31일
Would anyone be able to tell me how to do this but then interpolate the colours?

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

 채택된 답변

Walter Roberson
Walter Roberson 2013년 7월 30일

4 개 추천

pointsize = 10;
scatter(x, y, pointsize, z);

댓글 수: 10

Saskia
Saskia 2013년 7월 31일
Great thanks! Do you know how I can set full points and not just the border?
Saskia
Saskia 2013년 7월 31일
OOuupsss got it.
Thanks again!
Bilel Njeh
Bilel Njeh 2018년 11월 20일
thanks!
madhan ravi
madhan ravi 2019년 1월 1일
Carlos Noton's response:
Thank you!
alberto caracciolo
alberto caracciolo 2019년 9월 25일
Thank you.
I managed to color the points (with the default color scheme) according to a third variable. However, how can I change the colour scheme? And ho can I get a legend with a color bar?
Cheers
Trent Simonetti
Trent Simonetti 2019년 9월 25일
Is there a possibilty of getting this visualization with a color bar?
alberto caracciolo
alberto caracciolo 2019년 9월 26일
Yeah, that is basically my same question!
Emirhan Solmaz
Emirhan Solmaz 2019년 9월 27일
Hi. Could you tell me how you did color gradient with z value?
Not sure if you still need the color bar:
cb = colorbar();
zhou weiyan
zhou weiyan 2022년 8월 3일
Thank you!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

질문:

2013년 7월 30일

댓글:

2022년 8월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by