I'm trying to get the 'number at risk' (n in my code below) using xaxistable on my sgplot figure. However, I was expecting the 'n' to be aligned with the x axis timepoints (0, 6, 12, 18, 24, 30, and 36). Instead, the n is showing up at every timepoint where there is an actual change. So there are many more 'n' on the figure than needed - and not the ones I want. Does anyone know how to get the 'n' for your predefined x axis timepoints? My code is below. Figure is attached. proc sgplot data=b11 ; step x=fuptime y=s/group=trivex name='s' ; xaxistable n / x=fuptime class=trivex location=outside colorgroup=trivex separator ; styleattrs datacontrastcolors=(black gray) datalinepatterns=(solid); format trivex trivex.; yaxis values=(0.5 to 1.0 by 0.1); xaxis values=(0 to 36 by 6); yaxis label="Proportion of Patients with No Ulcer Recurrence (%)"; label fuptime=Length of Follow-Up (Months); label trivex=Phlebectomy; keylegend 's'; run;
... View more