<?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 Fun w/ODS Graphics: Gantt chart-like take on Presidents' ages in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312117#M10986</link>
    <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5859iD660667C0E969682/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="PresidentAges.png" title="PresidentAges.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At home waiting for the Comcast installer today (75Mbps, Internet here I come!), so thought I'd take a crack at Rick Wicklin's &lt;A href="http://blogs.sas.com/content/iml/2016/11/14/viz-age-us-president.html" target="_self"&gt;visualize-the-ages-of-US-presidents challenge&lt;/A&gt;. Try as I might, I'm afraid Rick wins this ODS Graphics throwdown with his elegant viz, but thought I'd post my stab at a Gantt chart-like solution anyway (which I "adapted" from Sanjay Matange's &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2014/05/04/the-highlow-plot/" target="_self"&gt;The HIGHLOW Plot&lt;/A&gt;). Wait'll next year, as we Cubs fans (used to!) say.&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;P&gt;&lt;STRONG&gt;CODE&lt;/STRONG&gt; (uses RW's &lt;EM&gt;Presidents&lt;/EM&gt; SAS dataset)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Gantt-chart like take on Rick Wicklin's Presidential ages vector chart;

title;
proc format;                             * Kludge since Trump's term TBD;
picture trump 74.1-74.9="?" other='99.9';

data presidents2;
set presidents;
if AgeAtEndDate=. then AgeAtEndDate=AgeAtInauguration+4; * Default to 4-year term;
format AgeAtInauguration AgeAtEndDate trump.;
label InaugurationDate="Inaugurated" PresidencyEndDate="End Date";

ods graphics on / imagemap height=11.25in width=11.25in;
proc sgplot data=presidents2 noautolegend;
highlow y=President low=AgeAtInauguration high=AgeAtEndDate /
         lowlabel=AgeAtInauguration highlabel=AgeAtEndDate lineattrs=(thickness=4pt);
yaxis grid reverse display=(nolabel noticks); 
yaxistable InaugurationDate PresidencyEndDate;
xaxis grid values=(40 to 80 by 5) valuesformat=z2. 
      label="Age of US Presidents at Beginning and End of Term";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Nov 2016 21:15:26 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2016-11-16T21:15:26Z</dc:date>
    <item>
      <title>Fun w/ODS Graphics: Gantt chart-like take on Presidents' ages</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312117#M10986</link>
      <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5859iD660667C0E969682/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="PresidentAges.png" title="PresidentAges.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At home waiting for the Comcast installer today (75Mbps, Internet here I come!), so thought I'd take a crack at Rick Wicklin's &lt;A href="http://blogs.sas.com/content/iml/2016/11/14/viz-age-us-president.html" target="_self"&gt;visualize-the-ages-of-US-presidents challenge&lt;/A&gt;. Try as I might, I'm afraid Rick wins this ODS Graphics throwdown with his elegant viz, but thought I'd post my stab at a Gantt chart-like solution anyway (which I "adapted" from Sanjay Matange's &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2014/05/04/the-highlow-plot/" target="_self"&gt;The HIGHLOW Plot&lt;/A&gt;). Wait'll next year, as we Cubs fans (used to!) say.&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;P&gt;&lt;STRONG&gt;CODE&lt;/STRONG&gt; (uses RW's &lt;EM&gt;Presidents&lt;/EM&gt; SAS dataset)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Gantt-chart like take on Rick Wicklin's Presidential ages vector chart;

title;
proc format;                             * Kludge since Trump's term TBD;
picture trump 74.1-74.9="?" other='99.9';

data presidents2;
set presidents;
if AgeAtEndDate=. then AgeAtEndDate=AgeAtInauguration+4; * Default to 4-year term;
format AgeAtInauguration AgeAtEndDate trump.;
label InaugurationDate="Inaugurated" PresidencyEndDate="End Date";

ods graphics on / imagemap height=11.25in width=11.25in;
proc sgplot data=presidents2 noautolegend;
highlow y=President low=AgeAtInauguration high=AgeAtEndDate /
         lowlabel=AgeAtInauguration highlabel=AgeAtEndDate lineattrs=(thickness=4pt);
yaxis grid reverse display=(nolabel noticks); 
yaxistable InaugurationDate PresidencyEndDate;
xaxis grid values=(40 to 80 by 5) valuesformat=z2. 
      label="Age of US Presidents at Beginning and End of Term";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Nov 2016 21:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312117#M10986</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2016-11-16T21:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/ODS Graphics: Gantt chart-like take on Presidents' ages</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312159#M10987</link>
      <description>&lt;P&gt;Nice work&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc﻿&lt;/a&gt;! Pleased to see you took up the challenge&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2016 23:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312159#M10987</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2016-11-16T23:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/ODS Graphics: Gantt chart-like take on Presidents' ages</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312170#M10988</link>
      <description>&lt;P&gt;Oops - didn't notice that Grover Cleveland had two terms, which threw a monkey wrench into my inauguration and term end dates (nice to see HIGHLOW handles the multiple line segments though!). Added President # tie-breaker - revised code, output below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CODE&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title;
proc format;                             * Kludge since Trump's term TBD;
picture trump 74.1-74.9="?" other='99.9';

data presidents2;
set presidents;
if AgeAtEndDate=. then AgeAtEndDate=AgeAtInauguration+4; * Default to 4-year term;
format AgeAtInauguration AgeAtEndDate trump. InaugurationDate PresidencyEndDate yymmddd10.;
label InaugurationDate="Inaugurated" PresidencyEndDate="End Date";

ods graphics on / imagemap height=11.25in width=11.25in;
proc sgplot data=presidents2 noautolegend;
highlow y=n low=AgeAtInauguration high=AgeAtEndDate /
        lowlabel=AgeAtInauguration highlabel=AgeAtEndDate lineattrs=(thickness=4pt);
yaxis grid reverse display=(nolabel noticks) type=discrete valueattrs=(size=8pt); 
yaxistable president / position=left valueattrs=(size=8pt) nolabel;
yaxistable InaugurationDate PresidencyEndDate / valueattrs=(size=8pt) labelattrs=(size=8pt);
xaxis grid values=(40 to 80 by 5) valuesformat=z2. valueattrs=(size=8pt)
      label="Age of US Presidents at Beginning and End of Term";
run&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;CHART&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5865iB91F043C5E5A4109/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="PresidentAgesV2.png" title="PresidentAgesV2.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2016 00:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/312170#M10988</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2016-11-17T00:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/ODS Graphics: Gantt chart-like take on Presidents' ages</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/572437#M18465</link>
      <description>&lt;P&gt;Rick is awesome, but this chart is far cleaner, easier to read, and more informative. Congrats!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 17:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Gantt-chart-like-take-on-Presidents-ages/m-p/572437#M18465</guid>
      <dc:creator>BranumMartin</dc:creator>
      <dc:date>2019-07-10T17:25:38Z</dc:date>
    </item>
  </channel>
</rss>

