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 Center および File ExchangeScatter Plots についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by