Difference between revisions of "Igor Quick Reference"

From Jimenez Group Wiki
Jump to: navigation, search
(Adding Text)
(Using Cursors)
Line 103: Line 103:
 
== Adding Lines ==
 
== Adding Lines ==
 
== Using Cursors ==
 
== Using Cursors ==
 +
 +
== Saving Graphs ==
 +
=== Graph Macro ===
 +
* ctrl+y
 +
 +
=== Graph Style Macro ===
 +
* ctrl+y
 +
 +
=== Save Graph as its own Experiment ===
 +
*''File -> Save Graph Copy...''
  
 
= Strings =
 
= Strings =

Revision as of 10:54, 2 August 2009

This page is intended to be a resource for the beginning and intermediate Igor user to quickly find help and tips about common tasks in Igor. Much of the information on this page is taken from the Igor "Getting Started" Introduction and Guided Tour, but is organized by topic so that the information is easy to find. Users of this page should also search (ctrl+f) for terms in case what they're looking for isn't found in the topic they expect.

This page was started by Ingrid Ulbrich.

Waves

Waves are vectors (arrays) in which data is stored. Point number counts from 0 (i.e., MyWave[0] is the first element of the wave).

Waves have inherent x values that are by default equal to the point number. If you display a wave, it is automatically plotted versus the x value (0, 1, 2, etc.). It is possible to change the inherent wave scaling (see setScale), or you can plot a y-wave versus an x-wave.

Helpful Wave Functions

  • make /O /N=
    • Data -> Make Waves...
  • duplicate /O
    • Data -> Duplicate Waves...
  • rename
    • Data -> Rename
    • when the wave is in a table, right-click and choose Reanme
  • setScale
    • Data -> Change Wave Scaling...

Putting Data in Waves

Typing in a Table

  1. First you need to view the wave in a table.
    • If the wave exists
      • double-click on it in the Data Browser to view it in a table
      • single-click on it in the Data Browser, then right click and select "Edit"
      • from the pulldown menus, choose Window -> New Table and select the wave(s) from the dialog window
    • If the wave doesn't exist
      • make the wave from the command line
      • Make a new table (from the pulldown menus, choose Window -> New Table and don't choose any existing waves). You can rename the waves later.
  2. Now you can type values directly into the table
    • Note that you are editing the only copy of the wave.
    • Note that Igor can only undo 1 action (it doesn't remember more than 1 action).
    • Note that if you paste into the table, you might insert points instead of overwriting existing data.

As a list of values, in the command line

Waves in Equations

Loading Text Data

Graphs

Helpful Graph Functions

  • display
    • Windows -> New Graph
    • From the Data Browser, single-click on a wave then right-click and choose "Display" (can't choose a "vs" wave)
  • appendToGraph
  • legend
  • ModifyGraph


Modifying Traces

  1. Getting to the window
    • Double-click on a trace
    • Right-click on a graph and choose "Modify (tracename)..."
    • Graph -> Modify Trace Appearance...
  2. Notes and Tricks
    • You can change several traces at once by selecting multiple waves (ctrl+click).

Modifying Axes

Axes

  1. Getting to the window
    • Double-click on an axis (look for vertical or horizontal double-arrow cursor)
    • Graph -> Modify Axis
  2. Notes and Tricks
    • You can make selections to any axis (or multiple axes at the same time) from the pulldown menu at the upper left of the window.


Adding Text

Legend

  • legend produces the default legend in the top graph
  • Graph -> Add Annotation..., change the Annotation type in the upper left corner to Legend
  • Right-click in the graph and choose "Add Annotation...", change the Annotation type in the upper left corner to Legend
  • Edit an existing legend by double-clicking on it.

Text box

  • Graph -> Add Annotation..., change the Annotation type in the upper left corner to TextBox
  • Right-click in the graph and choose "Add Annotation...", change the Annotation type in the upper left corner to TextBox
  • Edit an existing text box by double-clicking on it.

Tag (Text that

  • Graph -> Add Annotation..., change the Annotation type in the upper left corner to TextBox
  • Right-click in the graph and choose "Add Annotation...", change the Annotation type in the upper left corner to TextBox
  • Edit an existing text box by double-clicking on it.

"Drawn" text (less interactive than a text box)

  1. Get to the "Tools" by pressing ctrl+t when the top window is your graph. A set of buttons will appear to the left of your graph.
  2. Choose the "T..." icon and click in the graph where you want the text to be.
  3. Insert your text in the dialog box. Note that you can control the location and formatting of the text here.
  4. Press the top button on the "Tools" to return to normal graph interactions or press ctrl+t to close the "Tools" and return to normal graph interactions.
  5. Notes and Tips
    • After closing the dialog, you must click the arrow icon to move your text.
    • This text can only be moved or changed when "Tools" are available.

Adding Lines

Using Cursors

Saving Graphs

Graph Macro

  • ctrl+y

Graph Style Macro

  • ctrl+y

Save Graph as its own Experiment

  • File -> Save Graph Copy...

Strings

Helpful String Functions

Variables

Helpful Variable Functions

  • NVAR
  • NVAR_exists

Functions

The Local Procedure File

Igor Procedure Files (.ipf)

Local vs. Global Objects

Lists