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

st: RE: Overlapping variable labels


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Overlapping variable labels
Date   Fri, 5 Aug 2005 20:23:05 +0100

Solutions include: 

1. -graph hbar- 

2. -splitvallabels- from SSC 

3. explicit splitting of labels using 
compound double quotes (same as 2., but 
do it yourself) (discussed on Statalist
previously) 

3. using smaller text 

4. text at an angle 

Nick 
[email protected] 

Raphael Fraser
 
> When ever you plot a bar graph stata uses the variable label of the
> "over( variable)" to label the horizontal axis. My problem is the
> labels overlap on the horizontal axis and looks a bit messy. How can
> this be corrected?
> 
> My code and graph is attached. Thank you in advance.
> 
> #d;
> graph bar (count) p c, over(response) 
>         bargap(-20) bar(1,bcolor(red)) bar(2,bcolor(green)) 
> bar(3,bcolor(gold))
> 	 blabel(bar, format(%4.0f) position(outside))
> 	 legend(label(1 "Patients") label(2 "Controls") )
>          ytitle("Frequency") yla(,angle(0));
> #d;

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