Plotting on .fig file (in new window if possible)
이전 댓글 표시
Hello,
I am trying to open a figure and plot additional data on it. The figure was given to me as a .fig file so I do not have the data to recreate it.
To open the file, I am using the following code:
fig = openfig('filename');
However that opens it in the script tab and not as a new figure window. How can I open it in a new figure window like all my other plots?
Once I have that opened (regardless of in new window or not), how do I plot on it?
I am trying
openfig('filename')
hold on
plot(x,y)
But that doesn't seem to be working.
Any help is greatly appreciated.
Thanks!
댓글 수: 4
Turlough Hughes
2019년 10월 9일
Can you upload the .fig file?
JD
2019년 10월 10일
Stephan
2019년 10월 10일
Upload the file means to attach the .fig file i guess- not a picture of it.
JD
2019년 10월 10일
채택된 답변
추가 답변 (1개)
Ankit
2019년 10월 9일
Here is an example:
close all;
MySavedPlot = open('MySavedPlot.fig');
figure(MySavedPlot)
hold on
x = linspace(-2*pi,2*pi);
y1 = cos(x);
plot(x,y1,'color','b')
카테고리
도움말 센터 및 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!

