<?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: how to convert it to a macro to generate multiple graphs in png format? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778221#M22243</link>
    <description>&lt;P&gt;Use the OUTPUTFMT= option of the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0kroq43yu0lspn16hk1u4c65lti.htm" target="_blank" rel="noopener"&gt;ODS GRAPHICS&lt;/A&gt; statement.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Nov 2021 14:52:43 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-11-03T14:52:43Z</dc:date>
    <item>
      <title>how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778215#M22242</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to convert my below code into a macro where it generates multiple png images. I have a question on how to get the png formats?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate nonumber; 
ods escapechar='^';
ods listing close;
ods graphics on;
ods output survivalplot = sj.survplot;
proc lifetest data = sj.adsl3 method = km plots=s(test) 
		timelist = 0 1 2 5 10 15 20 25 30 conftype = linear;
	time years * death(0);
	strata ses;
run;


ods tagsets.rtf file = "/home/Projects/programs/exhibit_01.rtf";
ods graphics / reset height = 6in width = 8in noborder;
title1 j=c h=12pt font = arial "Overall Survival by SES";

proc sgplot data = sj.survplot;
		step x=time y=survival /group=stratum name='s' lineattrs=(pattern=solid);
	xaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Years" values=(0 to 5 by 1);
	yaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Survival Probability" values=(0.5 to 1 by 0.1);
	scatter x=time y=censored / markerattrs=(symbol=plus) name='c';
	scatter x=time y=censored / markerattrs=(symbol=plus) group=stratum;
	keylegend 'c'/location=inside position=topright;
	keylegend 's'/location=inside position=bottomleft;
run; 

ods tagsets.rtf close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As you see it is currently generating just one rtf file now. I have to generate multiple png files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 14:33:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778215#M22242</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-03T14:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778221#M22243</link>
      <description>&lt;P&gt;Use the OUTPUTFMT= option of the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0kroq43yu0lspn16hk1u4c65lti.htm" target="_blank" rel="noopener"&gt;ODS GRAPHICS&lt;/A&gt; statement.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 14:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778221#M22243</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-03T14:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778222#M22244</link>
      <description>&lt;P&gt;RTF embeds the images; if you want separate image files, use ODS HTML or similar.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 14:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778222#M22244</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-03T14:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778225#M22245</link>
      <description>If I convert above code into a macro call, will that generate multiple png files?</description>
      <pubDate>Wed, 03 Nov 2021 14:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778225#M22245</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-03T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778229#M22246</link>
      <description>&lt;P&gt;What is the rule for "multiple graphs"? How do you identify which graph goes where?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only thing I can &lt;STRONG&gt;guess&lt;/STRONG&gt; might be desirable for individual graphs would be the Stratum variable but you are using that in a group role.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use a BY STRATUM; (assumes the data set is sorted by Stratum) you will get one graph for each level of Stratum which would create separate PNG files if the proper ODS Graphics options are set. You would likely want to remove Stratum from the group role where used.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 15:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778229#M22246</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-11-03T15:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778231#M22247</link>
      <description>I have different group data to be analyzed. I'm afraid to take it out.</description>
      <pubDate>Wed, 03 Nov 2021 15:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778231#M22247</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-03T15:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778246#M22249</link>
      <description>1. Does the code posted above do what you want? Before you automate anything it should work as you need. If not, solve that issue first.&lt;BR /&gt;2. Once you have 1, show how it would work for two or three iterations if you copied/pasted it. Then post back and we can help you convert it to a macro.</description>
      <pubDate>Wed, 03 Nov 2021 16:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778246#M22249</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-03T16:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778249#M22250</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/294544"&gt;@RAVI2000&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I have different group data to be analyzed. I'm afraid to take it out.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So it appears, without any rule of how to create multiple graphs, that creating them actually isn't needed.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 16:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778249#M22250</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-11-03T16:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778272#M22255</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out. Here are the iteration of graphs and their corresponding outputs. I have highlighted the code where ever I have changed it while producing the graphs.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nodate nonumber; 
ods escapechar='^';
ods listing close;
ods graphics on;
ods output survivalplot = &lt;/CODE&gt;&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;sj.survplot1&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;CODE class=" language-sas"&gt;;
proc lifetest data = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;EM&gt;&lt;U&gt;sj.adsl3&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt; method = km plots=s(test) 
		timelist = 0 1 2 5 10 15 20 25 30 conftype = linear;
	time years * death(0);
	strata &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;ses&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
