MATLAB Answers

0

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

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

1 Answer

Answer by MathWorks Support Team on 27 Jan 2017
 Accepted Answer

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:
For internal use only:
This has been fixed in HG2, per g32818. OpenGL will be able to render transparency and logarithmic-scale axes.

  0 Comments

Sign in to comment.