<?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: Change names values in graph in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296512#M62145</link>
    <description>&lt;P&gt;If you have the option switch to SGPLOT instead, you get better graphics and more supported.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2016 11:50:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-09-05T11:50:51Z</dc:date>
    <item>
      <title>Change names values in graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296490#M62138</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the number of people by age. My numeric variable of age category ' Cat_age ' was coded in 1,2,3.&lt;/P&gt;&lt;P&gt;1='3-5 years'&lt;BR /&gt;2='6-11 years'&lt;BR /&gt;3='12-18 years'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to draw a graph with the number of people by age. So i used a proc format to display in my graph "3-5 years' instead of "1" but it doesn't seem to work... The graph displays me column with 1,2,3 in the horizontal axis. Ci-below my script (i am a beginner in SAS ...).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Age distribution';

axis1 stagger label=('Âge');
axis2 label=('Effectif');

proc format;
   value cat_age 1='3-5 ans'
                	   2='6-11 ans'
		           3='12-18 ans';
run;

proc gchart data=conso;
   vbar cat_age /discrete maxis=axis1 raxis=axis2;
   format cat_age;
run;
quit; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4831iE3AA93299CEBD56C/image-size/medium?v=v2&amp;amp;px=-1" alt="cat_age.JPG" title="cat_age.JPG" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 10:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296490#M62138</guid>
      <dc:creator>Foody</dc:creator>
      <dc:date>2016-09-05T10:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Change names values in graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296501#M62139</link>
      <description>&lt;P&gt;Your methodology is correct but syntax isn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The syntax is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FORMAT variable_name(s) format_name.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So in your case, since you've named the format the same as the variable name:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Format cat_age cat_age.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Sep 2016 10:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296501#M62139</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-05T10:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Change names values in graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296509#M62142</link>
      <description>&lt;P&gt;Thank you ! Now it works !&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc gchart data=conso;
   vbar cat_age /discrete maxis=axis1 raxis=axis2;
   format cat_age cat_age.;
run;
quit; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Sep 2016 11:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296509#M62142</guid>
      <dc:creator>Foody</dc:creator>
      <dc:date>2016-09-05T11:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Change names values in graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296512#M62145</link>
      <description>&lt;P&gt;If you have the option switch to SGPLOT instead, you get better graphics and more supported.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 11:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Change-names-values-in-graph/m-p/296512#M62145</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-05T11:50:51Z</dc:date>
    </item>
  </channel>
</rss>

