<?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 set the scale for sgplot graphs? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495253#M23</link>
    <description>&lt;P&gt;Welcome to the SAS Communities. We were all beginners once, and we all make mistakes, so don't worry about it. Hopefully, the experts will offer gentle advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your picture, it looks like you want a logarithmic scale on the Y axis. &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n04drrb1aehuqzn1t12j3958krtw.htm&amp;amp;locale=en#" target="_self"&gt;Use a YAXIS statement&lt;/A&gt; and specify TYPE=LOG to get a logarithmic axis. Specify LOGSTYLE=LOGEXPAND to show the numbers associated with each tick mark.&amp;nbsp; The following example should help you get started:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
do x = 1 to 5 by 0.1;
   y = 10**x;
   output;
end;
run;

proc sgplot data=Have;
series x=x y=y;
yaxis type=log logstyle=logexpand;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Remember that if someone answers your question, you can mark the response as "Answered" so that others know you have accepted an answer and do not require further help.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Sep 2018 12:27:33 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2018-09-13T12:27:33Z</dc:date>
    <item>
      <title>How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495195#M20</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;I worked so hard to learn about SAS alone, but now I'm facing some... problems. So I need some help.&lt;/P&gt;&lt;P&gt;Actually I got so many questions, but I'll keep trying looking for the answer by myself.&lt;/P&gt;&lt;P&gt;But this one... I thought it would be easy to find the answer. But I couldn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to set the scale of the graph&amp;nbsp;with the particular number. The goal is clear, and I attached&amp;nbsp;the photo of goal.&lt;/P&gt;&lt;P&gt;Like the photo, I need certain numbers in the scale while the visual gap of the scale is equal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I made the graph with sgplot. So if you can help me the code in sgplot it would be great. (But any helping code would be appreciated!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11.PNG" style="width: 156px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23249i44563418B6C98DFE/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.PNG" alt="11.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 08:57:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495195#M20</guid>
      <dc:creator>MonoLight</dc:creator>
      <dc:date>2018-09-13T08:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495198#M21</link>
      <description>&lt;P&gt;Please do not attach files zipped up, there is no way I am downloading files to my machine.&amp;nbsp; You can embed images in your post, look at the buttons above the post area.&amp;nbsp; Second, you need to at least show the code, post it as test using the code window - its the {i} above post area.&amp;nbsp; Its also useful (though maybe not in this case) to provide test data so that we can create something to run with - SAS is a data based language.&amp;nbsp; I will move you post to the relevant forum.&lt;/P&gt;
&lt;P&gt;In terms of your question, supply an xaxis or yaxis statement like:&lt;/P&gt;
&lt;PRE&gt;xaxis values=(0 1 2 3 4);
&lt;/PRE&gt;
&lt;P&gt;In your sgplot (note values should be the ones you want to see).&lt;/P&gt;
&lt;P&gt;This link is vital for any graph programmers, has examples for everything:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 08:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495198#M21</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-09-13T08:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495209#M22</link>
      <description>&lt;P&gt;Thank you. And my bad.&lt;/P&gt;&lt;P&gt;I attached the photo!&lt;/P&gt;&lt;P&gt;But it will take some time to add code since it is working with sgplot (it take about 40 min since it should draw over 30,000 series in a chart...) I'll add the code later!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the advice again.&lt;/P&gt;&lt;P&gt;It's my first time so... there are so many mistakes&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 09:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495209#M22</guid>
      <dc:creator>MonoLight</dc:creator>
      <dc:date>2018-09-13T09:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495253#M23</link>
      <description>&lt;P&gt;Welcome to the SAS Communities. We were all beginners once, and we all make mistakes, so don't worry about it. Hopefully, the experts will offer gentle advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From your picture, it looks like you want a logarithmic scale on the Y axis. &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n04drrb1aehuqzn1t12j3958krtw.htm&amp;amp;locale=en#" target="_self"&gt;Use a YAXIS statement&lt;/A&gt; and specify TYPE=LOG to get a logarithmic axis. Specify LOGSTYLE=LOGEXPAND to show the numbers associated with each tick mark.&amp;nbsp; The following example should help you get started:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Have;
do x = 1 to 5 by 0.1;
   y = 10**x;
   output;
end;
run;

proc sgplot data=Have;
series x=x y=y;
yaxis type=log logstyle=logexpand;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Remember that if someone answers your question, you can mark the response as "Answered" so that others know you have accepted an answer and do not require further help.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 12:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495253#M23</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-09-13T12:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495364#M24</link>
      <description>&lt;P&gt;Thank you for understanding and help!&lt;/P&gt;&lt;P&gt;I'm really glad someone can help me. I saw logarithm before, but I thought it only show the scale of 10, 100, 1000 or something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to set 500 or other numbers as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the answer again !&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 15:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495364#M24</guid>
      <dc:creator>MonoLight</dc:creator>
      <dc:date>2018-09-13T15:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495374#M25</link>
      <description>&lt;P&gt;Yes, you can specify custom ticks, but on a logarithmic scale they won't be evenly spaced.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=Have;
series x=x y=y;
yaxis type=log logstyle=logexpand 
      values=(100 500 1000 5000 10000 50000 100000);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Sep 2018 15:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495374#M25</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-09-13T15:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495409#M26</link>
      <description>&lt;P&gt;Thank you so much Rick!&lt;/P&gt;&lt;P&gt;You are the best! I applied your advice!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you in advance again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You made my day!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 02:09:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/495409#M26</guid>
      <dc:creator>MonoLight</dc:creator>
      <dc:date>2018-09-14T02:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/716974#M27477</link>
      <description>&lt;P&gt;Thank you Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the same but the scales in output presented are not as expected, please see the code below that I have used,&lt;/P&gt;&lt;P&gt;yaxis values=(0 10 100 1000 10000 100000 1000000 10000000) type=log logstyle=logexpand ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Akhil&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 07:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/716974#M27477</guid>
      <dc:creator>akhilvijayan382</dc:creator>
      <dc:date>2021-02-05T07:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/717033#M27483</link>
      <description>&lt;P&gt;Log(0) is not defined, so you can't use 0 as a tick value on a log axis. Try&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;yaxis values=(&lt;STRONG&gt;1&lt;/STRONG&gt; 10 100...)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 10:34:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/717033#M27483</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-02-05T10:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to set the scale for sgplot graphs?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/721244#M27774</link>
      <description>Thank you</description>
      <pubDate>Tue, 23 Feb 2021 11:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-set-the-scale-for-sgplot-graphs/m-p/721244#M27774</guid>
      <dc:creator>akhilvijayan382</dc:creator>
      <dc:date>2021-02-23T11:19:33Z</dc:date>
    </item>
  </channel>
</rss>

