You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
geom_smooth() will choose a default smoothing method if one isn't specified, and ?geom_textpath says that it will also do this. But it actually issues a warning and returns a blank plot unless a method is explicitly set.
library(ggplot2)
library(geomtextpath)
## normal geom_smooth() behavior
ggplot(iris) +
geom_smooth(
aes(Sepal.Length, Sepal.Width, color = Species),
se = FALSE
)
# `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## geom_textsmooth() yields warning and blank plot
ggplot(iris) +
geom_textsmooth(
aes(Sepal.Length, Sepal.Width, color = Species, label = Species),
se = FALSE
)
# `geom_smooth()` using formula 'y ~ x'
# Warning message:
# Computation failed in `stat_smooth()`:
# 'what' must be a function or character string
## setting `method` = "loess" fixes it
ggplot(iris) +
geom_textsmooth(
aes(Sepal.Length, Sepal.Width, color = Species, label = Species),
method = "loess",
se = FALSE
)
# `geom_smooth()` using formula 'y ~ x'
Software details:
OS Version: Windows 10 x64 (build 19044)
R Version: R version 4.1.2 (2021-11-01)
ggplot2 Version: 3.3.5
geomtextpath Version: 0.1.0
The text was updated successfully, but these errors were encountered:
@AllanCameron only tangentially related to this; geom_textsmooth() never draws the standard error bands, but when a user sets se = TRUE, the position scales get trained with the +/- SE values. Should we just internally set se = FALSE?
geom_smooth()
will choose a default smoothing method if one isn't specified, and?geom_textpath
says that it will also do this. But it actually issues a warning and returns a blank plot unless a method is explicitly set.Software details:
The text was updated successfully, but these errors were encountered: