2-D plots don't render correctly in Figures window
14 views (last 30 days)
Show older comments
All of my plots have had these strange rendering issues for a few days, but appears fine when I download the plot as an image. I'm worried it has something to do with my OS and nothing with Matlab. I am running Ubuntu 22.04.5 LTS and MATLAB R2025a
Here is a screenshot of my workstation. Notice that the 2D plot of the sine wave does not generate correctly

Here is the figure saved as a .png; same issue:

And here is a screenshot of the figure exported as a PDF, which renders the graph correctly:

1 Comment
Accepted Answer
Walter Roberson
on 22 Jul 2025
The partial line is because of a known bug, https://www.mathworks.com/matlabcentral/answers/2177698-strange-behaviour-of-plot#answer_1566533
The work-around is to use a LineWidth small enough that the line comes out one pixel thick
3 Comments
Walter Roberson
on 24 Jul 2025
Edited: Walter Roberson
on 24 Jul 2025
Datapoint: this problem does not happen on my low resolution (1920 x 1280) Windows 11 machine.
Datapoint: this problem does occur in my Windows 10 virtual machine hosted on MacOS 15.3, with about 2800 x 1800 resolution. Which is enough resolution for the High Resolution processing to kick in.
More Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!