BookmarkSubscribeRSS Feed
PatriciaEilerman
Calcite | Level 5

Hello,

I'm currently trying to add reference lines to my gplot and need to know some simple SAS code to create and edit the reference line. For example, I'm going to have a reference line which represent the maximum value= 0.68. I know that vref=0.68 and I know that cvref=green change the reference line color to green. However, how do I add label of this reference line to the legend so it easy for reader to tell difference between the lines. Please answer as soon as possible. Thanks.

Sincerely,

-Patricia

4 REPLIES 4
art297
Opal | Level 21

Regarding color I think you are looking for either the cautohref SAS/GRAPH(R) 9.3: Reference, Third Edition or the chref SASo/GRAPH(R) 9.3: Reference, Third Edition options.

As for labels, take a look at: Support.sas.com

PatriciaEilerman
Calcite | Level 5

I just figure out the colors a couple of minutes ago, but is there a way get reference label in the legend and not to the side. Thanks.

art297
Opal | Level 21

You have a number of options available if you use proc sgplot. see, e.g., SAS/GRAPH(R) 9.2: Statistical Graphics Procedures Guide, Second Edition

PatriciaEilerman
Calcite | Level 5

What about proc gplot since I'm using proc gplot code from a code worker?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 2637 views
  • 0 likes
  • 2 in conversation