※著作権に関するお断り: このページ(サブルーチン説明書)は,2000年当時以下のURLに存在した(2004年8月現在も存在しています),金野祥久氏らによって途中まで日本語化されていたPGPLOTのマニュアルを,本授業用に筆者が編集したものです.
http://www.fluidlab.naoe.t.u-tokyo.ac.jp/softwares/pgplot-j.html (文責:木津)
SUBROUTINE PGARRO (X1, Y1, X2, Y2) REAL X1, Y1, X2, Y2 ワールド座標の(X1,Y1)から(X2,Y2)に矢印を描く。(X2,Y2)につく矢印の頭の 大きさはPGSCHによって設定した現在の文字の大きさによって決定される。デ フォルトの大きさはビュー平面の幅、高さの1/40である。矢印の頭の表現 (shape,solid,open)はPGSAHによって制御する。 引数: X1, Y1 (input) : ワールド座標であらわされた矢印の尻尾の位置 X2, Y2 (input) : ワールド座標であらわされた矢印の頭の位置
SUBROUTINE PGASK (FLAG) LOGICAL FLAG PGPLOTのprompt state(プロンプトの状態)を変更する。prompt stateがONの場 合PGPAGEは、新しいぺージをスタートする前に``TypeRETURN for next page:''というメッセージを出力し、利用者がキャリッジリターンを入力する まで待ち続ける。(PGBEG実行後の)prompt stateの既定値は、インタラクティ ブデバイスではONとなっている。非インタラクティブデバイスでは常にOFFで ある。 引数: FLAG (input) : .TRUE.で、かつデバイスがインタラクティブデバイスで あれば、prompt stateはONになる。.FALSE.であれば, prompt stateはOFFになる。
INTEGER FUNCTION PGBAND (MODE, POSN, XREF, YREF, X, Y, CH) INTEGER MODE, POSN REAL XREF, YREF, X, Y CHARACTER*(*) CH カーソル位置と利用者が打ち込んだ文字を読み取る。カーソル位置はワールド 座標系の値で返される。PGBANDはカーソルを指定された位置に移動し(POSN=1 の場合)、マウスによるカーソル移動、キー操作など、デバイスで許可された 全ての操作を可能にする。カーソル位置を決定するには、利用者はキーボード から1文字入力する(?)。PGBANDはその文字と新しいカーソル位置を(ワールド 座標系で)返す。 いくつかのインタラクティブなデバイスでは、細長い線で、カーソルとともに 動くが、下にある絵を消去しないようなカーソル形状をとることができる。あ る場合ははカーソルはそのような形状によってアンカー位置(XREF,YREF)とカ ーソル位置の間に展開するが、それ以外の場合はカーソルは単にカーソル位置 に追随し形状や大きさは変わらない。カーソルの種類は以下に述べるMODE変数 によって決定される。あるカーソルの種類が使用するデバイスで許可されてい ない場合にはMODE=0として扱われる。 -- MODE=0のとき、アンカーは無視され、このルーチンはPGCURSと同様の挙動となる。 -- MODE=1のとき、アンカー位置とカーソル位置を結ぶ直線となる。 -- MODE=2のとき、カーソルの移動に伴って、アンカー位置とカーソル位置とを 頂点とする長方形の枠が展開する。長方形の各辺は水平あるいは鉛直方向を向 いている。 -- MODE=3のとき、2本の水平線が画面幅いっぱいに展開する。水平線の一方は アンカー位置を通り、もう一方はカーソル位置を通る。これは、一端が既知であ るようなY軸方向の範囲を決定する際に使う事ができる。 -- MODE=4のとき、2本の鉛直線が画面の高さいっぱいに展開する。鉛直線の一 方はアンカー位置を通り、もう一方はカーソル位置を通る。これは、一端が既 知であるようなX軸方向の範囲を決定する際に使う事ができる。 -- MODE=5のとき、カーソル位置を通る水平線が画面の幅いっぱいに展開する。 これは、(たとえばX軸方向の範囲の始点などの)X座標値を決定するのに使う事 ができる。アンカーは無視される。 -- MODE=6のとき、カーソル位置を通る鉛直線が画面の高さいっぱいに展開する。 これは、(たとえばY軸方向の範囲の始点などの)Y座標値を決定するのに使う事 ができる。アンカーは無視される。 -- MODE=7のとき、カーソルを中心とする十字線が画面いっぱいに展開する。 アンカーは無視される。 戻り値: PGBAND : 呼出しに成功したとき1。カーソルが使えない、あるいは その他のエラーが生じたとき0。 引数: MODE (input) : display モード(0, 1, ..7: 上記参照). POSN (input) : POSN=1のとき, PGBANDによってカーソルは(X,Y)に移動す る。POSN=0のとき、カーソルは移動しない。(デバイスに よってはこれは無視される) XREF (input) : ワールド座標系によるアンカーのX座標値 YREF (input) : ワールド座標系によるアンカーのY座標値 X (in/out) : ワールド座標系によるカーソルのX座標値 Y (in/out) : ワールド座標系によるカーソルのY座標値 CH (output) : 利用者が入力した文字。カーソルが使用できないか、あ るいはその他のエラーが生じたときは、CHAR(0)(すなわ ちASCIIコードのNUL)が入る。 注意: カーソルが使用できないデバイスであったり、利用者がカーソルを移動 しなかったりした場合でも、カーソル位置(X,Y)はPGBANDによって変わること がある。このような場合、(X,Y)は要求された位置に最も近いピクセルの位置 となる。
SUBROUTINE PGBBUF 画像出力コマンドの内部バッファへの保存を開始する。対応するPGEBUFが呼び 出される(かまたはPGUPDTによってバッファがクリアされる)までコマンドはバ ッファに蓄えられる。これによりPGPLOTの効用を高める事ができる。PGBBUFは 内部カウンタを進めるが、一方PGEBUFは内部カウンタを戻し、カウンタが0に なったときバッファは出力デバイスへフラッシュされる。 PGBBUF と PGEBUF の呼び出しは常に対になっていなければならない。 引数: なし
INTEGER FUNCTION PGBEG (UNIT, FILE, NXSUB, NYSUB) INTEGER UNIT CHARACTER*(*) FILE INTEGER NXSUB, NYSUB PGPLOTを開始し、出力ファイルをオープンする。他のPGPLOTサブルーチンを呼 び出す前に PGBEG を一回呼び出さなければならない。 もしPGPLOT用の出力ファイルが既にオープンされている場合は、そのファイル は新しいファイルがオープンされる前にクローズされる。 戻り値: PGBEG : 状態をあらわす戻り値。1は正常終了、それ以外はエラー をあらわす。エラーメッセージは標準エラー出力に書き 出される。戻り値を調べるためには、たとえば IER=PGBEG(...)というように PGBEGを関数として呼び出す。 PGBEGは呼び出しプログラム側でINTEGER型に宣言されて いなければならないことに注意すること。 引数: UNIT (input) : PGBEGはこの変数を無視する(0を 用いるとよい) FILE (input) : 描画のために"デバイス指定"する。 デバイス指定はインストールの状態に依存するが、通常 "device/type"または"file/type"の形をとる。この引数 がクエスチョンマーク('?')のとき、 PGBEG は利用者に(デバイスを指定する)文字列の入力を促す。 引数が空白文字列(' ')のとき、 PGBEG は 環境変数 PGPLOT_DEV の値を使用する。 NXSUB (input) : ビュー平面のX方向の分割数(>0または<0) NXSUB (input) : ビュー平面のY方向の分割数(>0) PGPLOTは各ページまたはスクリーンにNXSUB×NYSUBのグ ラフを作製する。ビュー平面がこのように分割されてい る時、 PGPAGE によって次のパネルへ移動するが次の物 理ページには移動しない。 NXSUB > 0のとき、PGPLOTは行順にパネルを使用する。 NXSUB < 0のとき、列順にパネルを使用する。
SUBROUTINE PGBIN (NBIN, X, DATA, CENTER) INTEGER NBIN REAL X(*), DATA(*) LOGICAL CENTER X(1..NBIN)を横軸の値、DATA(1..NBIN)を縦軸の値としたNBIN個の値からなる ヒストグラムを描く。ビンの間隔はXの値にしたがってあいている。 引数: NBIN (input) : 値の数。 X (input) : binの横座標の値。 DATA (input) : binの値 CENTER (input) : .TRUE.のとき、X の値はbinの中央を示す。.FALSE.のと き、X の値はbinの低い方の端(X座標の)を示す。
SUBROUTINE PGBOX (XOPT, XTICK, NXSUB, YOPT, YTICK, NYSUB) CHARACTER*(*) XOPT, YOPT REAL XTICK, YTICK INTEGER NXSUB, NYSUB 枠、座標、数値ラベルなどでビューポートに注釈をつける。PGBOX は 利用者 がCALLする代わりにPGENV からCALLされるが、利用者が明示的にCALLすること も出来る。 引数: XOPT (input) : X(水平)方向のプロットのオプションをあらわす文字列。 各オプションは1文字であらわされ、並べる順番はどうで もよい。 XTICK (input) : ワールド座標でのX軸上の刻みの幅。XTICK=0.0のとき、 刻み幅はPGBOXによってX軸上に少 なくとも3つの刻みが存在するように決定される。 NXSUB (input) : 主刻みを副刻みで分割する数。 XTIC=0.0であるかNXSUB=0であるときは、分割数は PGBOXによって決定される。 YOPT (input) : Y(垂直)方向のプロットのオプションをあらわす文字列。 書式はXOPTとおなじ。 YTICK (input) : Y座標に関して XTICK とおなじ働きをする。 NYSUB (input) : Y座標に関して NXSUB とおなじ働きをする。 XOPTとYOPTパラメータのオプション: A : 座標軸を描く(X座標は水平線 Y=0、Y座標は鉛直線 X=0) B : 枠の底辺(X)または左辺(Y)を描く。 C : 枠の上辺(X)または右辺(Y)を描く。 G : 鉛直方向(X)または水平方向(Y)の格子を描く。 I : 刻み線を反転させる。すなわち、ビューポートの内側ではなく外側に描く。 L : ラベルを対数的につける(後述)。 N : 数字ラベルを、通常の位置であるビューポート下側(X)または左側(Y)に書く。 P : 主刻み線を枠の外側に伸ばす(突き出す)。Iオプションが指定されている ときは無視される。 M : 数字ラベルを通常とは異なりビューポート上側(X)または右側(Y)に書く。 T : 主刻み線を主刻み間隔で描く S : 副刻み線を描く。 V : 数値ラベルの向きを縦にする。このオプションはYについてのみ有効である。 デフォルトではY軸に並行に書く。 1 : 自動的にラベルを振らず、10進でラベルを振る(PGNUMB 参照)。 2 : 自動的にラベルを振らず、指数的にラベルを振る。 完全な枠を描くためには、XOPTとYOPTの両方に BC を指定する。刻み線描画を 指定した場合は、指定に従って座標軸、フレームあるいはその両方に刻まれる。 A、B、Cのいずれも指定されていない場合には、刻み線は描かれない。PGBOX が PGENV から 呼び出される場合には、XOPTとYOPTはAXISの値にしたがって以 下のように設定される: -1: 'BC', 0: 'BCNST', 1: 'ABCNST', 2: 'ABCGNST'. 対数座標のときは、主刻み幅は常に1.0である。数字ラベルは10**(x)となる。 ただしxは刻み線のワールド座標での位置である。副刻み線が要求されている 場合は、それぞれの主刻み線の間に8個の副刻み線が等間隔(対数的)に描かれる。 座標表示に時間(日、時、分、秒)または角度(度、分、秒)を加えたい場合は、 PGTBOXを使用するとよい。
SUBROUTINE PGCIRC (XCENT, YCENT, RADIUS) REAL XCENT, YCENT, RADIUS 円を描く。このルーチンの挙動は領域塗りつぶしスタイルの属性に依存する。 領域塗りつぶしスタイルがSOLID(デフォルト)のとき、円の内部は現在のカラー インデックスを用いて塗りつぶされる。領域塗りつぶしスタイルがHORROWのと き、現在の線属性(カラーインデックス、ラインスタイル、ライン幅)を用いて 円の外形が描かれる。 引数: XCENT (input) : ワールド座標系での円の中心のX座標。 YCENT (input) : ワールド座標系での円の中心のY座標。 RADIUS (input) : ワールド座標系での円の半径。
SUBROUTINE PGCLOS 現在選択されているグラフィックスデバイスを閉じる。デバイスが閉じられた 後、開かれている他のデバイスをPGSLCTで選ぶか、または他のデバイスを PGOPENで開くまでは、それ以降のプロットは行えない。PGCLOSの呼び出しを行 わないと、プロットの一部または全てが失われる恐れがある。 [このルーチンはPGPLOT Version 5.1.0で付け加えられた。それよりも古いプ ログラムは、代わりにPGENDを使っている。] 引数: 無し
SUBROUTINE PGCONB (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR, 1 BLANK) INTEGER IDIM, JDIM, I1, I2, J1, J2, NC REAL A(IDIM,JDIM), C(*), TR(6), BLANK 配列データのコンターを描く。このルーチンは引数BLANKで定義されたマジッ ク値を持つ配列要素を無視してコンターマップ中にギャップを作ること以外は PGCONSと同じである。このルーチンはデータが全ての点ではないがほとんどの 点でデータを得られている場合に便利である。 引数: A (input) : データ配列。 IDIM (input) : 配列Aの大きさ(1番目の添字について)。 JDIM (input) : 配列Aの大きさ(2番目の添字について)。 I1,I2 (input) : コンターに使用するデータの範囲(1番目の添字について)。 J1,J2 (input) : コンターに使用するデータの範囲(2番目の添字について)。 C (input) : コンターレベルを格納する配列(配列Aのデータと同じ単 位とする)。次数は少なくともNC以上でなければならない。 NC (input) : コンターレベルの数。配列Cの次数より小さくなければな らない。(NCの符号が意味を持つPGCONT との互換性のために)この引数は絶対値がコンターレベル の数として使用される。 TR (input) : I,Jグリッドとワールド座標系の変換を定義する配列。 A(I,J)点のワールド座標での位置は次の式で与えられる。 X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J TR(3)とTR(5)は通常は0である(座標変換が回転やシアー を含まない限いかぎり)。 BLANK (input) : この値と等しいAの要素は無視される(空白になる)。
SUBROUTINE PGCONL (A, IDIM, JDIM, I1, I2, J1, J2, C, TR, 1 LABEL, INTVAL, MININT) INTEGER IDIM, JDIM, I1, J1, I2, J2, INTVAL, MININT REAL A(IDIM,JDIM), C, TR(6) CHARACTER*(*) LABEL PGCONT によって描かれたルーチンにラベルをつける。まずコンター線を引く ためにPGCONTが呼ばれ、次にラベルを付け加えるためにこのルーチンが呼ばれ る。ラベルはコンターの線上に等間隔に、上が大き値の方向になるように書か れる。ラベルは不透明であり、下のコンター線はラベルによって隠れる。ラベ ルは現在の属性(文字の高さ、線の幅、カラーインデックス、フォント)に従う。 先頭の9個の引数の意味は PGCONT と同じであり、通常は PGCONTで使われたの とおなじ値を使う。一つのコンターレベルしか指定できないことに注意せよ。 各レベルのコンターにラベルをつけたい場合は、それぞれについて PGCONL を 呼ぶこと。ラベルにはLABEL引数に与えた文字列が使用される。 コンターに沿ったラベルの配置はINTVALとMININTの二つのパラメータによって 決定される。 The spacing of labels along the contour is specified by parameters INTVAL and MININT. The routine follows the contour through the array, counting the number of cells that the contour crosses. The first label will be written in the MININT'th cell, and additional labels will be written every INTVAL cells thereafter. A contour that crosses less than MININT cells will not be labelled. Some experimentation may be needed to get satisfactory results; a good place to start is INTVAL=20, MININT=10. Arguments: A (input) : data array. IDIM (input) : first dimension of A. JDIM (input) : second dimension of A. I1, I2 (input) : range of first index to be contoured (inclusive). J1, J2 (input) : range of second index to be contoured (inclusive). C (input) : the level of the contour to be labelled (one of the values given to PGCONT). TR (input) : array defining a transformation between the I,J grid of the array and the world coordinates. The world coordinates of the array point A(I,J) are given by: X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J Usually TR(3) and TR(5) are zero - unless the coordinate transformation involves a rotation or shear. LABEL (input) : character strings to be used to label the specified contour. Leading and trailing blank spaces are ignored. INTVAL (input) : spacing along the contour between labels, in grid cells. MININT (input) : contours that cross less than MININT cells will not be labelled.
SUBROUTINE PGCONS (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR) INTEGER IDIM, JDIM, I1, I2, J1, J2, NC REAL A(IDIM,JDIM), C(*), TR(6) Draw a contour map of an array. The map is truncated if necessary at the boundaries of the viewport. Each contour line is drawn with the current line attributes (color index, style, and width). This routine, unlike PGCONT, does not draw each contour as a continuous line, but draws the straight line segments composing each contour in a random order. It is thus not suitable for use on pen plotters, and it usually gives unsatisfactory results with dashed or dotted lines. It is, however, faster than PGCONT, especially if several contour levels are drawn with one call of PGCONS. Arguments: A (input) : data array. IDIM (input) : first dimension of A. JDIM (input) : second dimension of A. I1,I2 (input) : range of first index to be contoured (inclusive). J1,J2 (input) : range of second index to be contoured (inclusive). C (input) : array of contour levels (in the same units as the data in array A); dimension at least NC. NC (input) : number of contour levels (less than or equal to dimension of C). The absolute value of this argument is used (for compatibility with PGCONT, where the sign of NC is significant). TR (input) : array defining a transformation between the I,J grid of the array and the world coordinates. The world coordinates of the array point A(I,J) are given by: X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J Usually TR(3) and TR(5) are zero - unless the coordinate transformation involves a rotation or shear.
SUBROUTINE PGCONT (A, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR) INTEGER IDIM, JDIM, I1, J1, I2, J2, NC REAL A(IDIM,JDIM), C(*), TR(6) 配列の等高線画面を描く。この画面は必要ならばビューポート境界で切断され る。それぞれの線は、NC が正の場合(下記)を除き、カレントの設定(color index, style, width)で描かれる。また line style は PGCONTによって正値 の等高線のとき 1 (直線) に、負値の等高線のとき 2 (点線) にセットされる。 引数: A (input) : プロットする配列。 IDIM (input) : 配列Aの行数。 JDIM (input) : 配列Aの列数。 I1, I2 (input) : 配列の中のプロットする列のrange。 J1, J2 (input) : 配列の中のプロットする行のrange。 C (input) : NC コンタレベル個の配列。少なくとも NC 次元以上。 NC (input) : +/- を持つ、コンタレベルの数(値は C の次元以下)。 NC が正の場合、つまり値がコンタレベル数のとき、line style は 上述のように自動的に選択される。 NC が負の場合、つまり値が -コンタレベル数のとき、全ての等高線に ついてカレントの line style の設定が使われる。 TR (input) : 配列の行列とworld座標との間の変換マトリクス。 配列の点 A(I,J)のworld座標は、次のように与えられる。 X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J 大抵の場合は変換に回転や剪断を含まないから、TR(3) と TR(5) は 0 で用いられる。
SUBROUTINE PGCONX (A,IDIM,JDIM,I1,I2,J1,J2,C,NC,PLOT) INTERGER IDIM,JDIM,I1,J1,I2,J2,NC REAL A(IDIM,JDIM),C(*) EXTERNAL PLOT ユーザー定義によるプロットルーチンを使用して、等高線図を描く。 このルーチンはデータが矩形グリッドに配置されていないときに PGCONT の代 わりに使用する。 PGCONT はある配列(I,J)のグリッドとワールド座標(x,y)との間を線形に変換 するだけだが、PGCONX はユーザーが定義したサブルーチンによりあらゆる変 換を可能にする。 その変換は格子点が重なるようなものも許されるが、但し等高線を作成するア ルゴリズムによる条件として、矩形トポロジー(的配置)を扱うものでなくては ならない。 例えば、変形した矩形グリッドの例として、theta=0.1n(pi/2) (n=0,1,..,10)、 r=0.25m (m=0,1,..,4) という極座標で与えられるデータを考える。 このグリッドには55の格子点があり、そのうち11点が原点に集中しているが、 しかしこの場合でも、PGCONX に渡されるデータ配列は(11,5)の次元を持ち、 そのデータ値は55の要素全てに配置されなければならない。 PGCONX はまた、立体図のような、等高線自体がある形状を表すような特殊な 用途にも使用できる。 ビューポートの境界では、等高線図のはみ出る部分は切り捨てられる。 どの等高線もカレントの属性(カラーインデックス、スタイル、幅)の線で描か れるが、もし引数 NC が正値ならば(下記参照)、PGCONX はラインスタイルを 正のデータについて 1 (実線)、負のデータについて 2 (破線)に設定する。 等高線の線の属性は、もし望むならば、ユーザーが適当なサブルーチンをコー ルすることでも変更できる。 引数: A (input) : データ配列。 IDIM (input) : 配列Aの行(列)数。 JDIM (input) : 配列Aの列(行)数。 I1, I2 (input) : 等高線にする行(列)の範囲。(配列中になければならない) J1, J2 (input) : 等高線にする列(行)の範囲。(配列中になければならない) C (input) : NC個の contour level の配列。少なくとも NC 要素必要。 NC (input) : C の要素数以下の contour level 数(正/負)。もし NC が 正なら、ラインスタイルは上述のように自動的に選択され る。負なら、それは contour level 数にマイナスを付け たものと解釈され、また全ての等高線にカレントの属性が 使用される。 PLOT (input) : PGCONX が実際の描画の際にコールするべきな、ユーザー によって与えられるサブルーチンのアドレス(名前)。この サブルーチンは、PGCONX を使用するプログラム中で EXTERNAL として定義されていなければならない。 サブルーチン PLOT は、4つの引数と共にコールされるようにする。 CALL PLOT(VISBLE,X,Y,Z) X,Y (input) は、配列A中の座標(I,J)に相当する real 値である。 もし VISBLE (input, integer) が 1 ならば、PLOT は現在のペン位置からワー ルド座標(X,Y)に向かって実際に線を描く。 もし 0 ならば、ただペン位置を(X,Y)に移動するだけである。 Z はカレントの contour level の値であって、必要なら PLOT により使用さ れる。 例: SUBROUTINE PLOT (VISBLE,X,Y,Z) REAL X, Y, Z, XWORLD, YWORLD INTEGER VISBLE XWORLD = X*COS(Y) ! ここがユーザー定義による YWORLD = X*SIN(Y) ! 変換 IF (VISBLE.EQ.0) THEN CALL PGMOVE (XWORLD, YWORLD) ELSE CALL PGDRAW (XWORLD, YWORLD) END IF END
SUBROUTINE PGCTAB(L, R, G, B, NC, CONTRA, BRIGHT) INTEGER NC REAL L(NC), R(NC), G(NC), B(NC), CONTRA, BRIGHT Use the given color table to change the color representations of all color indexes marked for use by PGIMAG. To change which color indexes are thus marked, call PGSCIR before calling PGCTAB or PGIMAG. On devices that can change the color representations of previously plotted graphics, PGCTAB will also change the colors of existing graphics that were plotted with the marked color indexes. This feature can then be combined with PGBAND to interactively manipulate the displayed colors of data previously plotted with PGIMAG. Limitations: 1. Some devices do not propagate color representation changes to previously drawn graphics. 2. Some devices ignore requests to change color representations. 3. The appearance of specific color representations on grey-scale devices is device-dependent. Arguments: L (input) : An array of NC normalized ramp-intensity levels corresponding to the RGB primary color intensities in R(),G(),B(). Colors on the ramp are linearly interpolated from neighbouring levels. Levels must be sorted in increasing order. 0.0 places a color at the beginning of the ramp. 1.0 places a color at the end of the ramp. Colors outside these limits are legal, but will not be visible if CONTRA=1.0 and BRIGHT=0.5. R (input) : An array of NC normalized red intensities. G (input) : An array of NC normalized green intensities. B (input) : An array of NC normalized blue intensities. NC (input) : The number of color table entries. CONTRA (input) : The contrast of the color ramp (normally 1.0). BRIGHT (input) : Brightness at the center colorindex (normally 0.5).
INTEGER FUNCTION PGCURS (X, Y, CH) REAL X, Y CHARACTER*(*) CH Read the cursor position and a character typed by the user. The position is returned in world coordinates. PGCURS positions the cursor at the position specified, allows the user to move the cursor using the joystick or arrow keys or whatever is available on the device. When he has positioned the cursor, the user types a single character on the keyboard; PGCURS then returns this character and the new cursor position (in world coordinates). Returns: PGCURS : 1 if the call was successful; 0 if the device has no cursor or some other error occurs. Arguments: X (in/out) : the world x-coordinate of the cursor. Y (in/out) : the world y-coordinate of the cursor. CH (output) : the character typed by the user; if the device has no cursor or if some other error occurs, the value CHAR(0) [ASCII NUL character] is returned. Note: The cursor coordinates (X,Y) may be changed by PGCURS even if the device has no cursor or if the user does not move the cursor. Under these circumstances, the position returned in (X,Y) is that of the pixel nearest to the requested position.
SUBROUTINE PGDRAW (X, Y) REAL X, Y 現在のペン位置から、ワールド座標系 (X,Y) で表された位置まで線を引く。 線は現在のウィンドウの縁に合わせて切り取られる。新しいペン位置はワール ド座標系の (X,Y) に移る。 引数: X (input) : ワールド座標による、線の終端のx座標 Y (input) : ワールド座標による、線の終端のy座標
SUBROUTINE PGEBUF PGEBUF の呼び出しは、直前の PGBBUF の呼び出しによる出力のバッファリン グを終了する。PGBBUF と PGEBUF は必ずペアで使用されなければならない。 PGBBUF は内部カウンタを加算し、PGEBUF はこのカウンタを減算する。カウン タが 0 になると、バッファリングされた出力が出力デバイスに描き出される。 引数: なし
SUBROUTINE PGEND PGPLOT を終了し、プロットファイルを閉じ、開いている全てのグラフィック デバイスを開放する。もし PGEND を呼び出さずに終了すると、開いているプ ロットの一部あるいは全部が失われる恐れがある。 引数: なし
SUBROUTINE PGENV (XMIN, XMAX, YMIN, YMAX, JUST, AXIS) REAL XMIN, XMAX, YMIN, YMAX INTEGER JUST, AXIS PGPLOTの"描画環境"をセットする。PGENVはPGPT,PGLINE等を後で呼び出すため のスケーリングを設定する。プロッタは新しいページまたはパネルに移動し、 必要に応じて画面を消去する。プロンプトの状態がONである場合は、(PGASKを 見よ)画面の消去の前に利用者からの確認を必要とする。呼び出された場合、 AXIS引数での指定に従って枠、座標、ラベル等が描かれる。 引数: XMIN (input) : ビューポートで左下隅になるワールド座標のx座標値。 XMAX (input) : ビューポートで右上隅になるワールド座標のx座標値 (XMAXはXMINより小さくても構わない事に注意)。 YMIN (input) : ビューポートで左下隅になるワールド座標のy座標値。 YMAX (input) : ビューポートで右上隅になるワールド座標のy座標値。 (YMAXはYMINより小さくても構わない事に注意)。 JUST (input) : JUST=1のとき、1インチあたりのワールド座標のx軸、y軸 のスケールは同じになる。それ以外の時、スケールは独 立になる。 AXIS (input) : 座標軸、目盛その他の描画を制御する。 AXIS = -2 : 枠、座標軸、ラベルを描かない; AXIS = -1 : 枠のみを描く; AXIS = 0 : 座標つき枠を描く; AXIS = 1 : AXIS=0と同じだが、座標軸(X=0,Y=0)を描く; AXIS = 2 : AXIS=1と同じだが、主刻み毎にグリッドを描く; AXIS = 10 : 枠を描き、対数的にX座標のラベルをつける。 AXIS = 20 : 枠を描き、対数的にy座標のラベルをつける。 AXIS = 30 : 枠を描き、両座標とも対数的にラベルをつける。 それ以外の座標軸オプションには、PGBOXを使う。 要求されるオプションコードを含むPGPLOT_ENVOPT環境変数を設定する事によっ てPGENVにPGBOXを追加オプショ ン付きで呼び出すようにできる。 例: PGPLOT_ENVOPT=P ! 外向きに目盛りを描く。 PGPLOT_ENVOPT=I ! 目盛マークを逆転させる。 PGPLOT_ENVOPT=IV ! 目盛マーク逆転させ、y軸のラベルを鉛直に描く。
SUBROUTINE PGERAS 現在のページまたはパネル上の全ての絵を消去する。 引数: なし
SUBROUTINE PGERRB (DIR, N, X, Y, E, T) INTEGER DIR, N REAL X(*), Y(*), E(*) REAL T Plot error bars in the direction specified by DIR. This routine draws an error bar only; to mark the data point at the start of the error bar, an additional call to PGPT is required. Arguments: DIR (input) : direction to plot the error bar relative to the data point. One-sided error bar: DIR is 1 for +X (X to X+E); 2 for +Y (Y to Y+E); 3 for -X (X to X-E); 4 for -Y (Y to Y-E). Two-sided error bar: DIR is 5 for +/-X (X-E to X+E); 6 for +/-Y (Y-E to Y+E). N (input) : number of error bars to plot. X (input) : world x-coordinates of the data. Y (input) : world y-coordinates of the data. E (input) : value of error bar distance to be added to the data position in world coordinates. T (input) : length of terminals to be drawn at the ends of the error bar, as a multiple of the default length; if T = 0.0, no terminals will be drawn. Note: the dimension of arrays X, Y, and E must be greater than or equal to N. If N is 1, X, Y, and E may be scalar variables, or expressions.
SUBROUTINE PGERRX (N, X1, X2, Y, T) INTEGER N REAL X1(*), X2(*), Y(*) REAL T Plot horizontal error bars. This routine draws an error bar only; to mark the data point in the middle of the error bar, an additional call to PGPT or PGERRY is required. Arguments: N (input) : number of error bars to plot. X1 (input) : world x-coordinates of lower end of the error bars. X2 (input) : world x-coordinates of upper end of the error bars. Y (input) : world y-coordinates of the data. T (input) : length of terminals to be drawn at the ends of the error bar, as a multiple of the default length; if T = 0.0, no terminals will be drawn. Note: the dimension of arrays X1, X2, and Y must be greater than or equal to N. If N is 1, X1, X2, and Y may be scalar variables, or expressions, eg: CALL PGERRX(1,X-SIGMA,X+SIGMA,Y)
SUBROUTINE PGERRY (N, X, Y1, Y2, T) INTEGER N REAL X(*), Y1(*), Y2(*) REAL T Plot vertical error bars. This routine draws an error bar only; to mark the data point in the middle of the error bar, an additional call to PGPT or PGERRX is required. Arguments: N (input) : number of error bars to plot. X (input) : world x-coordinates of the data. Y1 (input) : world y-coordinates of top end of the error bars. Y2 (input) : world y-coordinates of bottom end of the error bars. T (input) : length of terminals to be drawn at the ends of the error bar, as a multiple of the default length; if T = 0.0, no terminals will be drawn. Note: the dimension of arrays X, Y1, and Y2 must be greater than or equal to N. If N is 1, X, Y1, and Y2 may be scalar variables or expressions, eg: CALL PGERRY(1,X,Y+SIGMA,Y-SIGMA)
SUBROUTINE PGETXT Some graphics terminals display text (the normal interactive dialog) on the same screen as graphics. This routine erases the text from the view surface without affecting the graphics. It does nothing on devices which do not display text on the graphics screen, and on devices which do not have this capability. Arguments: None
SUBROUTINE PGFUNT (FX, FY, N, TMIN, TMAX, PGFLAG) REAL FX, FY EXTERNAL FX, FY INTEGER N REAL TMIN, TMAX INTEGER PGFLAG Draw a curve defined by parametric equations X = FX(T), Y = FY(T). Arguments: FX (external real function): supplied by the user, evaluates X-coordinate. FY (external real function): supplied by the user, evaluates Y-coordinate. N (input) : the number of points required to define the curve. The functions FX and FY will each be called N+1 times. TMIN (input) : the minimum value for the parameter T. TMAX (input) : the maximum value for the parameter T. PGFLAG (input) : if PGFLAG = 1, the curve is plotted in the current window and viewport; if PGFLAG = 0, PGENV is called automatically by PGFUNT to start a new plot with automatic scaling. Note: The functions FX and FY must be declared EXTERNAL in the Fortran program unit that calls PGFUNT.
SUBROUTINE PGFUNX (FY, N, XMIN, XMAX, PGFLAG) REAL FY EXTERNAL FY INTEGER N REAL XMIN, XMAX INTEGER PGFLAG Draw a curve defined by the equation Y = FY(X), where FY is a user-supplied subroutine. Arguments: FY (external real function): supplied by the user, evaluates Y value at a given X-coordinate. N (input) : the number of points required to define the curve. The function FY will be called N+1 times. If PGFLAG=0 and N is greater than 1000, 1000 will be used instead. If N is less than 1, nothing will be drawn. XMIN (input) : the minimum value of X. XMAX (input) : the maximum value of X. PGFLAG (input) : if PGFLAG = 1, the curve is plotted in the current window and viewport; if PGFLAG = 0, PGENV is called automatically by PGFUNX to start a new plot with X limits (XMIN, XMAX) and automatic scaling in Y. Note: The function FY must be declared EXTERNAL in the Fortran program unit that calls PGFUNX. It has one argument, the x-coordinate at which the y value is required, e.g. REAL FUNCTION FY(X) REAL X FY = ..... END
SUBROUTINE PGFUNY (FX, N, YMIN, YMAX, PGFLAG) REAL FX EXTERNAL FX INTEGER N REAL YMIN, YMAX INTEGER PGFLAG Draw a curve defined by the equation X = FX(Y), where FY is a user-supplied subroutine. Arguments: FX (external real function): supplied by the user, evaluates X value at a given Y-coordinate. N (input) : the number of points required to define the curve. The function FX will be called N+1 times. If PGFLAG=0 and N is greater than 1000, 1000 will be used instead. If N is less than 1, nothing will be drawn. YMIN (input) : the minimum value of Y. YMAX (input) : the maximum value of Y. PGFLAG (input) : if PGFLAG = 1, the curve is plotted in the current window and viewport; if PGFLAG = 0, PGENV is called automatically by PGFUNY to start a new plot with Y limits (YMIN, YMAX) and automatic scaling in X. Note: The function FX must be declared EXTERNAL in the Fortran program unit that calls PGFUNY. It has one argument, the y-coordinate at which the x value is required, e.g. REAL FUNCTION FX(Y) REAL Y FX = ..... END
SUBROUTINE PGGRAY (A, IDIM, JDIM, I1, I2, J1, J2, 1 FG, BG, TR) INTEGER IDIM, JDIM, I1, I2, J1, J2 REAL A(IDIM,JDIM), FG, BG, TR(6) 配列のグレースケールマップを現在のウィンドウに描く。インデックス (I1:I2, J1:J2)で定義される配列Aの一部が、変換マトリクスTRによって変換 され、ワールド座標系のビューサーフェスに表示される。表示された四辺形領 域は、ウィンドウの端で切り取られ、各点は配列の値に従って定められた暗度 でシェーディングされる。暗度(shade)は0から1までの範囲を持ち、値は background level(BG) と foreground level (FG) の間の1次補間値をとる。 すなわち、下のような値となる。 shade = [A(i,j) - BG] / [FG - BG] BG は FG の値より大きくても小さくても良い。BG とFG 間に入らない値の点 の暗度は、適当に0か1に設定される。 PGGRAY は、画像のために指定されたカラーインデックスのレンジの中でいく つのインデックスが利用できるかによって、2つの異なるアルゴリズムを用い る(カラーインデックスのレンジは PGSCIRルーチンでセットされ、現在およ びデフォルトのレンジは PGQCIRルーチンを呼び出すことで参照できる)。 もし16色以上のインデックスが利用可能ならば、PGGRAY はまずbackground color (color index 0)とforeground color (color index 1)の間を線型的に 区切ってcolorを設定し、それをこれらのカラーインデックスにアサインする。 そしてこれらのカラーインデックスを用いて画像を描くために PGIMAGを呼び 出す。このモードでは、シェーディングされた領域は"不透明"、つまり全ての ピクセルに色が設定されている。 もし16色以上のindexが使えない場合、PGGRAY は カラーインデックス 1 のみ を用いて、"ディザリング(dithering)"を行い、暗度(上記のように計算され る)によって塗りつぶすピクセルを決定する。このモードでは、シェーディン グされた領域は"透明"であり、下に描かれているグラフィクスを見ることがで きる。 変換マトリクス TR は、各配列の要素を表わす"セル"の中心のワールド座標を 計算するために用いられる。配列の要素A(I,J)におけるセルの中心のワールド 座標は、次のように与えられる。 X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J 大抵の場合は変換に回転やせん断を含まないから、TR(3) と TR(5) は0で用い られる。また、PGGRAY によってシェーディングされる四辺形領域のコーナー は、この変換を用いて(I1-0.5,J1-0.5),(I2+0.5,J2+0.5)のように与えられる。 引数: A (input) : プロットする配列 IDIM (input) : 配列Aの行数 JDIM (input) : 配列Aの列数 I1, I2 (input) : 配列の中のプロットする列の範囲 J1, J2 (input) : 配列の中のプロットする行の範囲 FG (input) : foreground color (カラーインデックス 1)として表示す る配列中の値 BG (input) : background color (カラーインデックス 0)として表示す る配列中の値 TR (input) : 配列の行列とワールド座標との間の変換行列
SUBROUTINE PGHI2D (DATA, NXV, NYV, IX1, IX2, IY1, IY2, X, IOFF, 1 BIAS, CENTER, YLIMS) INTEGER NXV, NYV, IX1, IX2, IY1, IY2 REAL DATA(NXV,NYV) REAL X(IX2-IX1+1), YLIMS(IX2-IX1+1) INTEGER IOFF REAL BIAS LOGICAL CENTER Plot a series of cross-sections through a 2D data array. Each cross-section is plotted as a hidden line histogram. The plot can be slanted to give a pseudo-3D effect - if this is done, the call to PGENV may have to be changed to allow for the increased X range that will be needed. Arguments: DATA (input) : the data array to be plotted. NXV (input) : the first dimension of DATA. NYV (input) : the second dimension of DATA. IX1 (input) IX2 (input) IY1 (input) IY2 (input) : PGHI2D plots a subset of the input array DATA. This subset is delimited in the first (x) dimension by IX1 and IX2 and the 2nd (y) by IY1 and IY2, inclusively. Note: IY2 < IY1 is permitted, resulting in a plot with the cross-sections plotted in reverse Y order. However, IX2 must be => IX1. X (input) : the abscissae of the bins to be plotted. That is, X(1) should be the X value for DATA(IX1,IY1), and X should have (IX2-IX1+1) elements. The program has to assume that the X value for DATA(x,y) is the same for all y. IOFF (input) : an offset in array elements applied to successive cross-sections to produce a slanted effect. A plot with IOFF > 0 slants to the right, one with IOFF < 0 slants left. BIAS (input) : a bias value applied to each successive cross- section in order to raise it above the previous cross-section. This is in the same units as the data. CENTER (input) : if .true., the X values denote the center of the bins; if .false. the X values denote the lower edges (in X) of the bins. YLIMS (input) : workspace. Should be an array of at least (IX2-IX1+1) elements.
SUBROUTINE PGHIST(N, DATA, DATMIN, DATMAX, NBIN, PGFLAG) INTEGER N REAL DATA(*) REAL DATMIN, DATMAX INTEGER NBIN, PGFLAG Draw a histogram of N values of a variable in array DATA(1...N) in the range DATMIN to DATMAX using NBIN bins. Note that array elements which fall exactly on the boundary between two bins will be counted in the higher bin rather than the lower one; and array elements whose value is less than DATMIN or greater than or equal to DATMAX will not be counted at all. Arguments: N (input) : the number of data values. DATA (input) : the data values. Note: the dimension of array DATA must be greater than or equal to N. The first N elements of the array are used. DATMIN (input) : the minimum data value for the histogram. DATMAX (input) : the maximum data value for the histogram. NBIN (input) : the number of bins to use: the range DATMIN to DATMAX is divided into NBIN equal bins and the number of DATA values in each bin is determined by PGHIST. NBIN may not exceed 200. PGFLAG (input) : if PGFLAG = 1, the histogram is plotted in the current window and viewport; if PGFLAG = 0, PGENV is called automatically by PGHIST to start a new plot (the x-limits of the window will be DATMIN and DATMAX; the y-limits will be chosen automatically. IF PGFLAG = 2,3 the histogram will be in the same window and viewport but with a filled area style. If pgflag=4,5 as for pgflag = 0,1, but simple line drawn as for PGBIN
SUBROUTINE PGIDEN プロットの一番下に、利用者名と日付、時間を表示する。 引数: なし
SUBROUTINE PGIMAG (A, IDIM, JDIM, I1, I2, J1, J2, 1 A1, A2, TR) INTEGER IDIM, JDIM, I1, I2, J1, J2 REAL A(IDIM,JDIM), A1, A2, TR(6) Draw a color image of an array in current window. The subsection of the array A defined by indices (I1:I2, J1:J2) is mapped onto the view surface world-coordinate system by the transformation matrix TR. The resulting quadrilateral region is clipped at the edge of the window. Each element of the array is represented in the image by a small quadrilateral, which is filled with a color specified by the corresponding array value. The subroutine uses color indices in the range C1 to C2, which can be specified by calling PGSCIR before PGIMAG. The default values for C1 and C2 are device-dependent; these values can be determined by calling PGQCIR. Note that color representations should be assigned to color indices C1 to C2 by calling PGSCR before calling PGIMAG. On some devices (but not all), the color representation can be changed after the call to PGIMAG by calling PGSCR again. Array values in the range A1 to A2 are mapped on to the range of color indices C1 to C2, with array values <= A1 being given color index C1 and values >= A2 being given color index C2. The mapping function for intermediate array values can be specified by calling routine PGSITF before PGIMAG; the default is linear. On devices which have no available color indices (C1 > C2), PGIMAG will return without doing anything. On devices with only one color index (C1=C2), all array values map to the same color which is rather uninteresting. An image is always "opaque", i.e., it obscures all graphical elements previously drawn in the region. The transformation matrix TR is used to calculate the world coordinates of the center of the "cell" that represents each array element. The world coordinates of the center of the cell corresponding to array element A(I,J) are given by: X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J Usually TR(3) and TR(5) are zero -- unless the coordinate transformation involves a rotation or shear. The corners of the quadrilateral region that is shaded by PGIMAG are given by applying this transformation to (I1-0.5,J1-0.5), (I2+0.5, J2+0.5). Arguments: A (input) : the array to be plotted. IDIM (input) : the first dimension of array A. JDIM (input) : the second dimension of array A. I1, I2 (input) : the inclusive range of the first index (I) to be plotted. J1, J2 (input) : the inclusive range of the second index (J) to be plotted. A1 (input) : the array value which is to appear with shade C1. A2 (input) : the array value which is to appear with shade C2. TR (input) : transformation matrix between array grid and world coordinates.
SUBROUTINE PGLAB (XLBL, YLBL, TOPLBL) CHARACTER*(*) XLBL, YLBL, TOPLBL Write labels outside the viewport. This routine is a simple interface to PGMTXT, which should be used if PGLAB is inadequate. Arguments: XLBL (input) : a label for the x-axis (centered below the viewport). YLBL (input) : a label for the y-axis (centered to the left of the viewport, drawn vertically). TOPLBL (input) : a label for the entire plot (centered above the viewport).
SUBROUTINE PGLCUR (MAXPT, NPT, X, Y) INTEGER MAXPT, NPT REAL X(*), Y(*) Interactive routine for user to enter a polyline by use of the cursor. Routine allows user to Add and Delete vertices; vertices are joined by straight-line segments. Arguments: MAXPT (input) : maximum number of points that may be accepted. NPT (in/out) : number of points entered; should be zero on first call. X (in/out) : array of x-coordinates (dimension at least MAXPT). Y (in/out) : array of y-coordinates (dimension at least MAXPT). Notes: (1) On return from the program, cursor points are returned in the order they were entered. Routine may be (re-)called with points already defined in X,Y (# in NPT), and they will be plotted first, before editing. (2) User commands: the user types single-character commands after positioning the cursor: the following are accepted: A (Add) - add point at current cursor location. D (Delete) - delete last-entered point. X (eXit) - leave subroutine.
SUBROUTINE PGLDEV 現在のバージョンのPGPLOTが認識する全てのデバイスタイプを端末に書き出す。 引数: なし
SUBROUTINE PGLEN (UNITS, STRING, XL, YL) REAL XL, YL INTEGER UNITS CHARACTER*(*) STRING Work out length of a string in x and y directions Input UNITS : 0 => answer in normalized device coordinates 1 => answer in inches 2 => answer in mm 3 => answer in absolute device coordinates (dots) 4 => answer in world coordinates 5 => answer as a fraction of the current viewport size STRING : String of interest Output XL : Length of string in x direction YL : Length of string in y direction
SUBROUTINE PGLINE (N, XPTS, YPTS) INTEGER N REAL XPTS(*), YPTS(*) 連続線(polyline)を引く基本ルーチン。連続線とは一つ以上の線分が連結した ものである。連続線を引くときには現在のカラーインデックス、線のスタイル、 太さなどの属性が用いられる。連続線はウィンドウの縁で切り取られる(クリ ッピング)。 引数: N (input) : 線を構成する点の数。つまり線は(N-1)本の線分で構成さ れる。Nは1より大きいこと。(1またはそれ以下のときは、 線は引かれない。) XPTS (input) : 各点のワールド座標系でのx座標を表す配列 YPTS (input) : 各点のワールド座標系でのx座標を表す配列 配列XおよびYの大きさはNかそれ以上でなければならない。現在の"ペン位置" はワールド座標系の(X(N),Y(N))に移動する。(N > 1のとき)
SUBROUTINE PGMOVE (X, Y) REAL X, Y "ペン"をワールド座標系であらわされた位置 (X,Y) に移動する、基本ルーチン。 線は引かれない。 引数: X (input) : ワールド座標による新しいペン位置のx座標 Y (input) : ワールド座標による新しいペン位置のy座標
SUBROUTINE PGMTXT (SIDE, DISP, COORD, FJUST, TEXT) CHARACTER*(*) SIDE, TEXT REAL DISP, COORD, FJUST ビューポートを基準として、指定した場所にテキストを書く(ビューポート内 外)。このルーチンはグラフに注釈を付けるときに便利である。PGLABはこの ルーチンを使用する。テキストは color-index、line-width、 character-height、character-font の各属性についてカレントの値を使用し て書かれる。 引数: SIDE (input) : 'B','L','T','R'のうちの一つを含まねばならない。これらはビュー ポートの Bottom, Left, Top, Right 部分を表わしている。もしこれ が 'LV' か 'RV' を含むとき、文字列はフレームに対して垂直方向に 書かれる。 DISP (input) : ビューポートの指定した辺からの文字列の離れ具合。ビューポート の外側に向かって、文字の高さ単位で指定する。値が正値だとビュー ポートの外側に書くが、負値だと内側に書くことになる。 COORD (input) : ピューポートの指定した辺に沿った文字列の位置。辺の内の何分の 一の場所かを小数(0〜1)で指定する。 FJUST (input) : ビューポートの指定した辺に沿う文字列の位置調整をする。もし FJUST=0.0 ならば文字列の左端が COORD 位置に置かれ、 FJUST=0.5 ならば文字列の中央が、 FJUST=1.0 ならば文字列の右端が、となる。 他の 0〜1 の値も有効だが、特に使う必要はないだろう。 TEXT (input) : プロットする文字列。位置調整の際に文字列末のスペースは無視さ れるが、文字列頭のスペースは意味を持つ。
SUBROUTINE PGNCUR (MAXPT, NPT, X, Y, SYMBOL) INTEGER MAXPT, NPT REAL X(*), Y(*) INTEGER SYMBOL Interactive routine for user to enter data points by use of the cursor. Routine allows user to Add and Delete points. The points are returned in order of increasing x-coordinate, not in the order they were entered. Arguments: MAXPT (input) : maximum number of points that may be accepted. NPT (in/out) : number of points entered; should be zero on first call. X (in/out) : array of x-coordinates. Y (in/out) : array of y-coordinates. SYMBOL (input) : code number of symbol to use for marking entered points (see PGPT). Note (1): The dimension of arrays X and Y must be greater than or equal to MAXPT. Note (2): On return from the program, cursor points are returned in increasing order of X. Routine may be (re-)called with points already defined in X,Y (number in NPT), and they will be plotted first, before editing. Note (3): User commands: the user types single-character commands after positioning the cursor: the following are accepted: A (Add) - add point at current cursor location. D (Delete) - delete nearest point to cursor. X (eXit) - leave subroutine.
SUBROUTINE PGNUMB (MM, PP, FORM, STRING, NC) INTEGER MM, PP, FORM CHARACTER*(*) STRING INTEGER NC このルーチンは数値を10進の文字表示に変換する。浮動小数点表示による丸め 誤差の問題を回避するために、数値は整数(MM)と10の累乗(10**PP)の形で与え る。出力文字列はMMの有効数字のみを保持し、整数形式(123)、小数形式 (0.0123)、指数形式(1.23x10**5)のいずれかになる。標準的なエスケープシー ケンス\u、\d、は巾指数をあらわし、\xは乗算記号をあらわす。このルーチン はPGBOXが表示する数字ラベルを作製するのに用いられる。 Formatting rules: - (a) Decimal notation (FORM=1): - Trailing zeros to the right of the decimal sign are omitted - The decimal sign is omitted if there are no digits to the right of it - When the decimal sign is placed before the first digit of the number, a zero is placed before the decimal sign - The decimal sign is a period (.) - No spaces are placed between digits (ie digits are not grouped in threes as they should be) - A leading minus (-) is added if the number is negative (b) Exponential notation (FORM=2): - The exponent is adjusted to put just one (non-zero) digit before the decimal sign - The mantissa is formatted as in (a), unless its value is 1 in which case it and the multiplication sign are omitted - If the power of 10 is not zero and the mantissa is not zero, an exponent of the form \x10\u[-]nnn is appended, where \x is a multiplication sign (cross), \u is an escape sequence to raise the exponent, and as many digits nnn are used as needed (c) Automatic choice (FORM=0): Decimal notation is used if the absolute value of the number is less than 10000 or greater than or equal to 0.01. Otherwise exponential notation is used. Arguments: MM (input) PP (input) : the value to be formatted is MM*10**PP. FORM (input) : controls how the number is formatted: FORM = 0 -- use either decimal or exponential FORM = 1 -- use decimal notation FORM = 2 -- use exponential notation STRING (output) : the formatted character string, left justified. If the length of STRING is insufficient, a single asterisk is returned, and NC=1. NC (output) : the number of characters used in STRING: the string to be printed is STRING(1:NC).
SUBROUTINE PGOLIN (MAXPT, NPT, X, Y, SYMBOL) INTEGER MAXPT, NPT REAL X(*), Y(*) INTEGER SYMBOL Interactive routine for user to enter data points by use of the cursor. Routine allows user to Add and Delete points. The points are returned in the order that they were entered (unlike PGNCUR). Arguments: MAXPT (input) : maximum number of points that may be accepted. NPT (in/out) : number of points entered; should be zero on first call. X (in/out) : array of x-coordinates. Y (in/out) : array of y-coordinates. SYMBOL (input) : code number of symbol to use for marking entered points (see PGPT). Note (1): The dimension of arrays X and Y must be greater than or equal to MAXPT. Note (2): On return from the program, cursor points are returned in the order they were entered. Routine may be (re-)called with points already defined in X,Y (number in NPT), and they will be plotted first, before editing. Note (3): User commands: the user types single-character commands after positioning the cursor: the following are accepted: A (Add) - add point at current cursor location. D (Delete) - delete the last point entered. X (eXit) - leave subroutine.
INTEGER FUNCTION PGOPEN (DEVICE) CHARACTER*(*) DEVICE グラフィックスデバイスをPGPLOTの出力対象として開く。デバイスを開くのに 成功すれば、そのデバイスが現在のデバイスとして選ばれ、それ以降のグラフ ィックスが出力される。この状態は、他のデバイスがPGSLCTで選ばれるまで、 あるいはそのデバイスがPGCLOSで閉じられるまで続く。 PGOPENから返される値を調べて、デバイスを開くのに成功し たことを確認するべきである。例えば以下のようにする。 ISTAT = PGOPEN('plot.ps/PS') IF (ISTAT .LE. 0 ) STOP PGOPENは呼び出すプログラムの中で、INGETERとして 宣言されている必要があることに注意。 引数DEVICEは、文字列定数または文字列変数である。この値は以下のいずれか でなければならない。 (1) A complete device specification of the form 'device/type' or 'file/type', where 'type' is one of the allowed PGPLOT device types (installation-dependent) and 'device' or 'file' is the name of a graphics device or disk file appropriate for this type. The 'device' or 'file' may contain '/' characters; the final '/' delimits the 'type'. If necessary to avoid ambiguity, the 'device' part of the string may be enclosed in double quotation marks. (2) A device specification of the form '/type', where 'type' is one of the allowed PGPLOT device types. PGPLOT supplies a default file or device name appropriate for this device type. (3) A device specification with '/type' omitted; in this case the type is taken from the environment variable PGPLOT_TYPE, if defined (e.g., setenv PGPLOT_TYPE PS). Because of possible confusion with '/' in file-names, omitting the device type in this way is not recommended. (4) A blank string (' '); in this case, PGOPEN will use the value of environment variable PGPLOT_DEV as the device specification, or '/NULL' if the environment variable is undefined. (5) A single question mark, with optional trailing spaces ('?'); in this case, PGPLOT will prompt the user to supply the device specification, with a prompt string of the form 'Graphics device/type (? to see list, default XXX):' where 'XXX' is the default (value of environment variable PGPLOT_DEV). (6) A non-blank string in which the first character is a question mark (e.g., '?Device: '); in this case, PGPLOT will prompt the user to supply the device specification, using the supplied string as the prompt (without the leading question mark but including any trailing spaces). (5)か(6)の場合は、デバイス指定は標準入力から読み出される。利用者はプロ ンプトに対し、(1), (2), (3)のいずれかのデバイス指定を与えなければなら ない。利用者がプロンプトにクエスチョンマークで答えると、利用できるデバ イスのタイプが全て表示され、再びプロンプトが示される。利用者がプロンプ トに対してファイル終端文字、例えばUNIXならctrl-Dを与えると、プログラム は実行を中断する。これによってプログラムが無限ループに陥る可能性を消し ている。このような動作が気に入らないプログラマは、PGPLOTのプロンプトが 動作しないようにするとよい。 デバイス形式は大文字、小文字の差を無視する(例えば、'/ps' と '/PS' は同 じ意味になる)。デバイスまたはファイル名は、オペレーティングシステムに よっては大文字、小文字の違いが意味を持つだろう。 以下は正しいDEVICE引数の例である。 (1) 'plot.ps/ps', 'dir/plot.ps/ps', '"dir/plot.ps"/ps', 'user:[tjp.plots]plot.ps/PS' (2) '/ps' (PGPLOTはこれを'pgplot.ps/ps'として扱う。) (3) 'plot.ps' (PGPLOT_TYPEが'ps'と指定されていると、PGPLOTは この指定を'plot.ps/ps'と解釈する。) (4) ' ' (PGPLOT_DEVが定義されているとき) (5) '? ' (6) '?PGPLOTのデバイス指定: ' [このルーチンはPGPLOT Version 5.1.0で付け加えられた。これより古いプロ グラムは、代わりにPGBEGを使っている。] 戻り値: PGOPEN : 正の値が返されたときは、グラフィックデバイスの 識別子としてPGSLCTで使われる。 0または負の値が返されたときはエラーである。このとき エラーメッセージが標準エラー出力に書き出される。 引数: DEVICE (input) : プロットデバイスの'デバイス指定' (詳細は上述).
SUBROUTINE PGPAGE プロッタを次のページまたはパネルへ進め、必要であれば画面を消去する。 「プロンプトの状態」がONであれば(see PGASK)、画面を消去する前に利用者 に確認を求める。表示面がPGBEGまたはPGSUBPでパネルに分割されているとき は、PGPAGEは次のパネルへと進む。このとき現在のパネルがページの最後のパ ネルであれば、PGPAGEは画面を消去して新しい用紙へと移動する。PGPAGEは PGPLOTのウィンドウやビューポート(正規化デバイス座標系による)を変えたり はしないが、表示面の大きさが外部から変えられたとき(例えばワークステー ションのウィンドウマネージャによって変えられたとき)は、ビューポートの 大きさはそれに合わせて変わることに注意。 引数: なし
SUBROUTINE PGPANL(IX, IY) INTEGER IX, IY Start plotting in a different panel. If the view surface has been divided into panels by PGBEG or PGSUBP, this routine can be used to move to a different panel. Note that PGPLOT does not remember what viewport and window were in use in each panel; these should be reset if necessary after calling PGPANL. Nor does PGPLOT clear the panel: call PGERAS after calling PGPANL to do this. Arguments: IX (input) : the horizontal index of the panel (in the range 1 <= IX <= number of panels in horizontal direction). IY (input) : the vertical index of the panel (in the range 1 <= IY <= number of panels in horizontal direction).
SUBROUTINE PGPAP (WIDTH, ASPECT) REAL WIDTH, ASPECT このルーチンは、それがそのデバイス上で可能であるとき、ビューサーフェスの 大きさ(「ペーパーサイズ」)を与えられた幅とアスペクト比(高さ/幅)に変更する。 デフォルトの大きさより小さいビューサーフェスを得ることは常に可能である。 いくつかのデバイス(たとえばロール紙やfan-feed紙(?)など)の場合、デフォルトより 大きいサイズのビューサーフェスを得ることも可能である。 このルーチンはPGBEGの直後かPGPAGEの直前に呼ばれなければならない。新しい ビューサーフェスの大きさは次にPGPAPが呼ばれるまでの全ての画像に適用される。 引数: WIDTH (input) :インチで表した新しいビューサーフェスの幅。 WIDTH=0.0の場合、PGPAPは引数ARGUMENTに適合する最大の ビューサーフェスを得る。(ちなみに1インチ=25.4mmである) ASPECT (input) : ビューサーフェスのアスペクト比(高さ/幅)。例えば ASPECT=1.0ならば正方形、ASPECT=0.618なら横長の長方形、 ASPECT=1.618なら縦長の長方形のビューサーフェスが得られる。
SUBROUTINE PGPIXL (IA, IDIM, JDIM, I1, I2, J1, J2, 1 X1, X2, Y1, Y2) INTEGER IDIM, JDIM, I1, I2, J1, J2 INTEGER IA(IDIM,JDIM) REAL X1, X2, Y1, Y2 Draw lots of solid-filled (tiny) rectangles aligned with the coordinate axes. Best performance is achieved when output is directed to a pixel-oriented device and the rectangles coincide with the pixels on the device. In other cases, pixel output is emulated. The subsection of the array IA defined by indices (I1:I2, J1:J2) is mapped onto world-coordinate rectangle defined by X1, X2, Y1 and Y2. This rectangle is divided into (I2 - I1 + 1) * (J2 - J1 + 1) small rectangles. Each of these small rectangles is solid-filled with the color index specified by the corresponding element of IA. On most devices, the output region is "opaque", i.e., it obscures all graphical elements previously drawn in the region. But on devices that do not have erase capability, the background shade is "transparent" and allows previously-drawn graphics to show through. Arguments: IA (input) : the array to be plotted. IDIM (input) : the first dimension of array A. JDIM (input) : the second dimension of array A. I1, I2 (input) : the inclusive range of the first index (I) to be plotted. J1, J2 (input) : the inclusive range of the second index (J) to be plotted. X1, Y1 (input) : world coordinates of one corner of the output region X2, Y2 (input) : world coordinates of the opposite corner of the output region
SUBROUTINE PGPNTS (N, X, Y, SYMBOL, NS) INTEGER N, NS REAL X(*), Y(*) INTEGER SYMBOL(*) Draw Graph Markers. Unlike PGPT, this routine can draw a different symbol at each point. The markers are drawn using the current values of attributes color-index, line-width, and character-height (character-font applies if the symbol number is >31). If the point to be marked lies outside the window, no marker is drawn. The "pen position" is changed to (XPTS(N),YPTS(N)) in world coordinates (if N > 0). Arguments: N (input) : number of points to mark. X (input) : world x-coordinate of the points. Y (input) : world y-coordinate of the points. SYMBOL (input) : code number of the symbol to be plotted at each point (see PGPT). NS (input) : number of values in the SYMBOL array. If NS <= N, then the first NS points are drawn using the value of SYMBOL(I) at (X(I), Y(I)) and SYMBOL(1) for all the values of (X(I), Y(I)) where I > NS. Note: the dimension of arrays X and Y must be greater than or equal to N and the dimension of the array SYMBOL must be greater than or equal to NS. If N is 1, X and Y may be scalars (constants or variables). If NS is 1, then SYMBOL may be a scalar. If N is less than 1, nothing is drawn.
SUBROUTINE PGPOLY (N, XPTS, YPTS) INTEGER N REAL XPTS(*), YPTS(*) Fill-area primitive routine: shade the interior of a closed polygon in the current window. The action of this routine depends on the setting of the Fill-Area Style attribute (see PGSFS). The polygon is clipped at the edge of the window. The pen position is changed to (XPTS(1),YPTS(1)) in world coordinates (if N > 1). If the polygon is not convex, a point is assumed to lie inside the polygon if a straight line drawn to infinity intersects and odd number of the polygon's edges. Arguments: N (input) : number of points defining the polygon; the line consists of N straight-line segments, joining points 1 to 2, 2 to 3,... N-1 to N, N to 1. N should be greater than 2 (if it is 2 or less, nothing will be drawn). XPTS (input) : world x-coordinates of the vertices. YPTS (input) : world y-coordinates of the vertices. Note: the dimension of arrays XPTS and YPTS must be greater than or equal to N.
SUBROUTINE PGPT (N, XPTS, YPTS, SYMBOL) INTEGER N REAL XPTS(*), YPTS(*) INTEGER SYMBOL 複数のグラフマーカー(polymarker)を描くための基本ルーチン。マーカーを描 くときのカラーインデックス、線の太さ、文字の高さなどは現在の属性値が用 いられる。(シンボル番号が31より大きければ、それに対応する現在の文字フ ォントが用いられる。)マーカーを描くように指定された点がウィンドウの外 にあるときには、何も描かれない。"ペン位置"はワールド座標系で (XPTS(N),YPTS(N))に移動する。(N > 0の場合) 引数: N (input) : マーカーを描く点の数 XPTS (input) : 各点のワールド座標系でのx座標を表す配列 YPTS (input) : 各点のワールド座標系でのx座標を表す配列 SYMBOL (input) : 各点に描かれるシンボルのコード番号 -1, -2 : 一つの点 (直径 = 現在の線の太さ) -3..-31 : 正多角形。辺の数はABS(SYMBOL)で、内部の塗 りつぶし方は現在の塗りつぶしスタイルによ る。 0..31 : 標準のマーカーシンボル 32..127 : ASCII文字 (現在のフォントを用いる) 文字Fをマーカーに使うときは、 SYMBOL = ICHAR('F')とする。 > 127 : Hersheyシンボル番号 注意: 配列XとYの大きさはNかそれ以上であること。Nが1のときは、XとYはス カラー(変数または定数)でもよい。Nが1より小さいときは、何も描かれない。
SUBROUTINE PGPTXT (X, Y, ANGLE, FJUST, TEXT) REAL X, Y, ANGLE, FJUST CHARACTER*(*) TEXT Primitive routine for drawing text. The text may be drawn at any angle with the horizontal, and may be centered or left- or right- justified at a specified position. Routine PGTEXT provides a simple interface to PGPTXT for horizontal strings. Text is drawn using the current values of attributes color-index, line-width, character-height, and character-font. Text is NOT subject to clipping at the edge of the window. Arguments: X (input) : world x-coordinate. Y (input) : world y-coordinate. The string is drawn with the baseline of all the characters passing through point (X,Y); the positioning of the string along this line is controlled by argument FJUST. ANGLE (input) : angle, in degrees, that the baseline is to make with the horizontal, increasing counter-clockwise (0.0 is horizontal). FJUST (input) : controls horizontal justification of the string. If FJUST = 0.0, the string will be left-justified at the point (X,Y); if FJUST = 0.5, it will be centered, and if FJUST = 1.0, it will be right justified. [Other values of FJUST give other justifications.] TEXT (input) : the character string to be plotted.
SUBROUTINE PGQAH (FS, ANGLE, VENT) INTEGER FS REAL ANGLE, VENT ルーチンPGARROで用いられる矢印の頭の形を調べる。 引数: FS (output) : FS = 1 => 塗りつぶし; FS = 2 => 外枠のみ ANGLE (output) : 矢頭の角度、degree単位 VENT (output) : 矢頭の後部から切り取られる三角形の部分の割合
SUBROUTINE PGQCF (FONT) INTEGER FONT 現在の文字フォントを調べる (設定はPGSCFを用いる)。 引数: FONT (output) : 現在のフォント番号 (範囲: 1-4).
SUBROUTINE PGQCH (SIZE) REAL SIZE 文字の大きさの属性を調べる (設定はPGSCHを用いる)。 引数: SIZE (output) : 現在の文字サイズ (サイズの既定値の倍数)
SUBROUTINE PGQCI (CI) INTEGER CI カラーインデックス属性を調べる (設定はPGSCIを用いる)。 引数: CI (output) : 現在のカラーインデックス (範囲: 0-max)。この値は 実際に使われているカラーインデックスの値で、その 前にPGSCIで要求されたカラーインデックスと 同じだとは限らない。出力デバイスによってはではそ のインデックスが使えないかもしれないからである。
SUBROUTINE PGQCIR(ICILO, ICIHI) INTEGER ICILO, ICIHI Query the color index range to be used for producing images with PGGRAY or PGIMAG, as set by routine PGSCIR or by device default. Arguments: ICILO (output) : the lowest color index to use for images ICIHI (output) : the highest color index to use for images
SUBROUTINE PGQCOL (CI1, CI2) INTEGER CI1, CI2 Query the range of color indices available on the current device. Argument: CI1 (output) : the minimum available color index. This will be either 0 if the device can write in the background color, or 1 if not. CI2 (output) : the maximum available color index. This will be 1 if the device has no color capability, or a larger number (e.g., 3, 7, 15, 255).
SUBROUTINE PGQCR (CI, CR, CG, CB) INTEGER CI REAL CR, CG, CB Query the RGB colors associated with a color index. Arguments: CI (input) : color index CR (output) : red, green and blue intensities CG (output) in the range 0.0 to 1.0 CB (output)
SUBROUTINE PGQCS(UNITS, XCH, YCH) INTEGER UNITS REAL XCH, YCH Return the current PGPLOT character height in a variety of units. This routine provides facilities that are not available via PGQCH. Use PGQCS if the character height is required in units other than those used in PGSCH. The PGPLOT "character height" is a dimension that scales with the size of the view surface and with the scale-factor specified with routine PGSCH. The default value is 1/40th of the height or width of the view surface (whichever is less); this value is then multiplied by the scale-factor supplied with PGSCH. Note that it is a nominal height only; the actual character size depends on the font and is usually somewhat smaller. Arguments: UNITS (input) : Used to specify the units of the output value: UNITS = 0 : normalized device coordinates UNITS = 1 : inches UNITS = 2 : millimeters UNITS = 3 : pixels UNITS = 4 : world coordinates Other values give an error message, and are treated as 0. XCH (output) : The character height for text written with a vertical baseline. YCH (output) : The character height for text written with a horizontal baseline (the usual case). The character height is returned in both XCH and YCH. If UNITS=1 or UNITS=2, XCH and YCH both receive the same value. If UNITS=3, XCH receives the height in horizontal pixel units, and YCH receives the height in vertical pixel units; on devices for which the pixels are not square, XCH and YCH will be different. If UNITS=4, XCH receives the height in horizontal world coordinates (as used for the x-axis), and YCH receives the height in vertical world coordinates (as used for the y-axis). Unless special care has been taken to achive equal world-coordinate scales on both axes, the values of XCH and YCH will be different. If UNITS=0, XCH receives the character height as a fraction of the horizontal dimension of the view surface, and YCH receives the character height as a fraction of the vertical dimension of the view surface.
SUBROUTINE PGQFS (FS) INTEGER FS Query the current Fill-Area Style attribute (set by routine PGSFS). Argument: FS (output) : the current fill-area style: FS = 1 => solid (default) FS = 2 => outline FS = 3 => hatched FS = 4 => cross-hatched
SUBROUTINE PGQHS (ANGLE, SEPN, PHASE) REAL ANGLE, SEPN, PHASE Query the style to be used hatching (fill area with fill-style 3). Arguments: ANGLE (output) : the angle the hatch lines make with the horizontal, in degrees, increasing counterclockwise (this is an angle on the view surface, not in world-coordinate space). SEPN (output) : the spacing of the hatch lines. The unit spacing is 1 percent of the smaller of the height or width of the view surface. PHASE (output) : a real number between 0 and 1; the hatch lines are displaced by this fraction of SEPN from a fixed reference. Adjacent regions hatched with the same PHASE have contiguous hatch lines.
SUBROUTINE PGQID (ID) INTEGER ID This subroutine returns the identifier of the currently selected device, or 0 if no device is selected. The identifier is assigned when PGOPEN is called to open the device, and may be used as an argument to PGSLCT. Each open device has a different identifier. [This routine was added to PGPLOT in Version 5.1.0.] Argument: ID (output) : the identifier of the current device, or 0 if no device is currently selected.
SUBROUTINE PGQINF (ITEM, VALUE, LENGTH) CHARACTER*(*) ITEM, VALUE INTEGER LENGTH This routine can be used to obtain miscellaneous information about the PGPLOT environment. Input is a character string defining the information required, and output is a character string containing the requested information. The following item codes are accepted (note that the strings must match exactly, except for case, but only the first 8 characters are significant). For items marked *, PGPLOT must be in the OPEN state for the inquiry to succeed. If the inquiry is unsuccessful, either because the item code is not recognized or because the information is not available, a question mark ('?') is returned. 'VERSION' - version of PGPLOT software in use. 'STATE' - status of PGPLOT ('OPEN' if a graphics device is open for output, 'CLOSED' otherwise). 'USER' - the username associated with the calling program. 'NOW' - current date and time (e.g., '17-FEB-1986 10:04'). 'DEVICE' * - current PGPLOT device or file. 'FILE' * - current PGPLOT device or file. 'TYPE' * - device-type of the current PGPLOT device. 'DEV/TYPE' * - current PGPLOT device and type, in a form which is acceptable as an argument for PGBEG. 'HARDCOPY' * - is the current device a hardcopy device? ('YES' or 'NO'). 'TERMINAL' * - is the current device the user's interactive terminal? ('YES' or 'NO'). 'CURSOR' * - does the current device have a graphics cursor? ('YES' or 'NO'). Arguments: ITEM (input) : character string defining the information to be returned; see above for a list of possible values. VALUE (output) : returns a character-string containing the requested information, truncated to the length of the supplied string or padded on the right with spaces if necessary. LENGTH (output): the number of characters returned in VALUE (excluding trailing blanks).
SUBROUTINE PGQITF (ITF) INTEGER ITF Return the Image Transfer Function as set by default or by a previous call to PGSITF. The Image Transfer Function is used by routines PGIMAG, PGGRAY, and PGWEDG. Argument: ITF (output) : type of transfer function (see PGSITF)
SUBROUTINE PGQLS (LS) INTEGER LS 現在の線種の属性を調べる (設定はPGSLSを用いる)。 引数: LS (output) : 現在の線種の属性 (範囲: 1-5).
SUBROUTINE PGQLW (LW) INTEGER LW 現在の線幅の属性を問い合わせる (設定はPGSLWを用いる)。 引数: LW (output) : 線幅 (範囲: 1-201).
SUBROUTINE PGQPOS (X, Y) REAL X, Y ワールド座標系による現在の"ペン"位置 (X,Y) を問い合わせる。 (訳注: 原文には "world C coordinates" という表現が使われているが、"C" の意味は不明。typoではないか?) 引数: X (output) : ワールド座標による、ペン位置のx座標 Y (output) : ワールド座標による、ペン位置のy座標
SUBROUTINE PGQTBG (TBCI) INTEGER TBCI 現在のテキスト背景のカラーインデックスを問い合わせる。(設定にはPGSTBG ルーチンを用いる。) 引数: TBCI (output) : 現在のテキスト背景カラーインデックスが入る。
SUBROUTINE PGQTXT (X, Y, ANGLE, FJUST, TEXT, XBOX, YBOX) REAL X, Y, ANGLE, FJUST CHARACTER*(*) TEXT REAL XBOX(4), YBOX(4) This routine returns a bounding box for a text string. Instead of drawing the string as routine PGPTXT does, it returns in XBOX and YBOX the coordinates of the corners of a rectangle parallel to the string baseline that just encloses the string. If the string is blank or contains no drwable characters, all four elements of XBOX and YBOX are assigned the starting point of the string, (X,Y). Arguments: X, Y, ANGLE, FJUST, TEXT (input) : these arguments are the same as the corrresponding arguments in PGPTXT. XBOX, YBOX (output) : arrays of dimension 4; on output, they contain the world coordinates of the bounding box in (XBOX(1), YBOX(1)), ..., (XBOX(4), YBOX(4)).
SUBROUTINE PGQVP (UNITS, X1, X2, Y1, Y2) INTEGER UNITS REAL X1, X2, Y1, Y2 Inquiry routine to determine the current viewport setting. The values returned may be normalized device coordinates, inches, mm, or pixels, depending on the value of the input parameter CFLAG. Arguments: UNITS (input) : used to specify the units of the output parameters: UNITS = 0 : normalized device coordinates UNITS = 1 : inches UNITS = 2 : millimeters UNITS = 3 : pixels Other values give an error message, and are treated as 0. X1 (output) : the x-coordinate of the bottom left corner of the viewport. X2 (output) : the x-coordinate of the top right corner of the viewport. Y1 (output) : the y-coordinate of the bottom left corner of the viewport. Y2 (output) : the y-coordinate of the top right corner of the viewport.
SUBROUTINE PGQVSZ (UNITS, X1, X2, Y1, Y2) INTEGER UNITS REAL X1, X2, Y1, Y2 Return the window, in a variety of units, defined by the full device view surface (0 -> 1 in normalized device coordinates). Input: UNITS 0,1,2,3 for output in normalized device coords, inches, mm, or absolute device units (dots) Output X1,X2 X window Y1,Y2 Y window
SUBROUTINE PGQWIN (X1, X2, Y1, Y2) REAL X1, X2, Y1, Y2 Inquiry routine to determine the current window setting. The values returned are world coordinates. Arguments: X1 (output) : the x-coordinate of the bottom left corner of the window. X2 (output) : the x-coordinate of the top right corner of the window. Y1 (output) : the y-coordinate of the bottom left corner of the window. Y2 (output) : the y-coordinate of the top right corner of the window.
SUBROUTINE PGRECT (X1, X2, Y1, Y2) REAL X1, X2, Y1, Y2 This routine can be used instead of PGPOLY for the special case of drawing a rectangle aligned with the coordinate axes; only two vertices need be specified instead of four. On most devices, it is faster to use PGRECT than PGPOLY for drawing rectangles. The rectangle has vertices at (X1,Y1), (X1,Y2), (X2,Y2), and (X2,Y1). Arguments: X1, X2 (input) : the horizontal range of the rectangle. Y1, Y2 (input) : the vertical range of the rectangle.
REAL FUNCTION PGRND (X, NSUB) REAL X INTEGER NSUB Routine to find the smallest "round" number larger than x, a "round" number being 1, 2 or 5 times a power of 10. If X is negative, PGRND(X) = -PGRND(ABS(X)). eg PGRND(8.7) = 10.0, PGRND(-0.4) = -0.5. If X is zero, the value returned is zero. This routine is used by PGBOX for choosing tick intervals. Returns: PGRND : the "round" number. Arguments: X (input) : the number to be rounded. NSUB (output) : a suitable number of subdivisions for subdividing the "nice" number: 2 or 5.
SUBROUTINE PGRNGE (X1, X2, XLO, XHI) REAL X1, X2, XLO, XHI Choose plotting limits XLO and XHI which encompass the data range X1 to X2. Arguments: X1, X2 (input) : the data range (X1<X2), ie, the min and max values to be plotted. XLO, XHI (output) : suitable values to use as the extremes of a graph axis (XLO <= X1, XHI >= X2).
SUBROUTINE PGSAH (FS, ANGLE, VENT) INTEGER FS REAL ANGLE, VENT ルーチンPGARROで描かれる矢印の頭のスタイルを設定する。 引数: FS (input) : FS = 1 => 塗りつぶし; FS = 2 => アウトライン それ以外の値は2と同じになる。既定値は1。 ANGLE (input) : 矢頭の角度、degree単位。20.0から90.0の範囲の値だと、 それらしい形になる。既定値は45.0。 VENT (input) : 矢頭の後ろから切り取られる三角形の部分の割合。0.0だ と三角形のくさび型の矢頭に、1.0だと>の形の線だけに なる。0.3から0.7の範囲の値だとそれらしい形になる。 既定値は0.3。
SUBROUTINE PGSAVE このルーチンは現在のPGPLOTの属性をプライベートな保存領域に保存する。そ れらはPGUNSA (unsave)によって呼び戻す事ができる。保存される属性は、文 字フォント、文字高さ、カラーインデックス、領域塗りつぶしスタイル、ライ ンスタイル、ライン幅、ペンの位置、矢印の頭の形、ハッチングスタイルであ る。色表現は保存されない。 PGSAVE と PGUNSAの呼出は常に対応していなければならない。属性のコピーは 20個まで保存できる。PGUNSAは常に直前に保存された値を呼び出す(last-in first-out stack). 複数のデバイスを使っているときに、PGUNSAはデバイスの違いに 関係なく、最後にPGSAVEを呼び出したときに保存された値を 取り出すことに注意。 引数: なし
ENTRY PGUNSA このルーチンはその前のPGSAVEの呼び出しで保存されたPGPLOTの属性を復元す る。使い方: CALL PGUNSA (引数はつけない). See PGSAVE. 引数: なし
SUBROUTINE PGSCF (FONT) INTEGER FONT 以降の文字列プロットで用いられる文字フォントを設定する。4種類のフォン トが利用できる。 1: (既定値) 単純な線書きのフォント ("normal" font) 2: roman font 3: italic font (斜体フォント) 4: script font (手書き風フォント) このルーチンを呼び出して決められるフォントは、文字列を書くときはじめに 選ばれるフォントに影響する。しかしフォントを文字列の中で(一部分だけ)変 更するためのエスケープシークエンス \fn, \fr, \fi, \fs がある。それぞれ フォント1, 2, 3, 4に対応する。 Argument: FONT (input) : 以降の文字列のプロットで用いられるフォントの番号 (1から4の範囲)
SUBROUTINE PGSCH (SIZE) REAL SIZE 文字の大きさの属性を設定する。その大きさはプログラム中でそれ以降に描か れる全ての文字とグラフのマーカーに影響を及ぼす。文字の大きさの既定値は 1.0で、ビュー平面の約1/40に一致する。文字の大きさを変更することによっ て、同時にPGBOXによって描かれる目盛線の長さや、PGERRXとPGERRYによって 描かれる終端の長さも規定される。 引数: SIZE (input) : 新しい文字の大きさ(既定値に対しての倍数をあらわす無 次元数)。
SUBROUTINE PGSCI (CI) INTEGER CI Set the Color Index for subsequent plotting, if the output device permits this. The default color index is 1, usually white on a black background for video displays or black on a white background for printer plots. The color index is an integer in the range 0 to a device-dependent maximum. Color index 0 corresponds to the background color; lines may be "erased" by overwriting them with color index 0 (if the device permits this). If the requested color index is not available on the selected device, color index 1 will be substituted. The assignment of colors to color indices can be changed with subroutine PGSCR (set color representation). Color indices 0-15 have predefined color representations (see the PGPLOT manual), but these may be changed with PGSCR. Color indices above 15 have no predefined representations: if these indices are used, PGSCR must be called to define the representation. Argument: CI (input) : the color index to be used for subsequent plotting on the current device (in range 0-max). If the index exceeds the device-dependent maximum, the default color index (1) is used.
SUBROUTINE PGSCIR(ICILO, ICIHI) INTEGER ICILO, ICIHI Set the color index range to be used for producing images with PGGRAY or PGIMAG. If the range is not all within the range supported by the device, a smaller range will be used. The number of different colors available for images is ICIHI-ICILO+1. Arguments: ICILO (input) : the lowest color index to use for images ICIHI (input) : the highest color index to use for images
SUBROUTINE PGSCR (CI, CR, CG, CB) INTEGER CI REAL CR, CG, CB Set color representation: i.e., define the color to be associated with a color index. Ignored for devices which do not support variable color or intensity. Color indices 0-15 have predefined color representations (see the PGPLOT manual), but these may be changed with PGSCR. Color indices 16-maximum have no predefined representations: if these indices are used, PGSCR must be called to define the representation. On monochrome output devices (e.g. VT125 terminals with monochrome monitors), the monochrome intensity is computed from the specified Red, Green, Blue intensities as 0.30*R + 0.59*G + 0.11*B, as in US color television systems, NTSC encoding. Note that most devices do not have an infinite range of colors or monochrome intensities available; the nearest available color is used. Examples: for black, set CR=CG=CB=0.0; for white, set CR=CG=CB=1.0; for medium gray, set CR=CG=CB=0.5; for medium yellow, set CR=CG=0.5, CB=0.0. Argument: CI (input) : the color index to be defined, in the range 0-max. If the color index greater than the device maximum is specified, the call is ignored. Color index 0 applies to the background color. CR (input) : red, green, and blue intensities, CG (input) in range 0.0 to 1.0. CB (input)
SUBROUTINE PGSCRN(CI, NAME, IER) INTEGER CI CHARACTER*(*) NAME INTEGER IER Set color representation: i.e., define the color to be associated with a color index. Ignored for devices which do not support variable color or intensity. This is an alternative to routine PGSCR. The color representation is defined by name instead of (R,G,B) components. Color names are defined in an external file which is read the first time that PGSCRN is called. The name of the external file is found as follows: 1. if environment variable (logical name) PGPLOT_RGB is defined, its value is used as the file name; 2. otherwise, if environment variable PGPLOT_DIR is defined, a file "rgb.txt" in the directory named by this environment variable is used; 3. otherwise, file "rgb.txt" in the current directory is used. If all of these fail to find a file, an error is reported and the routine does nothing. Each line of the file defines one color, with four blank- or tab-separated fields per line. The first three fields are the R, G, B components, which are integers in the range 0 (zero intensity) to 255 (maximum intensity). The fourth field is the color name. The color name may include embedded blanks. Example: 255 0 0 red 255 105 180 hot pink 255 255 255 white 0 0 0 black Arguments: CI (input) : the color index to be defined, in the range 0-max. If the color index greater than the device maximum is specified, the call is ignored. Color index 0 applies to the background color. NAME (input) : the name of the color to be associated with this color index. This name must be in the external file. The names are not case-sensitive. If the color is not listed in the file, the color representation is not changed. IER (output) : returns 0 if the routine was successful, 1 if an error occurred (either the external file could not be read, or the requested color was not defined in the file).
SUBROUTINE PGSFS (FS) INTEGER FS Set the Fill-Area Style attribute for subsequent area-fill by PGPOLY, PGRECT, or PGCIRC. Four different styles are available: solid (fill polygon with solid color of the current color-index), outline (draw outline of polygon only, using current line attributes), hatched (shade interior of polygon with parallel lines, using current line attributes), or cross-hatched. The orientation and spacing of hatch lines can be specified with routine PGSHS (set hatch style). Argument: FS (input) : the fill-area style to be used for subsequent plotting: FS = 1 => solid (default) FS = 2 => outline FS = 3 => hatched FS = 4 => cross-hatched Other values give an error message and are treated as 2.
SUBROUTINE PGSHLS (CI, CH, CL, CS) INTEGER CI REAL CH, CL, CS Set color representation: i.e., define the color to be associated with a color index. This routine is equivalent to PGSCR, but the color is defined in the Hue-Lightness-Saturation model instead of the Red-Green-Blue model. Hue is represented by an angle in degrees, with red at 120, green at 240, and blue at 0 (or 360). Lightness ranges from 0.0 to 1.0, with black at lightness 0.0 and white at lightness 1.0. Saturation ranges from 0.0 (gray) to 1.0 (pure color). Hue is irrelevant when saturation is 0.0. Examples: H L S R G B black any 0.0 0.0 0.0 0.0 0.0 white any 1.0 0.0 1.0 1.0 1.0 medium gray any 0.5 0.0 0.5 0.5 0.5 red 120 0.5 1.0 1.0 0.0 0.0 yellow 180 0.5 1.0 1.0 1.0 0.0 pink 120 0.7 0.8 0.94 0.46 0.46 Reference: SIGGRAPH Status Report of the Graphic Standards Planning Committee, Computer Graphics, Vol.13, No.3, Association for Computing Machinery, New York, NY, 1979. See also: J. D. Foley et al, ``Computer Graphics: Principles and Practice'', second edition, Addison-Wesley, 1990, section 13.3.5. Argument: CI (input) : the color index to be defined, in the range 0-max. If the color index greater than the device maximum is specified, the call is ignored. Color index 0 applies to the background color. CH (input) : hue, in range 0.0 to 360.0. CL (input) : lightness, in range 0.0 to 1.0. CS (input) : saturation, in range 0.0 to 1.0.
SUBROUTINE PGSHS (ANGLE, SEPN, PHASE) REAL ANGLE, SEPN, PHASE Set the style to be used for hatching (fill area with fill-style 3). The default style is ANGLE=45.0, SEPN=1.0, PHASE=0.0. Arguments: ANGLE (input) : the angle the hatch lines make with the horizontal, in degrees, increasing counterclockwise (this is an angle on the view surface, not in world-coordinate space). SEPN (input) : the spacing of the hatch lines. The unit spacing is 1 percent of the smaller of the height or width of the view surface. This should not be zero. PHASE (input) : a real number between 0 and 1; the hatch lines are displaced by this fraction of SEPN from a fixed reference. Adjacent regions hatched with the same PHASE have contiguous hatch lines. To hatch a region with alternating lines of two colors, fill the area twice, with PHASE=0.0 for one color and PHASE=0.5 for the other color.
SUBROUTINE PGSITF (ITF) INTEGER ITF Set the Image Transfer Function for subsequent images drawn by PGIMAG, PGGRAY, or PGWEDG. The Image Transfer Function is used to map array values into the available range of color indices specified with routine PGSCIR or (for PGGRAY on some devices) into dot density. Argument: ITF (input) : type of transfer function: ITF = 0 : linear ITF = 1 : logarithmic ITF = 2 : square-root
SUBROUTINE PGSLCT(ID) INTEGER ID Select one of the open graphics devices and direct subsequent plotting to it. The argument is the device identifier returned by PGOPEN when the device was opened. If the supplied argument is not a valid identifier of on open graphics device, a warning message is issued and the current selection is unchanged. [This routine was added to PGPLOT in Version 5.1.0.] Arguments: ID (input, integer): identifier of the device to be selected.
SUBROUTINE PGSLS (LS) INTEGER LS 以降のプロットで用いられる線の種類の属性を設定する。この属性は線を引く 基本ルーチンのみに影響する。グラフマーカーや文字列、領域塗りつぶしには 影響しない。 5種類の線のスタイルが使える。そのコードは以下の通り 1 (full line), 2 (dashed), 3 (dot-dash-dot-dash), 4 (dotted), 5 (dash-dot-dot-dot). 既定値は 1 (normal full line). 引数: LS (input) : 以降のプロットで用いられる線種のコード (1から5の範囲).
SUBROUTINE PGSLW (LW) INTEGER LW 線幅の属性を設定する。この属性は、線はもちろん、グラフマーカーや文字列 にも影響する。線幅の単位は1/200(0.005)インチ(およそ0.13mm)で、1〜201ま での範囲の整数でなければならない。デバイスによっては、太い線を描くとき にはそれぞれの線を線とは垂直の方向にずらしながら何本も引いて作られる。 引数: LW (input) : 線の太さ。単位は0.005インチ(0.13 mm) 範囲は1〜201.
SUBROUTINE PGSTBG (TBCI) INTEGER TBCI Set the Text Background Color Index for subsequent text. By default text does not obscure underlying graphics. If the text background color index is positive, however, text is opaque: the bounding box of the text is filled with the color specified by PGSTBG before drawing the text characters in the current color index set by PGSCI. Use color index 0 to erase underlying graphics before drawing text. Argument: TBCI (input) : the color index to be used for the background for subsequent text plotting: TBCI < 0 => transparent (default) TBCI >= 0 => text will be drawn on an opaque background with color index TBCI.
SUBROUTINE PGSUBP (NXSUB, NYSUB) INTEGER NXSUB, NYSUB PGPLOTはプロットデバイス(スクリーンやウィンドウ、紙など)の物理的な領域 をNXSUB×NYSUB個の`パネル'に分割して使うことができる。表示面がこれによ って分割された場合は、PGPAGEは次の物理ページではなく、次のパネルへと移 動する。表示面の初期分割はPGBEGを呼んだときに設定される。PGSUBPが呼ば れると、その次にPGPAGEを呼び出したときから新しい物理ページが始まるよう になる。PGSUBPの呼び出しから次にPGPAGEが呼び出されるまではプロットを行 なってはならない。(またはPGENVを呼び出してもよい。PGENVは中から PGPAGEを呼び出すから。) NXSUBが正のときは、PGPLOTはパネルを行の順に用いる。負のときは列の順に なる。例えば以下のごとし。 NXSUB=3, NYSUB=2 NXSUB=-3, NYSUB=2 +-----+-----+-----+ +-----+-----+-----+ | 1 | 2 | 3 | | 1 | 3 | 5 | +-----+-----+-----+ +-----+-----+-----+ | 4 | 5 | 6 | | 2 | 4 | 6 | +-----+-----+-----+ +-----+-----+-----+ PGPAGEが呼ばれると、PGPLOTは次のパネルへと進む。最後のパネルを使ってい るときにPGPAGEが呼ばれたときは、画面を消去するか次のページへと移動する。 なおPGPANLを用いれば、あるパネルから任意の異なるパネルへ飛ぶことも出来 る。 [訳注: 新しい物理ページへ移動した後も、ページはパネルに分割されたまま である。] 引数: NXSUB (input) : 表示面のX方向の分割数 (正、または負) NYSUB (input) : 表示面のY方向の分割数 (正)
SUBROUTINE PGSVP (XLEFT, XRIGHT, YBOT, YTOP) REAL XLEFT, XRIGHT, YBOT, YTOP ビューポートの大きさと位置を、正規化デバイス座標系で指定して変更する。 正規化デバイス座標系とは各次元に0から1の範囲の値である。ビューポートは 表示面上の四角形で、それの「向こう側に」絵が見える。線などを描く全ての PGルーチンはそれをビューポートの内側にのみ表示し、ビューポートをはみ出 す線はそこで切り取られる。(PGBOXやPGLABで描かれる軸やラベルなどを除く。) ビューポートを通して見えるワールド空間(グラフの座標系)はPGSWINを呼び出 して指定できる。表示面よりも大きなビューポートを指定してもよい。そのと きは表示面に現れる部分だけがプロットされる。 引数: XLEFT (input) : NDCで指定したビューポートの左端のx座標 XRIGHT (input) : NDCで指定したビューポートの右端のx座標 YBOT (input) : NDCで指定したビューポートの下端のy座標 YTOP (input) : NDCで指定したビューポートの上端のy座標
SUBROUTINE PGSWIN (X1, X2, Y1, Y2) REAL X1, X2, Y1, Y2 ワールド座標空間の中のウィンドウを変更して、指定したビューポートにマッ プする。通常、PGSWINはPGENVの中で自動的に呼び出されるが、利用者が直接 呼び出してもよい。 引数: X1 (input) : ビューポートの左下隅のx座標 X2 (input) : ビューポートの右上隅のx座標 (X2はX1より小さくてもよい) Y1 (input) : ビューポートの左下隅のy座標 Y2 (input) : ビューポートの右上隅のx座標 (Y2はY1より小さくてもよい)
SUBROUTINE PGTBOX (XOPT, XTICK, NXSUB, YOPT, YTICK, NYSUB) REAL XTICK, YTICK INTEGER NXSUB, NYSUB CHARACTER XOPT*(*), YOPT*(*) Draw a box and optionally label one or both axes with (DD) HH MM SS style numeric labels (useful for time or RA - DEC plots). If this style of labelling is desired, then PGSWIN should have been called previously with the extrema in SECONDS of time. In the seconds field, you can have at most 3 places after the decimal point, so that 1 ms is the smallest time interval you can time label. Large numbers are coped with by fields of 6 characters long. Thus you could have times with days or hours as big as 999999. However, in practice, you might have trouble with labels overwriting themselves with such large numbers unless you a) use a small time INTERVAL, b) use a small character size or c) choose your own sparse ticks in the call to PGTBOX. PGTBOX will attempt, when choosing its own ticks, not to overwrite the labels, but this algorithm is not very bright and may fail. Note that small intervals but large absolute times such as TMIN = 200000.0 s and TMAX=200000.1 s will cause the algorithm to fail. This is inherent in PGPLOT's use of single precision and cannot be avoided. In such cases, you should use relative times if possible. PGTBOX's labelling philosophy is that the left-most or bottom tick of the axis contains a full label. Thereafter, only changing fields are labelled. Negative fields are given a '-' label, positive fields have none. Axes that have the DD (or HH if the day field is not used) field on each major tick carry the sign on each field. If the axis crosses zero, the zero tick will carry a full label and sign. This labelling style can cause a little confusion with some special cases, but as long as you know its philosophy, the truth can be divined. Consider an axis with TMIN=20s, TMAX=-20s. The labels will look like +----------+----------+----------+----------+ 0h0m20s 10s -0h0m0s 10s 20s Knowing that the left field always has a full label and that positive fields are unsigned, informs that time is decreasing from left to right, not vice versa. This can become very unclear if you have used the 'F' option, but that is your problem ! Exceptions to this labelling philosophy are when the finest time increment being displayed is hours (with option 'Y') or days. Then all fields carry a label. For example, +----------+----------+----------+----------+ -10h -8h -6h -4h -2h PGTBOX can be used in place of PGBOX; it calls PGBOX and only invokes time labelling if requested. Other options are passed intact to PGBOX. Inputs: XOPT : X-options for PGTBOX. Same as for PGBOX plus 'Z' for (DD) HH MM SS.S time labelling 'Y' means don't include the day field so that labels are HH MM SS.S rather than DD HH MM SS.S The hours will accumulate beyond 24 if necessary in this case. 'X' label the HH field as modulo 24. Thus, a label such as 25h 10m would come out as 1h 10m 'H' means superscript numbers with d, h, m, & s symbols 'D' means superscript numbers with o, ', & '' symbols 'F' causes the first label (left- or bottom-most) to be omitted. Useful for sub-panels that abut each other. Care is needed because first label carries sign as well. 'O' means omit leading zeros in numbers < 10 E.g. 3h 3m 1.2s rather than 03h 03m 01.2s Useful to help save space on X-axes. The day field does not use this facility. YOPT : Y-options for PGTBOX. See above. XTICK : X-axis major tick increment. 0.0 for default. YTICK : Y-axis major tick increment. 0.0 for default. If the 'Z' option is used then XTICK and/or YTICK must be in seconds. NXSUB : Number of intervals for minor ticks on X-axis. 0 for default NYSUB : Number of intervals for minor ticks on Y-axis. 0 for default The regular XOPT and YOPT axis options for PGBOX are A : draw Axis (X axis is horizontal line Y=0, Y axis is vertical line X=0). B : draw bottom (X) or left (Y) edge of frame. C : draw top (X) or right (Y) edge of frame. G : draw Grid of vertical (X) or horizontal (Y) lines. I : Invert the tick marks; ie draw them outside the viewport instead of inside. L : label axis Logarithmically (see below). N : write Numeric labels in the conventional location below the viewport (X) or to the left of the viewport (Y). P : extend ("Project") major tick marks outside the box (ignored if option I is specified). M : write numeric labels in the unconventional location above the viewport (X) or to the right of the viewport (Y). T : draw major Tick marks at the major coordinate interval. S : draw minor tick marks (Subticks). V : orient numeric labels Vertically. This is only applicable to Y. The default is to write Y-labels parallel to the axis. 1 : force decimal labelling, instead of automatic choice (see PGNUMB). 2 : force exponential labelling, instead of automatic. The default is to write Y-labels parallel to the axis ****************** EXCEPTIONS ******************* Note that 1) PGBOX option 'L' (log labels) is ignored with option 'Z' 2) The 'O' option will be ignored for the 'V' option as it makes it impossible to align the labels nicely 3) Option 'Y' is forced with option 'D' ***************************************************************
SUBROUTINE PGTEXT (X, Y, TEXT) REAL X, Y CHARACTER*(*) TEXT 文字列を書く。最初の文字の左下隅が指定した位置に置かれ、文字列は水平に 書かれる。このルーチンは、基本ルーチンPGPTXTを簡単に使えるようにしたも のである。水平でない文字列を書きたいときにはPGPTXTの方を使う。 引数: X (input) : 文字列の先頭の、ワールド座標系のx座標 Y (input) : 文字列の先頭の、ワールド座標系のy座標 TEXT (input) : 書きたい文字列
SUBROUTINE PGUPDT グラフィック画面を更新し、全ての表示待ち出力を出力デバイスに描き出す。 このルーチンは PGBBUF によって作られるバッファを空にするが、 PGBBUF/PGEBUF が使用するカウンタは変更しない。出力がバッファリングされ ているかは関知しないので、このルーチンは画面が完全に更新されることが必 要な場合にのみ使用するべきである(例えば利用者による操作の前など)。 引数: なし
SUBROUTINE PGVECT (A, B, IDIM, JDIM, I1, I2, J1, J2, C, NC, TR, 1 BLANK) INTEGER IDIM, JDIM, I1, I2, J1, J2, NC REAL A(IDIM,JDIM), B(IDIM, JDIM), TR(6), BLANK, C 2つの配列からベクトル図を描く。このルーチンは、 引数BLANKで定義されるマジック値を持つ配列要素は無視され、 ベクトル図に空白ができるという点でPGCONBと類似している。 このルーチンはグリッド上のほとんどの全ての点で測定されているが、 全ての点で測定されてはいないデータに対して有用である。 ベクトルは矢印によって表示される。矢印の頭のスタイルはPGSAHによって定義され、 矢印の頭の大きさはPGSCHで設定される現在の文字サイズによって定義される。 Arguments: A (input) : 水平方向成分データ配列。 B (input) : 鉛直方向成分データ配列。 IDIM (input) : 配列A,Bの大きさ(1番目の添字について)。 JDIM (input) : 配列A,Bの大きさ(2番目の添字について)。 I1,I2 (input) : マッピングされる1番目の添字の範囲(inclusive). J1,J2 (input) : マッピングされる2番目の添字の範囲(inclusive). C (input) : ベクトルの長さのスケールファクタ。0.0のとき、Cは 最も長いベクトルがTR(2)+TR(3)とTR(5)+TR(6)のうち 小さい方とおなじになるようセットされる。 NC (input) : ベクトルの位置ぎめコード。 <0 ベクトルの頭が座標に一致する。 >0 ベクトルの根本が座標に一致する。 =0 ベクトルは座標の中心に表示される。 TR (input) : I,J座標系とワールド座標系の座標変換を定義する配列。 配列上の点A(I,J)のワールド座標系での位置は、以下の ように与えられる。 X = TR(1) + TR(2)*I + TR(3)*J Y = TR(4) + TR(5)*I + TR(6)*J 普通はTR(3)とTR(5)は0である(座標変換が回転やせん断 を含まない限り) BLANK (input) : 配列AまたはBの要素のうちこれと等しい値を取るものは 無視される(空白となる)。
SUBROUTINE PGVSIZ (XLEFT, XRIGHT, YBOT, YTOP) REAL XLEFT, XRIGHT, YBOT, YTOP ビューポートの大きさと位置を、物理デバイス座標系(インチ単位)で指定して 変更する。ビューポートは表示面上の四角形で、それの「向こう側に」絵が見 える。線などを描く全てのPGルーチンはそれをビューポートの内側にのみ表示 し、ビューポートをはみ出す線はそこで切り取られる。(PGBOXやPGLABで描か れる軸やラベルなどを除く。)ビューポートを通して見えるワールド空間(グラ フの座標系)はPGSWINを呼び出して指定できる。表示面よりも大きなビューポ ートを指定してもよい。そのときは表示面に現れる部分だけがプロットされる。 引数: XLEFT (input) : ビューポートの左端のx座標。表示面の左端からのインチ で指定する。 XRIGHT (input) : ビューポートの右端のx座標。表示面の左端からのインチ で指定する。 YBOT (input) : ビューポートの下端のy座標。表示面の下端からのインチ で指定する。 YTOP (input) : ビューポートの上端のy座標。表示面の下端からのインチ で指定する。
SUBROUTINE PGVSTD ビューポートを標準のビューポートに定義する。標準のビューポートとは、表 示領域(またはパネル)の全領域から、ラベルを書く分として文字の高さの4倍 にあたるマージンを四方に取った、その内側である。したがってこれは現在の 文字の高さに依存する。文字の高さはPGSCHで設定する。 引数: なし
SUBROUTINE PGWEDG(SIDE, DISP, WIDTH, FG, BG, LABEL) CHARACTER *(*) SIDE,LABEL REAL DISP, WIDTH, FG, BG 欄外の暗度見本や色見本を、カレントビューポートの指定した軸に平行に描く。 このルーチンはPGIMAGやPGGRAYによるイメージの見本を描くために用意されて いる。この見本の描画にはPGSITFで定められる変換が有効で、またPGSCIRによ って定められるカラーインデックスの幅が用いられる。 引数: SIDE (input) : 1文字目は 'B','L','T','R' のうちの一つでなければならない。 これらはビューポートの Bottom, Left, Top, Right 部分 を表わしている。 2文字目は、見本の描画にPGIMAGを使うなら'I'を、PGGRAY を使うなら'G'を指定する。 DISP (input) : ビューポートの指定した辺からの見本の離れ具合。ビュー ポートの外側に向かって、文字の高さ単位で指定する。値 が正値だとビューポートの外側に書くが、負値だと内側に 書くことになる。 WIDTH (input) : 注釈文字を含む全ての見本の幅を、文字の高さ単位で指定する。 FG (input) : shade 1 (foreground) として表示される数値。FG と BG は PGGRAYや PGIMAG で用いられている値を指定する(べきである)。 BG (input) : shade 0 (background) として表示される数値。 LABEL (input) : オプションとして付けられる単位等のラベル。必要ないと きは' 'を指定する。
SUBROUTINE PGWNAD (X1, X2, Y1, Y2) REAL X1, X2, Y1, Y2 ワールド座標空間のウィンドウをビューポートとし、同時にビューポートのワ ールド座標系での縦横(x,y)の大きさをウィンドウに等しくする。新しいビュ ーポートは、要求された縦横比を満足し、以前に置かれたビューポートに入る 最大の大きさを持つ。 引数: X1 (input) : ビューポート左下の x 座標。 X2 (input) : ビューポート右上の x 座標。(X2 は X1 より大きいこと。) Y1 (input) : ビューポート左下の y 座標。 Y2 (input) : ビューポート右上の y 座標。(Y2 は Y1 より大きいこと。)
SUBROUTINE PGADVANCE See description of PGPAGE.
INTEGER FUNCTION PGBEGIN (UNIT, FILE, NXSUB, NYSUB) INTEGER UNIT CHARACTER*(*) FILE INTEGER NXSUB, NYSUB See description of PGBEG.
INTEGER FUNCTION PGCURSE (X, Y, CH) REAL X, Y CHARACTER*1 CH See description of PGCURS.
SUBROUTINE PGLABEL (XLBL, YLBL, TOPLBL) CHARACTER*(*) XLBL, YLBL, TOPLBL See description of PGLAB.
SUBROUTINE PGMTEXT (SIDE, DISP, COORD, FJUST, TEXT) CHARACTER*(*) SIDE, TEXT REAL DISP, COORD, FJUST See description of PGMTXT.
SUBROUTINE PGNCURSE (MAXPT, NPT, X, Y, SYMBOL) INTEGER MAXPT, NPT REAL X(*), Y(*) INTEGER SYMBOL See description of PGNCUR.
SUBROUTINE PGPAPER (WIDTH, ASPECT) REAL WIDTH, ASPECT See description of PGPAP.
SUBROUTINE PGPOINT (N, XPTS, YPTS, SYMBOL) INTEGER N REAL XPTS(*), YPTS(*) INTEGER SYMBOL See description of PGPT.
SUBROUTINE PGPTEXT (X, Y, ANGLE, FJUST, TEXT) REAL X, Y, ANGLE, FJUST CHARACTER*(*) TEXT See description of PGPTXT.
SUBROUTINE PGVPORT (XLEFT, XRIGHT, YBOT, YTOP) REAL XLEFT, XRIGHT, YBOT, YTOP See description of PGSVP.
SUBROUTINE PGVSIZE (XLEFT, XRIGHT, YBOT, YTOP) REAL XLEFT, XRIGHT, YBOT, YTOP See description of PGVSIZ.
SUBROUTINE PGVSTAND See description of PGVSTD.
SUBROUTINE PGWINDOW (X1, X2, Y1, Y2) REAL X1, X2, Y1, Y2 See description of PGSWIN.