Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: barplot x-axis labels


From   Arnold Kester <[email protected]>
To   [email protected]
Subject   Re: st: RE: barplot x-axis labels
Date   Mon, 28 Feb 2005 21:14:46 +0100

David Harrison wrote:
You no longer need the -showyvars-... the -ascategory- tells Stata to
treat your variables as if they were categories, which get labelled
by default. Using both options together it is trying to label both
variables and categories within variables (of which there are none).

David
Thanks David.

So here's my "grand finale" :-)

* ====================================================
* barplot -- no more a problem --thanks David Harrison!

clear

set obs 100

gen BiopNose= (uniform()<.6)
gen BiopKidney= (uniform()<.3)
gen BiopLung= (uniform()<.5)
gen BiopSkin= (uniform()<.2)
gen BiopMuscle= (uniform()<.2)

graph bar (mean) Nose=BiopNose Kidney=BiopKidney ///
  Lung=BiopLung Skin=BiopSkin Muscle=BiopMuscle, ///
  yt(Percent of patients) bar(1, bfcolor(ltblue)) ///
  ylabel(0 "0" 0.2 "20" 0.4 "40" 0.6 "60" 0.8 "80") ///
  ascategory legend(off) nolabel

exit
* ===============================================


*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index