<?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: unable to define set range using sgplot in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559947#M10407</link>
    <description>&lt;P&gt;I don't understand your quesiton.&lt;/P&gt;
&lt;P&gt;If you want limit the X value,you can exclude these points by :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc SGplot data=have(where=(year between 50 and 90));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And Better post a sample data to test your code ,that would better help to explain your Q.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 May 2019 12:26:30 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-05-19T12:26:30Z</dc:date>
    <item>
      <title>unable to define set range using sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559935#M10405</link>
      <description>&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Hi all,&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I believe the answer for this should be simple but going through all the sas documentation for SGplots has given me nothing that works.&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I'm using sas 9.4&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I'm trying to standardize the range of the X axis between 50 and 90 in a simple regression.&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I have the following code&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;proc SGplot data=have;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;by task;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;reg x=year y=score / nomarkers group=group clm clmtransparency=0.6;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Xaxis values= (50 TO 90 by 5) ranges=(50-90);&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Xaxis label= "Age years";&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;run;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I first tried with a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;min&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;max&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statement, doesn't work because that's just the values, then the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Values &lt;/EM&gt;as that defines the tick marks and I figured it would show all the tick marks i asked for,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but that didn't work either. Then&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;ranges&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but that is for splitting ranges&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Any idea how i can have the x axis range between 50 and 90 ?&lt;/P&gt;&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Thanks heaps.&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 05:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559935#M10405</guid>
      <dc:creator>P20</dc:creator>
      <dc:date>2019-05-19T05:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: unable to define set range using sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559947#M10407</link>
      <description>&lt;P&gt;I don't understand your quesiton.&lt;/P&gt;
&lt;P&gt;If you want limit the X value,you can exclude these points by :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc SGplot data=have(where=(year between 50 and 90));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And Better post a sample data to test your code ,that would better help to explain your Q.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 12:26:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559947#M10407</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-05-19T12:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: unable to define set range using sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559951#M10408</link>
      <description>Sorry ksharp and thank you for your suggestion, i didn't think sample data would clarify but i will add some as soon as i get to my computer&lt;BR /&gt;&lt;BR /&gt;I want a regression plot where there the x axis ranges from 50 to 90. With tick marks every 5 years.&lt;BR /&gt;&lt;BR /&gt;With the code i have above i have some plots that have an x axis that begins at 50 and have tick marks by 10, and end at 90, some that begin with 70 and have tick marks by 20. The program chooses where the x axis begins and what values and tick marks are chosen and displayed.&lt;BR /&gt;&lt;BR /&gt;Using excel i can choose to have each plot have an x axis begin where i want and end where i want. This makes comparing plots easy. I cant seem to find an option to do the same in sas.</description>
      <pubDate>Sun, 19 May 2019 13:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/559951#M10408</guid>
      <dc:creator>P20</dc:creator>
      <dc:date>2019-05-19T13:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: unable to define set range using sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/560196#M10434</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/91650"&gt;@P20&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Hi all,&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I believe the answer for this should be simple but going through all the sas documentation for SGplots has given me nothing that works.&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I'm using sas 9.4&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I'm trying to standardize the range of the X axis between 50 and 90 in a simple regression.&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I have the following code&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;proc SGplot data=have;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;by task;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;reg x=year y=score / nomarkers group=group clm clmtransparency=0.6;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Xaxis values= (50 TO 90 by 5) ranges=(50-90)&lt;STRONG&gt;&lt;FONT color="#ff0000" size="5"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&lt;FONT color="#ff0000"&gt;Xaxis&lt;/FONT&gt; label= "Age years";&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;run;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;I first tried with a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;min&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;max&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;statement, doesn't work because that's just the values, then the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;Values &lt;/EM&gt;as that defines the tick marks and I figured it would show all the tick marks i asked for,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but that didn't work either. Then&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;ranges&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;but that is for splitting ranges&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Any idea how i can have the x axis range between 50 and 90 ?&lt;/P&gt;
&lt;P class="s1w8oh2o-10 bQeEFC"&gt;Thanks heaps.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The first "xaxis" that you ended with a ; is ignored because you included an entire additional XAXIS statement. You may only have one XAXIS statement and the last in the code will likely be the one to be applied.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;Xaxis values= (50 TO 90 by 5) ranges=(50-90) 
          label= "Age years";
&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 May 2019 15:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/560196#M10434</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-20T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: unable to define set range using sgplot</title>
      <link>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/561032#M10527</link>
      <description>&lt;P&gt;That worked, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 04:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/unable-to-define-set-range-using-sgplot/m-p/561032#M10527</guid>
      <dc:creator>P20</dc:creator>
      <dc:date>2019-05-23T04:17:33Z</dc:date>
    </item>
  </channel>
</rss>

