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]
Re: st: modify axis range in scatter graphs
From
Ulrich Kohler <[email protected]>
To
[email protected]
Subject
Re: st: modify axis range in scatter graphs
Date
Fri, 19 Mar 2010 09:12:16 +0100
Am Freitag, den 19.03.2010, 08:59 +0100 schrieb joachim jarreau:
> Hi,
>
> I have the following dataset:
>
> X year
> 142.3704 1997
> 140.2368 1998
> 165.6991 1999
> 225.0937 2000
> 243.2682 2001
> 295.1701 2002
> 412.7598 2003
> 560.8112 2004
> 660.2197 2005
> 791.7939 2006
> 956.2615 2007
>
> If I type the following :
> scatter X year, c(l)
> I get a graph with the x-scale ranging from 1995 to 2010, while my
> data only extend from 1997 to 2007. Adding :
>
> xscale(range(1997 2007))
> or
> xscale(r(1997 2007) noextend)
>
> does not modify the outcome.
>
> Any help much appreciated, thanks in advance
This is because the algorithm for producing "nice" labels comes up with
a solution that labels the values 1995, 2000, ..., 2010. Option -xlab()-
overwrites the default. Try, for example,
. scatter X year, c(l) xlab(1997(2)2007)
Hope that helps
Uli
> *
> * 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/
*
* 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/