Copy Graph Subwindow

Is it possible to copy a graph subwindow embedded in a panel for pasting in another application?  My tests so far show the entire panel is copied.

This has been addressed here: https://www.wavemetrics.com/forum/igor-pro-wish-list/request-duplicateg…

Basically, you need to create a self standing copy of the graph and then you can do what you want with it.

Here is my current version which works for my specific case:

// how to copy Graph subwindow embedded in panel
// calling: DuplGraphInPanelSubwndw("PanelName#GraphName")
// You should end up with new graph, copy,... , kill at the end
// https://www.wavemetrics.com/forum/igor-pro-wish-list/request-duplicateg…

Function DuplGraphInPanelSubwndw(String gname)
    String rec = WinRecreation(gname, 0)  
    Variable lines=ItemsInList(rec, "\r")
    Variable i
    String newrec = ReFactorWinRec(rec)
    Execute newrec
end

Function/S ReFactorWinRec(WRstr)
    string WRstr
   
    string gstr
    string fstr, istr, rstr, estr
   
    // remove the /W component
    gstr = "((?s).+)(Display/W=\(\\d+,\\d+,\\d+,\\d+\))((?s).+)"  
    SplitString/E=gstr WRstr, istr, rstr, estr  
    fstr = istr + "Display" + estr
   
    // remove the /HOST component
    gstr = "((?s).+)(/HOST=#)((?s).+)"
    SplitString/E=gstr fstr, istr, rstr, estr  

    fstr = istr + estr
    return (fstr)
end

 

 

Jan,

Thanks.  I had found this brief thread from earlier this year https://www.wavemetrics.com/comment/19627#comment-19627, but had dismissed it since the need was to use the graph in Igor.  Of course, I missed one use, to permit user to export as TIFF.  For now, I will avoid the subpanel issue completely, but may return to it when I have more time.