Duplicate a graph
anna
This is a simple problem, but looking briefly in the forum I couldn't find anything...
I have an Igor file, with a graph in it. How can I duplicate it? In order to have two copies of the same graph in the same Igor Experiment?
I tried to click on the graph and then go to Edit-Duplicate but I cannot select the Duplicate command.
Thanks!!
1) While on a graph, use control-Y (PC) or command-Y (Mac) to bring up a dialog box. Choose create graph macro and give the window a name. Select Do It. Then, go to the Windows : Graph Macros menu. You should see the name that you just typed as one option. Choose it. That will create a copy of the graph. The graph uses exactly the same data as your original graph. The commands to create the graph (called the recreation macro) are visible in the procedure window.
2) Use the second example code shown here. Copy this in to your procedure window. Run it. This will create a copy of the graph AND duplicate the data waves that are on the graph. (The first example will do essentially the same as above, however it is called from within a user function).
If you might eventually want to extract a graph and its associated data to use in a separate experiment, you could use the package here.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
August 25, 2011 at 06:21 am - Permalink
To create the macro make sure the graph has the focus and type -Y (hit control key and y together). In the center of the dialog that will then pop up click "Create Window Macro" and give it a new name, if desired. Click "Do It". The graph name will appear in the Windows>GraphMacros menu.
August 25, 2011 at 06:32 am - Permalink
That should work. For example, execute this:
Now choose Edit->Duplicate. The graph window should be duplicated. If not, tell me what Igor version you are using and on what OS.
August 25, 2011 at 01:52 pm - Permalink
First of all, thanks a lot to all of you, I used the 'create window macro' method and it worked.
The 'Edit -> Duplicate' does not work, in Windows 7 Igor Pro 5.02.
Adiooos!
September 1, 2011 at 05:47 am - Permalink
The oldest Windows Igor that I have access to right now is 6.04 and it works in that version. We are currently shipping 6.22A. It works in that version.
September 1, 2011 at 07:42 am - Permalink
Sorry but how may I use the functions in http://www.igorexchange.com/node/1469 ? I plan to duplicate a window AND all its waves (actually, I want the values of the new waves to be doubled, so I may add a line in the procedure after I understand how it works). I first tested CloneWindow (but I removed the "if (freeze)" paragraph because my Igor Pro does not understand "GetWinCoords") by typing CloneWindow(win="Graph8") in the command line, but nothing happened. (I was expecting a new window to pop up.) I also failed to compile CloneWindow2 because my Igor Pro does not understand "UniqueName2".
Sorry for my limited knowledge about these commands, but could anyone show me how to execute these functions? Thank you very much.
October 13, 2016 at 07:21 pm - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 14, 2016 at 04:51 pm - Permalink