<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Challenge for SAS Nerds: Build a SAS Valentine in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/437565#M15083</link>
    <description>Thank you, Chris.</description>
    <pubDate>Thu, 15 Feb 2018 13:29:01 GMT</pubDate>
    <dc:creator>jl3</dc:creator>
    <dc:date>2018-02-15T13:29:01Z</dc:date>
    <item>
      <title>Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/429763#M14849</link>
      <description>&lt;P&gt;Do you remember last year &lt;A title="read about it in this article" href="https://blogs.sas.com/content/sgf/2018/01/22/sas-language-valentines/" target="_blank"&gt;when a SAS communities member asked for help&lt;/A&gt; in crafting a marriage proposal?&amp;nbsp; (No? &lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Newbie-here-Question-about-a-proposal-using-SAS/td-p/416684" target="_blank"&gt;Take minute to go read the thread&lt;/A&gt; -- it's worth it! )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The question and responses inspired us.&amp;nbsp; We know that SAS users, when given a challenge and the chance to help someone, rush to use their superpowers for Good.&amp;nbsp; And while "creating a marriage proposal" is probably not a business objective in your SAS life, the techniques learned along the way can have many uses other than just popping the question.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="&amp;quot;Binary heart&amp;quot; by @Rick_SAS" style="width: 252px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18032i89557F62C21D44CB/image-dimensions/252x315?v=v2" width="252" height="315" role="button" title="binaryheart.png" alt="&amp;quot;Binary heart&amp;quot; by @Rick_SAS" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;"Binary heart" by @Rick_SAS&lt;/span&gt;&lt;/span&gt;With Valentine's Day is approaching (February 14 -- don't forget!), we'd like to channel that creativity and knowledge into a fun challenge: creating Valentine's Day greetings with SAS tools!&amp;nbsp; To participate, respond to this post with code and/or images of your SAS-generated Valentines.&amp;nbsp; It's not a contest -- not exactly -- but we'll definitely take the best submissions and do something fun with them.&amp;nbsp; And even if you don't have a Valentine to add, please click &lt;STRONG&gt;Like&lt;/STRONG&gt; on any of the replies that&amp;nbsp;you...well...like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking for inspiration?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/02/14/a-parametric-view-of-love.html" target="_blank"&gt;A parametric view of love&lt;/A&gt; by Rick Wicklin&amp;nbsp; (&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;)&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/A-Belated-Happy-x-2-y-2-1-3-x-2-y-3-0-Day/td-p/250016" target="_blank"&gt;A Happy (x**2+y**2-1)**3-x**2*y**3=0 Day!&lt;/A&gt; by SAS Communities member&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/02/11/binary-heart.html" target="_blank"&gt;A binary heart in SAS&lt;/A&gt; by Rick Wicklin&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Happy-Valentines-Day-A-Dozen-Polar-Roses/m-p/250167#M9067" target="_blank"&gt;A dozen polar roses&lt;/A&gt; by SAS Communities member&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/38972"&gt;@LauraRK&lt;/a&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2015/02/12/have-a-traditional-sasgraph-valentines-day/" target="_blank"&gt;Have a traditional SAS/Graph Valentine's Day&lt;/A&gt; by Robert Allison (&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Remember, include your code (if applicable) -- use the code button (the SAS running man) to add/format it.&amp;nbsp; And add screenshots/images with the Photos button.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Communities tip: Try not to add file attachments if you can avoid it -- sometimes these are difficult for visitors to view.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;See also:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2018/01/22/sas-language-valentines/" target="_self"&gt;A Valentine Challenge: Express your &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt; with SAS&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 20:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/429763#M14849</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-01-22T20:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/429948#M14858</link>
      <description>&lt;P&gt;Inspired by the many great Valentines day posts I thought I'd create a variation of &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13585"&gt;@GraphGuy&lt;/a&gt;'s traditional SAS/GRAPH PROC GMAP Heart and dust off my annotate skills to create the following...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="valentine-pi.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18040iCEFC85316442B236/image-size/large?v=v2&amp;amp;px=999" role="button" title="valentine-pi.png" alt="valentine-pi.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code below...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name=valentines_graph;
filename odsout '.';

%let pink=cxFF3333;
%let darkgray=gray66;

data heart_data;
do x=-2 to 2 by .05;
 y=sqrt(1-(abs(x)-1)**2);
 output;
 end;
do x=2 to -2 by -.05;
 y=arcos(1-abs(x))-3.14;
 output;
 end;
run;

data heart_data; set heart_data;
/* set the undefined values to zero */
if y=. then y=0;
/* re-shape the deep parts of the 'V' just a tiny bit */
if round(x*100)=0 then y=y+.2;
/* an id variable for gmap */
idvar='heart';
my_html=
 'title='||quote('I Love SAS!')||
 ' href='||quote('https://blogs.sas.com/content/sgf/2018/01/22/sas-language-valentines/');;
run;

data anno_pi;
length function $8;
xsys='2'; ysys='2'; hsys='3'; when='a'; color="&amp;amp;darkgray";
function='move'; x=-0.75; y=-1.25; output;
function='draw'; x=-0.75; y=0.0; output;
function='move'; x=-1.25; y=0.0; output;
function='draw'; x=1.25; y=0.0; output;
function='move'; x=0.75; y=0.0; output;
function='draw'; x=0.75; y=-1.25; output;
run;
goptions device=png;
goptions noborder;

ODS LISTING CLOSE;
ODS HTML path=odsout body="&amp;amp;name..htm"
 (title="Valentine's Heart SAS Graph") style=htmlblue;

goptions gunit=pct ftitle='albany amt/bold' ftext='albany amt/bold' htitle=3.5 htext=3.5 ctext=&amp;amp;darkgray;

title1 ls=1.5  c=&amp;amp;darkgray "My " c=&amp;amp;pink "love" c=&amp;amp;darkgray " for you";
title2 ls=1.5  c=&amp;amp;darkgray "is like the decimals of pi";
footnote ls=1.5  c=&amp;amp;darkgray bold "...never ending";
*title2 h=8 ' ';
pattern1 v=s c=&amp;amp;pink;
proc gmap data=heart_data map=heart_data anno=anno_pi;
id idvar;
choro idvar / nolegend
 coutline=&amp;amp;darkgray
 html=my_html
 des='' name="&amp;amp;name";
run;

quit;
ODS HTML CLOSE;
ODS LISTING;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 11:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/429948#M14858</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2018-01-23T11:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431077#M14879</link>
      <description>&lt;P&gt;Here's my stab at this challenge, featuring little misshapen hearts made out of scatter plot dots. &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Love Over Time.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18108iC2AD4933B2B80470/image-size/large?v=v2&amp;amp;px=999" role="button" title="Love Over Time.png" alt="Love Over Time.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here's the code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data love;
	input time love;
datalines;
0 0 
1 1 
1.12 1.12
.88 1.12
2 2 
3 3 
3.12 3.12
2.88 3.12
4 4 
5 5 
5.12 5.12
4.88 5.12
6 6 
7 7 
7.12 7.12
6.88 7.12
8 8 
9 9 
9.12 9.12
8.88 9.12
10 10 
11 11 
11.12 11.12
10.88 11.12
12 12 
13 13 
13.12 13.12
12.88 13.12
14 14 
15 15 
15.12 15.12
14.88 15.12
16 16 
17 17 
17.12 17.12
16.88 17.12
18 18 
19 19 
;
run;

proc template;
define statgraph sgdesign;
dynamic _TIME2 _LOVE;
begingraph / designwidth=629 designheight=482;
   entrytitle halign=center 'Love Over Time' / textattrs=(family='Monotype Corsiva' size=24 );
   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
      layout overlay / wallcolor=CXFFCCCC xaxisopts=( label=('TIME') labelattrs=(family='HeiT' size=16 ) linearopts=( tickvaluepriority=TRUE tickvalueformat=BEST6.)) yaxisopts=( label=('LOVE') labelattrs=(family='HeiT' size=16 ) linearopts=( tickvaluepriority=TRUE tickvalueformat=BEST6.));
         scatterplot x=_TIME2 y=_LOVE / name='scatter' markerattrs=(color=CXFF0000 symbol=CIRCLEFILLED size=7 weight=bold );
      endlayout;
   endlayout;
endgraph;
end;
run;

proc sgrender data=WORK.LOVE template=sgdesign;
dynamic _TIME2="TIME" _LOVE="LOVE";
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jan 2018 20:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431077#M14879</guid>
      <dc:creator>OliviaWright</dc:creator>
      <dc:date>2018-01-25T20:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431093#M14881</link>
      <description>&lt;P&gt;Interesting idea to use the Circlefilled symbol to create a heart.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;The Symbol font has a "Heart" shape (0xA9).&amp;nbsp; Another way would be to use SYMBOLCHAR to define a heart symbol to use it directly&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 20:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431093#M14881</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-01-25T20:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431096#M14882</link>
      <description>&lt;P&gt;Ha ha.. With this challenge I took a "word harder, not smarter" approach.. That's the saying right?:)&lt;/P&gt;
&lt;P&gt;I was using ODS Graphics Designer which sadly does not have a heart as a symbol option. But I will take this into consideration for my next valentine. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 20:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431096#M14882</guid>
      <dc:creator>OliviaWright</dc:creator>
      <dc:date>2018-01-25T20:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431161#M14883</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LOVE.gif" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18113i4842F5F49B95D78C/image-size/large?v=v2&amp;amp;px=999" role="button" title="LOVE.gif" alt="LOVE.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With apologies to &lt;A href="https://en.wikipedia.org/wiki/Robert_Indiana#LOVE" target="_self"&gt;Robert Indiana&lt;/A&gt;, here's a simple SAS ODS Graphics-generated valentine!&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;&lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: Valentine's Day L-O-V-E;

data love1;                         * Letters L-V-E in upper left, lower left/right quadrants;
x1=1; y1=2; txt1='L'; n+1; output;
x1=1; y1=1; txt1='V'; n+1; output;
x1=2; y1=1; txt1='E'; n+1; output;

data love2;                         * Unicode heart ("O") in upper right quadrant;
x2=1.9; y2=1.95; txt2=unicode('\u2764'); output;

data love3;                         * Valentine message in center of heart;
x3=1.9; y3=1.95; txt3="BE*MINE"; output;

data love4;                         * Points for filled polygons for each quadrant;
input id@; do i=1 to 4; input x4 y4@; output; end;
cards;
1 0 1.53 1.5 1.53 1.5 3 0 3 "L"
2 1.5 1.53 3 1.53 3 3 1.5 3 "O"
3 0 0 1.5 0 1.5 1.53 0 1.53 "V"
4 1.5 0 3 0 3 1.53 1.5 1.53 "E"
;
data love;                          * Put it all together;
set love1 love2 love3 love4;
                                    * Plot a Valentine!;
ods graphics on / reset=index imagefmt=gif antialias height=5in width=5in;  
proc sgplot data=love noautolegend noborder pad=0 aspect=1;
* 1. Colored quadrants (use transparency to create lighter version of letter colors);
polygon x=x4 y=y4 id=id / colormodel=(blue red green orange) transparency=.85 nooutline fill colorresponse=id;
* 2. L-V-E letters;
text x=x1 y=y1 text=txt1 / position=center vcenter=bbox contributeoffsets=none colormodel=(blue green orange)
                           textattrs=(family="Cumberland AMT" size=258pt weight=bold) colorresponse=n; 
* 3. "Outer" heart ("O" letter), tilted;
text x=x2 y=y2 text=txt2 / position=center vcenter=bbox contributeoffsets=none rotate=-45
                           textattrs=(family="Arial Unicode MS" size=202pt weight=bold color=red); 
* 4. Smaller "inner" heart (inside "O" letter), tilted;
text x=x2 y=y2 text=txt2 / position=center vcenter=bbox contributeoffsets=none rotate=-45 
                           textattrs=(family="Arial Unicode MS" size=106pt weight=bold color=pink); 
* 5. "BE MINE" message on "inner" heart, tilted;
text x=x3 y=y3 text=txt3 / position=center vcenter=bbox contributeoffsets=none splitchar='*' splitpolicy=splitalways
                           textattrs=(size=14pt weight=bold color=red) rotate=-45; 
xaxis display=none offsetmin=0 offsetmax=0 values=(.5 2.45); * Suppress labels/ticks on axes, set bounds;
yaxis display=none offsetmin=0 offsetmax=0 values=(.5 2.55);  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 03:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431161#M14883</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2018-01-26T03:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431307#M14889</link>
      <description>&lt;P&gt;Awesome and very creative and aesthetic.&amp;nbsp; Nice to see you make this visual using SGPLOT with fairly compact code.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 15:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/431307#M14889</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-01-26T15:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/433320#M14965</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data data1;
input love time_year age;
datalines;
10 1 20 
11 2 21
12 3 22
13 4 23
14 5 24
15 6 25
16 7 26
17 8 27
18 9 28
19 10 29
20 11 30
;

run;
ods pdf file='C:\Users\**bleep**\Google Drive\Computational Statistics\work1.pdf';
title "SAS Valentine";
proc g3d;
scatter love*time_year=age / color='red'  shape='HEART'  size=3 ctext='red'  caxis='red' ;
run;
quit;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18262iE14DE5684097B6EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas.jpg" alt="sas.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 23:19:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/433320#M14965</guid>
      <dc:creator>chinki</dc:creator>
      <dc:date>2018-02-01T23:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/433326#M14966</link>
      <description>&lt;P&gt;LOVEly chart &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/190876"&gt;@chinki&lt;/a&gt;!&amp;nbsp;&lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt; It's also lovely to see that you're a new SAS Support Communities member. May your initiative encourage others. Yeah!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind Regards,&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;
&lt;P&gt;P.S. Participation in the community is a great way to earn some &lt;A href="https://communities.sas.com/t5/SAS-Global-Forum-2018/Participate-on-the-SAS-Support-Communities-earn-conference-swag/gpm-p/430772" target="_self"&gt;SAS Global Forum 2018 conference swag&lt;/A&gt;!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 23:49:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/433326#M14966</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2018-02-01T23:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/433328#M14967</link>
      <description>&lt;P&gt;Thank you! Michelle&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I am new to this community and enjoying&amp;nbsp;SAS.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 23:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/433328#M14967</guid>
      <dc:creator>chinki</dc:creator>
      <dc:date>2018-02-01T23:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/434759#M15024</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mmValentine.png" style="width: 480px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18361i3CDFB9152B494441/image-size/large?v=v2&amp;amp;px=999" role="button" title="mmValentine.png" alt="mmValentine.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To paraphrase &lt;A href="https://twitter.com/bobbyhillquotes/status/615947176745766913" target="_self"&gt;Bobby Hill&lt;/A&gt;, "After seeing &lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684" target="_self"&gt;@Rick_SAS&lt;/A&gt;'s &lt;A href="https://blogs.sas.com/content/iml/2015/02/11/binary-heart.html" target="_self"&gt;Binary Heart&lt;/A&gt; and &lt;A href="https://blogs.sas.com/content/iml/2017/02/20/proportion-of-colors-mandms.html" target="_self"&gt;M&amp;amp;Ms&lt;/A&gt; posts, well, what was I supposed to do? Not code a SAS ODS Graphics I-Heart-M&amp;amp;Ms Valentine?"&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: I Heart M&amp;amp;Ms Valentine;

data red(keep=x y m s rename=(x=x1 y=y1)) white(keep=x y m s rename=(x=x2 y=y2));
retain m "m" s 1;                  * M&amp;amp;M letter ("m"), M&amp;amp;M size (1);
do y=15 to 1 by -1;                * Read in 15x15 M&amp;amp;M valentine layout template from inline data;
  input mms $15.;                  * X=Background M&amp;amp;M (red), *=Heart M&amp;amp;M (white);
  do x=1 to 15;                    * Output points for plot;                 
    if substr(mms,x,1)="X" then output red; 
    else output white;
  end;
end;   
cards;
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
XXX***XXX***XXX
XX*****X*****XX
X*************X
X*************X
X*************X
XX***********XX
XXX*********XXX
XXXX*******XXXX
XXXXX*****XXXXX
XXXXXX***XXXXXX
XXXXXXX*XXXXXXX
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXX
;
data mms;                          * Put M&amp;amp;Ms all together;
set red white;
                                   * Plot M&amp;amp;Ms valentine!;
ods graphics on / reset=index imagefmt=png antialias=on height=5in width=5in dataskinmax=500;  
proc sgplot data=mms noautolegend noborder pad=0 aspect=1 nowall subpixel;
styleattrs backcolor=rose;
* 1. Background M&amp;amp;Ms (red);
bubble x=x1 y=y1 size=s / dataskin=gloss bradiusmin=15 fill fillattrs=(color=red);
text x=x1 y=y1 text=m / textattrs=(family="Albany AMT Bold" size=12pt color=white weight=bold) position=center vcenter=bbox contributeoffsets=none strip;
* 2. Heart M&amp;amp;Ms (white);
bubble x=x2 y=y2 size=s / dataskin=gloss bradiusmin=15 fill fillattrs=(color=white);
text x=x2 y=y2 text=m / textattrs=(family="Albany AMT Bold" size=12pt color=deeppink weight=bold) position=center vcenter=bbox contributeoffsets=none strip;
xaxis display=none offsetmin=0 offsetmax=0 min=.4 max=15.6 values=(.4 15.6); * Suppress labels/ticks on axes, set bounds;
yaxis display=none offsetmin=0 offsetmax=0 min=.4 max=15.6 values=(.4 15.6);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 04:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/434759#M15024</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2018-02-07T04:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/434765#M15025</link>
      <description>&lt;P&gt;Awwww &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;... so glad you did! A magnificent map of m&amp;amp;ms &lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 05:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/434765#M15025</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2018-02-07T05:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/435489#M15038</link>
      <description>&lt;P&gt;SAS Graph has never been my forte, but here is at least an attempt that even newbies can replicate:&lt;/P&gt;
&lt;PRE&gt;data need (drop=t);
  do t=0 to 2*constant("pi") by 0.1;
    x=16*sin(t)**3;
    y =13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t);
    output;
  end;
  x=16.6;
  y=16.5;
  output;
