How can I get correctly plotted lines when using Matlab in a Webbrowser?

2 ビュー (過去 30 日間)
Frithjof Splettstößer
Frithjof Splettstößer 2023 年 1 月 30 日
コメント済み: Cris LaPierre 2023 年 2 月 1 日
Problem: When displaying a plot using the webbrowser, the result looks weird. Most points of the line are missing, only two straight parts are shown as in the appended image.
Tests until now: I tried to plot some random or fixed numbers (1d and 2d arrays) on different backend machines (
) and web browsers browsers (
  • Firefox and Chromium on Manjaro Linux for all cases;
  • Firefox and Edge on Windows 10 for first case [Windows as backend])
Results: The simplified code used for the screenshot is
format compact
x = 1 : 10
y = randn( 1, 10 )
plot( x, y );
Some kinds of basic plots do not get displayed correctly, but this seems to be slightly inconsistent: plot(x) seems to work, but plot(x,y) with random y values seems to result in the wrong behaviour. plot3() and scatter() seem to work, but polar() does not.
In some cases, the plots do not get displayed at all.
Question: How do I fix this plotting error?
  1 件のコメント
Star Strider
Star Strider 2023 年 1 月 30 日
I cannot reproduce that problem. Your code works correctly for me in MATLAB Online (Firefox) and there is no problem with the figure.

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

回答 (1 件)

Cris LaPierre
Cris LaPierre 2023 年 1 月 30 日
I suggest contacting support.
I was not able to reproduce in MATLAB Online using Edge or Chrome.
  2 件のコメント
Frithjof Splettstößer
Frithjof Splettstößer 2023 年 2 月 1 日
In a virtual machine, the plot on matlab.mathworks.com looks as intended. On the host machine, it still looks as in the uploaded screenshot. → It could be dependent on my installed hardware or software.
Could it be something OpenGL/WebGL related?
Do you have other ideas for where to search for the problem?
Cris LaPierre
Cris LaPierre 2023 年 2 月 1 日
I don't, but support might.

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

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by