BookmarkSubscribeRSS Feed
0 Likes

 

HREFLABELS and HREFLABPOS options are available is SAS/QC & SAS/STAT, it would be really useful to have these available is SAS/GRAPH too in order to label VREF & HREF lines easily.  Currently the only way to do this is with PROC ANNOTATE which is clumsy and difficult especially if you keep redrawing the graph and moving the reference line.

 

These 2 options are already written and it would make life so much easier in SAS/GRAPH if they were incorporated.   

5 Comments
ChrisHemedinger
Community Manager

In recent years, most graphical programming enhancements have been added to the SG graphical procedures, which are included with Base SAS. Have you looked at using PROC SGPLOT and the REFLINE statement? SGPLOT offers tremendous control over data labels too, with most graph types supporting a DATALABEL option.

ballardw
Super User

The stuff that goes on behind the curtain is such that would likely require significant effort to add an approach not currently used by the SAS/Graph procedures. The more recent SGPLOT and SGPANEL were designed around a different code base, referred to as "statistical graphs" or SG (see the connection) and those are the options used by the statistical procedures in SAS/Stat and SAS/QC.

 

I agree this would be a reasonable request if the procedures were using the SAS/Graph procedure core to create the graphs.

 

It really doesn't take long to learn to prefer the SGPLOT, and love SGPANEL, over Gplot and Gchart. I have taught co-workers to use both the SAS/Graph and the newer SG procedures and everyone finds the newer procedures easier to understand. Plus the ability to overlay  and use different types of graphs that did not exist in SAS/Graph is extremely useful.

 

Remember also, you have to pay additional fees for SAS/Graph where the SG procedures are built into the base now.

MarciaS
SAS Employee

The SAS/GRAPH AXIS statement includes the REFLABEL= option which allows you to specify text for the reference line labels. The JUSTIFY= and POSITION= suboptions within the REFLABEL= option allow you to adjust the position of the reference line text.

GrahamC
Calcite | Level 5

Thanks all,

 

the REFLABEL on the AXIS statement does not work for me as I have multiple reference lines.

I will certainly take a look at SGPLOT though. 

MarciaS
SAS Employee

The AXIS statement REFLABEL= option supports multiple reference lines. You can include the text for each reference line label enclosed in quotes, separated by a space, and listed in the same order as the reference lines. The JUSTIFY= and POSITION= options can be listed prior to each text string so that each reference line label could be positioned in a different location.