<?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 Specify grid interval without specifying minimum and maximum of the axis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126492#M260220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to specify grid interval without specifying the minimum and max of the axis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, we typically have this for the specs of the axis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;axis1 order=(0 to 100 by 10); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my range for the axis changes and I don't want to specify it.&amp;nbsp; But I need to specify the interval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Nov 2012 19:53:22 GMT</pubDate>
    <dc:creator>JasonL</dc:creator>
    <dc:date>2012-11-14T19:53:22Z</dc:date>
    <item>
      <title>Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126492#M260220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to specify grid interval without specifying the minimum and max of the axis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, we typically have this for the specs of the axis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;axis1 order=(0 to 100 by 10); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my range for the axis changes and I don't want to specify it.&amp;nbsp; But I need to specify the interval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 19:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126492#M260220</guid>
      <dc:creator>JasonL</dc:creator>
      <dc:date>2012-11-14T19:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126493#M260221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I had a similar need I used to pull the max and min values of the variable, round up or down (floor and ceiling functions) as needed to multiples of the interval and had those values assigned to macro variables. Then the Axis definition would use the min and max macro variable values in the ORDER section of the Axis statement. The problem with this approach is your data may occasionally have a range large enough that for your desired interval the results are illegible or that SAS can't use such as 10 to 10000 by 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might also experiment with using the MAJOR=(Number = n) to use a standard number of tick marks and let the interval fall as it may.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 20:13:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126493#M260221</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-11-14T20:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126494#M260222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I'll try that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 20:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126494#M260222</guid>
      <dc:creator>JasonL</dc:creator>
      <dc:date>2012-11-14T20:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126495#M260223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would it suffice to include a short proc sql to get the min, max and interval into macro variables that could then be used for your axis statement?&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;18&lt;/P&gt;&lt;P&gt;26&lt;/P&gt;&lt;P&gt;30&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select min(x),max(x),round((max(x)-min(x))/10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; into :min,:max,:interval&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from have&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;axis1 order=(&amp;amp;min. to &amp;amp;max. by &amp;amp;interval.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 20:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126495#M260223</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-14T20:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126496#M260224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 20:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126496#M260224</guid>
      <dc:creator>JasonL</dc:creator>
      <dc:date>2012-11-14T20:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126497#M260225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might consider the IML routine GSCALE which will be more powerful(option wise) and produced more pleasing results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; have;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; x;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;1&lt;BR /&gt;5&lt;BR /&gt;9&lt;BR /&gt;18&lt;BR /&gt;26&lt;BR /&gt;30&lt;BR /&gt;&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NINCR=4;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;iml&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;use&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; have;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;read&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;all&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; into X;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; background-color: #ffffff;"&gt;/*CALL GSCALE( scale, , nincr&amp;lt;, nicenum&amp;lt;, fixed-end&amp;gt;);*/&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;CALL GSCALE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;scale,X,&amp;amp;nincr&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; scaleT = t(scale);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; symputX(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'XSTART'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp; scale[&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;],&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'G'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; symputX(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'XEND'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scale[&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;],&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'G'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; symputX(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'XINCREMENT'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,scale[&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;],&lt;/SPAN&gt;&lt;SPAN style="color: #800080; background-color: #ffffff;"&gt;'G'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;quit&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; NOTE: &amp;amp;xstart TO &amp;amp;xend BY &amp;amp;XINCREMENT; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 20:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126497#M260225</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-11-14T20:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Specify grid interval without specifying minimum and maximum of the axis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126498#M260226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 16:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Specify-grid-interval-without-specifying-minimum-and-maximum-of/m-p/126498#M260226</guid>
      <dc:creator>JasonL</dc:creator>
      <dc:date>2012-11-15T16:26:43Z</dc:date>
    </item>
  </channel>
</rss>

