<?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: Advanced ODS Graphics techniques: new free book in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236437#M8580</link>
    <description>&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 9.4 TS Level 1M0 and it doesn't seem to recognize the Spline statement. Is there something comparable in my version?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Brian Adams&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2015 15:57:53 GMT</pubDate>
    <dc:creator>BTAinRVA</dc:creator>
    <dc:date>2015-11-25T15:57:53Z</dc:date>
    <item>
      <title>Advanced ODS Graphics techniques: new free book</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/235735#M8570</link>
      <description>&lt;P&gt;#DataViz enthusiasts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our colleague&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld﻿&lt;/a&gt;&amp;nbsp;has recently published a&amp;nbsp;&lt;STRONG&gt;free&lt;/STRONG&gt; book titled, &lt;EM&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2015/11/19/advanced-ods-graphics-examples/" target="_self"&gt;Advanced ODS Graphics Techniques&lt;/A&gt;&lt;/EM&gt;. &amp;nbsp;The book is a free PDF download that brings together lots of documentation and examples from various sources, plus some great examples that put the techniques into practice. &amp;nbsp;I encourage you to &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2015/11/19/advanced-ods-graphics-examples/" target="_self"&gt;read Warren's blog post&lt;/A&gt; to learn more and download the book.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to share one particularly cool example that I found in Chapter 5 of the book -- it reminds me of the &lt;A href="https://en.wikipedia.org/wiki/Spirograph" target="_self"&gt;Spirograph set&lt;/A&gt; I had as a child, but with neater output and less work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/907iB2EABD90EED5C84F/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="spirograph-like example from Warren's book" title="spirograph-like example from Warren's book" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's Warren's example code ("Fun with Splines"), with minor adjustments from me, to create this visualization. &amp;nbsp;You can run it as-is in SAS Enterprise Guide with the HTML results turned on. &amp;nbsp;Or, you can modify it slightly (see the lines with notes in the comments) to run well in SAS University Edition or SAS Studio. &amp;nbsp;(And of course, you can specify your own ODS statements to run this in display manager/PC SAS).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Example from Chapter 5 of Warren Kuhfeld's book                                   */
/* Advanced ODS Graphics Examples                                                    */
/* http://blogs.sas.com/content/graphicallyspeaking/advanced-ods-graphics-examples   */
data x(drop=t);
  do id = 1 to 20;
    t = (id - 1) * 2 * constant('pi') / 20;
    x = cos(t);
    y = sin(t);
    output;
  end;
run;

data curves(drop=id t: m d);
  do id1 = 1 to 20;
    do id2 = id1 + 1 to 20;
      g + 1;
      set x(rename=(x=t1 y=t2)) point=id1;
      set x(rename=(x=t3 y=t4)) point=id2;
      d = (t4 - t2) ** 2 + (t3 - t1) ** 2;
      x1 = t1;
      y1 = t2;
      output; /* output the starting point */

      td = ifn(abs(t4 - t2) lt 1e-12, 1e-12, t4 - t2);
      m = -(t3 - t1) / td;
      t1 = mean(t1, t3);
      t2 = mean(t2, t4);
      x1 = t1 + ifn(t1 gt 0 or td eq 1e-12, -1, 1) *
        sqrt(0.1 * d / (1 + m * m));
      y1 = m * (x1 - t1) + t2;
      output; /* output the midpoint */

      x1 = t3;
      y1 = t4;
      output; /* output the ending point */
    end;
  end;
  stop;
run;

data both;
  merge x curves;
run;

ods graphics / width=600 height=600 noborder;
/* Using ODS layout to align 3 graphs on one row */ 
ods layout start columns=3;

ods region;
/* When using EG with HTML output */
ods html(id=eghtml) style=plateau;
/* uncomment this for SAS Studio/SAS University Edition */
*ods html5(id=web) style=plateau;
proc sgplot data=both noautolegend noborder;
  scatter y=y x=x / markerattrs=(symbol=circlefilled size=5px);
  series y=y1 x=x1 / group=g lineattrs=graphdata1(pattern=solid);
  spline y=y1 x=x1 / group=g lineattrs=graphdata2(pattern=solid)
    arrowheadpos=both;
  xaxis display=none;
  yaxis display=none;
run;

ods region;
/* When using EG with HTML output, comment */
ods html(id=eghtml) style=dove;
/* uncomment this for SAS Studio/SAS University Edition */
*ods html5(id=web) style=dove;
proc sgplot data=both noautolegend noborder;
  scatter y=y x=x / markerattrs=(symbol=circlefilled size=5px);
  series y=y1 x=x1 / group=g lineattrs=graphdata1(pattern=solid);
  spline y=y1 x=x1 / group=g lineattrs=graphdata2(pattern=solid)
    arrowheadpos=both;
  xaxis display=none;
  yaxis display=none;
run;

ods region;
/* When using EG with HTML output */
ods html(id=eghtml) style=statdoc;
/* uncomment this for SAS Studio/SAS University Edition */
*ods html5(id=web) style=statdoc;
proc sgplot data=both noautolegend noborder;
  scatter y=y x=x / markerattrs=(symbol=circlefilled size=5px);
  series y=y1 x=x1 / group=g lineattrs=graphdata1(pattern=solid);
  spline y=y1 x=x1 / group=g lineattrs=graphdata2(pattern=solid)
    arrowheadpos=both;
  xaxis display=none;
  yaxis display=none;
run;

ods layout end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Nov 2015 17:48:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/235735#M8570</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-11-20T17:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ODS Graphics techniques: new free book</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236437#M8580</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 9.4 TS Level 1M0 and it doesn't seem to recognize the Spline statement. Is there something comparable in my version?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Brian Adams&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 15:57:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236437#M8580</guid>
      <dc:creator>BTAinRVA</dc:creator>
      <dc:date>2015-11-25T15:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ODS Graphics techniques: new free book</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236464#M8582</link>
      <description>&lt;P&gt;The SPLINE statement is new for SAS 9.4 maintenance release 3.&amp;nbsp; I currently have maintenance release 2 at work (TS1M2), so I can't generate the spirograph example yet either.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 17:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236464#M8582</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2015-11-25T17:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced ODS Graphics techniques: new free book</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236853#M8590</link>
      <description>&lt;P&gt;I'm sorry that I missed that SPLINE is brand new for SAS 9.4m3. &amp;nbsp;You can play with this example if you &lt;A href="http://www.sas.com/en_us/software/university-edition.html" target="_self"&gt;use SAS Universty Edition&lt;/A&gt;: free software for learning SAS. &amp;nbsp;The current version uses SAS 9.4m3. &amp;nbsp;And no, you don't have to be a student to use this! &amp;nbsp;It's available for &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/What-are-the-permitted-uses-of-SAS-University-Edition/ta-p/235130" target="_self"&gt;just about any non-commercial purpose&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2015 20:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Advanced-ODS-Graphics-techniques-new-free-book/m-p/236853#M8590</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-11-29T20:20:42Z</dc:date>
    </item>
  </channel>
</rss>

