Why do the axes box and tick marks disappear when I use transparency in a plot in MATLAB 7.5 (R2007b)?

조회 수: 8 (최근 30일)
When I create a plot with a textbox object and set the 'FaceAlpha' property of the textbox to a value smaller than 1, the current axes box and tick marks disappear, mostly at the right side and at the top.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2013년 10월 18일
This is an issue with the 'OpenGL' renderer installed in the system. When using transparency in a plot the figures renderer is automatically set to OpenGL. This renderer often clips the axes box and tick marks.
To work around this issue, you can make the axes box visible by slightly changing the camera target of the axes:
ct = camtarget;
camtarget([ct(1)+0.001*ct(1) ct(2)+0.001 ct(3)]);
To make the tick marks at the right side and top visible you can overlay another axes object with the same settings as the other axes, empty its ticklabels and set the axis locations to the right and top of the axes:
ax2 = copyobj(gca,gcf);
set(ax2,'XAxisLocation','top','XTickLabel','','YAxisLocation','right','YTickLabel','','Color','none')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품


릴리스

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by