What happened to line plots in Matlab 2025a?

185 ビュー (過去 30 日間)
Stephen
Stephen 2025 年 7 月 15 日
コメント済み: Semanur 2025 年 10 月 15 日 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 件のコメント
Star Strider
Star Strider 2025 年 7 月 15 日
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 2025 年 8 月 20 日
編集済み: Manuel 2025 年 8 月 20 日
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):

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2025 年 7 月 15 日
The work-around is to use a LineWidth small enough that the line comes out one pixel thick.
  1 件のコメント
Semanur
Semanur 2025 年 10 月 15 日 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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

製品


リリース

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by