Data visualization with SAS programming

Changing line thickness of a survival curve

Reply
New Contributor jzl
New Contributor
Posts: 2

Changing line thickness of a survival curve

I am using proc lifetest and ODS graphics to plot a Kaplan-meier survival curve. I'd like to increase the thickness of the curve. Any help would be greatly appreciated!
SAS Super FREQ
Posts: 925

Re: Changing line thickness of a survival curve

The following steps should get you there:

1) Determine which ODS Graphics template needs to be modified. To do this, do
"ods trace on;" before the proc lifetest. You will see the ODS objects in the log. You should see one for the graph. The template name will start with stat.lifetest.graphics.

2) Find the template in the template store. To bring up the template window, type "odst" in the command box. Navigate to sashelp.tmplmst->stat->lifetest->graphics. Your template should be in there. Right-click on it and select "edit".

3) Search for "stepplot". Everwhere you see a STEPPLOT statement, add the following (make sure it is added after the "/"): lineattrs=(thickness=2).

4) Compile the template by clicking on the little "running man" in the toolbar. This should compile the template and put it in sasuser.templat->stat->lifetest->graphics. You can navigate over an see it. The log will also tell you if the compile was successful. You can now rerun your proc lifetest and see the thickness change. If you want to go back to the old template, just navigate to it in sasuser and delete it.

Hope this help!
Dan
New Contributor jzl
New Contributor
Posts: 2

Re: Changing line thickness of a survival curve

That worked great! Thanks Dan! By the way, is there a place or document that I can read more about how to modify these ODS Graphics templates?
SAS Super FREQ
Posts: 925

Re: Changing line thickness of a survival curve

This chapter on the SAS support site demonstrates some of the most common template modifications (http://support.sas.com/publishing/pubcat/chaps/63120.pdf).

Hope this helps,
Dan
Ask a Question
Discussion stats
  • 3 replies
  • 423 views
  • 0 likes
  • 2 in conversation