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

Re: st: Persistent graph legends using by()

From   Nick Winter <>
Subject   Re: st: Persistent graph legends using by()
Date   Wed, 16 Jun 2004 19:32:40 -0400

In this case, the "legend(off)" should be a suboption of by():

. twoway ... , by(UNIT , legend(off) ) ...

See the section titled "Use of legends with by()" in -help by_option- (or the equivalent manual entry, I assume; I don't have them at hand).

--Nick Winter

At 04:14 PM 6/16/2004 -0700, you wrote:

Hi Statalisters
I have a graph of some data I'm pretty pleased with, but I don't want a
legend on it.  Unfortunately, Stata is insisting on one:

. twoway (scatter mean desc if parttag) (scatter u95 desc if parttag,
msymbol(none) mlabel(cap) mlabposition(0)) (scatter l95 desc if parttag,
msymbol(none) mlabel(cap) mlabposition(0)), by(UNIT)
ylabel(, angle(horizontal) labsize(small))
xlabel(, valuelabel labsize(small)) legend(off)

The legend pops up in the 6 o'clock position of the main body of the graph,
with an appropriate symbol for mean, and no markers for u95 or l95 (as
specified, since I'm using a custom symbol, "cap").

Any suggestions on how to get the legendless graph I'm trying for?

John Wallace | Research Associate | Test Method Development
AFFYMETRIX, INC. | 3380 Central Expressway | Santa Clara, CA 95051 | Tel:
408-731-5574 | Fax:  408-481-0435
*   For searches and help try:
Nicholas Winter 607.255.8819 t
Assistant Professor 607.255.4530 f
Department of Government e
308 White Hall w
Cornell University
Ithaca, NY 14853-4601
* For searches and help try:

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