typestar

Axes in Igor Pro

SetAxis fixes a range, and the axis keywords decide how it reads.

Function ScaleAxes()
    SetAxis left, 0, 1.2
    SetAxis/A bottom

    ModifyGraph log(left)=1
    ModifyGraph nticks(bottom)=8, minor(bottom)=1

    Label left, "Current (\\U)"
    Label bottom, "Time (s)"

    ModifyGraph freePos(right)=0
    SetAxis/A/R right
End

How it works

  1. SetAxis/A autoscales; passing two numbers pins the range.
  2. ModifyGraph log(left)=1 makes one axis logarithmic.
  3. Label writes the axis title, and takes Igor's escape codes.

Keywords and builtins used here

The run, in numbers

Lines
13
Characters to type
235
Tokens
54
Three-star pace
85 tpm

At the three-star pace of 85 tokens a minute, this run takes about 38 seconds.

Type this snippet

Step 2 of 6 in Styling, step 7 of 19 in Graphs & presentation.

← Previous Next →