Borrar filtros
Borrar filtros

Can't find figure

1 visualización (últimos 30 días)
Sean Lineaweaver
Sean Lineaweaver el 25 de Oct. de 2020
Editada: dpb el 25 de Oct. de 2020
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 comentarios
Sean Lineaweaver
Sean Lineaweaver el 25 de Oct. de 2020
Editada: dpb el 25 de Oct. de 2020
Thanks.I have taken your recommendations to heart. And agree completely with Authoring my own Figures Rather than relying on GUIDE. That saidHowever,I tried explicitly Including The figure (Fig) in my annotation command:
t = annotation(Fig,'arrow','x',[0 1111],'y',[0 1000]);
But my arrows still did not appear in Fig. Any suggestions other than rewriting my GUI (figure) from scratch (without using GUIDE)?
dpb
dpb el 25 de Oct. de 2020
Editada: dpb el 25 de Oct. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by