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

st: barplot x-axis labels


From   Arnold Kester <[email protected]>
To   [email protected]
Subject   st: barplot x-axis labels
Date   Mon, 28 Feb 2005 13:50:17 +0100

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/




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