Trouble with plotting names of variables

Hi all,

I'm rather new to R and I came to a rather simple problem I think but I didn't find a solution after some searches.

I've successfully generated a lasso function and wanted to plot the results. When I did that, I got the graph that I wanted but I would like to see the names of the different variables on the graph.

The graph on the left is what I receive when I use the code
plot(lasso)

But I came across another paper where the authors plotted the graph on the right (which I would like to have).

(Since I'm a new user I could only post one picture so that's why I had to crop them in one pic.)

Thanks in advance for your help!
Matt

If you are using glmnet, page 17 and 18 of the glmnet PDF have an example of such a plot.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.