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,

 채택된 답변

Kelly Kearney
Kelly Kearney 2014년 3월 29일

0 개 추천

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

댓글 수: 7

Ali
Ali 2014년 3월 29일
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 2014년 4월 1일
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 2014년 4월 1일
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);
???

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

Ali
2014년 3월 29일

댓글:

2014년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by