2020年1月1日水曜日

SASで年賀状





すべてのSASユーザーへ、SASで年賀状をつくりました。
2020年もどうぞよろしくお願いいたします!




年賀状をつくるプログラム (SAS9.4以上で動作)

*** 描画用のパーツ ;
data mouse;
  x1= 0;     y1= 0;
  x2= 0;     y2=-6.5;
  x3=-0.31;  y3= 1.2;
  x4= 0.31;  y4= 1.2;
  x5= 0;     y5= 0.15;
  x6= 0;     y6= 0.7;
  x7=-1.1;   y7= 4.5;
  x8= 1.1;   y8= 4.5;
run;

data whisker;
input higeno x9 y9;
cards;
1 -1.5  1.3
1 -0.8  1.1
2 -1.5  0.6
2 -0.8  0.6
3 -1.5 -0.1
3 -0.8  0.1
4  1.5  1.3
4  0.8  1.1
5  1.5  0.6
5  0.8  0.6
6  1.5 -0.1
6  0.8  0.1
;

data tail;
input x10 y10;
cards;
1.45 -9.5
1.8  -8
2    -5
1.9  -2
;

data nenga;
 merge mouse whisker tail;
run;

*** 描画 ;
title ;
ods graphics on / height=10cm width=14.8cm;

proc sgplot data=nenga noautolegend;
 styleattrs wallcolor=lavenderblush;
   
 /* Text */
 inset "HAPPY NEW YEAR"  /  position=top textattrs=(color=gold size=31cm);
 inset "20"  /  position=bottomleft textattrs=(color=green size=140cm );
 inset "20"  /  position=bottomright textattrs=(color=orange size=140cm );
   
 /* mouse */
 scatter x=x1 y=y1  /  markerattrs=(symbol=circlefilled  size=3cm color=skyblue);
 scatter x=x2 y=y2  /  markerattrs=(symbol=circlefilled  size=4cm color=skyblue);
 scatter x=x3 y=Y3  /  markerattrs=(symbol=circlefilled  size=0.2cm color=black);
 scatter x=x4 y=Y4  /  markerattrs=(symbol=circlefilled  size=0.2cm color=black);
 scatter x=x5 y=y5  /  markerattrs=(symbol=ArrowDown  size=0.5cm color=black);
 scatter x=x6 y=y6  /  markerattrs=(symbol=TriangleDownFilled  size=0.3cm color=pink);
 scatter x=x7 y=y7  /  markerattrs=(symbol=CircleFilled  size=1.5cm color=skyblue);
 scatter x=x8 y=y8  /  markerattrs=(symbol=CircleFilled  size=1.5cm color=skyblue);
 scatter x=x7 y=y7  /  markerattrs=(symbol=CircleFilled  size=1.2cm color=lightpink);
 scatter x=x8 y=y8  /  markerattrs=(symbol=CircleFilled  size=1.2cm color=lightpink);

 /* wisker */
 series  x=x9 y=y9  /  group=higeno lineattrs=(color=black);

 /* tail */
 series  x=x10 y=y10  /  lineattrs=(color=lightpink thickness=0.12cm) smoothconnect;

 xaxis min=-3 max=3  display=none;
 yaxis min=-5 max=1  display=none;
run;




0 件のコメント:

コメントを投稿