<?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 change the scale of x axis of survival curve in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928438#M365285</link>
    <description>&lt;P&gt;I ran the following code and got the curve below.&lt;/P&gt;
&lt;P&gt;proc lifetest data=sasuser.combine_aim2n2 plots=survival(f) timelist=(0 to 132 by 12);&lt;BR /&gt;time month2*ui2(0);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-15 021346.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96540i678FB1BCA239CA73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-05-15 021346.png" alt="Screenshot 2024-05-15 021346.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2024 06:17:05 GMT</pubDate>
    <dc:creator>tan-wongv</dc:creator>
    <dc:date>2024-05-15T06:17:05Z</dc:date>
    <item>
      <title>change the scale of x axis of survival curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928438#M365285</link>
      <description>&lt;P&gt;I ran the following code and got the curve below.&lt;/P&gt;
&lt;P&gt;proc lifetest data=sasuser.combine_aim2n2 plots=survival(f) timelist=(0 to 132 by 12);&lt;BR /&gt;time month2*ui2(0);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-15 021346.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96540i678FB1BCA239CA73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-05-15 021346.png" alt="Screenshot 2024-05-15 021346.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 06:17:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928438#M365285</guid>
      <dc:creator>tan-wongv</dc:creator>
      <dc:date>2024-05-15T06:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: change the scale of x axis of survival curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928459#M365292</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/464169"&gt;@tan-wongv&lt;/a&gt;,&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/464169"&gt;@tan-wongv&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Would there be a way to change the scale of x axis from 0 25 50 75 100 125 to 0 12 24 36 48 60 72 84 96 108 120 132?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, I see &lt;EM&gt;three&amp;nbsp;&lt;/EM&gt;ways to do this, the simplest of which is a combination of three &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_lifetest_syntax01.htm#statug.lifetest.lftodsplotsurvival" target="_blank" rel="noopener"&gt;survival (plot) options&lt;/A&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Specify those tick marks in the ATRISK option.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Add the ATRISKTICKONLY option.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Make the "At Risk" display invisible by using a tiny proportion in the OUTSIDE option.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;proc lifetest data=sasuser.combine_aim2n2 plots=survival(f &lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;atrisk(outside(1e-6))=0 to 132 by 12 atrisktickonly&lt;/STRONG&gt;&lt;/FONT&gt;);
time month2*ui2(0);
run;&lt;/PRE&gt;
&lt;P&gt;It is possible, though, that the last tick mark (132) is not displayed if the greatest failure time is less than 132.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other two ways are more cumbersome:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Write the data needed for the plot to a dataset (by using the OUTSURV= option of the PROC LIFETEST statement and a subsequent DATA step) and then use PROC SGPLOT to create the plot where you have the XAXIS statement and its various options available.&lt;/LI&gt;
&lt;LI&gt;Modify a copy of the ODS template underlying the plot, which is&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Stat.Lifetest.Graphics.ProductLimitFailure&lt;/FONT&gt;. Change the first occurrence of&lt;BR /&gt;
&lt;PRE&gt;linearopts=(viewmax=MAXTIME tickvaluelist=XTICKVALS ...&lt;/PRE&gt;
in the PROC TEMPLATE code to&lt;BR /&gt;
&lt;PRE&gt;linearopts=(viewmax=132 tickvaluelist=(0 12 24 36 48 60 72 84 96 108 120 132) ...&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 15 May 2024 10:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928459#M365292</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2024-05-15T10:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: change the scale of x axis of survival curve</title>
      <link>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928564#M365346</link>
      <description>&lt;P&gt;Thank you very much for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 21:52:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/change-the-scale-of-x-axis-of-survival-curve/m-p/928564#M365346</guid>
      <dc:creator>tan-wongv</dc:creator>
      <dc:date>2024-05-15T21:52:00Z</dc:date>
    </item>
  </channel>
</rss>

