any clues why the title has been cut off by the code below?
title "Time to First Event";
ods graphics on/noborder;
ods rtf file = "C:\Users\q\Desktop\figure 1.rtf";
proc sgpanel data=adtte7 noautolegend;
panelby trt01p / spacing=15 novarname;
colaxis label ="Days";
rowaxis label ="Subject ID" display=(NOTICKS);
series x=aval0 y=subjid_r/group=subjid_r
lineattrs=(color=black pattern=solid thickness = 2)
;
scatter x=ttcvd y=subjid_r/name = 'a'
markerattrs=(color=red symbol=circlefilled size=15)
;
scatter x=ttmi y=subjid_r/name = 'b'
markerattrs=(color=yellow symbol=diamondfilled size=15)
;
scatter x=ttreva y=subjid_r/name = 'c'
markerattrs=(color=purple symbol=trianglefilled size=15)
;
scatter x=tthua y=subjid_r/name = 'd'
markerattrs=(color=green symbol=squarefilled size=15)
;
scatter x=ttstr y=subjid_r/name = 'e'
markerattrs=(color=blue symbol=starfilled size=15)
;
keylegend 'a' 'b' 'c' 'd' 'e';
run;
I have a hunch. Try your original code with the embedded title, but add this line before the PROC SGPANEL:
ods graphics / imagefmt=png;
Let me know if that works for you.
Thanks!
Dan
Probably because the title is being placed in the body of the graph, and the space allocated is not wide enough. Avoid putting titles in the body of the graph, and use the titles area with:
ods rtf file = "C:\Users\q\Desktop\figure 1.rtf" nogtitle nogfootnote;
Thanks RW9! This works but if I do want to put the title in the body of the graph, how may I allocate the space? Appending some space seems a temp solution but is there a wise way?
I have a hunch. Try your original code with the embedded title, but add this line before the PROC SGPANEL:
ods graphics / imagefmt=png;
Let me know if that works for you.
Thanks!
Dan
coool! this works. Thanks a lot Dan!
Can you show us a picture?
it looks good in sas output but get cut off in rtf file.
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.
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.