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: xlabel( , alternate) problem
From
Jeph Herrin <[email protected]>
To
[email protected]
Subject
st: xlabel( , alternate) problem
Date
Fri, 01 Feb 2013 14:28:59 -0500
Apologies if this is in the archives, I couldn't find it.
I am combining two graphs something like this to get a line with an
additional reference point (x0,y0):
sum x
local x0=r(min)-1
local xmax=r(max) // needed below
twoway connect y x || scatteri `y0' `x0'
and because -x- has long labels (they are months) i want to use -xlabel(
, alternate)-. But I also have to label the first point from -scatteri-
so I have this
twoway connect y x || scatteri `y0' `x0' ///
xlabel(`x0'(1)`xmax' `x0' "Reference" , alternate)
which works almost well enough. Almost, because while everything is
labelled correctly, the first label ("Reference") is not alternated - it
is the same level as the second label, with the 3rd one then lowered,
4th raised, etc.
Is there a way to trick the -alternate- option into applying to the
first label as well?
thanks,
Jeph
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/