typestar

Images and contours in Igor Pro

A two-dimensional wave can be drawn as an image or as contour lines.

Function ShowMatrix(WAVE m)
    DoWindow/K MatrixView
    NewImage/N=MatrixView m

    ModifyImage $NameOfWave(m) ctab={*, *, Rainbow, 0}
    ModifyGraph mirror=2, tick=2

    AppendMatrixContour m
    ModifyContour $NameOfWave(m) autoLevels={*, 8, 0}
    ColorScale/A=RC/E image=$NameOfWave(m), "amplitude"
End

How it works

  1. NewImage opens a window; AppendImage adds to the current one.
  2. ModifyImage ctab= picks the color table and its range.
  3. AppendMatrixContour draws the same matrix as contour lines.

Keywords and builtins used here

The run, in numbers

Lines
11
Characters to type
283
Tokens
68
Three-star pace
80 tpm

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

Type this snippet

Step 3 of 5 in Making a graph, step 3 of 19 in Graphs & presentation.

← Previous Next →