BookmarkSubscribeRSS Feed
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

happythanksgivingpilgrim.png

 

Based on a Free Kids Crafts Thanksgiving project, here's a quick SAS ODS Graphics take on a Pilgrim hat. Happy Thanksgiving, all! 

 

* Fun With SAS ODS Graphics: Happy Thanksgiving, Pilgrim! (5-Polygon Pilgrim Hat)
  Based on children's craft project at freekidscrafts.com/tissue-paper-pilgrim-hat;

data PilgrimHat;                     /* Generate pairs of x,y points for 5 polygons */ 
infile datalines dlm=', ';           
input x y@@;                         
id=floor((_n_-1)/4)+1;               /* 4 pairs of x,y points per polygon */
datalines;                           
0,0 540,0 540,110 0,110
40,110 500,110 490,205 50,205
53,205 487,205 460,530, 80,530 
190,100 350,100 350,215 190,215
230,135 310,135 310,180 230,180
;                                    /* Plot pilgrim hat polygons */
ods graphics / reset antialias border=off width=5.43in height=5.35in;
proc sgplot aspect=1 pad=10 nowall noborder noautolegend;
styleattrs backcolor=cxF9F1D9 datacolors=(black brown black orange brown);
polygon x=x y=y id=id / group=id nooutline fill;
inset "HAPPY THANKSGIVING!" / position=bottom textattrs=(weight=bold size=28pt color=cxB95328);
xaxis display=none offsetmin=.1 offsetmax=.1 values=(0 543); 
yaxis display=none offsetmin=.12 offsetmax=.03 values=(0 535); 
run;

 

Original Pilgrim Hat TemplateOriginal Pilgrim Hat Template

 

SAS ODS Graphics Work-In-ProgressSAS ODS Graphics Work-In-Progress

 

 

3 REPLIES 3
yabwon
Onyx | Level 15

Just for fun. 🙂

data have;
infile CARDS missover;
input x l u g :$1. lab $50.;
cards;
5 0 20 A
10 0 20 A
12 0 80 A
38 0 80 A
40 0 20 A
45 0 20 A
10 20 35 B
40 20 35 B
20 15 40 C
30 15 40 C
22 20 35 D
28 20 35 D
;
run;

proc sgplot data=have aspect=1  nowall noborder noautolegend ;
  styleattrs backcolor=cxF9F1D9 datacolors=(black brown orange brown);
  BAND x=x lower=l upper=u / group=g;
  xaxis display=(NOTICKS NOVALUES NOLINE) 
    label="HAPPY THANKSGIVING!"
    labelattrs=(size=6pct color=brown weight=bold)
    ;
  yaxis display=none;
run;

yabwon_0-1700727886802.png

 

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



yabwon
Onyx | Level 15

Thank you! 🙂

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1311 views
  • 7 likes
  • 2 in conversation