Display loaded figure in main window

6 views (last 30 days)
nadir
nadir on 26 Mar 2013
hi How i can diplay a plot window using hgload('toto.fig') for example in main window or dock the opened figure in the parent window
i use a push button to call the hgload function, and i want display my FIG in same window, i dont want the new opened window

Answers (1)

Walter Roberson
Walter Roberson on 26 Mar 2013
hgload() is going to create a new figure. You can copyobj() its contents into an existing figure.
You would probably want to locate the axes in the figure and copy the contents of the axes to an existing axes, but make sure you also set() all the writable axes properties to what they are in the loaded figure except the three position properties. Also, if you have legend() or annotations, you might have multiple axes objects to worry about.

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!