<?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: Fun with SAS ODS Graphics: Apollo 11 EarthRise Bubble/Ellipse Plot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575179#M18533</link>
    <description>&lt;P&gt;Good idea - haven't tried this technique, but will look into it. In the meantime, I borrowed from&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/08/20/fun-ods-graphics-eclipse-animation/" target="_self"&gt;your 2017 solar eclipse post&lt;/A&gt;&amp;nbsp;and added some "stars" with a scatter plot. Also tossed in some random "craters" with a bubble plot. &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;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Earthrise (now with scatterplot stars and bubbleplot craters!)" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31173iE503AF47A61D1120/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EarthRiseSASv2.png" alt="Earthrise (now with scatterplot stars and bubbleplot craters!)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Earthrise (now with scatterplot stars and bubbleplot craters!)&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: Apollo 11 Earthrise Bubble/Ellipse Plot
  See the real Apollo 11 deal at history.nasa.gov/ap11ann/kippsphotos/6550.jpg;

ods graphics / height=5in width=5in antialias dataskinmax=2000; * Original NASA image was 600 x 600;

data earth; * Generate a point for the earth;
x=300; y=185; r=50; * x, y, radius for bubble plot of "earth";

data stars; * Generate random "stars";
do i=1 to 1000;
  xs=ceil(ranuni(1)*600);
  ys=ceil(ranuni(1)*600);
  output;
end;

data craters; * Generate 35 random non-overlapping "craters";
array x[500] _temporary_; array y[500] _temporary_; array r[500] _temporary_;
nc=0;
do i=1 to 500;
  xc=30+ceil(ranuni(2)*540); * X-coordinate from 30-570;
  yc=280+ceil(ranuni(2)*290); * y-coordinate from 280-570;
  rc=10+ceil(ranuni(2)*20); * radius from 10-30;
  do j=1 to nc; * Reject new crater if not at least 15 units away from prior craters;
    if sqrt((xc-x[j])**2+(yc-y[j])**2)&amp;lt;rc+r[j]+15 then goto rejected;
  end;
  nc+1; x[nc]=xc; y[nc]=yc; r[nc]=rc; output; * Save crater points, radius;
  if nc=35 then stop; * Limit to 35 craters;
  rejected:
end;

data earthstarscraters; * Merge data together for chart;
set earth stars craters;

proc template; * "Earth Rise" chart (bubble + eclipse plot);
define statgraph ellipseparm;
begingraph / opaque=true border=false backgroundcolor=black pad=0 subpixel=on; * Black background;
  layout overlayequated / 
    equatetype=square opaque=true border=true backgroundcolor=black wallcolor=black WALLDISPLAY=(FILL)
    commonaxisopts=(viewmin=0 viewmax=600) /* Limit X-Y axes range to 0=600 */
    xaxisopts=(display=none offsetmin=0 offsetmax=0)
    yaxisopts=(display=none offsetmin=0 offsetmax=0 reverse=true); * Got coordinates from MS-Paintbrush, so use reverse y-axis;
    scatterplot x=xs y=ys / markerattrs=(symbol=diamondfilled color=white size=2pt); * Stars;
    bubbleplot x=x y=y size=r / 
                fillattrs=(color=dodgerblue) display=(fill) dataskin=sheen relativescale=false; * Dodger Blue Earth;
    ellipseparm xorigin=300 yorigin=6250 semimajor=6000 semiminor=6000 slope=0 /  
                display=(fill) fillattrs=(color=cx696969); * Dim Gray Moon (semimajor=semiminor=circle);
    bubbleplot x=xc y=yc size=rc / 
                fillattrs=(color=cx696969) display=(fill) dataskin=crisp relativescale=false; * Dim Gray craters w/crisp dataskin;                

 endlayout;
  endGraph;
 end;
run;
proc sgrender data=earthstarscraters(obs=max) template=ellipseparm;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 21 Jul 2019 05:00:32 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2019-07-21T05:00:32Z</dc:date>
    <item>
      <title>Fun with SAS ODS Graphics: Apollo 11 EarthRise Bubble/Ellipse Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575111#M18530</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Earthrise (Bubble/Ellipse Plot)" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31169i1D0C431D6A7766B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EarthRiseSAS.png" alt="Earthrise (Bubble/Ellipse Plot)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Earthrise (Bubble/Ellipse Plot)&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Earthrise (Apollo 11)" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31168i620723754225A742/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EarthRiseApollo11.jpg" alt="Earthrise (Apollo 11)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Earthrise (Apollo 11)&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Figured I should do something to mark the 50th anniversary of the Moon Landing, even if it's only a silly Earthrise bubble/ellipse plot!&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: Apollo 11 Earthrise Bubble/Ellipse Plot
  See the real Apollo 11 deal at history.nasa.gov/ap11ann/kippsphotos/6550.jpg;

ods graphics / height=5in width=5in antialias; * Original NASA image was 600 x 600;
data moon; * Generate a point for the earth;
x=300; y=185; r=50; * x, y, radius for bubble plot of "earth";

