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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 2703 views
  • 0 likes
  • 3 in conversation