<?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: Integers on Axis in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9091#M98</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This quick-fix (hard-coding values in the axis statement) is pretty dangerous, especially since you're letting the axis auto-scale -- if the data you're plotting ever changes (and causes the axis to auto-scale another way, say from 1 to 5), then these hard-coded axis values would become wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2011 19:11:21 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2011-09-14T19:11:21Z</dc:date>
    <item>
      <title>Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9084#M91</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In GCHART or GPLOT is there a way to format the axis to be integers? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ie my points are (1.2, 10.3) (2.4,11.3) (8.5, 9.2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd the like the graph axis to be 1 2 3 ... 10 rather than 1.0 to 10.0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using annotate to label certain points but when I include a format statement in the gchart the annotate variables are also losing their decimal point. &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, 14 Sep 2011 16:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9084#M91</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-09-14T16:49:13Z</dc:date>
    </item>
    <item>
      <title>Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9085#M92</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would the method described at &lt;A _jive_internal="true" href="https://communities.sas.com/message/26127#26127"&gt;http://communities.sas.com/message/26127#26127&lt;/A&gt; suffice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 17:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9085#M92</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-09-14T17:06:43Z</dc:date>
    </item>
    <item>
      <title>Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9086#M93</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think so...because format 8. changes the annotate values it will change the values being labelled as well, and that's not what I'm looking for. &lt;/P&gt;&lt;P&gt;I need to label points and separately label the axis with specific values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that this is the GTL for 9.3 but I haven't been able to find anything related to GPLOT or GCHART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks though!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 17:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9086#M93</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-09-14T17:29:05Z</dc:date>
    </item>
    <item>
      <title>Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9087#M94</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure I understand the question exactly, but you can control the format of the values used on the gplot axis tickmarks (and the gchart response axis) by applying a format - either to the data set, or specify it in the gplot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And when annotating text values, the annotated text will be whatever you stuff into the 'text' variable - if you apply a format (such as using the put() function when you create the text variable) then the annotated text will be formatted in that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;BR /&gt;input x y;&lt;BR /&gt;datalines;&lt;BR /&gt;1.2 10.3&lt;BR /&gt;2.4 11.3&lt;BR /&gt;8.5 9.2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data foo_anno; set foo;&lt;BR /&gt;function='label'; position='2'; xsys='2'; ysys='2'; color='red';&lt;BR /&gt;text=put(y,comma5.0);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc gplot data=foo anno=foo_anno;&lt;BR /&gt;format y comma5.0;&lt;BR /&gt;format x comma5.0;&lt;BR /&gt;plot y*x;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 17:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9087#M94</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-09-14T17:37:48Z</dc:date>
    </item>
    <item>
      <title>Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9088#M95</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was mistaken, the labels are being output by a symbol and pointlabel statement rather than annotate, the annotate is used for something else. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to format to apply specific formats using the symbol or axis statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 17:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9088#M95</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-09-14T17:53:26Z</dc:date>
    </item>
    <item>
      <title>Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9089#M96</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, for the axes, I would definitely use the format in the data, or the format in the proc gplot, to control the format of the numbers in the axes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get the maximum flexibility in the pointlabel, I could create a new text variable in the data set (similar to the one I created in the annotate data set), and use the put() function and whatever format you like (and even add extra characters if desired), and then specify that as the variable to use as the pointlabel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data foo;&lt;BR /&gt;input x y;&lt;BR /&gt;text=put(y,comma5.0);&lt;BR /&gt;datalines;&lt;BR /&gt;1.2 10.3&lt;BR /&gt;2.4 11.3&lt;BR /&gt;8.5 9.2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;symbol value=dot height=2 color=red&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pointlabel=("#text" h=2.2 c=gray55 font="albany amt/bold");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gplot data=foo;&lt;BR /&gt;format y comma5.0;&lt;BR /&gt;format x comma5.0;&lt;BR /&gt;plot y*x;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 18:00:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9089#M96</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-09-14T18:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9090#M97</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following seems to give me what I want the easiest. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data foo;&lt;/P&gt;&lt;P&gt;input x y;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1.2 10.3&lt;/P&gt;&lt;P&gt;2.4 11.3&lt;/P&gt;&lt;P&gt;8.5 9.2&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;data foo_anno; set foo;&lt;/P&gt;&lt;P&gt;function='label'; position='2'; xsys='2'; ysys='2'; color='red';&lt;/P&gt;&lt;P&gt;text=put(y,comma5.1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;axis1 value=('1' '2' '3' '4' '5' '6' '7' '8' '9' '10');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gplot data=foo anno=foo_anno;&lt;/P&gt;&lt;P&gt;plot y*x/haxis=axis1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob's solution is probably more maintainable, but this is a quick fix at the moment. &lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 18:36:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9090#M97</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-09-14T18:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9091#M98</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This quick-fix (hard-coding values in the axis statement) is pretty dangerous, especially since you're letting the axis auto-scale -- if the data you're plotting ever changes (and causes the axis to auto-scale another way, say from 1 to 5), then these hard-coded axis values would become wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 19:11:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9091#M98</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-09-14T19:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Integers on Axis</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9092#M99</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the heads up. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also didn't mark my own answer as correct, instead I said assumed answered :smileyconfused:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 20:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Integers-on-Axis/m-p/9092#M99</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-09-14T20:26:10Z</dc:date>
    </item>
  </channel>
</rss>

