Plotting on .fig file (in new window if possible)
Ältere Kommentare anzeigen
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 Kommentare
Turlough Hughes
am 9 Okt. 2019
Can you upload the .fig file?
JD
am 10 Okt. 2019
Stephan
am 10 Okt. 2019
Upload the file means to attach the .fig file i guess- not a picture of it.
JD
am 10 Okt. 2019
Akzeptierte Antwort
Weitere Antworten (1)
Ankit
am 9 Okt. 2019
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')
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