run;

proc sgplot noautolegend;
  title 'Be my valentine';
  scatter  y=y  x=x  / markerattrs=(symbol=squarefilled color=red);
  lineparm x=0 y=0 slope=1 /LINEATTRS=(pattern=MediumDashShortDash thickness=5 color=red);
run;
&lt;/PRE&gt;
&lt;P&gt;Not as nice or fancy as the others, but even graphic newbies can have/show love on Valentine's Day:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 571px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18415i0A3C22ED44DB05A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 23:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/435489#M15038</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-02-08T23:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/435491#M15039</link>
      <description>&lt;P&gt;Nice work&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;!&amp;nbsp;&lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt; One of the beauties with SAS... there is always something to learn!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 23:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/435491#M15039</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2018-02-08T23:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436068#M15044</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data carsheart;
set sashelp.cars;

 heartsymbol='Heart';
run;
 
proc sgplot data=carsheart noautolegend;
  symbolimage name=Heart image="C:\Users\ptimusk\Dropbox\SASUniversityEdition\myfolders\symbolheartlarge.png" ;
 styleattrs datasymbols=(Heart);

  reg x=EngineSize y=mpg_city / group=heartsymbol lineattrs=(color=black pattern=dash) 
                          ;;
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="symbolheartlarge.png" style="width: 256px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18453iE6331A8A160CFA21/image-size/large?v=v2&amp;amp;px=999" role="button" title="symbolheartlarge.png" alt="symbolheartlarge.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;C:\Users\ptimusk\Dropbox\SASUniversityEdition\myfolders\symbolheartlarge.png&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I borrowed code from &lt;SPAN class="posted-by"&gt;&lt;SPAN class="reviewer"&gt;&lt;A title="Posts by Sanjay Matange" href="https://blogs.sas.com/content/author/sanjaymatange/" rel="author" target="_blank"&gt;Sanjay Matange&lt;/A&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;'s blog and used a creative commons cupid heart symbol&lt;/P&gt;
&lt;DIV class="heading cf"&gt;
&lt;H1 class="post-title item fn"&gt;Marker Symbols&lt;/H1&gt;
&lt;/DIV&gt;
&lt;DIV class="post-meta cf"&gt;&lt;SPAN class="posted-by"&gt;By &lt;SPAN class="reviewer"&gt;&lt;A title="Posts by Sanjay Matange" href="https://blogs.sas.com/content/author/sanjaymatange/" rel="author" target="_blank"&gt;Sanjay Matange&lt;/A&gt; on &lt;A href="https://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;Graphically Speaking&lt;/A&gt;&lt;/SPAN&gt; &lt;/SPAN&gt; &lt;SPAN class="posted-on"&gt; &lt;SPAN class="dtreviewed"&gt; &lt;TIME class="value-title" title="2015-01-14" datetime="2015-01-14T13:16:37-05:00"&gt;January 14, 2015&lt;/TIME&gt; &lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/01/14/marker-symbols/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2015/01/14/marker-symbols/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Custom Heart Plot Symbols" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18454iE80102439A9BED3E/image-size/large?v=v2&amp;amp;px=999" role="button" title="HeartsPlot.png" alt="Custom Heart Plot Symbols" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Custom Heart Plot Symbols&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Feb 2018 05:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436068#M15044</guid>
      <dc:creator>ptimusk</dc:creator>
      <dc:date>2018-02-11T05:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436229#M15049</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data val;
