BookmarkSubscribeRSS Feed
PSIOT
SAS Employee

 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


AdminMoy1.png
7 REPLIES 7
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Why not just create the RTF straight off an use:

ods rtf file="..." bodytitle;

...

ods rtf close;
PSIOT
SAS Employee

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.

DanH_sas
SAS Super FREQ

In what environment are you running this code? Is it DMS (display manager), EG (Enterprise Guide), or SAS Studio?

PSIOT
SAS Employee

Ok I have just find the solution on web:

need to put 

ODS tagsets.sasreport13(ID=EGSR) gtitle;

Thank you all for support,

 

Regards,

 

 

DanH_sas
SAS Super FREQ

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

sutradhaari
Calcite | Level 5

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!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 7 replies
  • 7961 views
  • 3 likes
  • 4 in conversation