Why is my figure different when I open it in the Figure Window, compared to that displayed in the results pane of Live Script?

1 次查看(过去 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:
Live Script view: my code on left and figure on right
Figures side by side:
my figure from Figure window on left (on top of my code) and Figure from Live Script on right
  2 个评论
Cris LaPierre
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
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 个)

VBBV
VBBV 2024-4-29

Try without hold off after yline commands.


Voss
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)

类别

Help CenterFile Exchange 中查找有关 Labels and Annotations 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by