Can't find figure
3 views (last 30 days)
Show older comments
I use:
Fig = openfig('bin\EAMConfigEval.fig','reuse');
To open a figure I created inGUIDE. I then want to annotate the figure with arrows but when I do so, a completely new figure is created.How do I force the annotation arrows to be drawn ontoThe figure I have created in GUIDE?
Figure properties:
Alphamap: [1×64 double]
BeingDeleted: off
BusyAction: 'queue'
ButtonDownFcn: ''
Children: [8×1 Graphics]
Clipping: on
CloseRequestFcn: 'closereq'
Color: [0.2510 0.2510 0.4000]
Colormap: [256×3 double]
ContextMenu: [0×0 GraphicsPlaceholder]
CreateFcn: ''
CurrentAxes: [1×1 Axes]
CurrentCharacter: ''
CurrentObject: [1×1 UIControl]
CurrentPoint: [276.2000 334.6000]
DeleteFcn: ''
DockControls: on
FileName: 'bin\EAMConfigEval.fig'
GraphicsSmoothing: on
HandleVisibility: 'callback'
Icon: ''
InnerPosition: [71.4000 173.8000 1.0032e+03 548.8000]
IntegerHandle: on
Interruptible: on
InvertHardcopy: on
KeyPressFcn: ''
KeyReleaseFcn: ''
MenuBar: 'none'
Name: 'EAMConfigEval'
NextPlot: 'add'
Number: 1
NumberTitle: off
OuterPosition: [64.2000 166.6000 1.0176e+03 586.4000]
PaperOrientation: 'portrait'
PaperPosition: [0.2500 2.5000 8 6]
PaperPositionMode: 'manual'
PaperSize: [8.5000 11]
PaperType: 'usletter'
PaperUnits: 'inches'
Parent: [1×1 Root]
Pointer: 'arrow'
PointerShapeCData: [16×16 double]
PointerShapeHotSpot: [1 1]
Position: [71.4000 173.8000 1.0032e+03 548.8000]
Renderer: 'opengl'
RendererMode: 'auto'
Resize: on
Scrollable: off
SelectionType: 'normal'
SizeChangedFcn: ''
Tag: 'figConfigEval'
ToolBar: 'auto'
Type: 'figure'
Units: 'pixels'
UserData: [1×0 double]
Visible: on
WindowButtonDownFcn: ''
WindowButtonMotionFcn: ''
WindowButtonUpFcn: ''
WindowKeyPressFcn: ''
WindowKeyReleaseFcn: ''
WindowScrollWheelFcn: ''
WindowState: 'normal'
WindowStyle: 'normal'
5 Comments
dpb
on 25 Oct 2020
Edited: dpb
on 25 Oct 2020
"By default, the first time you save or run your app, GUIDE save two files:
- A FIG-file, with extension .fig, that contains a complete description of the layout and each component, such as push buttons, axes, panels, menus, and so on. The FIG-file is a binary file and you cannot modify it except by changing the layout in GUIDE. FIG-files are specializations of MAT-files."
The second m-file contains initialization code and an app-opening function that must run before the GUI is available. I'm guessing maybe if you saved the initialization function and ran it, then you might be able to address the figure, but that's purely conjecture.
It's thus futile to modify a GUIDE .fig file directly; despite using the same file extension, the resulting .fig file is NOT an ordinary figure file that contains within it all the stuff needed to build the figure and so can be further modified. Only within the GUIDE environment or perhaps manually by munging on the associated m-file can you manage to do so(*).
(*) I've never actually used GUIDE so the latter is a guess--even that may not work outside the environment.
I also don't know if you can simply do a copyobj to create a new version of the existing that can then be edited as an ordinary .fig file or not. I gather there's a way from the "migration strategies" help page that says for minimal or occasional editing to export the app from the GUIDE environment to a single m-file that one can then edit manually. From there you it seems as though you should be able to save a "real" .fig file going forward.
Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps 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!