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,

 Respuesta aceptada

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

7 comentarios

Ali
Ali el 29 de Mzo. de 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 el 1 de Abr. de 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?
Kelly Kearney
Kelly Kearney el 1 de Abr. de 2014
Hard to tell what "differently" would be, since you haven't showed how you tried it in the first place...
Ali
Ali el 1 de Abr. de 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.
Kelly Kearney
Kelly Kearney el 4 de Abr. de 2014
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);
???

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

Ali
el 29 de Mzo. de 2014

Comentada:

el 5 de Abr. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by