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: Re: Marginsplot and labelled reference line


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Re: Marginsplot and labelled reference line
Date   Thu, 15 Mar 2012 12:26:23 +0000

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 
[email protected] 


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martyn Sherriff
Sent: 15 March 2012 12:13
To: [email protected]
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/


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