Page 1 of 1

Scatter Plot with Dates

Posted: Mon Mar 10, 2014 12:52 pm
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.

Re: Scatter Plot with Dates

Posted: Tue Mar 11, 2014 8:30 am
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)

Re: Scatter Plot with Dates

Posted: Thu Mar 13, 2014 12:25 pm
by e1983
Thanks so much.