<?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: How to put case count label in Proc Gplot in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78979#M22769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;hi ... there's most likely a nice looking SG solution too, but here's one for GPLOT ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;do x = 1 to 10;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; y = ceil(100*ranuni(0));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if ranuni(0) lt .3 then output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if ranuni(0) lt .2 then output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if ranuni(0) lt .1 then output; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; create view xy as select x,y,count(*) as count from test group by x,y;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;goptions reset=all ftext='calibri' htext=2 gunit=pct;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;symbol1 v='6c'x f='wingdings' h=2 c=blue pointlabel=(c=blue "#count");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;axis1 offset=(2,2)pct;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;proc gplot data=xy;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;plot y*x / haxis=axis1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10681i6C5E967C643E0FA5/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="xy_counts.png" title="xy_counts.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Apr 2012 15:17:54 GMT</pubDate>
    <dc:creator>MikeZdeb</dc:creator>
    <dc:date>2012-04-11T15:17:54Z</dc:date>
    <item>
      <title>How to put case count label in Proc Gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78977#M22767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a plot produced by proc gplot. I now need to add on the case count to each data point. There are multiple cases with same value.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to do this without creating new variables? I know I probably can do this by creating a new "count" variable and then use pointlabel. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 12:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78977#M22767</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2012-04-11T12:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to put case count label in Proc Gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78978#M22768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or any other SAS procedures can create this type of line graph?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I have about 10+ time points, I want to graph out the mean value for each time point. Every time points may have from 1 to 100 cases. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 14:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78978#M22768</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2012-04-11T14:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to put case count label in Proc Gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78979#M22769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;hi ... there's most likely a nice looking SG solution too, but here's one for GPLOT ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;do x = 1 to 10;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; y = ceil(100*ranuni(0));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if ranuni(0) lt .3 then output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if ranuni(0) lt .2 then output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; if ranuni(0) lt .1 then output; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; create view xy as select x,y,count(*) as count from test group by x,y;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;goptions reset=all ftext='calibri' htext=2 gunit=pct;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;symbol1 v='6c'x f='wingdings' h=2 c=blue pointlabel=(c=blue "#count");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;axis1 offset=(2,2)pct;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;proc gplot data=xy;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;plot y*x / haxis=axis1;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 12pt;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10681i6C5E967C643E0FA5/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="xy_counts.png" title="xy_counts.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 15:17:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78979#M22769</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-04-11T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to put case count label in Proc Gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78980#M22770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With sgplot, Mike,&amp;nbsp;&amp;nbsp; the minimal would be&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;/P&gt;&lt;P&gt;proc sgplot data=xy;&lt;/P&gt;&lt;P&gt;scatter x=x y=y / datalabel=count&amp;nbsp; markerattrs=(symbol=circlefilled&amp;nbsp;&amp;nbsp; color=blue);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i don't know yet if in sgplot the tickmarks are generated&amp;nbsp; by the data or if we could regulate them by program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xaxis grid values=(1 to 10 by 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could render better but is limited as i don't see the possibility for minor tickmarks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andre&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 15:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78980#M22770</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2012-04-11T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to put case count label in Proc Gplot</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78981#M22771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. Mike. This is what I did. I created a count variable and then use pointlabel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 16:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-put-case-count-label-in-Proc-Gplot/m-p/78981#M22771</guid>
      <dc:creator>LilyY_</dc:creator>
      <dc:date>2012-04-11T16:08:09Z</dc:date>
    </item>
  </channel>
</rss>

