<?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: creating population pyramid with sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500298#M17056</link>
    <description>&lt;P&gt;Could you just change the format to character?&lt;/P&gt;
&lt;PRE&gt;proc format;
 value $tmp
   -200000="-2"
   -100000=" "
   0=0
   100000=" "
   200000="2";
run;&lt;/PRE&gt;
&lt;P&gt;Alternatively you would need to have major ticks as the 20000, 0, 20000 and then minor ticks without labels at all five points.&amp;nbsp; Haven't got anything to work on, but something like;&lt;/P&gt;
&lt;PRE&gt;xaxis major=(-20000 0 200000) minor=(-20000 -10000 0 10000 20000);&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Oct 2018 10:31:07 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-10-01T10:31:07Z</dc:date>
    <item>
      <title>creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500287#M17053</link>
      <description>&lt;P&gt;I used sgplot to create this population pyramid. I used the picture format as in the program. I want the xaxis values to be displayed as shown but 0 should be displayed as one digit instead of 6 digits as its showing. Is there any way I can do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture positive
low-high= '999999'
;
run;

 

 
proc sgplot data = population2017 noautolengend ;
format Male Female positive.;
hbarparm category= agegroup  response=Male/ barwidth=1 fillattrs=(color=blue baselineattrs=(thickness=0)
outlineattrs=(color=black thickness= 0) missing;
hbarparm category= agegroup response=Female/  barwidth=1 fillattrs=(color=red) baselineattrs=(thickness=0)&lt;BR /&gt;outlineattrs=(color=black thickness=0) missing;
xaxis values=(-200000 to 200000 by 100000) display=(nolabel) grid  ;
yaxis display=(nolabel) offsetmin=0 offsetmax=0; 
run;

 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2018 09:35:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500287#M17053</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-10-01T09:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500290#M17054</link>
      <description>&lt;P&gt;You could create another format to be applied to the xaxis something like:&lt;/P&gt;
&lt;PRE&gt;proc format;
 value tmp
   -200000=-2
   -100000=-1
   0=0
   100000=1
   200000=2;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2018 09:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500290#M17054</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-01T09:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500295#M17055</link>
      <description>&lt;P&gt;Thanks, it worked fine.&lt;/P&gt;&lt;P&gt;I have another question: if I want for example the first grid on the xaxis to have a value (which is here 200000), the next grid to be displayed but without any value then the next with value 100000 and so on. I mean a gid should always be left without a value between&lt;/P&gt;&lt;P&gt;those with values. How do I do that?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 10:06:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500295#M17055</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-10-01T10:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500298#M17056</link>
      <description>&lt;P&gt;Could you just change the format to character?&lt;/P&gt;
&lt;PRE&gt;proc format;
 value $tmp
   -200000="-2"
   -100000=" "
   0=0
   100000=" "
   200000="2";
run;&lt;/PRE&gt;
&lt;P&gt;Alternatively you would need to have major ticks as the 20000, 0, 20000 and then minor ticks without labels at all five points.&amp;nbsp; Haven't got anything to work on, but something like;&lt;/P&gt;
&lt;PRE&gt;xaxis major=(-20000 0 200000) minor=(-20000 -10000 0 10000 20000);&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2018 10:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500298#M17056</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-01T10:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500301#M17057</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
picture positive
low-high= '000000'
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Oct 2018 10:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500301#M17057</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-10-01T10:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500304#M17058</link>
      <description>&lt;P&gt;Hello RW9,&lt;/P&gt;&lt;P&gt;thanks for the suggestion. I added minorgrid on the xaxis and this solved the problem. Thank you very much for the help&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 11:34:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500304#M17058</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-10-01T11:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: creating population pyramid with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500305#M17059</link>
      <description>&lt;P&gt;I added minorgrid option to the xaxis which solved the problem&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 11:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/creating-population-pyramid-with-sgplot/m-p/500305#M17059</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2018-10-01T11:35:39Z</dc:date>
    </item>
  </channel>
</rss>

