I'm currently creating a PDF report which includes figures created with SGPlot in a macro. The output of the SGPLOT on it's own if fine, but in the PDF the edge of the plot is being cut off (see examples below).
Can anybody suggest why the plots are appearing like this in the pdf?
SGPLOT output:
Same plot in PDF:
SGPLOT macro and ODS PDF code:
/* SGPlot macro */
%macro team_chart(team_short,type);
ods graphics on / height=13cm width=20cm ;
proc sgplot data=&type._medians_final_&team_short. noborder sganno=anno_&type._&team_short._final dattrmap=attrmap_&type. pad=(right=20%);
xaxis label='Average time interval (hh:mm)' valueattrs=(size=11pt family=arial) labelattrs=(size=12pt family=arial) offsetmin=0.15 values=('-24:00:00'T '-12:00:00'T '00:00:00'T '12:00:00'T '24:00:00'T '36:00:00'T '48:00:00'T);
yaxis label='Financial year' valueattrs=(size=11pt family=arial) labelattrs=(size=12pt family=arial);
hbar fyr / response=median group=t_label grouporder=data nooutline attrid=A barwidth=0.7;
keylegend / title='Median time from:' titleattrs=(size=11pt family=arial weight=bold) valueattrs=(size=10pt family=arial) noborder location=outside;
run;
%mend team_chart;
/* macro used in ODS PDF */
%macro char_teams (type,team_long,team_short,num);
ods pdf startpage = now; options orientation=landscape;
footnote h=10pt f=Arial j=c "~{thispage}";
ods pdf text="~S={cellwidth=27.70cm font_face='Arial' font_size=16pt just=c font_weight=bold foreground=&nhs_blue.}&team_long.";
ods pdf text=" ";
ods pdf text=" ";
ods pdf text="~S={cellwidth=27.70cm font_face='Arial' font_size=12pt just=l font_weight=bold foreground=black}Figure &num. - Median times of &type. organ donation process, &team_long., &st_date. - &end_date.";
ods pdf text=" ";
%team_chart(&team_short.,&type.);
%mend char_teams;
... View more