Scatter Plot with Dates

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
e1983
Posts: 20
Joined: Sun Aug 28, 2011 2:32 am

Scatter Plot with Dates

Unread post by e1983 »

Hi. Is it possible to have the "style" of a scatter plot as dates rather than dots or symbols etc. ? Any help would be greatly appreciated.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Scatter Plot with Dates

Unread post by TomDoan »

No. However, you can do GRTEXT instructions using X and Y coordinates to place arbitrary text at specific locations on a scatter gram.

This uses the data from Brockwell and Davis example ITSFP021.rpf. If you graph the whole range, the labels will probably collide so this does only 25 years.

Code: Select all

spgraph
scatter(footer="Figure 1-16 Scatter Plot of y(t-1) vs y(t)",$
  line=||0.0,%beta(1)||)
# ylag y 1876:1 1900:1
do time=1876:1,1900:1
   grtext(x=ylag(time),y=y(time)) %string(%year(time))
end do time   
spgraph(done)
e1983
Posts: 20
Joined: Sun Aug 28, 2011 2:32 am

Re: Scatter Plot with Dates

Unread post by e1983 »

Thanks so much.
Post Reply