Page 1 of 1

text into a graphic

Posted: Sat Mar 09, 2024 2:51 pm
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

Re: text into a graphic

Posted: Sat Mar 09, 2024 3:29 pm
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)

Re: text into a graphic

Posted: Sun Mar 10, 2024 7:06 am
by Abarbosa
Thanks Thomas Doan for your reply and suggestion which worked perfectly.
Antonio barbosa