Whyaken
Whyaken

Reputation: 71

Enableing Line Smoothing causes axes drawing errors

In Matlab 2011a I am plotting a line, and I use the parameter ("LineSmoothing", 1) to make the line look prettier, but it causes the Y and X axis to disappear.

enter image description here

Does someone know what is causing this, and more importantly, how it can be fixed?

I tried the opengl('OpenGLLineSmoothingBug',1) but it didn't change anything.

Thanks in advance!

Upvotes: 0

Views: 1207

Answers (1)

Amro
Amro

Reputation: 124563

The undocumented LineSmoothing property causes the figure to automatically switch to using the OpenGL renderer. And the bug you've shown in fact affects all OpenGL-rendererd figures (regardless of this property use).

Example: (tested on R2012a in WinXP)

plot(1:10,'o-'), box on
set(gcf, 'Renderer','opengl')

screenshot

note how the top and right borders of the box disappear once you execute the second line.

There are some suggested workarounds.

Upvotes: 1

Related Questions