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,

 Accepted Answer

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

7 Comments

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.
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...
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.

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Asked:

Ali
on 29 Mar 2014

Commented:

on 5 Apr 2014

Community Treasure Hunt

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

Start Hunting!