0

im am using the plot_glmnet function from the package plotmo, like below

mod <- glmnet(as.matrix(mtcars[-1]), mtcars[,1])
plot_glmnet(mod)

Is there a way to replace the 2nd x-axis at the top with the degrees of freedom and increase its label size ?

rook1996
  • 237
  • 3
  • 9

1 Answers1

0

Do it like this:

library(glmnet)
library(plotmo)
mod <- glmnet(as.matrix(mtcars[-1]), mtcars[,1])
par(cex.lab=1.2) # bigger text on axis labels
plot_glmnet(mod, xvar="norm") # degress-of-freedom on top axis
Stephen Milborrow
  • 976
  • 10
  • 14