Infile Datalines;
informat vert 2. horz 2.;
input vert horz;

Datalines;
1 6
2 5
2 6
2 7
3 4
3 5
3 6
3 7
3 8
4 3
4 4
4 5
4 6
4 7
4 8
4 9
5 2
5 3
5 4
5 5
5 6
5 7
5 8
5 9
5 10
6 1
6 2
6 3
6 4
6 5
6 6
6 7
6 8
6 9
6 10
6 11
7 1
7 2
7 3
7 4
7 5
7 6
7 7
7 8
7 9
7 10
7 11
8 1
8 2
8 3
8 4
8 5
8 6
8 7
8 8
8 9
8 10
8 11
9 2
9 3
9 4
9 5
9 6
9 7
9 8
9 9
9 10
10 3
10 4
10 5
10 7
10 8
10 9
11 4
11 8
run;

options pageno=1 linesize=min pagesize=35;

proc plot data=val;
plot vert*horz='v' /vpos=27;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436229#M15049</guid>
      <dc:creator>jl3</dc:creator>
      <dc:date>2018-02-12T14:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436234#M15050</link>
      <description>&lt;P&gt;That's old school,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/129322"&gt;@jl3&lt;/a&gt;!&amp;nbsp; I've taken the liberty of posting the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; vert |
      |
      |
      |
      |
   11 +                 v                   v
      |
   10 +            v    v    v         v    v    v
      |
    9 +       v    v    v    v    v    v    v    v    v
      |
    8 +  v    v    v    v    v    v    v    v    v    v    v
      |
    7 +  v    v    v    v    v    v    v    v    v    v    v
      |
    6 +  v    v    v    v    v    v    v    v    v    v    v
      |
    5 +       v    v    v    v    v    v    v    v    v
      |
    4 +            v    v    v    v    v    v    v
      |
    3 +                 v    v    v    v    v
      |
    2 +                      v    v    v
      |
    1 +                           v
      |
      ---+----+----+----+----+----+----+----+----+----+----+--
         1    2    3    4    5    6    7    8    9   10   11&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436234#M15050</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-02-12T14:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436239#M15051</link>
      <description>&lt;P&gt;Yes Chris.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436239#M15051</guid>
      <dc:creator>jl3</dc:creator>
      <dc:date>2018-02-12T14:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436489#M15052</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-02-14 Hearts.png" style="width: 496px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18469iC3D549441375EBF3/image-size/large?v=v2&amp;amp;px=999" role="button" title="2018-02-14 Hearts.png" alt="2018-02-14 Hearts.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Love is often unnecessarily complicated, just like this code! */
