BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ChipmunkPDX
Calcite | Level 5

I cannot figure out how to get the labels to stop auto numbering.  I am using 9.4 sgplot to make my Kaplan-Meier graphs, but it keeps auto numbering the xaxistable labels.  I would like to not have the 1: and 2: to the left of the labels (see below).  The variable is numeric, but formatted.  If I remove the format I get the original values without the numbering.  If I change it to a text variable, the auto numbering comes back, so don't think it has to do with it being formatted.

 

Code:

proc sgplot data=SurvivalPlotData noautolegend;
styleattrs datalinepatterns=(solid solid) datacolors=(blue red);
step x=time y=survival / group=stratum name='s' grouporder=ascending;
scatter x=time y=censored / markerattrs=(symbol=plus) name='c' grouporder=ascending;
scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum grouporder=ascending;
xaxistable atrisk / x=tatrisk location=inside class=stratum colorgroup=stratum ;
Yaxis label="% Survival" values=(0 to 1 By .2) ;
Xaxis LABEL="Days After Transplant" values=(0 to 730 By 365) ;
INSET "Log Rank p-value = 0.0948" / BORDER TEXTATTRS = (SIZE=8 COLOR=black)
position=bottomright;
refline 365 / axis=x lineattrs=(thickness=1 color=black pattern=dash);
run;

 

 

ChipmunkPDX_0-1667428141395.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Open your "SurvivalPlotData" dataset and see if there is "the auto numbering " in variable "stratum" ?

View solution in original post

2 REPLIES 2
Ksharp
Super User
Open your "SurvivalPlotData" dataset and see if there is "the auto numbering " in variable "stratum" ?
ChipmunkPDX
Calcite | Level 5

Thank you.  The problems was the ODS from the Proc Lifetest adding the numbering, not the graphing.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 153 views
  • 1 like
  • 2 in conversation