Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: RE: Re: Marginsplot and labelled reference line


From   Martyn Sherriff <statams48@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Re: Marginsplot and labelled reference line
Date   Thu, 15 Mar 2012 12:29:47 +0000

Many thanks.
Martyn

On 15 March 2012 12:26, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> The incantation -yaxis(1 2)- plus sub-options -, axis(1)- -, axis(2)- where appropriate is the general recipe. Usually a few things spring into existence that you need to zap, such as echoed axis titles that you can remove with -ytitle("", axis(#)-.
>
> Nick
> n.j.cox@durham.ac.uk
>
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martyn Sherriff
> Sent: 15 March 2012 12:13
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Re: Marginsplot and labelled reference line
>
> I am using the following code add two reference lines to marginsplot (Stata 12):
>
> marginsplot, title("Black background")                                                                          ///
>        plot1opts(lcolor(gs9) mcolor(gs9)) ci1opts(lcolor(gs9))                                         ///
>        plot2opts(lcolor(gold) mcolor(gold)) ci2opts(lcolor(gold))                                              ///
>        plot3opts(lcolor(red) mcolor(red)) ci3opts(lcolor(red))                                         ///
>        plot4opts(lcolor(maroon) mcolor(maroon)) ci4opts(lcolor(maroon))                               ///
>        plot5opts(lcolor(dkgreen) mcolor(dkgreen))
> ci5opts(lcolor(dkgreen))                               ///
>        plot6opts(lcolor(midgreen) mcolor(midgreen)) ci6opts(lcolor(midgreen))                  ///
>        plot7opts(lcolor(dkorange) mcolor(dkorange)) ci7opts(lcolor(dkorange))                  ///
>        yline(1 2, lpattern(shortdash) lcolor(black))
>
> I want to label the right hand y axis with 50 % and 100 %
> corresponding to the '1' and '2' reference lines but cannot find the
> correct syntax. Or do I need to explicit add and label the lines with
> addplot?
>
>
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index