Menu

#515 axis ij does not flip Y data for Pcolor

v4.0 (major)
open
nobody
5
2011-05-13
2011-05-13
Jeff S.
No

Using Axis ij is suppoed to flip the Y axis - both axis tick labels and the data.
When using Pcolor, the axis tick labels get flipped, but the data remains plotted the same.
This works as expected in MatLab.

To recreate:

colormap(gray)
x1 = [1.0 0.9 0.8 0.7];
x2 = [0.6 0.5 0.4 0.3];
x3 = [0.2 0.1 0.0 0.5];
x4 = [0.5 0.5 0.5 0.5];
xd = [1.0 1.0 1.0 1.0];
% last row and column of the matrix are ignored in pcolor (as in matlab)
v = [[x1 0]; [x2 0]; [x3 0]; [x4 0]; [xd 0]];
pcolor(v);
% this should vertically flip both the Y axis labels and the data contents of the pcolor grid.
axis ij;

Discussion


Log in to post a comment.