Learning SAS? Welcome to the exclusive online community for all SAS learners.

Changing graph settings in proc phreg

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Changing graph settings in proc phreg

How do you change the graph setting for Proc phreg? I need the lines on the graph not be different colors, but instead be different dashes (ex. one solid, one shortdash, one linedash) so the graph can be seen in greyscale. I'd also like to change the Y-axis (which is survival probability) to show from 0.75 to 1 instead of from 0 to 1. 

 

Any advise helps! I've searched a bunch of stuff and could only find code for proc lifetest or sgplots, but I specifically need proc phreg.

Current code I'm using is below:

 

proc phreg data = stagelib.predicted1 plots(overlay timerange = 0, 10) = survival;
model survyr*NETdeath(0) = surgtype grade2 stage ps;
freq ps;
baseline covariates=estimated survival=_all_ / rowid=ID ;
label survyr = "Time (Years)";
title "p-NET Specific Kaplan-Meier Curves by Surgery Strategy";
run;


Accepted Solutions
Solution
‎10-30-2017 04:27 PM
Super User
Posts: 20,203

Re: Changing graph settings in proc phreg

Depends on how you're outputing your results. Assuming PDF or RTF, something like the following:

 

ods rtf style=journal2;

ods pdf style=journal2;

View solution in original post


All Replies
Super User
Posts: 20,203

Re: Changing graph settings in proc phreg

Changing your style is easier. 


Try changing it to Journal or Journal2 and check your plots.

New Contributor
Posts: 3

Re: Changing graph settings in proc phreg

Thanks. Is there a way to do that in the code? Like "style = journal"?. Or do I have to go into the SAS settings to change it?

Solution
‎10-30-2017 04:27 PM
Super User
Posts: 20,203

Re: Changing graph settings in proc phreg

Depends on how you're outputing your results. Assuming PDF or RTF, something like the following:

 

ods rtf style=journal2;

ods pdf style=journal2;
New Contributor
Posts: 3

Re: Changing graph settings in proc phreg

Thanks!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 234 views
  • 0 likes
  • 2 in conversation