In the attached figure, I would like to have the font size and style of x-axis labels to be the same with others (like y-axis, etc)
(Circled in the attached) I use "family="courier new" size=9 for all. But it seems not working on the mentioned.
The program code is:
options papersize=LETTER orientation = landscape nonumber nodate topmargin = 0.5 in bottommargin = 0.5 in
rightmargin = 0.5 in leftmargin=0.5 in ;
ods graphics on/border=on width=9.4in height=5.8in ;
ods listing gpath="&path./dev/programs/figures/output";
ods rtf file ="&path./dev/programs/figures/output/&pgmnum.(&pgmname.).rtf" startpage = yes nogtitle nogfootnote ;
proc sgplot data=all pad=(bottom=25% left=20%) uniform=all ;
where trtp~='';
*format typen type. trtan trt.;
vbar PARAM / response=percent group=trtpn groupdisplay=cluster name='a'
datalabel datalabelattrs=(family="courier new" size=9) dataskin=matte ;
keylegend 'a' / location=outside position=bottom valueattrs=(family="courier new" size=9);
xaxis display=(noticks) label='Treatment' LABELATTRS=(family="courier new" size=9);
yaxis display=all LABELATTRS=(family="courier new" size=9) offsetmin=0.02 offsetmax=0.1 thresholdmin=1 thresholdmax=1
label="Response Rate (%)" values=(0 to 42 by 5) ;
format trtpn trt.;
run;
ods graphics on/reset=all;
ods rtf close;
Thanks,
Daniel
It works fine for me.
options papersize=LETTER orientation = landscape nonumber nodate topmargin = 0.5 in bottommargin = 0.5 in
rightmargin = 0.5 in leftmargin=0.5 in ;
ods graphics on/border=on width=9.4in height=5.8in ;
ods listing gpath="&wdir";
ods rtf file ="&wdir/d.rtf" startpage = yes nogtitle nogfootnote ;
proc sgplot data=SASHELP.CLASS pad=(bottom=25% left=20%) uniform=all ;
vbar AGE / response=WEIGHT group=SEX name='a'
datalabel datalabelattrs=(family="courier new" size=9) dataskin=matte ;
keylegend 'a' / location=outside position=bottom valueattrs=(family="courier new" size=9);
xaxis display=(noticks) label='aa' labelattrs=(family="courier new" size=9);
yaxis display=all labelattrs=(family="courier new" size=9) offsetmin=0.02 offsetmax=0.1 thresholdmin=1 thresholdmax=1
label="bb" values=(0 to 42 by 5) ;
run;
ods rtf close;
ods graphics on/reset=all;
Please supply code we can run so we can replicate. And supply formatted code.
I did not see your graph as you provided it in a WORD file.
I have found out the solution:
valueattrs will control the value text...
xaxis display=(noticks) label='Treatment' LABELATTRS=(family="courier new" size=9)
valueattrs=(family="courier new" size=9);
You post title says you want to format the label.
Option VALUEATTRS formats the values.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: