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

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
applej
Posts: 20
Joined: Thu May 14, 2015 9:17 am

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

Unread post 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
Attachments
vgrid.RGF
(2.28 KiB) Downloaded 850 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

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

Unread post 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.
applej
Posts: 20
Joined: Thu May 14, 2015 9:17 am

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

Unread post 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!
Post Reply