We show how plots based on the residuals from a proportional hazards model may be used to reveal the correct functional form for covariates in the model. A smoothed plot of the martingale residues was suggested for this purpose by Therneau, Grambsch, and Fleming (1990, Biometrika 77, 147-160); however, its consistency required that the covariates be independent. They also noted that the plot could be biased for large covariate effects. We introduce two refinements which overcome these difficulties. The first is based on a ratio of scatter plot smooths, where the numerator is the smooth of the observed count plotted against the covariate, and the denominator is a smooth of the expected count. This is related to the Arjas goodness-of-fit plot (1988, Journal of the American Statistical Association 83, 204-212). The second technique smooths the martingale residuals divided by the expected count, using expected count as a weight. This latter approach is related to a GLM partial residual plot, as well as to the iterative methods of Hastie and Tibshirani (1990, Biometrics 46, 1005-1016) and Gentleman and Crowley (1991, Biometrics 47, 1283-1296). Applications to survival data sets are given.