本文を読み飛ばす

The first step to use graph macro

まとめ

Igor Pro によるグラフマクロの使い方の初歩

環境

OS

Windows 10 Pro

Igor Pro

6.37

最近のものであれば問題ないはず.

グラフの作成

以下のスクリーンショットは英語版ですが,適宜読み替えてください.

  1. データをプロットする

/images/igorprostylemacro/01-130430-CeO2.png
  1. 適当にスタイルを調整する

/images/igorprostylemacro/02-130430-CeO2_styled.png

グラフマクロの作成

  1. ウィンドウコントロールを表示させ (Ctrl キーを押しながら,Y で表示),Style Name を決めて "Create Style Macro" にチェックを入れて,実行 (Do it).

/images/igorprostylemacro/03-WindowControl.png
  1. 作成したグラフマクロが記録されていることを Procedure windows で確認(Ctrl キーを押しながら,M で表示)

/images/igorprostylemacro/04-ProcedureWindow.png
  1. 上で決めたグラフマクロの名前が,Graph → Graph Macro にあることを確認

/images/igorprostylemacro/05-GraphMacro.png

別のグラフの作成

  1. 別のデータをプロットする

/images/igorprostylemacro/06-130430_Y2O3.png
  1. スタイルが変更されていないグラフを選択した状態で,グラフマクロを実行する

Window → Graph Macro の XRDStyle を実行

/images/igorprostylemacro/07-130430-Y2O3_styling.png

すると,XRDStyle マクロが適用される.

/images/igorprostylemacro/08-130430-Y2O3_styled.png

作成したグラフマクロを別のファイル(Igor で言うところのエクスペリメントファイル)で使う

  1. Procedure windows からグラフマクロをコピーする

以下は,例.

Proc XRDStyle() : GraphStyle
   PauseUpdate; Silent 1             // modifying window...
   ModifyGraph/Z gFont="Arial",gfSize=12,width={Aspect,1.41},height=226.772
   ModifyGraph/Z tick=1
   ModifyGraph/Z mirror=2
   ModifyGraph/Z fStyle=1
   Label/Z left "Intensity (cps)"
   Label/Z bottom "2 theta / degree"
EndMacro
  1. Procedure windows からグラフマクロをコピーする.

上記の文字列(あくまで,例.)をコピーして,メモ帳に開いて,XRDStyle.ipf という名前で保存する.

/images/igorprostylemacro/09-XRDStyle.ipf.png/images/igorprostylemacro/10-XRDStyle.ipf_save.png
  1. XRDStyle.ipf を Igor Procedure に保存する

エクスプローラで

%userprofile%\documents\WaveMetrics\Igor Pro 6 User Files\Igor Procedures

を開いて,XRDStyle.ipf を移動する.

/images/igorprostylemacro/11-XRDStyle.ipf_move.png
  1. Igor Pro を終了する.

新しいファイル(エクスペリメントファイル)で XRDStyle を使う

  1. Igor Pro を起動する.

  2. 適当なデータを読み込んで,プロットする.

/images/igorprostylemacro/01-130430-CeO2.png
  1. XRDStyle グラフマクロを実行する

Window → Graph Macro の XRDStyle を実行

/images/igorprostylemacro/02-130430-CeO2_styled.png