Placing vertical lines with the -by- option would set the same
X-positions for all plots of -by-. If that satisfied your question, then
for example:
Webuse auto
twoway connect mpg weight, sort by(foreign) xline(2000 3000,
lwidth(vthick) lcolor(ltbluishgray))
But what I understand from your post is you want different X-positions
depending on the country. Then you might want to write a small program
that accepted arguments for country, X-positions and changes in
labeling, though you could also do it interactively.
..Frank
Ravi wrote:
I have a series of data that I have plotted against time( x-axis is
years 1965-2000) but also want to include a couple of vertical lines to
highlight particular years that dramatic things happened.
For example - my series is trade data(trade/gdp) from 1965-2000 for 40
countries.
I am fine with
Twoway Conn trade year , by(country)
But in each country there were years that I would like to mark (event
analysis style) So say in Argentina I want a vertical line at 1976 and
1989. For Brazil it may 1983 and 1991 and so on.
The only thing I come across that looks like this is when people want a
break in the x-axis and then to restart it later. That's the look I
want. It is similar to standard graphs of output (GDP) and then you see
shaded years to show recessions.
Would appreciate any help.
Ravi
*
* 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/