-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direct 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 (override stat_params manually |
another work-around mentioned in #31 is using direct.label(ggplot.object, method=something) instead of ggplot.object+geom_dl(), which works because direct.label internally uses the same "override stat_params" trick, |
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.The text was updated successfully, but these errors were encountered: