Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Help with axis range of graphs.


From   Kwang Teo <[email protected]>
To   [email protected]
Subject   st: Help with axis range of graphs.
Date   Sat, 17 May 2003 12:17:03 -0500

Dear Statalisters,

I am preparing a set of graphs in which the values of the x-axis
variable, "year", ranges from 1816 to 1992. The following is the what I have
typed in my do-file (I am using Stata 8):

==========
#delimit ;

graph twoway line meandemdisp meannondemdisp year if year>1815 & year<1992,
sort
title("Graph 3")
subtitle("Mean # Major-Major Power Dyad Dispute Involvements by Regime Type")
legend(label(1 "jointly democratic dyads") label(2 "non-jointly democratic
dyads"))
ytitle("")
xtitle("year")
xscale(range(1816 1992) noextend) ;
===================================

However, when the graph is displayed, the x-axis still ranges from 1800 to
2000, even though there are no values of the y-axis variables for the years
1800 to 1815, and 1993 to 2000.

Where have I gone wrong? I have been reading the Graphics manual, which is why
I added the options "xscale(range)", but to no avail.

Sincerely,
Kwang Teo
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index