Duplicate a graph

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.
You have two options ...

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
One method is to create a graph macro for the plot to be duplicated. As many duplicates of the original graph can then be made by selecting the macro from the menu Windows>GraphMacros.

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.
anna wrote:
I tried to click on the graph and then go to Edit-Duplicate but I cannot select the Duplicate command.

That should work. For example, execute this:
Make jack=sin(x/8); Display jack

Now choose Edit->Duplicate. The graph window should be duplicated. If not, tell me what Igor version you are using and on what OS.
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.
The 'Edit -> Duplicate' does not work, in Windows 7 Igor Pro 5.02.

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.
*Updated: i already got assistance from the author of the procedures. Problems solved.

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.
Well, UniqueName2 isn't something that comes with Igor. The author must have supplied it to you. Perhaps for others who might read this thread you could let us all know what the solution was.

John Weeks
WaveMetrics, Inc.