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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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