Recreation macro for graph in panel

Hi,

I have a graph that is embedded in a panel, and I would like to be able to make this into a stand-alone graph which I could manipulate further, and then print without the surrounding panel. My first idea was to use DoWindow to get the commands for recreate the graph:

DoWindow/R myPanel#myGraph

but I don't think DoWindow works on sub-windows. Is there another way to accomplish this short of getting a list of all waves in the graph and doing TraceInfo on them all to try to recreate the graph that way?

Thanks in advance.

hrodstein

This might give you some ideas:

Function Demo()
	KillWindow/Z DemoPanel
	NewPanel /N=DemoPanel /W=(191,58,820,419)
	Make/O jack=sin(x/8)
	Display/HOST=DemoPanel/N=GraphSubWindow jack
	
	DoUpdate /W=DemoPanel
	String commands = WinRecreation("DemoPanel#GraphSubWindow", 0)
	commands = ReplaceString("/HOST=#", commands, "")
	// Print commands
	Execute commands
End