how to add a figure at a particular location in the GUI

i have a drawing which i have drawn in the pdetoolbox . it i ssaved as a 'm.' file . now i want to add a command in such a way that when i push a button in the GUI, the saved drawing is displayed at a particular position in the same GUI. is it possible ?

 Risposta accettata

It depends upon the code that got saved. If it has its own "figure" call, then you would have difficulty doing what you wanted without editing the code.
Sometimes the easiest thing to do in cases like these is to create a uipanel() at the position one wants the graphics to go, and then do the drawing on the uipanel.

2 Commenti

thanks....i actually figured out that my drawing can also be saved as a .fig file . so nw all i wish to do is show theat fig file in the GUI at the axes component,when the button is pressed
open() the '.fig' file, set() the resulting figure visibility to be 'off' immediately, get() the children of that figure and copyobj() them to the uipanel. You might have to be a bit selective about the kinds of objects you copy to avoid (e.g.) copying menus and title bars.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Printing and Saving in Centro assistenza e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by