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, statalist.org is already up and running.


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

Re: st: marginsplot ignores label() sub-option in legend


From   Nick Winter <nwinter@virginia.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: marginsplot ignores label() sub-option in legend
Date   Thu, 03 Nov 2011 10:43:03 -0400

You need to use the -label()- suboption of the -plotdimensions()- option:

marginsplot, plot( , label("some" "label"))

Nick Winter

On 11/2/2011 10:48 PM, David Muller wrote:
I was wondering if anyone else has come across the following issue,
and whether there are any workarounds.

I'm trying to specify particular labels in a legend produced by
-marginsplot-, but the label() sub-option is being ignored. The labels
in the legend are the value labels for the variable foreign despite
specifying otherwise:

*begin example
sysuse auto, clear
reg price mpg i.foreign
margins foreign, at(mpg=(15(5)35))
marginsplot, legend(lab(1 "some") lab(2 "label"))
*end example

If anyone could shed any light on this it would be greatly appreciated.

Cheers,
David
*
*   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/

--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Associate Professor                             434.924.3359 f
Department of Politics                  nwinter@virginia.edu e
University of Virginia          faculty.virginia.edu/nwinter w
S385 Gibson Hall, South Lawn
*
*   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