BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Miracle
Barite | Level 11

Dear SAS forumers,

 

Can I please ask if anyone has tried this spread-level plot macro http://www.datavis.ca/sasmac/sprdplot.html?

If so, did you manage to run it without problems?

When I tried to run it with my data, the error started at line211: %labels(data=_sumry_, x=logm, y=logs, text=left(%scan(&class,1)), size=&htext, pos=2, out=_label_); Here I have enclosed partial log window output if you could explain how it can be resolved please?
 

Thank you much.

 

17     %labels(data=_sumry_, x=logm, y=logs, text=left(%scan(&class,1)),        size=&htext,
       -
       180
17  ! pos=2, out=_label_);  data _slope_;    set _parms_(keep=logm);     drop logm power;
17  ! xsys='1'; ysys='1';    length text $16 function $8;    x = %scan(&sploc,1);    y
WARNING: Apparent invocation of macro LABELS not resolved.
SYMBOLGEN:  Macro variable CLASS resolves to raps drinkinghelp2
SYMBOLGEN:  Macro variable HTEXT resolves to 1.7
MPRINT(SPRDPLOT):   %labels(data=_sumry_, x=logm, y=logs, text=left(raps), size=1.7, pos=2,
out=_label_);
NOTE: The previous statement has been deleted.
WARNING: The data set WORK._PARMS_ may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
MPRINT(SPRDPLOT):   data _slope_;
MPRINT(SPRDPLOT):   set _parms_(keep=logm);
ERROR: The variable LOGM in the DROP, KEEP, or RENAME list has never been referenced.

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Yes, in http://www.datavis.ca/sasmac/labels.html it says: "This is an updated version of the LABEL macro ..., renamed to 'LABELS' to avoid a conflict with the LABEL macro in ANNOMAC.SAS." So, LABELS might be the right one to use.

View solution in original post

5 REPLIES 5
Reeza
Super User

It looks like it's dependent on another macro - labels. Did you download that macro and define it?

 

It looks to be here:

http://datavis.ca/sasmac/labels.html

FreelanceReinh
Jade | Level 19

Hello @Miracle,

 

I'm not sure why in your code macro LABELS is called, whereas in the code of SPRDPLOT I only find a call of macro LABEL. Anyhow, both LABEL and LABELS are available under Utility macros --> Graphics utility on the web page you linked to. So, simply download the macros you need and compile them (i.e. simply submit the macro code) or put them into an autocall library before you call SPRDPLOT.

Reeza
Super User

Hmm...interesting. The macro for download is also called %labels, not %label. 

 

Michael also stores his macros on GitHub and %label and %labels macro are both available here. It does look like it was updated to %labels about 4 years, in the last change note.

 

https://github.com/friendly/SAS-macros

 

 

FreelanceReinh
Jade | Level 19

Yes, in http://www.datavis.ca/sasmac/labels.html it says: "This is an updated version of the LABEL macro ..., renamed to 'LABELS' to avoid a conflict with the LABEL macro in ANNOMAC.SAS." So, LABELS might be the right one to use.

Miracle
Barite | Level 11

Dear @FreelanceReinh and @Reeza.

The sprdplot macro now runs without problem.

Thank you very much Smiley Happy

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1894 views
  • 6 likes
  • 3 in conversation