BookmarkSubscribeRSS Feed
natanya
Calcite | Level 5
Hello,

In the gplot graph that I am producing, I would like to include 5 reference (vref) lines. I would like to label each reference line with text i.e. "id1" "id2" "id3" etc.
Is there any way I can do this?

Thanks in advance,
Natanya
6 REPLIES 6
ArtC
Rhodochrosite | Level 12
You are looking for the REFLABEL= option on the AXIS statement. You can find an example at:
http://caloxy.com/papers/61_133_30.pdf
natanya
Calcite | Level 5
Thanks ArtC. This is great.
Is there a way to control where the labels of the reference lines go? i.e. can I put them sideways? or in the middle of the line? on the left or right? top or bottom?
Thanks.
ArtC
Rhodochrosite | Level 12
You can use the justify= option to move the text some [left, right, center].
[pre]
axis1 reflabel=(t=1 j=left '100' j=left 'LBS');
[/pre]
For vertical text consider using the a=90 and a=-90 options.
Text can also be placed with the TITLE, FOOTNOTE, and NOTE statements, which support the MOVE= option to place text exactly.
If you need to do too very much more you may need to use ANNOTATE which is very flexible.
natanya
Calcite | Level 5
Thanks for your help,
I will work with these options. At this point annotate is too threatening.
ArtC
Rhodochrosite | Level 12
Good luck
Annotate need not be so hard to learn. The documentation is good, there are a number of good papers, and of course my unbiased favorite is the book:
Annotate Simply the Basics
https://support.sas.com/pubscat/bookdetails.jsp?pc=57320
natanya
Calcite | Level 5
Hi Art,
Thank you for your links. I did take the plunge and worked a bit with annotate. I used one of your documents that I found online. It was very clearly written and very helpful. I am sure that as I move forward I will have more questions, but meanwhile thanks for your help.
Natanya

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2254 views
  • 0 likes
  • 2 in conversation