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
I just started using ggbump and I'm surprised by the behavior of the lines when previously shown missing values reappear, when axis limits are set.
I'm sure I'm not clear so here's an example :
test <- data.frame(Time = rep(seq(1:3), 4),
Type = rep(letters[1:4], each = 3),
rank = c(4, 2, 4, 2, 4, 3, 3, 3, 2, 1, 4, 1))
This small dataframe simulates rank data with 4 ranks, but imagine I want to show only 3. If I do that with geom_line:
ggplot(test, aes(x = Time, y = rank, color = Type)) +
geom_line(linewidth = 4) +
geom_point(size = 10) +
ylim(1, 3)
Take the purple points. There are two values that are shown and one that is out of bounds, and they're not linked.
Now if I replace geom_line with geom_bump:
ggplot(test, aes(x = Time, y = rank, color = Type)) +
geom_bump(linewidth = 4) +
geom_point(size = 10) +
ylim(1, 3)
geom_bump draws lines between unlinked points as it seems it ignores the existence of out of bounds values. I expected it to behave like geom_line in that regard.
I might have missed something, but is it the intended behavior?
The text was updated successfully, but these errors were encountered:
Haclio
changed the title
geom_bumps links returning values
geom_bump links returning values
Apr 22, 2024
Haclio
changed the title
geom_bump links returning values
geom_bump links reappearing values
Apr 22, 2024
In the geom_bump, group in aes must be set on the variable called "group" and not the variable I call Risques.
When the value for one categorie is out-of-bound and then back in the top X, the group variable will change. This way, in the geom_bump, they are considered to be 2 different groups and therefore will not be linked.
Hi!
I just started using ggbump and I'm surprised by the behavior of the lines when previously shown missing values reappear, when axis limits are set.
I'm sure I'm not clear so here's an example :
This small dataframe simulates rank data with 4 ranks, but imagine I want to show only 3. If I do that with
geom_line
:Take the purple points. There are two values that are shown and one that is out of bounds, and they're not linked.
Now if I replace
geom_line
withgeom_bump
:geom_bump
draws lines between unlinked points as it seems it ignores the existence of out of bounds values. I expected it to behave likegeom_line
in that regard.I might have missed something, but is it the intended behavior?
The text was updated successfully, but these errors were encountered: