Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: legend with assplot()


From   "Bontempo, Daniel E" <deb193@ku.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: legend with assplot()
Date   Thu, 12 Jan 2012 22:51:23 +0000

OK. Solved.

The legend(off) must go inside the byopts(). The help says only the letters "by" are needed BUT THIS IS WRONG, so my previous attempt to do this had generated a "by() option invalid error message". 

Turns out you must spell out "byopts" when using panel mode of xtline. (This make sense since the by is implicit in panel mode, and you really are only passing the options.) Then you can put a legend subcommand inside.

xtline LNFw_BLUP_4, i( KSDE_ID) t( week_c3) addplot(scatter LNF week_c3) byopts( legend(off))



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Bontempo, Daniel E
Sent: Thursday, January 12, 2012 3:25 PM
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: legend with assplot()

I am using xtline in panel mode with the addplot()option. This seems to turn on a legend distinguishing the primary xtline curve from the addplot() curve, and I cannot seem to turn it off.

For example:

. xtline LNFw_BLUP_4, i( KSDE_ID) t( week_c3) legend(off) addplot((scatter LNF week_c3), legend(off))


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index