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

Holiday Door WreathHoliday Door WreathODS Graphics Chinese Flag WreathODS Graphics Chinese Flag Wreath

 

A neighbor's holiday door wreath was nice, but made me wonder, "Where have I seen that before?" And then I remembered - @Ksharp's SAS ODS Graphics Happy-National-Day Chinese flag wreath! Happy Holidays!

 

UPDATE: Modified code, adding random sizes and shades of reds to get the following virtual holiday wreath. OK, nowhere near as nice as my neighbor's, but you can't beat the price! 😀 🎅

 

ODS Graphics Holiday WreathODS Graphics Holiday Wreath

 

data wreath;                              * Generate points for holiday 'wreath';
do a=90 to -270 by -10;                   * Generates points for bubbles;
  do r=.5 to 1.1 by .15;                  * Five points for each angle;  
    x=r*cos(a*constant('pi')/180);
    y=r*sin(a*constant('pi')/180);        
    size=ceil(ranuni(7)*10);              * Assign random size (# from 1-10);
    if r=1.1 then size=max(size,4);       * Minimum size for outermost ring is 4;
    colornum=ceil(ranuni(2)*5);           * Assign random red shade (# from 1-5);
    output;
  end;
end;
                                          * Holiday Wreath (Bubble+Scatter Plots);
proc sgplot data=wreath aspect=1 noautolegend noborder;
bubble x=x y=y size=size /
       dataskin=pressed  nooutline bradiusmin=.17in bradiusmax=.28in 
       colormodel=(cxff5b5b cxe20000 cxcb0000 cxbd0000 cxa60000) /* Shades of red */
       fill colorresponse=colornum;   
xaxis display=none; yaxis display=none;   * Look Ma, no axes!;

 

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
  • 756 views
  • 6 likes
  • 1 in conversation