Scatter with data labels

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
slackscholar
Posts: 2
Joined: Wed Jan 05, 2011 2:46 am

Scatter with data labels

Unread post by slackscholar »

Hi,

Would it be possible to make an X-Y scatter plot that comes with a label on each (x,y) point?

thanks!
moderator
Site Admin
Posts: 269
Joined: Thu Oct 19, 2006 4:33 pm

Re: Scatter with data labels

Unread post by moderator »

Yes, you can use GRTEXT to do that. You need to wrap the whole thing in an SPGRAPH, do the SCATTER and then do a GRTEXT command for each point you want to label. You'll probably want to use a loop over the entries to do that. Use the Y option and either the ENTRY or X option to specify the positioning of the labels.

For something similar, see the second example under GRTEXT in the Reference Manual.

Regards,
Tom Maycock
Estima
slackscholar
Posts: 2
Joined: Wed Jan 05, 2011 2:46 am

Re: Scatter with data labels

Unread post by slackscholar »

Thank you so much for the prompt reply!
It works!
Post Reply