Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDirect label on smoothed line methods not working? #24
Comments
|
Sessioninfo()
|
|
this issue happens because stat_smooth also has a "method" parameter. the method="last.qp" is meant to be passed to geom_dl, but ggplot2 (mistakenly?) passes it to stat_smooth, which rightly raises the warning because it does not know anything about last.qp. |
|
a work-around with the current code is to calculate the smooth yourself (instead of using stat_smooth), save the smooth lines in a data table, and then plot/label it via geom_line/geom_dl. |
|
another work-around is mentioned in tidyverse/ggplot2#4073 (comment) and this seems to be an issue with ggplot2 so I'm closing this issue. |
Hi, I am trying to use the method as per this stackoverflow answer here
This code...
produces this error:
Interestingly, as a side issue, I went to run the code in the documentation from
geom_dl()and i got fatal errors from Rstudio, when printing some objects, as noted in the code. I tested on Rstudio cloud, and that code worked fine there, but I'm running a pretty standard and neat setup - happy to give more details if this can't be reproduced.