フィルターのクリア

fplot add an undesired line

1 回表示 (過去 30 日間)
Radu Trimbitas
Radu Trimbitas 2020 年 2 月 5 日
回答済み: Star Strider 2020 年 2 月 5 日
When I use fplot with LineWidth a dashed thick gray line appears on the right edge o the box. Example
h=fplot(@(u) u.*exp(u),[-6,1],'r-','LineWidth',3)
fplotbug.png
Without Linewidth the picture is OK

採用された回答

Star Strider
Star Strider 2020 年 2 月 5 日
The gray line (that is always present (although it changes with the LineWidth parameter) indicates that the function increases or decreases without bound at that point.
There is no direct way to remove it, however you can get the XData and YData values from the fplot function and plot them separately:
figure
h=fplot(@(u) u.*exp(u),[-6,1],'r-','LineWidth',3);
figure
plot(h.XData, h.YData, '-r', 'LineWidth',2)
The gray dashed line is now gone from the second plot.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by