That's not the one you need so doesn't affect this question, but will affect future output. I would suggest seeing if a colleague/classmate has not and get it from them. They can change slightly between versions so providing mine wouldn't necessarily solve your issue.
@tbn1 wrote:
Thanks - I was playing with your old code before I knew what I was doing and I think I changed it already so I do not have the original template.
Hi Reeza,
I reset the template to default and changed ONLY the X axis ticks. I was able to change the X axis. However, I am getting these strange lines from the end of the curve (as shown below). This was happening to me before I changed the template too and I was wondering whether you have seen this before? I have pasted template below.
Proc template;
source Stat.Phreg.Graphics.CIF;
define statgraph Stat.PHReg.Graphics.Cif;
dynamic title1 title2 title3 title4 xviewMin xviewMax group groupIndex groupName plotCL
transparency _byline_ _bytitle_ _byfootnote_;
BeginGraph;
entrytitle TITLE1 TITLE3;
entrytitle TITLE2 TITLE4 / textattrs=GRAPHVALUETEXT;
layout overlay / xaxisopts=(linearopts=(viewmin=0 viewmax=5)) yaxisopts=(
label="Probability");
if (PLOTCL)
bandplot LimitLower=LOWERCIF LimitUpper=UPPERCIF x=TIME / group=GROUP index=
GROUPINDEX modelname="CIF" datatransparency=transparency;
endif;
stepplot y=CIF x=TIME / group=GROUP index=GROUPINDEX name="CIF";
if (EXISTS(GROUP))
discretelegend "CIF" / location=outside title=GROUPNAME;
endif;
endlayout;
if (_BYTITLE_)
entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;
else
if (_BYFOOTNOTE_)
entryfootnote halign=left _BYLINE_;
endif;
endif;
EndGraph;
end;
It looks like the data is connecting itself back at 0 for some reason (the last data point is connecting back to the first).
Try changing your stepplot to look like this:
stepplot y=eval(ifn(time<=5,CIF,.)) x=eval(ifn(time <=5,TIME,.)) / group=GROUP index=GROUPINDEX name="CIF";
That x axis label looks like code, or did you do that on purpose?
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.