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
Diamond | Level 26
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3673 views
  • 0 likes
  • 3 in conversation