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
[email protected]
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Bhoom
Suktitipat
Sent: Tuesday, 29 July 2008 2:36 PM
To: [email protected]
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.
Sincerely,
Bhoom
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/