Bookmark and Share

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

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

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

From   Scott Merryman <>
Subject   Re: st: marginsplot ignores label() sub-option in legend
Date   Thu, 3 Nov 2011 04:21:57 -0500

You could use the -order- option:

marginsplot, legend(order(3 "some" 4 "label"))


On Wed, Nov 2, 2011 at 9: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:

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