run;

ods tagsets.rtf file = "/home/Projects/programs/&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;exhibit_01.rtf&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;";
ods graphics / reset &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;height = 6in&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt; width = 8in noborder;
title1 j=c h=12pt font = arial "&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;Overall Survival by SES&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;";

proc sgplot data = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;sj.survplot1&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
		step x=time y=survival /group=stratum name='s' lineattrs=(pattern=solid);
	xaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Years" values=(0 to 5 by 1);
	yaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Survival Probability" values=(&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;0.5 to 1 by 0.1&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;);
	scatter x=time y=censored / markerattrs=(symbol=plus) name='c';
	scatter x=time y=censored / markerattrs=(symbol=plus) group=stratum;
	keylegend 'c'/location=inside position=topright;
	keylegend 's'/&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;location=inside&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt; position=bottomleft;
run; 
ods tagsets.rtf close;
ods listing;


ods listing close;
ods graphics on;
ods output survivalplot = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;sj.survplot2&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
proc lifetest data = sj.adsl3 method = km plots=s(test) 
		timelist = 0 1 2 5 10 15 20 25 30 conftype = linear;
	time years * death(0);
	strata &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;race_ses&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
run;


ods tagsets.rtf file = "/home/Projects/programs/&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;exhibit_02.rtf&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;";
ods graphics / reset height = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;7.5&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;in width = 9in noborder;
title1 j=c h=12pt font = arial "&lt;FONT face="arial black,avant garde" size="3" color="#000000"&gt;&lt;U&gt;&lt;EM&gt;Survival by Race and SES&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;";

proc sgplot data = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;sj.survplot2&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
		step x=time y=survival /group=stratum name='s' lineattrs=(pattern=solid);
	xaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Years" values=(0 to 5 by 1);
	yaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Survival Probability" values=&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;(0.3 to 1 by 0.1)&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
	scatter x=time y=censored / markerattrs=(symbol=plus) name='c';
	scatter x=time y=censored / markerattrs=(symbol=plus) group=stratum;
	keylegend 'c'/location=inside position=topright;
	keylegend 's'/&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;location=outside&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
run; 
ods tagsets.rtf close;
ods listing;



ods listing close;
ods graphics on;
ods output survivalplot = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;sj.survplot3&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
proc lifetest data = &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;sj.adsl4&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt; method = km plots=s(test) 
		timelist = 0 1 2 5 10 15 20 25 30 conftype = linear;
	time years * death(0);
	strata &lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;race_ses_min&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;
run;

ods tagsets.rtf file = "/home/Projects/programs/&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;exhibit_03.rtf&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;";
ods graphics / reset height = 6in width = 8in noborder;
title1 j=c h=12pt font = arial "&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;U&gt;&lt;EM&gt;Survival by Minority Race and SES"&lt;/EM&gt;&lt;/U&gt;&lt;/FONT&gt;;

proc sgplot data = s&lt;FONT face="arial black,avant garde" size="3"&gt;&lt;EM&gt;&lt;U&gt;j.survplot3&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;;
		step x=time y=survival /group=stratum name='s' lineattrs=(pattern=solid);
	xaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Years" values=(0 to 5 by 1);
	yaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Survival Probability" values=(0.3 to 1 by 0.1);
	scatter x=time y=censored / markerattrs=(symbol=plus) name='c';
	scatter x=time y=censored / markerattrs=(symbol=plus) group=stratum;
	keylegend 'c'/location=inside position=topright;
	keylegend 's'/location=inside position=bottomleft;
