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 ビュー (過去 30 日間)
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)

採用された回答

MathWorks Support Team
MathWorks Support Team 2010 年 8 月 20 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

製品


リリース

R2009b

Community Treasure Hunt

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

Start Hunting!

Translated by