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

oxmastree2025.png

 

Another year, another SAS ODS Graphics text plot take on a neat Christmas card, this one from dezeen's 2010 collection . Happy Holidays, all!

 

* Fun With SAS ODS Graphics: Yet Another Text Plot Xmas Tree 
  SAS ODS Graphics take on a neat 2010 card at dezeen.com/2010/12/24/designer-christmas-cards-3;

data greetings;                                        * Generate text and x/y points for 'tree';
retain greeting '*|WE|WISH|YOU A|MERRY|CHRISTMAS|AND A HAPPY|NEW YEAR.' X .4 Y .85; 
output;

%SGANNO;                                               * Extend Y descender in "YEAR" to make a 'tree trunk';
DATA extend_Y;                                         * Generate a rectangle 'tree trunk';
%SGRECTANGLE(X1=153, Y1=169, WIDTH=4, HEIGHT=75, X1SPACE="DATAPIXEL", Y1SPACE="DATAPIXEL",
             ANCHOR="TOPLEFT", DRAWSPACE="GRAPHPIXEL", DISPLAY="FILL", FILLCOLOR="WHITE",
             HEIGHTUNIT="PIXEL", WIDTHUNIT="PIXEL"); 
                                                       * Generate annotated text plot 'tree' on ellipse plot 'snow hill';
ods graphics / reset antialias width=4in height=6in noborder imagefmt=png antialias; 
proc sgplot data=greetings noautolegend nowall pad=3 noborder sganno=extend_Y;  
styleattrs backcolor=cx008975;                         * Greenish background;
text x=x y=y text=greeting / position=bottom textattrs=(color=white size=24pt weight=bold) splitchar='|' splitpolicy=splitalways contributeoffsets=none; * White lettering;
ellipseparm semimajor=2 semiminor=.35 / xorigin=.4 yorigin=-.2 nooutline fill fillattrs=(color=white); * White snow hill;
xaxis display=none values=(0 1) offsetmax=0 offsetmin=0; * Suppress axes;
yaxis display=none values=(0 1) offsetmax=0 offsetmin=0;
run;

 

 

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 0 replies
  • 203 views
  • 2 likes
  • 1 in conversation