<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ODS Layout Grid Output in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963412#M25405</link>
    <description>&lt;P&gt;You could embedded a picture(report) in a graph.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2023/09/18/embed-graph-sgplot.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2023/09/18/embed-graph-sgplot.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example.&lt;/P&gt;
&lt;P&gt;But you need to adjust it according to your requirement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path= c:\temp ;

title;
ods graphics / reset=all;
options nodate nonumber;
options papersize=(1in 1in);
ods printer file="&amp;amp;path.\report.png" printer=png dpi=300; 
proc report data=sashelp.class(obs=6) nowd style={outputwidth=100% cellpadding=0 cellspacing=0 } ;
column name sex age;
run;
ods printer close;



%SGANNO;   
data anno;
%SGIMAGE(image="&amp;amp;path\report.png",   
         drawspace="wallpercent", x1=50, y1=98,
         anchor="topleft",
         border="true"         
         );
run;


ods listing gpath="&amp;amp;path." style=htmlblue image_dpi=300;
ods graphics / reset=all outputfmt=emf imagename="xxxxxxx" IMAGEFMT=EMFDual  height=800px width=1200px border=on;
title "Picture-In-a-Picture Image";
proc sgplot data=Sashelp.Heart sganno=anno;
  density Cholesterol / type=kernel group=Sex;
  yaxis grid;
  xaxis offsetmax=0.5;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1743772326471.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105897i74C0E3AB07AFD855/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1743772326471.png" alt="Ksharp_0-1743772326471.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Apr 2025 13:12:18 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-04-04T13:12:18Z</dc:date>
    <item>
      <title>ODS Layout Grid Output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963334#M25404</link>
      <description>&lt;P&gt;I am trying to export an ods layout that contains a graph (the proc sgplot) with a table below it (the proc report).&amp;nbsp; I would like to export the image as an EMF.&amp;nbsp; This code will print the desired output in my results viewer, but the export file only contains the graph, not the table.&amp;nbsp; Is there a way to export both, as a group, and as an EMF?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO TEST (Y1,Y2,values,TITLE1);

ods _all_ close;
options nodate nonumber;
options papersize=(7.35in 5.40in);
title &amp;amp;title1;
ods printer printer=emfdual; file="test.emf" style=normalprinter;
ods layout gridded rows=2 advance=proc;
ods graphics / reset=all outputfmt=emf imagename="&amp;amp;y2" IMAGEFMT=EMFDual  height=2.72in width=5.35in border=on; 

proc sgplot data= Final noborder;
styleattrs datacontrastcolors=(cx3d5b58 cxabb091 cx002e6d cxffd100 cx7cbdeb cx00a5cf cx679436 cxd68d45);
series y=&amp;amp;y1 x=date2 / group=Type /*datalabel=&amp;amp;y1 DATALABELATTRS=(family='Roboto' SIZE=8pt weight=bold color=black)*/
MARKERS MARKERATTRS=(SYMBOL=CircleFilled  size=6) LINEATTRS = ( pattern=solid THICKNESS=2);
keylegend / noborder;
yaxis grid VALUES = (&amp;amp;values) display=(noline noticks) valueATTRS=(family='Roboto' size=8pt)
label=" " LABELATTRS=(family='Roboto' size=8pt);
XAXIS   TYPE = discrete  display=( noline noticks)label=" " 
LABELATTRS=(family='Roboto' size=8pt) valueATTRS=(family='Roboto' size=8pt) ;
title1  &amp;amp;title1;
run;

ods region;
ods layout gridded rows=2 advance=proc;
ods graphics / reset=all outputfmt=emf imagename="&amp;amp;y2" IMAGEFMT=EMFDual  height=3.72in width=5.35in border=on; 

proc report data=Final nowd;
columns  Type &amp;amp;y1, date2;
define Type / group style=[cellwidth=3cm just=c];
define date2 / across '' order=data style=[cellwidth=3cm just=c] ;
define &amp;amp;y1 / analysis '' style=[cellwidth=3cm just=c];
run;

ods layout end; 
ods layout end;
ods printer close;

%MEND TEST;


%TEST ( OOH_pct,OH_pct2,0 .20 .40 .60 .80 1,"Title");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Apr 2025 15:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963334#M25404</guid>
      <dc:creator>Whitlea</dc:creator>
      <dc:date>2025-04-03T15:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Layout Grid Output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963412#M25405</link>
      <description>&lt;P&gt;You could embedded a picture(report) in a graph.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2023/09/18/embed-graph-sgplot.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2023/09/18/embed-graph-sgplot.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example.&lt;/P&gt;
&lt;P&gt;But you need to adjust it according to your requirement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path= c:\temp ;

title;
ods graphics / reset=all;
options nodate nonumber;
options papersize=(1in 1in);
ods printer file="&amp;amp;path.\report.png" printer=png dpi=300; 
proc report data=sashelp.class(obs=6) nowd style={outputwidth=100% cellpadding=0 cellspacing=0 } ;
column name sex age;
run;
ods printer close;



%SGANNO;   
data anno;
%SGIMAGE(image="&amp;amp;path\report.png",   
         drawspace="wallpercent", x1=50, y1=98,
         anchor="topleft",
         border="true"         
         );
run;


ods listing gpath="&amp;amp;path." style=htmlblue image_dpi=300;
ods graphics / reset=all outputfmt=emf imagename="xxxxxxx" IMAGEFMT=EMFDual  height=800px width=1200px border=on;
title "Picture-In-a-Picture Image";
proc sgplot data=Sashelp.Heart sganno=anno;
  density Cholesterol / type=kernel group=Sex;
  yaxis grid;
  xaxis offsetmax=0.5;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1743772326471.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105897i74C0E3AB07AFD855/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1743772326471.png" alt="Ksharp_0-1743772326471.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 13:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963412#M25405</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-04T13:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Layout Grid Output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963514#M25406</link>
      <description>&lt;P&gt;I think you want this graph ?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
 set sashelp.stocks;
if year(date)=2005;
keep stock date close;
run;


ods listing gpath="c:\temp" style=htmlblue image_dpi=300;
ods graphics / reset=all outputfmt=emf imagename="xxxxxxx" IMAGEFMT=EMFDual height=3.72in width=5.35in border=on;
proc sgplot data=have noautolegend;
  series x=date y=close/group=stock markers curvelabel curvelabelpos=max;
  xaxistable close/x=date class=stock colorgroup=stock;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1743819587460.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105956iE8B0BE47DCCB1117/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1743819587460.png" alt="Ksharp_1-1743819587460.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 02:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-Layout-Grid-Output/m-p/963514#M25406</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-05T02:19:52Z</dc:date>
    </item>
  </channel>
</rss>

