nothing show up when plotting with pcolor in 2D

I want to plot with "pcolor" in matlab, my X is [1*3529], Y is [1*2540], my Z is [2540*3529],
when I write the command pcolor(X,Y,Z) nothing show up, Why should it be like that?
Thanks,

 Réponse acceptée

The syntax is fine, so it should work. Possibly OpenGL issues? Try:
figure;
pcolor(X,Y,Z);
set(gcf, 'renderer', 'zbuffer');

7 commentaires

Ali
Ali le 29 Mar 2014
thanks for your answer, now when i type what you told me, figure opens but everywhere is black, why should it be like that?!
The default with pcolor is faceted shading, i.e. the edges of the cells are shown in black. For a plot as dense as yours, all you'll see is this black.
Add
shading flat
after the plot to see the data values.
Ali
Ali le 1 Avr 2014
Thank you, it worked, one more thing is that, when I use the "xlim" command, it doesn't work, I am wondering if the command should be used differently or what?
Hard to tell what "differently" would be, since you haven't showed how you tried it in the first place...
Ali
Ali le 1 Avr 2014
Hi,
I plotted with "pcolor" and it is fine, but I want it look like a contour, I am wondering how should I do? I tried contour(X,Y,Z) for the same vectors that I use in "pcolor" but it shows something wrong.
Once again, "something wrong" is a difficult problem to solve without any details as to your data or calling syntax or what you see or how it differs from what you want.
Why not just use
image(Z);
???

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by