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 on April 23, and its replacement, is already up and running.

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

st: Re: Marginsplot and labelled reference line

From   Martyn Sherriff <>
Subject   st: Re: Marginsplot and labelled reference line
Date   Thu, 15 Mar 2012 12:13:02 +0000

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

Thank you,
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index