Data visualization with SAS programming

SGPLOT: How do I remove the auto title from by line statement

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

SGPLOT: How do I remove the auto title from by line statement

SAS 9.4 TS Level 1M2 

 

So whenever I run an SGPLOT with a by statement it automatically inserts a second title -- how do I remove that second title?

 

Here's my code (be nice as I'm just learning the graphics package):

 

ods graphics on;
ods listing style=DEFAULT image_dpi=300 gpath="FILE_LOCATION"; 
ods graphics / imagename="IMAGE_NAME";

PROC SGPLOT DATA=DATA_SET UNIFORM=SCALE;
BY VAR1 VAR2;
TITLE H=9pt 'TITLE: VAR1=#byval(VAR1) VAR2=#byval(VAR2)';

SCATTER X=X Y=Y / GROUP=ID MARKERATTRS=(SIZE=5) ;

XAXIS DISPLAY=(NOLABEL) TYPE=TIME INTERVAL=MONTH MINOR VALUEATTRS=(size=7);
YAXIS LABEL='LABEL' TYPE=LINEAR VALUES=(0 to 10 by 1) LABELATTRS=(size=8) VALUEATTRS=(size=7) valueshint;

KEYLEGEND / BORDER POSITION=RIGHT LOCATION=OUTSIDE ACROSS=1 TITLE='ID' SORTORDER=ASCENDING titleattrs=(size=7) valueattrs=(size=6);

RUN; ods graphics off;

 


Accepted Solutions
Solution
‎04-10-2018 08:14 AM
Super User
Super User
Posts: 9,200

Re: SGPLOT: How do I remove the auto title from by line statement

I would guess that:

options nobyline;

Should suppress that, but I have nothing to test it on.

 

Nothing wrong with your code, other than using all uppercase and not indenting sections.

View solution in original post


All Replies
Solution
‎04-10-2018 08:14 AM
Super User
Super User
Posts: 9,200

Re: SGPLOT: How do I remove the auto title from by line statement

I would guess that:

options nobyline;

Should suppress that, but I have nothing to test it on.

 

Nothing wrong with your code, other than using all uppercase and not indenting sections.

New Contributor
Posts: 2

Re: SGPLOT: How do I remove the auto title from by line statement

Thanks, RW9 --

 

I saw the "nobyline" syntax when Google searching for the answer but was trying to embed it in the ods line codes.

 

Thanks again,

KDS5

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 113 views
  • 0 likes
  • 2 in conversation