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
Adding an y argument produces the expected output, with a warning:
Warning: Ignoring unknown aesthetics: y
ggplot(data.frame(x = 0:5, y = 0:5), aes(x, y)) +
geom_point() +
annotate(geom = "hline",
yintercept = 2.5, y = 2.5)
There is something odd going on: when y is present, the hline is plotted at the yintercept position, but the "ignored" unknown aesthetics still affects the scale limits.
ggplot(data.frame(x = 0:5, y = 0:5), aes(x, y)) +
geom_point() +
annotate(geom = "hline",
yintercept = 2.5, y = 100)
ggplot2 2.2.1.9000 installed minutes ago.
Hope this helps diagnose the problem.
The text was updated successfully, but these errors were encountered:
I demonstrate the problem here only for
geom_hline
, but the same problem affectsgeom_vline
.Adding an
y
argument produces the expected output, with a warning:Warning: Ignoring unknown aesthetics: y
There is something odd going on: when y is present, the hline is plotted at the yintercept position, but the "ignored" unknown aesthetics still affects the scale limits.
ggplot2 2.2.1.9000 installed minutes ago.
Hope this helps diagnose the problem.
The text was updated successfully, but these errors were encountered: