You need the options -showyvars- and -nolabel- instead of -blabel(name)-.
As described by the help file, the -blabel() option "allows you to add labels on top of the bars"
David
-----Original Message-----
From: Arnold Kester [mailto:[email protected]]
Sent: 28 February 2005 12:50
To: [email protected]
Subject: st: barplot x-axis labels
Dear listers,
I have been trying to make a decent plot similar to the included .do
file below, but I cannot get the organ names ("Nose", "Lung", "Kidney",
..) below the bars. Stata insists putting "mean of BiopNose", etc. when
I ask for labels, and puts in in the wrong place.
I am aware that the plot contains very little information.
Thanks,
Arnold Kester
==============================================
* barplot problem
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) ///
ylabel(0 "0" 0.2 "20" 0.4 "40" 0.6 "60" 0.8 "80") ///
bargap(20) bar(1, bfcolor(ltblue)) bar(2, bfcolor(ltblue)) ///
bar(3, bfcolor(ltblue)) bar(4, bfcolor(ltblue)) ///
bar(5, bfcolor(ltblue)) ///
blabel(name) legend(off)
exit
* ====================================
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.5.1 - Release Date: 27-2-05
*
* 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/
*
* 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/