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: xlabel( , alternate) problem

From   Jeph Herrin <>
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?

*   For searches and help try:

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