Why are the numbers on my figure axes upside-down when I try to superimpose a PATCH object onto an image using MATLAB 7.9 (R2009b)?

2 visualizzazioni (ultimi 30 giorni)
I want to superimpose a semi-transparent PATCH object on an image, but the numbers on axes are mirrored and upside-down in MATLAB 7.9 (R2009b).
Reproduction Steps:
A = imread('cameraman.tif');
figure('Renderer','OpenGL');
imagesc(A);
patch([100 150 150 100],[150 150 100 100],'k','FaceAlpha',.25)

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 20 Ago 2010
The upside-down numbers in figure axes can be resolved by changing the OPENGL renderer in MATLAB 7.9 (R2009b).
The mirrored axes might be caused by the hardware version of the OPENGL renderer. To determine if this is the case, set MATLAB to use the software version of the OPENGL renderer as below:
opengl software
Now, generate image superimposed with a semi-transparent patch, for example:
A = imread('cameraman.tif');
figure('Renderer','painters');
imagesc(A);
patch([100 150 150 100],[150 150 100 100],'k','FaceAlpha',.25);
You can check if the “Renderer” is “Generic” (software OpenGL) by executing:
opengl info
If the axes show correct numbered labels after following the steps above, then the issue is with the hardware version of OpenGL rendering. You may be able to resolve the issue by updating the graphics card drivers.

Più risposte (0)

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Tag

Prodotti


Release

R2009b

Community Treasure Hunt

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

Start Hunting!

Translated by