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

Re: st: Re: labeling overlaid histograms


From   rghuang <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Re: labeling overlaid histograms
Date   Sat, 13 Dec 2003 13:28:45 +0800

Scott Merryman��
 
   i want to know what /// means?and what is its function.
   can you do me a favor to tell me ?
   thank you.
 
����
 
======== 2003-12-13 11:04:51 ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ð´ï¿½ï¿½ï¿½ï¿½ ========
 
Devra,
 
I believe you want to use the -legend(label(# "text"))- option.  Something like
this:
 
twoway (histogram weight if foreign==0, density blcolor(blue) bfcolor(none)
legend(label(1 "Domestic"))) ///
 (histogram weight if foreign==1, density blcolor(red) bfcolor(none)
legend(label(2 "Foreign")))
 
hope this helps,
Scott
 
----- Original Message ----- 
From: "Devra Golbe" < [email protected]>
Sent: Friday, December 12, 2003 8:10 PM
Subject: st: labeling overlaid histograms
 
 
>>  I am trying to  produce overlaid  histograms in which each histogram is
>>  labeled (e.g., "foreign" or "domestic").  I have checked the graphics
>>  manual, and the online help, and am unable to find the solution.
>>
>>  . use "C:\Stata8\auto.dta", clear
>>  .histogram weight if foreign==0, density blcolor(blue) bfcolor(none)
>>
>>  produces a single histogram labeled  "Weight (lbs.)"
>>
>>  However, the following
>>
>>  . twoway (histogram weight if foreign==0, density blcolor(blue)
>>  bfcolor(none))  ///
>>    (histogram weight if foreign==1, density blcolor(red) bfcolor(none))
>>
>>  produces two overlaid histograms, each labeled "density".  How can I get
>>  the two histograms to be labeld "Domestic" and "Foreign", respectively?
>>
>>  Thanks,
>>  Devra
>>
>>
>>  ______________________________________________________________
>>  Devra L. Golbe, Professor
>>  Dept. of Economics
>>  Hunter College  / CUNY
>>  695 Park Ave., NY, NY 10021
>>  voice:  212-772-5408
>>  fax:     212-772-5398 (office)
>>             208-361-5964 (e-fax)
>>
>>  http://econ.hunter.cuny.edu/faculty/golbe
>>
>>
>>  *
>>  *   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/

= = = = = = = = = = = = = = = = = = = = = =

������������������
��

����������������������������rghuang
                          [email protected]
����������������������������������2003-12-13
 



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