Numbers in GUI are upside down

1 view (last 30 days)
Teresa
Teresa on 17 Sep 2011
Hi,
i show a matrix in an image with different colors and to show the values i use the text-property of axes. but know the numbers in the axes of my GUI are upside down and i don't know why. I use MATLAB 7.12.0 (R2011a) at home and at work i use R2010b and there they are normal. The code for the axes is:
cmap = load('StoichMap1.mat');
amin = min(A(:));
amax = max(A(:));
if abs(amin) <= amax
grenzeoben = amax;
else
grenzeoben = abs(amin);
end
grenzeunten = grenzeoben * (-1);
imagesc(A,'CDataMapping','scaled')
alpha 0.5
%axis equal
axis off
colormap(cmap.StoichMap1)
caxis([grenzeunten grenzeoben]);
%if and(size(A,1)<25,size(A,2)<25)
for i = 1:size(A,2)
for j = 1:size(A,1)
if A(j,i)~= 0
text(i,j,num2str(A(j,i)),'HorizontalAlignment','center','Fontsize',22)
end
end
end
Hope anyone can help me Thank you

Accepted Answer

Jan
Jan on 18 Sep 2011
"alpha 0.5" set the renderer automatically to OpenGL. There are a lot of bugs in the OpenGL support. So try this:
feature('UseGenericOpengl', 1)
BTW: "alpha 0.5" works, but I'd prefer "alpha(0.5)" which does not perform an implicite string to double conversion.
  2 Comments
Teresa
Teresa on 18 Sep 2011
Thank youuuu :) Now it works
Jan
Jan on 19 Sep 2011
Updating the OpenGL drivers of the graphics-card might help also.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!