run; 
ods tagsets.rtf close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also some of the other output formats are png images.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="S_RAVI_0-1635959461665.png" style="width: 529px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65363i7764F1217858D2C4/image-dimensions/529x395?v=v2" width="529" height="395" role="button" title="S_RAVI_0-1635959461665.png" alt="S_RAVI_0-1635959461665.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="S_RAVI_1-1635959486601.png" style="width: 533px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65364i75FD4C6E05ACBCD1/image-dimensions/533x428?v=v2" width="533" height="428" role="button" title="S_RAVI_1-1635959486601.png" alt="S_RAVI_1-1635959486601.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="S_RAVI_2-1635959550395.png" style="width: 535px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65365iFCB57A3031C5BDB0/image-dimensions/535x381?v=v2" width="535" height="381" role="button" title="S_RAVI_2-1635959550395.png" alt="S_RAVI_2-1635959550395.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778272#M22255</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-03T17:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778274#M22256</link>
      <description>Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I have posted my codes for different graphs and their output. I still do have more graphs with different strata variables.</description>
      <pubDate>Wed, 03 Nov 2021 17:14:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778274#M22256</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-03T17:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778276#M22257</link>
      <description>&lt;P&gt;I have highlighted other elements that are changing across the code. Not sure why they are not appearing here. Some of them include in and out datasets like survplot1,2,3, height, title, strata variables, keylegend location, values for Y-AXIS etc.,&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 17:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778276#M22257</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-03T17:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778402#M22275</link>
      <description>Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Can you help by taking a look into those codes and output and how can I convert them into macros?</description>
      <pubDate>Thu, 04 Nov 2021 01:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778402#M22275</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-04T01:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778498#M22281</link>
      <description>Nothing is highlighted for me.</description>
      <pubDate>Thu, 04 Nov 2021 15:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778498#M22281</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-04T15:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778500#M22282</link>
      <description>&lt;P&gt;Tutorial on converting a working program to a macro&lt;BR /&gt;&lt;BR /&gt;This method is pretty robust and helps prevent errors and makes it much easier to debug your code. Obviously biased, because I wrote it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%macro create_graphs(input_data = ,
                                      output_data= ,
                                      output_file=,
                                       variable = );
options nodate nonumber; 
ods escapechar='^';
ods listing close;
ods graphics on;
ods output survivalplot = sj.&amp;amp;outputfile;
proc lifetest data = sj.&amp;amp;input_data method = km plots=s(test) 
		timelist = 0 1 2 5 10 15 20 25 30 conftype = linear;
	time years * death(0);
	strata ses &amp;amp;variable;
run;

ods tagsets.rtf file = "/home/Projects/programs/&amp;amp;output_file..rtf";
ods graphics / reset height = 6in width = 8in noborder;
title1 j=c h=12pt font = arial "Overall Survival by SES";

proc sgplot data = sj.&amp;amp;output_data.;
		step x=time y=survival /group=stratum name='s' lineattrs=(pattern=solid);
	xaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Years" values=(0 to 5 by 1);
	yaxis valueattrs=(size=11.2pt) labelattrs=(size=12.5pt) label="Survival Probability" values=(0.5 to 1 by 0.1);
	scatter x=time y=censored / markerattrs=(symbol=plus) name='c';
	scatter x=time y=censored / markerattrs=(symbol=plus) group=stratum;
	keylegend 'c'/location=inside position=topright;
	keylegend 's'/location=inside position=bottomleft;
run; 
ods tagsets.rtf close;
ods listing;

%mend;

%create_graphs(input_data = adsl3 , output_data= survplot1, output_file=exhibit_01, variable=ses);&lt;BR /&gt;%create_graphs(input_data = adsl4 , output_data= survplot2, output_file=exhibit_02, variable=race_ses);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Probably not everything but enough to get started and give you the idea. Please follow the tutorial linked above to see explanations and details.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may not work because I have no data to test it on, if it doesn't and you cannot debug it yourself please post your code, log with macro debugging options on (MPRINT, SYMBOLGEN) and explain what is wrong.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 15:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778500#M22282</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-04T15:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778528#M22283</link>
      <description>This was a very helpful tutorial who are struggling with macros. I have learnt some new things from you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;. Thank you so much!</description>
      <pubDate>Thu, 04 Nov 2021 16:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778528#M22283</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-11-04T16:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to convert it to a macro to generate multiple graphs in png format?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778531#M22284</link>
      <description>You should also check out this macro. It's old so haven't tested it lately but there's example testing code at the bottom. &lt;BR /&gt;&lt;A href="https://gist.github.com/statgeek/d3bce2a9e2ef0523db9d" target="_blank"&gt;https://gist.github.com/statgeek/d3bce2a9e2ef0523db9d&lt;/A&gt;</description>
      <pubDate>Thu, 04 Nov 2021 16:41:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/how-to-convert-it-to-a-macro-to-generate-multiple-graphs-in-png/m-p/778531#M22284</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-04T16:41:44Z</dc:date>
    </item>
  </channel>
</rss>

