[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: turn off legend of scatter plot

From   "Matt Spittal" <>
To   <>
Subject   st: RE: turn off legend of scatter plot
Date   Tue, 29 Jul 2008 15:01:55 +1000

Hi Bhoom,

I think you need to place the legend commands within the -by- statement. See the last line of this example.

sysuse auto, clear
gen logprice = log(price)
twoway scatter logprice weight, msymbol(oh) || ///
	scatter logprice weight if logprice>8, msymbol(circle) mcolor(red) ||, ///
	xscale(noline) ytitle(-log(p-value)) xtitle(Position) xtick(none) xlabel(none) ///
	by(foreign, legend(off)) 

-- Matt

-----Original Message-----
[]On Behalf Of Bhoom
Sent: Tuesday, 29 July 2008 2:36 PM
Subject: st: turn off legend of scatter plot

Dear Statalister,

I need a little help turning off graph legend

Here is what I have

twoway (scatter logp pos,msymbol(oh)) || (scatter logp pos if logp>4,
msymbol(circle) mcolor(red) mlabel(snp)), xscale(noline)
ytitle(-log(p-value)) xtitle(Position) by(trait) xtick(none)
xlabel(none) legend(off)

I'm using Stata 10. I specified "legend(off)" but I still got the
legend label at the bottom.
How can I get rid off it. Is there something wrong with my code?

Thank you very much.

*   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