Why are the data and tick labels for my log or semilog plot displayed incorrectly when rendered in OpenGL?

1 view (last 30 days)
For example:
x=logspace(-2,0,500);
plot(x,((sin(1./x)).^2)./x);
set(gcf, 'Renderer', 'opengl')
set(gca,'XScale','linear','YScale','log');

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Aug 2022
Edited: MathWorks Support Team on 25 Aug 2022
This change has been incorporated into the documentation in Release 2010b (R2010b). For previous releases, read below for any additional information:
The OpenGL renderer does not support logarithmic scaling. As a workaround, render the figure using either the painters or zbuffer renderer. For example:
set(gcf,'renderer','zbuffer')
For more information on graphics rendering and troubleshooting, refer to the following link:
Troubleshooting section:https://www.mathworks.com/help/matlab/graphics.html
 

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!