What happened to line plots in Matlab 2025a?

201 visualizzazioni (ultimi 30 giorni)
Stephen
Stephen il 15 Lug 2025
Commentato: Semanur il 15 Ott 2025 alle 8:53
I have a fresh install of MATLAB 2025a on Ubuntu 24.04.2 LTS. As I'm trying out some basics, I found that trying to plot does something very strange with the line thickness. At the ends, the line is quite visible, but as it approaches the next data point, it tapers to zero thickness. I haven't messed with any settings, this is just out of the box behavior. What is going on and how do I fix it?
For context, the below is what the plot should look like:
x = -10:1:10;
plot(x,x.^2)
  4 Commenti
Star Strider
Star Strider il 15 Lug 2025
It's not just you!
This has been reported previously, most recently in Plot now showing correctly (Linux Ubuntu 22.04) and I have seen it reportred at least one other time.
The plots almost always render correctly here and in MATLAB Online. It seems to be some sort of incompatibility with Ubuntu (and possibly other Linux distros) and WebGL, that has taken the place of the previous rendering functions. (TMW uses Ubuntu here in Answers and in MATLAB Online -- type ver in both to display that information -- so I have no idea what the problem may be, and apparently I am not alone.)
I am having a different problem with it (Ubuntu 24.04 LTS), and working with TMW to solve it. Graphics in general are not affected, only MATLAB plots (that for me render correctly when they render at all), so I doubt the Nvidia graphics card that I have with my AMD Threadripper system is the problem.
Meanwhile, Contact Support and report it. Include the URL of this thread in your message to TMW.
Consider upgrading to 24.04. Back up all your user files to a SD card or USB drive first, because when I upgraded to 24.04, the upgrade erased everything. (Fortunately, I had backups of most of my files.)
Manuel
Manuel il 20 Ago 2025
Modificato: Manuel il 20 Ago 2025
Same problem here on Debian bookworm:
figure(1)
x=1:0.1:10;
plot(x,sin(x),'LineWidth',3.0)
On R2025a:
Should be (R2024b):

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 15 Lug 2025
The work-around is to use a LineWidth small enough that the line comes out one pixel thick.
  1 Commento
Semanur
Semanur il 15 Ott 2025 alle 8:53
you are a savior!! i have a lab lecture in an hour and its my first time using matlab since ive transferred to ubuntu. I was losing my mind as step() is working just fine and plot() is not rendering the graph but somehow i cloud hover over the graph to see the point values which meant that the calculations were correct but its just the plot not rendering them as it should be. And i needed a plot to put in my report! Using a linewidth of .1 works just fine.

Accedi per commentare.

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Prodotti


Release

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by