I am preparing a figure and it has title. I do not want to use TITLE statement, because I do not want the text and figure merged together.
So I used ods text to output text, like below. I want "company name" is at left, "study" is at center and "Protocol" is at right. However the text can not be adjusted properly.
If I used TITLE statement, the text could be very easily adjusted.
Can someone help me out? Eigher to adjust the text with ods text, or to use title but to separate the text and figure. Thanks in advance.
ods text="^S={just=l}company name ^S={just=c}study ^S={just=r} Protocol";
title j=l "Company name" j=c "Study" j=r "Protocol";
You need NOGTITLE option.
ods tagsets.rtf file='c:\temp\temp.rtf' nogtitle style=journal ;
proc sgplot data=sashelp.class;
title j=l "Company name" j=c "Study" j=r "Protocol";
scatter y=height x=weight / group=sex;
xaxis label= "Females are second in the data set and legend.";
run;
ods tagsets.rtf close;
ODS Text is not very bright and you have to take control of a great many things. You might try setting the WIDTH of the output to 100% of the page width. Without a known width the Ods Text processor doesn't understand that you want to use the whole width of the page. I don't have access to code currently where I have done this in the past but I think I used something like Width=8in in the first of the Style options. 8in = 8 inches, and should match your margin settings. You need to make sure it affects the whole string, use (), otherwise the first value may get the entire width.
I suspect that you are currently getting the 3 items with basically just a space between them if I remember correctly from working through this a while ago.
You need NOGTITLE option.
ods tagsets.rtf file='c:\temp\temp.rtf' nogtitle style=journal ;
proc sgplot data=sashelp.class;
title j=l "Company name" j=c "Study" j=r "Protocol";
scatter y=height x=weight / group=sex;
xaxis label= "Females are second in the data set and legend.";
run;
ods tagsets.rtf close;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.