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

st: RE: barplot x-axis labels

From   "David Harrison" <>
To   <>
Subject   st: RE: barplot x-axis labels
Date   Mon, 28 Feb 2005 12:45:46 -0000

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"


-----Original Message-----
From: Arnold Kester []
Sent: 28 February 2005 12:50
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.

Arnold Kester

* barplot problem


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)

* ====================================

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:

*   For searches and help try:

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