<?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: pointlabel -- needs to be cut short, with int() in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284977#M10079</link>
    <description>&lt;P&gt;Beautiful. &amp;nbsp;Still, however, all those .000000 after each number in plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Got error message when I tried: &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;markerchar&lt;SPAN class="token operator"&gt;=int(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;N)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;markerchar&lt;SPAN class="token operator"&gt;=(int(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;N))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps I should format the N column itself?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2016 23:09:47 GMT</pubDate>
    <dc:creator>NKormanik</dc:creator>
    <dc:date>2016-07-15T23:09:47Z</dc:date>
    <item>
      <title>pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284705#M10068</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;symbol1 pointlabel = ("#N" h=.5 font=simplex nodropcollisions) value=none;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;N is a number of cases. &amp;nbsp;I'd like to see that number as label in a scatterplot, instead of a dot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gplot data=have;
plot X * Y = 1;  /* Surmised that "= 1" means symbol1 */ 
run;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Unfortunately N shows in the plot having many decimal places, all 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I figured using int() would do the trick, to just show N alone, no superfluous unwanted decimal places.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried several ways, but none seem to work. &amp;nbsp;One approach that does not work is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;"#int(N)"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Another possibility would be to create an ad-hoc variable, N2, that is int(N), and then to use N2 instead of N in the pointlabel. &amp;nbsp;But I'm not sure how to code such.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help toward a solution greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nicholas Kormanik&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 23:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284705#M10068</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2016-07-14T23:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284795#M10069</link>
      <description>&lt;P&gt;Would you be willing to use PROC SGPLOT instead? &amp;nbsp;If so, you can use the MARKERCHAR= option to specify a variable name. Instead of markers, the value of that variable is plotted. You can controls the size and color of the text by using the MARKERCHARATTRS= option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
input x y N;
datalines;
1 2 37
3 1 23
5 2 16
4 1  2
5 4  1
3 3 18
;

proc sgplot data=Have;
scatter x=x y=y / markerchar=N markercharattrs=(size=14);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jul 2016 10:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284795#M10069</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-07-15T10:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284977#M10079</link>
      <description>&lt;P&gt;Beautiful. &amp;nbsp;Still, however, all those .000000 after each number in plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Got error message when I tried: &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;markerchar&lt;SPAN class="token operator"&gt;=int(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;N)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;markerchar&lt;SPAN class="token operator"&gt;=(int(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;N))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps I should format the N column itself?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 23:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284977#M10079</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2016-07-15T23:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284978#M10080</link>
      <description>&lt;P&gt;Yes, apply the format to the column. &amp;nbsp;If you don't want decimals, use the x.0 format. &amp;nbsp;If you review the doc, you will see that MARKERCHAR only accepts a variable, not an expression. &amp;nbsp;If you want to use expressions, use GTL.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 23:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284978#M10080</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-07-15T23:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284981#M10081</link>
      <description>&lt;P&gt;What's the easiest way to apply that format to the column?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 23:34:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284981#M10081</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2016-07-15T23:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284982#M10082</link>
      <description>&lt;P&gt;Use the FORMAT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;sgplot&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;Have&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;format N f2.0;
scatter x&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;x y&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;y &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; markerchar&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;N&lt;/SPAN&gt; markercharattrs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;size&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;14&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jul 2016 00:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284982#M10082</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2016-07-16T00:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: pointlabel -- needs to be cut short, with int()</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284983#M10083</link>
      <description>&lt;P&gt;Excellent. &amp;nbsp;This approach has the added benefit of not having to affect/rewrite the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much to all of you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2016 01:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/pointlabel-needs-to-be-cut-short-with-int/m-p/284983#M10083</guid>
      <dc:creator>NKormanik</dc:creator>
      <dc:date>2016-07-16T01:07:23Z</dc:date>
    </item>
  </channel>
</rss>

