/*-------------------------------------------------------- GPLOT(2次元マップ)をラベル付で出力する 指定例 %gplotlab( data = x, id = name, dim1 = size, dim2 = ratio, device = winprtm ) T.SUZUKI ( 1998.9 ) --------------------------------------------------------*/ %macro gplotlab( data = _LAST_, /* Data set for plot */ id = , /* 点につけるラベル値を持つ変数 */ dim1 = , /* X軸に使う変数 */ dim2 = , /* Y軸に使う変数 */ fontolab = hwdmx001,/* ラベルのフォント. */ sizeolab = 0.8, /* ラベルのサイズ */ plot = y , /* グラフ印刷の有無: Y | N */ device = win , /* 出力デバイス: WIN | WINPRTM */ horigin = 0 cm, /* グラフ印刷時の左余白 */ vorigin = 0 cm, /* グラフ印刷時の下余白 */ hlength = , /* グラフ印刷時の水平軸の長さ */ vlength = , /* グラフ印刷時の垂直軸の長さ */ /* A4横の印刷時は 25 cm 程度 */ horder =, /* %str( order = ( --- ) ) , */ vorder =, /* %str( order = ( --- ) ) , */ /* AXIS をマクロ外指定する場合 */ haxis =, /* for horizontal axis */ vaxis =, /* for vertical axis */ hsym = 0.4, /* height of plot symbols */ hval = 0.6, /* 軸目盛の高さ */ fval = simplex, /* 軸目盛のフォント */ vref = 0, /* 垂直参照線の位置 */ href = 0, /* 水平参照線の位置 */ lvref = 2, /* 垂直線の線種番号 */ lhref = 2, /* 水平線の線種番号 */ dim1lab = f = hwdmx003 h = 0.8 "2次元プロット表示", dim2lab = ' ' ); %if &data = _LAST_ %then %let data = %scan( &sysdata , 2 ) ; %put NOTE: dataset name = &data . ; data _anno_ ; set &data ; length function style $8 text $16 ; xsys = '2' ; ysys = '2' ; text = &id ; color = 'BLACK' ; x = &dim1 ; y = &dim2 ; position = '5' ; style = "&fontolab" ; size = &sizeolab ; function = 'LABEL' ; run ; %if %upcase( &plot ) = Y %then %do; %if %upcase( &device ) = WIN %then %do ; %if &hlength = %str() %then %let hlength = 70 pct ; %if &vlength = %str() %then %let vlength = 70 pct ; %end ; %else %do ; %if &hlength = %str() %then %let hlength = 15 cm ; %if &vlength = %str() %then %let vlength = 15 cm ; %end ; %let hlength = %str( length = &hlength ) ; %let vlength = %str( length = &vlength ) ; goptions horigin = &horigin vorigin = &vorigin device = &device ; symbol v = none ; %if %length( &haxis ) = 0 %then %do ; axis2 label = ( &dim1lab ) &horder value = ( f = &fval h = &hval ) &hlength ; %let haxis = axis2 ; %end; %if %length( &vaxis ) = 0 %then %do ; axis1 label = ( &dim2lab ) &vorder value = ( f = &fval h = &hval ) &vlength ; %let vaxis = axis1 ; %end; proc gplot data = &data ; plot &dim2 * &dim1 / anno = _anno_ frame vref = &vref href = &href lvref = &lvref lhref = &lhref vaxis = &vaxis haxis = &haxis hm = 1 vm = 1 des = "GPLOTLAB" ; run ; quit; %end; %mend gplotlab ;