BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cnloach
Fluorite | Level 6

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;

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

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

View solution in original post

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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;
cnloach
Fluorite | Level 6

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?

DanH_sas
SAS Super FREQ

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

cnloach
Fluorite | Level 6

coool! this works. Thanks a lot Dan!

DanH_sas
SAS Super FREQ

Can you show us a picture?

cnloach
Fluorite | Level 6

it looks good in sas output but get cut off in rtf file.

sas-innovate-wordmark-2025-midnight.png

Register Today!

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.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 3306 views
  • 1 like
  • 3 in conversation