Dear all,
I create some graphs in png that I put later in ods rtf. I would like to have the title inside the graph because i have sometimes 3 or 4 graphs on same page but i did not succeed til now..
Please find my code:
ODS GRAPHICS / RESET IMAGENAME = 'AdminMoy' IMAGEFMT =png
HEIGHT = 3.15 in WIDTH = 4.9 in;
ODS LISTING GPATH = '\\vcarapp010\Rapports\01-ETUDE PIVOT\Graphs' ;
proc sgplot data=alldata /*noautolegend*/;
series x=nbDay y=pmd /legendlabel='Setting of right input pressure' LINEATTRS=(color=PAB pattern=solid);
series x=nbDay y=DP /legendlabel='Setting of avg. L/R admission P. ratio' LINEATTRS=(color=red pattern=solid);
xaxis label='days' /min=0;
yaxis interval=AUTO integer label='Pressure (mmHg)' VALUES= (0 to 8 by 1) GRID;
refline 0.0083 /axis=X label="switch in auto mode" lineattrs=(color=black) LABELATTRS=(Color=red Family=Arial Size=6 Style=Italic Weight=Bold); /*met une ligne de référence verticale pour un évenement*/
keylegend/ location=outside position=bottom down=2;
title1 "Patient: PA001FRLAE - EN001FRLAE";
title2 "Time trajectories post-implant for setting of right input pressure and avg. L/R admission P. ratio";
run;
quit;
Please find enclosed image.
Thank you
Why not just create the RTF straight off an use:
ods rtf file="..." bodytitle; ... ods rtf close;
Because i manage also a content in doc file and do not support bodytitle in option of ods rtf.
declaration of ods rtf:
ods rtf file='\\vcarapp010\Rapports\01-ETUDE PIVOT\Report\Hemodynamical Report_PA001FRLAE.doc' dpi=300 contents=yes toc_data ;
ods noproctitle;
I would like to have the title in png file.
In what environment are you running this code? Is it DMS (display manager), EG (Enterprise Guide), or SAS Studio?
Entreprise guide
Ok I have just find the solution on web:
need to put
ODS tagsets.sasreport13(ID=EGSR) gtitle;
Thank you all for support,
Regards,
By default, EG sets NOGTITLE and NOGFOOTNOTE for the graph output, which might explain what you're seeing. To get titles and footnotes inside the graph in EG, do the following steps:
1. Go to Tools->Optoins
2. In the left pane, under "Results", click on the "Graph" item
3. In the right pane, clicl on the two check boxes to include titles and footnotes in the graph
4. Re-run your test
Hope this helps!
Dan
Super! I struggled a day on footnotes to present inside the plot. the result came in a min after your reference. Thanks a lot Dan!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.