data _null_;
	retain SheLovesMe Valentine;
	input Kiss @@;
	length Valentine $20.;
	do Enamored = 1 to Kiss;
		Cupid + 1;
		Valentine = Cats( Valentine, SheLovesMe, SheLovesMe*3 );
		if not mod( Cupid, 10 ) then do;
			call execute('%put ERROR-' || translate( Valentine, " &amp;lt; ", "01." ) || ';');
			Valentine = "";
		end;
	end;
	SheLovesMe = not SheLovesMe;
	cards;
1 3 2 3 1 30 1 8 3 6 5 4 7 2 14
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Feb 2018 22:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436489#M15052</guid>
      <dc:creator>Cowboy_Coffee</dc:creator>
      <dc:date>2018-02-12T22:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Challenge for SAS Nerds: Build a SAS Valentine</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436494#M15053</link>
      <description>&lt;P&gt;Oh &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/193026"&gt;@Cowboy_Coffee&lt;/a&gt; your poetic SAS code is just as lovely (or perhaps more) than the output... charming choice of variable names &lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;
&lt;P&gt;P.S. Welcome to the SAS Community too - a beautiful first post! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 22:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Challenge-for-SAS-Nerds-Build-a-SAS-Valentine/m-p/436494#M15053</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2018-02-12T22:33:52Z</dc:date>
    </item>
  </channel>
</rss>