proc template; * "Earth Rise" chart (bubble + eclipse plot);
define statgraph ellipseparm;
begingraph / opaque=true border=false backgroundcolor=black pad=0 subpixel=on; * Black background;
  layout overlayequated / 
    equatetype=square opaque=true border=true backgroundcolor=black wallcolor=black WALLDISPLAY=(FILL)
    commonaxisopts=(viewmin=0 viewmax=600) /* Limit X-Y axes range to 0=600 */
    xaxisopts=(display=none offsetmin=0 offsetmax=0)
    yaxisopts=(display=none offsetmin=0 offsetmax=0 reverse=true); * Got coordinates from MS-Paintbrush, so use reverse y-axis;
    bubbleplot x=x y=y size=r / 
                fillattrs=(color=dodgerblue) display=(fill) dataskin=sheen relativescale=false; * Dodger Blue Earth;
    ellipseparm xorigin=300 yorigin=6250 semimajor=6000 semiminor=6000 slope=0 /  
                display=(fill) fillattrs=(color=cx696969); * Dim Gray Moon (semimajor=semiminor=circle);
  endlayout;
  endGraph;
 end;
run;
proc sgrender data=moon template=ellipseparm;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Jul 2019 07:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575111#M18530</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2019-07-20T07:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Fun with SAS ODS Graphics: Apollo 11 EarthRise Bubble/Ellipse Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575160#M18531</link>
      <description>&lt;P&gt;Nice.&amp;nbsp; How about adding some textures using images?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 18:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575160#M18531</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2019-07-20T18:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fun with SAS ODS Graphics: Apollo 11 EarthRise Bubble/Ellipse Plot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575179#M18533</link>
      <description>&lt;P&gt;Good idea - haven't tried this technique, but will look into it. In the meantime, I borrowed from&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/08/20/fun-ods-graphics-eclipse-animation/" target="_self"&gt;your 2017 solar eclipse post&lt;/A&gt;&amp;nbsp;and added some "stars" with a scatter plot. Also tossed in some random "craters" with a bubble plot. &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;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Earthrise (now with scatterplot stars and bubbleplot craters!)" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31173iE503AF47A61D1120/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EarthRiseSASv2.png" alt="Earthrise (now with scatterplot stars and bubbleplot craters!)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Earthrise (now with scatterplot stars and bubbleplot craters!)&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun w/SAS ODS Graphics: Apollo 11 Earthrise Bubble/Ellipse Plot
  See the real Apollo 11 deal at history.nasa.gov/ap11ann/kippsphotos/6550.jpg;

ods graphics / height=5in width=5in antialias dataskinmax=2000; * Original NASA image was 600 x 600;

data earth; * Generate a point for the earth;
x=300; y=185; r=50; * x, y, radius for bubble plot of "earth";

data stars; * Generate random "stars";
do i=1 to 1000;
  xs=ceil(ranuni(1)*600);
  ys=ceil(ranuni(1)*600);
  output;
end;

data craters; * Generate 35 random non-overlapping "craters";
array x[500] _temporary_; array y[500] _temporary_; array r[500] _temporary_;
nc=0;
do i=1 to 500;
  xc=30+ceil(ranuni(2)*540); * X-coordinate from 30-570;
  yc=280+ceil(ranuni(2)*290); * y-coordinate from 280-570;
  rc=10+ceil(ranuni(2)*20); * radius from 10-30;
  do j=1 to nc; * Reject new crater if not at least 15 units away from prior craters;
    if sqrt((xc-x[j])**2+(yc-y[j])**2)&amp;lt;rc+r[j]+15 then goto rejected;
  end;
  nc+1; x[nc]=xc; y[nc]=yc; r[nc]=rc; output; * Save crater points, radius;
  if nc=35 then stop; * Limit to 35 craters;
  rejected:
end;

data earthstarscraters; * Merge data together for chart;
set earth stars craters;

proc template; * "Earth Rise" chart (bubble + eclipse plot);
define statgraph ellipseparm;
begingraph / opaque=true border=false backgroundcolor=black pad=0 subpixel=on; * Black background;
  layout overlayequated / 
    equatetype=square opaque=true border=true backgroundcolor=black wallcolor=black WALLDISPLAY=(FILL)
    commonaxisopts=(viewmin=0 viewmax=600) /* Limit X-Y axes range to 0=600 */
    xaxisopts=(display=none offsetmin=0 offsetmax=0)
    yaxisopts=(display=none offsetmin=0 offsetmax=0 reverse=true); * Got coordinates from MS-Paintbrush, so use reverse y-axis;
    scatterplot x=xs y=ys / markerattrs=(symbol=diamondfilled color=white size=2pt); * Stars;
    bubbleplot x=x y=y size=r / 
                fillattrs=(color=dodgerblue) display=(fill) dataskin=sheen relativescale=false; * Dodger Blue Earth;
    ellipseparm xorigin=300 yorigin=6250 semimajor=6000 semiminor=6000 slope=0 /  
                display=(fill) fillattrs=(color=cx696969); * Dim Gray Moon (semimajor=semiminor=circle);
    bubbleplot x=xc y=yc size=rc / 
                fillattrs=(color=cx696969) display=(fill) dataskin=crisp relativescale=false; * Dim Gray craters w/crisp dataskin;                

 endlayout;
  endGraph;
 end;
run;
proc sgrender data=earthstarscraters(obs=max) template=ellipseparm;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Jul 2019 05:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-with-SAS-ODS-Graphics-Apollo-11-EarthRise-Bubble-Ellipse/m-p/575179#M18533</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2019-07-21T05:00:32Z</dc:date>
    </item>
  </channel>
</rss>

