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

SasMomTatto.png

 

Happy Mother's Day! Thanks to Pavel Panchekha's How to Draw a Heart in Polar Coordinates for the formula, Rick Wicklin's Lo, how a polar rose e'er blooming for SAS code, and COLOURlovers for the Comic Skin Tone color code!

 

SAS CODE

* Fun With SAS ODS Graphics: Mom Tattoo;

data Heart;                                                     * Generate Data;
do t = 0 to 2*constant("pi") by 0.01;                           * Heart;
  r=sin(t)*sqrt(abs(cos(t)))/(sin(t)+7/5)-2*sin(t)+2;
  x = r*cos(t);        
  y = r*sin(t);
  id=1;
  output;
end;
x=.; y=.;
xMarker=-1.85; yMarker=-3.6; output; xmarker=.; ymarker=.;      * Arrow;
xArrowO=-1.85; yArrowO=-3.6; xArrow=2.5; yArrow=.75; output; xArrowO=.; yArrowO=.; xArrow=.; yArrow=.;
xArrowO2=1.25; yArrowO2=-.5; xArrow2=2.5; yArrow2=.75; output; xArrowO2=.; yArrowO2=.; xArrow2=.; yArrow2=.;
xText=0; yText=-1.25; Text='MOM'; output;                       * Text;

proc sgplot data=Heart aspect=1 nowall noautolegend noborder;   * Generate "Mom" tattoo;
styleattrs backcolor=cxF7CEB5;                                  * Change to match your own skin color!;
vector x=xArrow y=yArrow / 
       xorigin=xArrowO yorigin=yArrowO lineattrs=(color=darkgreen thickness=10pt) arrowheadshape=barbed;
scatter x=xMarker y=yMarker / markerattrs=(symbol=circlefilled size=20pt color=darkgreen);
series x=x y=y / lineattrs=(color=black thickness=5pt);
polygon x=x y=y id=id / fill fillattrs=(color=red);
vector x=xArrow2 y=yArrow2 / 
       xorigin=xArrowO2 yorigin=yArrowO2 lineattrs=(color=darkgreen thickness=10pt) arrowheadshape=barbed;
text x=xText y=yText text=Text / backlight=1 strip textattrs=(color=black size=72pt weight=bold);
xaxis display=none min=-2.4 max=2.5 offsetmax=.001 offsetmin=.001; 
yaxis display=none min=-4.2 max=1.3 offsetmax=.001 offsetmin=.001;

 

2 REPLIES 2
Jay54
Meteorite | Level 14

Nice use of backlight!  Smiley Happy

ChrisNZ
Tourmaline | Level 20

 

Hi @tc, if you are looking for ideas, it liked this challenge to proc gtile taken from

 

https://www.weforum.org/agenda/2017/03/worlds-biggest-economies-in-2017/

 

aaa1.PNG

 

The "rest of the world" legend entry is badly named. This would leave only Antartica.

"Small countries" or "Countries with less than 0.39%" or "160 smallest countries" or similar would be more accurate.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1503 views
  • 6 likes
  • 3 in conversation