BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
Does anyone know how to increase the font size for datalabel?
proc sgplot data=yrp;
vbar yoi / response=yr_tot;
vline yoi / response=avg y2axis datalabel=avg;
y2axis min=0 max=10000;
run;
Thank you.
6 REPLIES 6
DanH_sas
SAS Super FREQ
Hey,

For now, you must adjust the size through the ODS style. Here is a simple example:
[pre]
proc template;
define style biglabel;
parent=styles.listing; /* or your favorite style */
style GraphDataText from GraphDataText /
fontsize=10pt;
end;
run;

ods listing style=biglabel;
proc sgplot data=sashelp.class;
scatter x=weight y=height / datalabel;
run;
[/pre]

Hope this helps,
Dan
gzr2mz39
Quartz | Level 8
A png file was created that looked correct.
However the graph in my rtf file (I'm using ods rtf) did not reflect the change.
Thank you.
Cynthia_sas
SAS Super FREQ
Hi:
You might be looking at the old file, especially if Word was still open when you reran your code. Are you seeing any messages in the log, such as:
[pre]
ERROR: File is in use, C:\temp\report.rtf.
[/pre]

cynthia
DanH_sas
SAS Super FREQ
Also make sure you specified the style on the ODS RTF statement.
gzr2mz39
Quartz | Level 8
You are correct. I didn't add the style to ods rtf statement. Thank you.
DanH_sas
SAS Super FREQ
One other note: the default style for ODS RTF is the RTF style. You may want to change the PARENT in the BIGLABEL style to be styles.rtf to get your previous output appearance.

Thanks!
Dan

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 3228 views
  • 0 likes
  • 3 in conversation