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

Re: st: Can someone tell me what is wrong with this legend command?


From   Philip Ryan <[email protected]>
To   [email protected]
Subject   Re: st: Can someone tell me what is wrong with this legend command?
Date   Sat, 27 Mar 2004 15:16:22 +1030

Note that statement (2) differs from (1) and (3) in that I specified ring(0) in

statement (2).  This puts the legend inside the plot region.  see page 375 of 
the Graphics  manual.

Phil


Quoting "Dimitriy V. Masterov" <[email protected]>:

> Phil is right. The option he suggests (2) seems to place the legend in the
> graph area, whereas (1) and (3) place it in the margin on the right. Can
> someone explain why this is the case?
> 
> line  ged hs yob, legend(pos(3) col(1) lab(1  "Males") lab(2   "Females"))
> 
> line ged hs yob,  legend(pos(3))   legend(col(1))   legend(lab (1 "Males")) 
> legend(lab(2   "Females")) legend(ring(0))
> 
> line ged hs yob, legend(pos(3)) legend(col(1) lab(1  "Males") lab(2
> "Females"))
> 
> DVM
> 
> 
> On Sat, 27 Mar 2004, Philip Ryan wrote:
> 
> > The labels are arguments of the legend option.  Just omit the second right
> > parenthesis after "col(1))" to include the labels within the argument space
> of
> > legend:
> >
> > line le_m le_f year, legend(pos(3)) legend(col(1) lab(1  "Males") lab
> > (2   "Females"))
> >
> >
> > Phil
> >
> >
> > Quoting Jon Ebeling <[email protected]>:
> >
> > > I tried to do the following command and option; it is straight out of
> > > the graphics volume, page 379 of the Stata8 volumes. Here is what
> happened.
> > >
> > >
> > > . line le_m le_f year, legend(pos(3)) legend(col(1)) lab(1  "Males")
> > > lab(2   "Females"))
> > > option lab() not allowed
> > > invalid syntax
> > > r(198);
> > >
> > > If anyone can tell me what i"m donig wrong here, I would appreciate it.
> > > Jon Ebeling
> > >
> > >
> > >
> > > *
> > > *   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/
> > >
> >
> >
> > --
> > Philip Ryan
> > Associate Professor
> > Department of Public Health
> >
> > Associate Dean (IT)
> > Faculty of Health Sciences
> >
> > Head, Data Management and Analysis Centre
> > Department of Public Health and Department of General Practice
> >
> > University of Adelaide
> > 5005 South Australia
> > AUSTRALIA
> > CRICOS Provider Number 00123M
> > -----------------------------------------------------------
> > This email message is intended only for the addressee(s)
> > and contains information that may be confidential and/or
> > copyright.  If you are not the intended recipient please
> > notify the sender by reply email and immediately delete
> > this email. Use, disclosure or reproduction of this email
> > by anyone other than the intended recipient(s) is strictly
> > prohibited. No representation is made that this email or
> > any attachments are free of viruses. Virus scanning is
> > recommended and is the responsibility of the recipient.
> > *
> > *   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/
> >
> 
> 
_______________________________________________________________________________
> Dimitriy V. Masterov
> 
> Work:
> Center for Social Program Evaluation
> 1155 East 60th St. Room 038
> Chicago, IL 60637
> Work: (773)256-6005
> Fax: (773)256-6313
> 
> Home:
> 1312 East 53rd St., Apt.309
> Chicago, IL 60615
> Mobile: (773)220-2760
> 
> 
> 
> *
> *   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/
> 


-- 
Philip Ryan
Associate Professor
Department of Public Health

Associate Dean (IT)
Faculty of Health Sciences

Head, Data Management and Analysis Centre
Department of Public Health and Department of General Practice

University of Adelaide
5005 South Australia
AUSTRALIA
CRICOS Provider Number 00123M
----------------------------------------------------------- 
This email message is intended only for the addressee(s) 
and contains information that may be confidential and/or 
copyright.  If you are not the intended recipient please 
notify the sender by reply email and immediately delete 
this email. Use, disclosure or reproduction of this email 
by anyone other than the intended recipient(s) is strictly 
prohibited. No representation is made that this email or 
any attachments are free of viruses. Virus scanning is 
recommended and is the responsibility of the recipient.
*
*   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