# Re: st: Population-pyramid-like graph - positive barlabels on theleft?

 From Eric Cahuzac To statalist@hsphsun2.harvard.edu Subject Re: st: Population-pyramid-like graph - positive barlabels on theleft? Date Fri, 21 Jul 2006 15:29:03 +0200

It's still not the answer you want, but it's an exemple... close to Michael N. Mitchell: "A Visual Guide to Stata Graphics" example.
Where "Homme" and "femme" are numbers and "age" a discrete value.
Eric.

replace homme= -homme/1e+3
replace femme = femme/1e+3
twoway (bar homme age, horizontal yaxis(1)) (bar femme age, horizontal yaxis(2)), /*
*/ ytitle("Ages", axis(1) orientation(horizontal)) /*
*/ ytitle("Ages", axis(2) orientation(horizontal)) /*
*/ xtitle("Population en milliers") /*
*/ legend(off) /*
*/ xlabel(-400 "400" -300 "300" -200 "200" 200(100)400) /*
*/ xsca(noline titlegap(-3.5)) /*
*/ ysca(axis(1) noline) ysca(axis(2) noline) /* */ ylab(0(10)100,angle(0) axis(1)) /* */ ylab(0(10)100,angle(0) axis(2)) /* */ title("Pyramide des âges de la france pour 2004") /*
*/ plotregion(style(none)) /*
*/ note("Source : Insee - Recensement de la population") /*
*/ text(90 -300 "Hommes") /*
*/ text(90 300 "Femmes")

Gawrich Stefan a écrit :

Hi everyone,

with cancer registry data I want to draw the sex-specific distribution of
cancer localisations on a population-pyramid-like diagram.

The difference to the population pyramid is that I have localisations
instead of age groups on the vertical axis, which differ by sex. So I have
different localisations to the left (women) and to the right (men). The
localisations are sorted by frequency and to obtain a homogeneous graph I
use the same number of bars/localisations on both sides.

I tried different graphing options and ended up using two "gr hbar" graphs
combined so far.
Whats missing is that I need to label the bars (abs. or rel. frequency) and
get negative values on the left side. Is there a way to obtain all positive
bar labels (just like the options for all positive axis labels)?

Best wishes

Dr. Stefan Gawrich
Hesse Health state Office
35683 Dillenburg
Germany
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

```
--
______________________________

Eric Cahuzac
Institut National de la Recherche Agronomique (INRA)
Station d'Economie et Sociologie Rurale (ESR)
Chemin de Borde-Rouge - Auzeville
BP 52627, 31326 CASTANET-TOLOSAN CEDEX
Tel. 05.61.28.53.41 (direct)
05.61.28.53.49 (secrétariat)
Fax. 05.61.28.53.72
e-mail  cahuzac@toulouse.inra.fr
http://www.toulouse.inra.fr/esr

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```