<?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: Changing Line colors in KM plot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506264#M135690</link>
    <description>Also, I tried to run your code as is and there were some weird issues, not sure if that was introduced from copy/pasting from here or from documentation. Either way, the code works when I typed it out manually step by step again.</description>
    <pubDate>Sat, 20 Oct 2018 20:56:52 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-20T20:56:52Z</dc:date>
    <item>
      <title>Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506191#M135652</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way I can specify particular colors in KM plot using proc lifetest?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%ProvideSurvivalMacros %let GraphOpts = DataContrastColors=(green red blue) DataColors=(green red blue); %CompileSurvivalTemplates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from the link&amp;nbsp;&lt;A href="https://support.sas.com/documentation/onlinedoc/stat/131/kaplan.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/stat/131/kaplan.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it doesn't seem to work.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 23:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506191#M135652</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-10-19T23:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506192#M135653</link>
      <description>Hi:&lt;BR /&gt;  Did you follow the instructions on page 799 to download and store the macro code in a temporary file? If you followed the instructions and it's not working for you, then you'll want to open a track with Tech Support on this.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 20 Oct 2018 00:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506192#M135653</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-10-20T00:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506193#M135654</link>
      <description>&lt;P&gt;The surv macro should work. Please post your full code and and the log. If you cannot use your real data please feel free to use a dataset from the documentation or sashelp.heart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9263"&gt;@sfo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way I can specify particular colors in KM plot using proc lifetest?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%ProvideSurvivalMacros %let GraphOpts = DataContrastColors=(green red blue) DataColors=(green red blue); %CompileSurvivalTemplates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from the link&amp;nbsp;&lt;A href="https://support.sas.com/documentation/onlinedoc/stat/131/kaplan.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/stat/131/kaplan.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it doesn't seem to work.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Oct 2018 00:14:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506193#M135654</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-20T00:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506210#M135661</link>
      <description>&lt;P&gt;Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the log:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Template 'Stat.Lifetest.Graphics.ProductLimitSurvival' was unable&lt;BR /&gt; to write to template store!&lt;BR /&gt;ERROR: Template 'Stat.Lifetest.Graphics.ProductLimitSurvival2' was unable&lt;BR /&gt; to write to template store!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and this is how I am doing in&amp;nbsp; my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods pdf file="&amp;amp;dir\OAK_KM_&amp;amp;fn._Plot_%sysfunc(date(),yymmdd10.).pdf" style=HMTLBlue;&lt;BR /&gt;ods listing close;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;goptions xmax=5 ymax=4 xpixels=1500 ypixels=1200;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%ProvideSurvivalMacros&lt;BR /&gt;%let GraphOpts = DataContrastColors=(green red blue)&lt;BR /&gt;DataColors=(green red blue black);&lt;BR /&gt;%CompileSurvivalTemplates&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ODS EXCLUDE ProductLimitEstimates;&lt;BR /&gt;&lt;BR /&gt;proc lifetest data=OS_Titer_KM plots=survival(atrisk);&lt;BR /&gt;time TIME*censor(1);&lt;BR /&gt;strata&amp;nbsp;A;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Oct 2018 07:39:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506210#M135661</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-10-20T07:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506262#M135689</link>
      <description>&lt;P&gt;Try deleting the templates and try again?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival  /
          store=sasuser.templat;
   delete Stat.Lifetest.Graphics.ProductLimitSurvival2 /
          store=sasuser.templat;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 20 Oct 2018 20:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506262#M135689</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-20T20:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506264#M135690</link>
      <description>Also, I tried to run your code as is and there were some weird issues, not sure if that was introduced from copy/pasting from here or from documentation. Either way, the code works when I typed it out manually step by step again.</description>
      <pubDate>Sat, 20 Oct 2018 20:56:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506264#M135690</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-20T20:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506335#M135722</link>
      <description>&lt;P&gt;I tried again and getting the attached error log and below is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template;&lt;BR /&gt; delete Stat.Lifetest.Graphics.ProductLimitSurvival /&lt;BR /&gt; store=sasuser.templat;&lt;BR /&gt; delete Stat.Lifetest.Graphics.ProductLimitSurvival2 /&lt;BR /&gt; store=sasuser.templat;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;%let url = //support.sas.com/documentation/onlinedoc/stat/ex_code/131;&lt;BR /&gt;infile "http:&amp;amp;url/templft.html" device=url;&lt;BR /&gt;file 'macros.tmp';&lt;BR /&gt;retain pre 0;&lt;BR /&gt;input;&lt;BR /&gt;if index(_infile_, '&amp;lt;/pre&amp;gt;') then pre = 0;&lt;BR /&gt;if pre then put _infile_;&lt;BR /&gt;if index(_infile_, '&amp;lt;pre&amp;gt;') then pre = 1;&lt;BR /&gt;run;&lt;BR /&gt;%inc 'macros.tmp' / nosource;&lt;/P&gt;
&lt;P&gt;%ProvideSurvivalMacros&lt;BR /&gt;%let GraphOpts = DataContrastColors=(green red blue black)&lt;BR /&gt;DataColors=(green red blue black);&lt;BR /&gt;%CompileSurvivalTemplates&lt;BR /&gt;ods graphics on;&lt;/P&gt;
&lt;P&gt;proc lifetest data=data&lt;BR /&gt;plots=survival(cb=hw test atrisk(outside maxlen=13));&lt;BR /&gt;time TIME*censor(1);&lt;BR /&gt;strata T_Titer;&lt;BR /&gt;by ACTARM1;run;&lt;/P&gt;
&lt;P&gt;ods graphics off;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Oct 2018 21:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506335#M135722</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-10-21T21:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506466#M135787</link>
      <description>I think you need to contact tech support now. That shouldn't happen. If you're working with SAS UE that may be part of it, because the SASuser library isn't writeable in that edition.</description>
      <pubDate>Mon, 22 Oct 2018 14:51:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506466#M135787</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-22T14:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Line colors in KM plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506534#M135805</link>
      <description>&lt;P&gt;Thanks I have contacted tech support.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 17:12:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-Line-colors-in-KM-plot/m-p/506534#M135805</guid>
      <dc:creator>sfo</dc:creator>
      <dc:date>2018-10-22T17:12:22Z</dc:date>
    </item>
  </channel>
</rss>

