how to extract code after manually editing graphs

I have been editing my plots manually and I was wondering if there's a way for me to extract what happens in the form of code.

I've been doing that for ModifyGraph and Label and DrawText but have not been able to find such options for embedding and subwindows

 

 

subwindows

HI,

 

Save the recreation macro.  Control-Y to bring up the dialog.  All the code used to create the graph as currently displayed is now in the procedure window.

One side note:  The image shows the graph in tools mode.  If you save recreation marco it will also save the tools mode open.  When I build GUI I have remember to turn off tool mode before saving.

 

Andy

In reply to by hegedus

Thank you for the response.

 

I don't think I am doing this right though. 

 

As can be seen in the image attached, I do get a block of code I can add to my ipf but when I run it again, it doesnt produce a plot and subplots in the same settings.

hi2.JPG (112.13 KB)

 First, you only need the Graph Macro. You do not need the Graph Style.

Secondly, yes ... the recreation code is a macro. You can change it to a function call with no real problems. One way is to change the entry and exit points, for example from `Window Graph..`  to `Function myGraph()` with `end` rather than `EndMacro`. The other way is to copy + paste segments of the window recreation code in to your own function as appropriate to what parts you need your function to do.

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More