필터 지우기
필터 지우기

2D scatter plot with Z-value in color

조회 수: 243 (최근 30일)
Saskia
Saskia 2013년 7월 30일
댓글: zhou weiyan 2022년 8월 3일
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일
pointsize = 10;
scatter(x, y, pointsize, z);
  댓글 수: 10
Mateusz Surma
Mateusz Surma 2020년 1월 17일
Not sure if you still need the color bar:
cb = colorbar();
zhou weiyan
zhou weiyan 2022년 8월 3일
Thank you!

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by