Bookmark and Share

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   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: modify axis range in scatter graphs
Date   Fri, 19 Mar 2010 01:20:26 -0700 (PDT)

--- On Fri, 19/3/10, joachim jarreau wrote:
> 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.

See: Nicholas J. G. Winte (2005) "Stata tip 23: Regaining control 
over axis ranges". The Stata Journal, 5(3): 467--468.
http://www.stata-journal.com/article.html?article=gr0019

And the example below:

*------------ begin example -------------
clear
input 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
end

scatter x year, xlab(1997(2)2007) 
*------------ end example ---------------
( For more on how to use examples I sent to statalist see:
 http://www.maartenbuis.nl/stata/exampleFAQ.html )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   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/


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