Scatter graphs and grtext

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
marcushemma
Posts: 5
Joined: Sat Jun 12, 2010 3:12 am

Scatter graphs and grtext

Unread post by marcushemma »

Hi,

The below works fine but is a bit tedious, especially in case of more countries.
Is there a way to enter the x- and y-coordinates in a string and insert in a grtext instruction?

spgraph
SCATTER(hlabel="2006",vlabel="2018", STYLE=symbols, OVERLAY=LINES, noovkey,ovsamescale) 2
# LIB06 LIB18 / 28
# LIBA LIBB
grtext(x=0.66,y=0.68, direction=0) "ARG"
grtext(x=0.51,y=0.40, direction=180) "BOL"
grtext(x=0.77,y=0.56, direction=0) "BRA"
grtext(x=0.85,y=0.77, direction=0) "CHL"
grtext(x=0.40,y=0.48, direction=0) "COL"
grtext(x=0.53,y=0.47, direction=180) "ECU"
grtext(x=0.63,y=0.62, direction=0) "PER"
grtext(x=0.44,y=0.43, direction=180) "PRY"
grtext(x=0.84,y=0.78, direction=180) "URY"
grtext(x=0.19,y=0.09, direction=0) "VEN"
spgraph(done)

best regards
Marcus
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Scatter graphs and grtext

Unread post by TomDoan »

Where did you get the numbers? There's no reason you can't put all the GRTEXT's in a loop as long as you have series or vectors with the x and y values.
Post Reply