<?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 Y-axis range in CIF plot (PROC PHREG) in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Change-Y-axis-range-in-CIF-plot-PROC-PHREG/m-p/867081#M23621</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to expand the Y-axis (probability) of CIF plot that is created by PROC PHREG.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found that TIMERANGE and RANGE only change the X-axis range (I was able to customize the X-axis range).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any option to change the Y-axis to be between 0 - 1?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my first line code;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;phreg&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt; = XYZ plots (range = (&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&lt;/SPAN&gt;))= cif;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;W&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 17:40:33 GMT</pubDate>
    <dc:creator>lansoprazole</dc:creator>
    <dc:date>2023-03-29T17:40:33Z</dc:date>
    <item>
      <title>Change Y-axis range in CIF plot (PROC PHREG)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Y-axis-range-in-CIF-plot-PROC-PHREG/m-p/867081#M23621</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to expand the Y-axis (probability) of CIF plot that is created by PROC PHREG.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found that TIMERANGE and RANGE only change the X-axis range (I was able to customize the X-axis range).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any option to change the Y-axis to be between 0 - 1?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my first line code;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;&lt;STRONG&gt;phreg&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt; = XYZ plots (range = (&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;SPAN&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&lt;/SPAN&gt;))= cif;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;W&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 17:40:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Y-axis-range-in-CIF-plot-PROC-PHREG/m-p/867081#M23621</guid>
      <dc:creator>lansoprazole</dc:creator>
      <dc:date>2023-03-29T17:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change Y-axis range in CIF plot (PROC PHREG)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Change-Y-axis-range-in-CIF-plot-PROC-PHREG/m-p/872601#M23729</link>
      <description>&lt;P&gt;If you still need it... you can &lt;A href="http://ODS%20Graphics Template Modification" target="_self"&gt;modify the plot template&lt;/A&gt; to customize the y-axis range in a CIF plot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a default plot:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods select CIFPlot;&lt;BR /&gt;proc phreg data=Bmt plots(overlay)=cif;&lt;BR /&gt;&amp;nbsp; class Disease;&lt;BR /&gt;&amp;nbsp; model T*Status(0)=Disease / eventcode(cox)=1;&lt;BR /&gt;&amp;nbsp; baseline covariates=Risk;&lt;BR /&gt;run;&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="Zard_0-1682609968951.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83338iF370EE7E3EBD18E8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Zard_0-1682609968951.png" alt="Zard_0-1682609968951.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add the following LinearOpts= in the YaxisOpts option to specify your own y-axis range:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template; &lt;BR /&gt;&amp;nbsp; define statgraph Stat.PHReg.Graphics.Cif; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; dynamic title1 title2 title3 title4 xviewMin xviewMax group groupIndex &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; groupName plotCL transparency _byline_ _bytitle_ _byfootnote_; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; BeginGraph; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; entrytitle TITLE1 TITLE3; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; entrytitle TITLE2 TITLE4 / textattrs=GRAPHVALUETEXT; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; layout overlay / xaxisopts=(linearopts=(viewmin=XVIEWMIN viewmax= &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;XVIEWMAX)) yaxisopts=(label="Probability" &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;linearopts=(viewmin=0 viewmax=1 tickvaluelist=(0 .2 .4 .6 .8 1.0)));&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (PLOTCL) &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bandplot LimitLower=LOWERCIF LimitUpper=UPPERCIF x=TIME / group&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =GROUP index=GROUPINDEX modelname="CIF" datatransparency= &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transparency; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;endif; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; stepplot y=CIF x=TIME / group=GROUP index=GROUPINDEX name="CIF"; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (EXISTS(GROUP)) &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; discretelegend "CIF" / location=outside title=GROUPNAME; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; endif; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; endlayout; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (_BYTITLE_) &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; else &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (_BYFOOTNOTE_) &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entryfootnote halign=left _BYLINE_; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;endif; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; endif; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; EndGraph; &lt;BR /&gt;&amp;nbsp; end; &lt;BR /&gt;run;&lt;BR /&gt;ods select CIFPlot;&lt;BR /&gt;proc phreg data=Bmt plots(overlay range=0,500)=cif;&lt;BR /&gt;&amp;nbsp; class Disease;&lt;BR /&gt;&amp;nbsp; model T*Status(0)=Disease / eventcode(cox)=1;&lt;BR /&gt;&amp;nbsp; baseline covariates=Risk;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zard_1-1682610096482.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83339i2EC734EE8BBE08D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Zard_1-1682610096482.png" alt="Zard_1-1682610096482.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Delete the modified template to revert back to the default plot:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc template; &lt;BR /&gt;&amp;nbsp; delete Stat.PHReg.Graphics.Cif; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 16:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Change-Y-axis-range-in-CIF-plot-PROC-PHREG/m-p/872601#M23729</guid>
      <dc:creator>Zard</dc:creator>
      <dc:date>2023-04-27T16:09:15Z</dc:date>
    </item>
  </channel>
</rss>

