Newbie: templates
jlawrence
I hope some of you are/were OriginLab/ Kaleidagraph users.
The way it works for me is like this: I made a graph, modify it here and there and save it as template. That way, I can create template for each graph of IR, UV=VIS, NMR, I-V, etc etc). Open new data, plot, and then open plot=templatd-data.
However the present settings are confusing to me. How should I proceed ?
September 20, 2011 at 06:39 am - Permalink
September 20, 2011 at 06:53 am - Permalink
Can anyone post a practical guide for doing this in Mac ? I am sure most of you are doing this to maintain consistency in your graphs.
September 20, 2011 at 07:01 am - Permalink
If there is other code in the main Procedure window, then you need to follow a more complicated process:
1) Create a new procedure window by selecting Windows->New->Procedure Window. In the dialog, give it a name that says what it does.
2) Find the style macro in the main Procedure window. Select all the code from Window through End, then Edit->Cut.
3) Select Windows->Procedure Windows->
4) Paste the code into the new procedure window.
5) File->Save Procedure As, navigate to Igor Pro User Files folder, save in Igor Procedures folder.
You're right- this is too complicated. We keep thinking about how to make this easier while keeping the flexibility of the window macros.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 20, 2011 at 08:48 am - Permalink
Better yet, back up and read about procedure files in general so you understand how global procedure files fit into the picture:
September 20, 2011 at 12:22 pm - Permalink
Has something changed about this?
I followed the instructions given here and in
but in my case nothing was listed in the command window (I'm assuming that is the main procedure window).
It only says:
"SmallPanel" of course being the style name that I assigned. I would really like to copy that style over to
another Igor experiment and not having to do it every time again.
Cheers,
Markus
February 8, 2012 at 08:58 am - Permalink
No, the command window has the command line below the red line for typing in individual commands, and the history area above the red line that shows commands that have been executed, along with output from commands.
The Procedure window is a special window for code- that is, macros and functions that have names and bodies with multiple command lines and control structures. Go to the Windows menu and select Procedure Windows->Procedure Window.
"THE Procedure Window" is the main procedure window. You can have more than one window with code in it, each one is a procedure window. The main Procedure window is always associated with an experiment file, never with a separate procedure file. Other procedure windows can be associated with files external to whatever experiment file you may be working with.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
February 8, 2012 at 09:24 am - Permalink
Hi,
I am also (more or less) a newbie here. Is there a way to modify existing graphs with a style macro? If I read the instruction well, it's only possible to apply the style macro when making a new graph.
Thanks a lot!
Mai
February 23, 2022 at 07:42 am - Permalink
Hi,
I am also (more or less) a newbie here. Is there a way to modify existing graphs with a style macro? If I read the instruction well, it's only possible to apply the style macro when making a new graph.
Thanks a lot!
Mai
February 23, 2022 at 07:42 am - Permalink
Make sure the graph you want to modify is the top graph window. Then select Windows->Graph Macros-><your style macro>
You can also simply invoke the style macro from Igor's command line, like any other macro or user-defined function.
February 23, 2022 at 01:05 pm - Permalink
One caveat is that a style macro does not include commands for modifying graph properties that have the default value. Thus, for example, if you create a style macro from a graph with a single trace default trace color, the style macro will not include a command to set the trace color. If you then apply the style macro to another graph with a single trace with a non-default trace color, its trace color will remain unchanged.
To provide a concrete example:
•Display jack // Has default trace color (red)
•DoWindow/R/S=Graph0Style Graph0 // Create style macro
If you now look at the Graph0Style proc in the procedure window, you will see no command to set the trace color:
PauseUpdate; Silent 1 // modifying window...
EndMacro
Thus, if you apply this to a graph with, for example, a single blue trace, the trace's color will remain blue, not change to red.
This is why the help topic "Graph Style Macros" says:
Consequently you may want to start with a style macro and then tweak it. Execute this for background information on style macro syntax:
DisplayHelpTopic "Graph Style Macros"
February 23, 2022 at 01:25 pm - Permalink