How to plot scatter type figures using gridded data?

8 vues (au cours des 30 derniers jours)
Leon
Leon le 17 Fév 2022
Réponse apportée : KSSV le 18 Fév 2022
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 commentaire
AndresVar
AndresVar le 18 Fév 2022
% 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)

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 18 Fév 2022
Use:
scatter(X(:),Y(:),Z(:))

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by