<?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 add a heading in the legend using Proc tempalte? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343570#M63404</link>
    <description>&lt;P&gt;Please try the title option in discretelegend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph survival;
begingraph;

layout lattice / rows=2 rowweights=(0.85 0.15) rowgutter=10 columndatarange=union;

layout overlay / xaxisopts=(label="Years"  linearopts=(viewmax=5.5 viewmin=0 tickvaluelist=(0 1 2 3 4 5)))

yaxisopts=(label="Actuarial Survival (%)"  linearopts=(viewmin=0 viewmax=100 tickvaluelist=(10 20 30 40 50 60 70 80 90 100)));

stepplot x=time y=survival / group=stratum name='a';

discretelegend 'a' / title='legend' location=inside halign=right valign=top down=2 across=1 border=true;

layout gridded / columns=1 border=false autoalign=(bottom);

entry halign=left "P&amp;lt;.001";

endlayout;
endlayout;
endlayout;
endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
    <pubDate>Thu, 23 Mar 2017 02:11:09 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2017-03-23T02:11:09Z</dc:date>
    <item>
      <title>How to add a heading in the legend using Proc tempalte?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343565#M63403</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a small heading into the legend ("Health care associated"), between community and non-nosocomial in the figure attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to do it using proc template? This is the codes I used to create this figure.&lt;/P&gt;&lt;P&gt;I would truly appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;template&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;define&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;statgraph&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; survival;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;begingraph&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;layout&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; lattice / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rows&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rowweights&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.85&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rowgutter&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;columndatarange&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=union;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;layout&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;overlay&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xaxisopts&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Years"&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="Courier New" size="2"&gt; linearopts=(viewmax=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;5.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; viewmin=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; tickvaluelist=(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;yaxisopts&lt;/FONT&gt;=(label=&lt;FONT color="#800080"&gt;"Actuarial Survival (%)"&lt;/FONT&gt;&lt;FONT color="#008000"&gt;&amp;nbsp; &lt;/FONT&gt;linearopts=(viewmin=&lt;STRONG&gt;&lt;FONT color="#008080"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; viewmax=&lt;STRONG&gt;&lt;FONT color="#008080"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt; tickvaluelist=(&lt;STRONG&gt;&lt;FONT color="#008080"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;20&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;30&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;40&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;50&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;60&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;70&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;80&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;90&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;stepplot&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;x&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=time &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;y&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=survival / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=stratum &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;name&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'a'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;discretelegend&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;'a'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;location&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=inside &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;halign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=right &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;valign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=top &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;down&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;across&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;border&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=true;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;layout&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;gridded&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;columns&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;border&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=false &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;autoalign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(bottom);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;entry&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;halign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=left &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"P&amp;lt;.001"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endlayout&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endlayout&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endlayout&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endgraph&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13591iDFC47F0769C0BBC0/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="survival test.jpg" title="survival test.jpg" /&gt;</description>
      <pubDate>Thu, 23 Mar 2017 02:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343565#M63403</guid>
      <dc:creator>NT</dc:creator>
      <dc:date>2017-03-23T02:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a heading in the legend using Proc tempalte?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343570#M63404</link>
      <description>&lt;P&gt;Please try the title option in discretelegend&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
define statgraph survival;
begingraph;

layout lattice / rows=2 rowweights=(0.85 0.15) rowgutter=10 columndatarange=union;

layout overlay / xaxisopts=(label="Years"  linearopts=(viewmax=5.5 viewmin=0 tickvaluelist=(0 1 2 3 4 5)))

yaxisopts=(label="Actuarial Survival (%)"  linearopts=(viewmin=0 viewmax=100 tickvaluelist=(10 20 30 40 50 60 70 80 90 100)));

stepplot x=time y=survival / group=stratum name='a';

discretelegend 'a' / title='legend' location=inside halign=right valign=top down=2 across=1 border=true;

layout gridded / columns=1 border=false autoalign=(bottom);

entry halign=left "P&amp;lt;.001";

endlayout;
endlayout;
endlayout;
endgraph;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 02:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343570#M63404</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-03-23T02:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a heading in the legend using Proc tempalte?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343816#M63444</link>
      <description>&lt;P&gt;Dear Jag,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NT&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 18:33:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-a-heading-in-the-legend-using-Proc-tempalte/m-p/343816#M63444</guid>
      <dc:creator>NT</dc:creator>
      <dc:date>2017-03-23T18:33:51Z</dc:date>
    </item>
  </channel>
</rss>

