How to plot scatter type figures using gridded data?

조회 수: 8 (최근 30일)
Leon
Leon 2022년 2월 17일
답변: KSSV 2022년 2월 18일
As you know, scatter plot takes in a 3-column data. What if my X, Y, and Z are all gridded data with the size of 360 x 180?
How do I display the value in each grid using colors? Kind of like contour but I want to see the values at each of the grids.
Thanks!
  댓글 수: 1
AndresVar
AndresVar 2022년 2월 18일
% example
Z=randi(10,3); % "gridded data" 3x3
x=3:6; % x coords you can get from X mesh
y=6:9; % y coords you can get from Y mesh
imagesc(x,y,Z)

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

답변 (1개)

KSSV
KSSV 2022년 2월 18일
Use:
scatter(X(:),Y(:),Z(:))

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by