Page 1 of 1

how to add a text label on a vgrid line in graph ?

Posted: Fri Jan 20, 2017 3:42 pm
by applej
Dear Tom,

I'm trying to denote a horizontal line in a time series graph. I add that line as a threshold bar. Here is my current codes:

set TED1dummy = TED1 >= 0.8
graph(shading = TED1dummy, vgrid=0.8 )
# TED1 1987:7 2014:12

And I want to add a text as : " gamma= 0.8" somewhere above the horizontal line. I checked the RATS manual on graphics, yet haven't found this case. Attached is the look of current graph by the above code. Looking forwards your advise.

Thank you,
J

Re: how to add a text label on a vgrid line in graph ?

Posted: Fri Jan 20, 2017 4:22 pm
by TomDoan
Use GRTEXT. Also https://estima.com/docs/RATS%209%20Intr ... f#page=146. The first example on the help is for a time series graph like yours. Something like
spgraph
  graph(shading = TED1dummy, vgrid=0.8 )
  # TED1 1987:7 2014:12
  grtext(valign=bottom,y=0.8,entry=2014:12,align=right) "Gamma=.8"
spgraph(done)
looks like it would work.

Re: how to add a text label on a vgrid line in graph ?

Posted: Wed Feb 01, 2017 10:26 pm
by applej
TomDoan wrote:Use GRTEXT. Also https://estima.com/docs/RATS%209%20Intr ... f#page=146. The first example on the help is for a time series graph like yours. Something like
spgraph
  graph(shading = TED1dummy, vgrid=0.8 )
  # TED1 1987:7 2014:12
  grtext(valign=bottom,y=0.8,entry=2014:12,align=right) "Gamma=.8"
spgraph(done)
looks like it would work.
Thank you very much!