<?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: annotated data in gplot and sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/376748#M13008</link>
    <description>Thanks, Sanjay and Reeza, I got it, The sgplot is not going to replace the gplot, we still need old annotate library to build some graphs like the example I randomly drew.</description>
    <pubDate>Mon, 17 Jul 2017 20:18:29 GMT</pubDate>
    <dc:creator>fy1</dc:creator>
    <dc:date>2017-07-17T20:18:29Z</dc:date>
    <item>
      <title>annotated data in gplot and sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/375834#M12994</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I made an annotated dataset to try out the sgplot, and found the result is not what I expected, Could you tell me what i should do to make my existing annotated datasets are still valuable in new powerful procedure sgplot? &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;****************************************************************************;&lt;/P&gt;&lt;P&gt;data xx;&lt;BR /&gt;do Dt='1JAN2016'd to '1jan2017'd;&lt;BR /&gt;retain CNT 1;&lt;BR /&gt;cat1=rand('bernolli',0.3);&lt;BR /&gt;cat2=rand('bernolli',0.5);&lt;BR /&gt;mon=month(DT);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;proc means data=xx sum;&lt;BR /&gt;var CAT1 CAT2;&lt;BR /&gt;class MON ;&lt;BR /&gt;output out=res_cnt sum=/autoname;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data plt;&lt;BR /&gt;set res_cnt;&lt;BR /&gt;x=_n_;&lt;BR /&gt;y=CAT1_sum;&lt;BR /&gt;if mon&amp;gt;.;&lt;BR /&gt;run;&lt;BR /&gt;%annomac;&lt;BR /&gt;data plt_anno ;&lt;BR /&gt;set plt;&lt;BR /&gt;%dclanno;&lt;BR /&gt;%line(0,0,10,10,black,1,1);&lt;BR /&gt;%line(0,0,12,22,black,1,1);&lt;BR /&gt;%line(0,0,22,33,black,1,1);&lt;BR /&gt;%line(0,0,32,44,black,1,1);&lt;/P&gt;&lt;P&gt;run;&lt;BR /&gt;axis1;&lt;BR /&gt;axis2;&lt;BR /&gt;proc ganno annotate=plt_anno;&lt;BR /&gt;title1 "ganno";&lt;BR /&gt;run;&lt;BR /&gt;proc gplot data=plt;&lt;BR /&gt;title1 "gplot";&lt;BR /&gt;plot y*mon/anno=plt_anno;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=plt sganno=plt_anno;&lt;BR /&gt;title1 "sgplot";&lt;BR /&gt;scatter x=mon y=y;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;***************************************************************************;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 21:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/375834#M12994</guid>
      <dc:creator>fy1</dc:creator>
      <dc:date>2017-07-13T21:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: annotated data in gplot and sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/375846#M12995</link>
      <description>&lt;P&gt;The advantage to SGPLOT is that sometimes there's an easier/better way to do things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both codes generate a standard scatter plot but the GPLOT has some random lines?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SGPLOT I would consider using REFLINE/POLYGON/TEXT instead to mimic some of the functionality you had with the annotation sets. I'm not sure this would work in your exact situation/example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 21:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/375846#M12995</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-13T21:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: annotated data in gplot and sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/376620#M12997</link>
      <description>&lt;P&gt;Annotation in SGPLOT is NOT the same as in GPLOT. &amp;nbsp;You cannot use the same data set. &amp;nbsp;That is one reason the option name is called SGANNO, not ANNO. &amp;nbsp;See this &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2017/04/23/diagonal-tick-values/" target="_blank"&gt;article &lt;/A&gt;on some information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, there are better ways to create graphs in SG procedures without use of annotation as alluded to by Reeza. &amp;nbsp;See &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2016/12/05/getting-started-sgplot-index/" target="_blank"&gt;Getting Started articles in Graphically Speaking Blog&lt;/A&gt; for many articles on using &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2016/11/07/layers-vs-annotation/" target="_blank"&gt;plot layers&lt;/A&gt;. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 15:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/376620#M12997</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-07-17T15:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: annotated data in gplot and sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/376748#M13008</link>
      <description>Thanks, Sanjay and Reeza, I got it, The sgplot is not going to replace the gplot, we still need old annotate library to build some graphs like the example I randomly drew.</description>
      <pubDate>Mon, 17 Jul 2017 20:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/annotated-data-in-gplot-and-sgplot/m-p/376748#M13008</guid>
      <dc:creator>fy1</dc:creator>
      <dc:date>2017-07-17T20:18:29Z</dc:date>
    </item>
  </channel>
</rss>

