<?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: Why I cannot change axis tick values in proc sgplot? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315773#M11075</link>
    <description>&lt;P&gt;Use a format, not a macro. If a level was missing the labels wouldn't align automatically, whereas they would with a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value&amp;nbsp;educ_fmt
1="graduate_school"
2="university"
3="high_school"
..
9 = "unknown2";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then apply the format within your proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=Freq_Education_default;
vbar EDUCATION / response = percent group=default
groupdisplay=stack;

format education educ_fmt.;

xaxis discreteorder=data;
yaxis grid values=(0 to 100 by 10) label="Percentage of total in group";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2016 03:24:47 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-12-01T03:24:47Z</dc:date>
    <item>
      <title>Why I cannot change axis tick values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315770#M11074</link>
      <description>&lt;P&gt;The variable EDUCATION has values 1 2 3 4 5 6, which stand for graduate_school, university, high_school, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to plot a standardized segment bar plot as following (picture 1), and I'm also trying to change the tick value to graduate_school, etc, which are what these value really mean.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let education_label = "graduate_school" "university" "high_school"&lt;BR /&gt;"others" "unknown1" "unknown2";&lt;BR /&gt;proc sgplot data=Freq_Education_default;&lt;BR /&gt;vbar EDUCATION / response = percent group=default&lt;BR /&gt;groupdisplay=stack;&lt;BR /&gt;xaxis discreteorder=data valuesdisplay =(&amp;amp;education_label);&lt;BR /&gt;yaxis grid values=(0 to 100 by 10) label="Percentage of total in group";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I change "valuesdisplay" to "values", the plot changes to picture 2, neither of two pictures is what I am aiming for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6145iA1667605146BF207/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="1.png" title="1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6146i3BA619E282BC5F82/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="2.png" title="2.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 03:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315770#M11074</guid>
      <dc:creator>henryjing</dc:creator>
      <dc:date>2016-12-01T03:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why I cannot change axis tick values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315773#M11075</link>
      <description>&lt;P&gt;Use a format, not a macro. If a level was missing the labels wouldn't align automatically, whereas they would with a format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value&amp;nbsp;educ_fmt
1="graduate_school"
2="university"
3="high_school"
..
9 = "unknown2";
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then apply the format within your proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=Freq_Education_default;
vbar EDUCATION / response = percent group=default
groupdisplay=stack;

format education educ_fmt.;

xaxis discreteorder=data;
yaxis grid values=(0 to 100 by 10) label="Percentage of total in group";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 03:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315773#M11075</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-01T03:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why I cannot change axis tick values in proc sgplot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315785#M11078</link>
      <description>&lt;P&gt;Reeza&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I eventually get what I want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thanks so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Henry&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 03:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Why-I-cannot-change-axis-tick-values-in-proc-sgplot/m-p/315785#M11078</guid>
      <dc:creator>henryjing</dc:creator>
      <dc:date>2016-12-01T03:41:32Z</dc:date>
    </item>
  </channel>
</rss>

