![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1682256/image.png)
Why is my figure different when I open it in the Figure Window, compared to that displayed in the results pane of Live Script?
조회 수: 4 (최근 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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1682241/Live%20Script%20view:%20my%20code%20on%20left%20and%20figure%20on%20right.jpeg)
Figures side by side:
![my figure from Figure window on left (on top of my code) and Figure from Live Script on right](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1682246/my%20figure%20from%20Figure%20window%20on%20left%20(on%20top%20of%20my%20code)%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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1682256/image.png)
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에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!