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
Michael Norman Mitchell <[email protected]>
To
[email protected]
Subject
Re: st: modify axis range in scatter graphs
Date
Fri, 19 Mar 2010 01:12:05 -0700
Greetings
You can use the -xlabel()- option as shown below to get the x axis to
display as values 1997 to 2007 incrementing by 1's.
scatter X year, c(l) xlabel(1997(1)2007)
Best regards,
Michael N. Mitchell
See the Stata tidbit of the week at...
http://www.MichaelNormanMitchell.com
On 2010-03-19 12.59 AM, joachim jarreau wrote:
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
joachim
*
* 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/