
Why is my figure different when I open it in the Figure Window, compared to that displayed in the results pane of Live Script?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I set up the plot as I wanted it in Live Script, but when I press the "Open in Figure Window" arrow for said figure it opens, but some ylines are missing. How do I resolve this so I can save the figure as a .fig file?
Thanks! :)
Screenshots and code included below:
Code and Figure as seen in Live Script:

Figures side by side:
%20and%20Figure%20from%20Live%20Script%20on%20right.jpeg)
2 件のコメント
Cris LaPierre
2024 年 4 月 29 日
I am not able to duplicate the issue. What version of MATLAB are you working in? Is there any code in a previous section we should know about?

Walter Roberson
2024 年 4 月 29 日
I seem to recall a bug about ylines not displaying properly... but that was several releases ago and affected only a single release.
回答 (2 件)
Voss
2024 年 4 月 29 日
Try saving the uifigure directly at the end of your code:
fig_filename = 'output.fig'; % change this to what/where the .fig file should be called/located
saveas(F6,fig_filename)
1 件のコメント
Cris LaPierre
2024 年 4 月 30 日
I can reproduce in R2023b update 6 but not in R2024a.
However, if I save the figure programmatically, the ylines are preserved.
saveas(F6,'myplot.fig')
参考
カテゴリ
Help Center および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!