Data visualization with SAS programming

SGPLOT fonts

Reply
New Contributor
Posts: 2

SGPLOT fonts

HELP, when changing the font to courier new with SGPLOT it seems that the label and legend text is not as bright as the lines in the figure, any idea how I can change this without setting the font to bold?

Esteemed Advisor
Esteemed Advisor
Posts: 7,203

Re: SGPLOT fonts

In your Keylegend statement use titleattrs={}

and set the size bigger, per SAS Help:

https://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#p0xmbppzx71smb...

New Contributor
Posts: 2

Re: SGPLOT fonts

proc sgplot data=L_01 (where=(TRTA="&TRT1." and SUBJID="&SUB1."));
 XAXIS label = "Time (h)" values = (0 to 25 by 1);
 YAXIS label = "Plasma concentration (ng/mL)" values = (0 to 8000 by 400) LABELATTRS=GraphLabelText;
      *scatter x=ATPTN y=AVAL / yerrorlower=MSDN yerrorupper=MSDP markerattrs=(color=black symbol=IBEAM);
      series x=ARELTM y=AVAL / MARKERS MARKERATTRS=(COLOR=black) LINEATTRS=(COLOR=black THICKNESS=0.01mm) name="s1";

      KEYLEGEND "s1" / NOBORDER LOCATION=INSIDE POSITION=TOPRIGHT TITLE= "Planned Dose";

run;

 

this is the code I used and I tried to add the attribute option everywhere and every time sas hands me an error msg, the code above generates this error msg

 


WARNING 1-322: Assuming the symbol LABEL was misspelled as LABELATTRS.

Trusted Advisor
Posts: 1,114

Re: SGPLOT fonts

When I run your code, I don't get this warning. I suspect a version issue: The LABELATTRS= option has been available only since SAS 9.3. Are you perhaps using 9.2?

SAS Super FREQ
Posts: 1,080

Re: SGPLOT fonts

As mentioned by RW9, it should be TITLEATTRS and VALUEATTRS, and while I cannot test it, I seem to recall this was not available with SAS 9.2.

Ask a Question
Discussion stats
  • 4 replies
  • 473 views
  • 0 likes
  • 4 in conversation