@sam1231 wrote:
Hi,
In my graph i am trying to show data until 3 year but when i added extra time point data was truncated. its not showing on x axis.
proc sgplot data=kmout;
step x=time y=surv / group=grp lineattrs=(pattern=solid) name='s';
scatter x=citime y=surv / markerattrs=(symbol=plus) yerrorupper=yup yerrorlower=ylow name='c' group=grp;
yaxis values=(0 to 40 by 5) label="&ydesc" ;
xaxis values=(0,30,183,365,730,1095) Label='Days Post-Procedure';
xaxistable atrisk / x=citime class=grp
location=outside colorgroup=grp
title='Number of subjects at risk' separator;
run;
If a value you want to graph involves dates then it is almost certain you will be better off creating actual SAS date values as there are a large number of tools that will work with them. For instance some years have more than 365 days and then your cutting data at 1095 days duration might be removing some.
Since other values on your x-axis such as 30 and 365 are also not appearing I am not sure that the graph you have in your attachment was built with the code that you show. It does not help diagnosis of code issues to cut up the results. If your data is so sensitive that you cannot show the entire graph, then create dummy data that shows the same issue, post the data as well as the code.
It might be a good idea to post the LOG of the code that creates the output in the attachment.