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;
Nice use of backlight!
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/
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.