text into a graphic

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
Abarbosa
Posts: 2
Joined: Wed Mar 06, 2024 10:56 am

text into a graphic

Unread post by Abarbosa »

I would like to insert a short text (two words) into a graphic. The graphic displays
time series lines and also includes two vertical lines that mark a time interval.
I would like to insert the text between these two vertical lines so as to
explain the meaning of this time interval. How can I do this? Thanks for any suggestion
Antonio Barbosa
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: text into a graphic

Unread post by TomDoan »

Use GRTEXT. For instance,

Code: Select all

cal(q) 2000:1
set x 1 100 = t+%ran(1.0)
set grid = t==2010:1.or.t==2016:1
spgraph
graph(grid=grid)
# x
grtext(entry=(2010:1+2016:1)/2,y=95.0,valign=top) "This is a description\\that is inserted in the graph"
spgraph(done)
Abarbosa
Posts: 2
Joined: Wed Mar 06, 2024 10:56 am

Re: text into a graphic

Unread post by Abarbosa »

Thanks Thomas Doan for your reply and suggestion which worked perfectly.
Antonio barbosa
Post Reply