Numbers in GUI are upside down

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

 Risposta accettata

Jan
Jan il 18 Set 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 Commenti

Teresa
Teresa il 18 Set 2011
Thank youuuu :) Now it works
Jan
Jan il 19 Set 2011
Updating the OpenGL drivers of the graphics-card might help also.

Accedi per commentare.

Più risposte (0)

Richiesto:

il 17 Set 2011

Community Treasure Hunt

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

Start Hunting!

Translated by