Thanks for the video! Wouldn't it be easier to plot a white space just before the geom_link (since this function does not properly deal with alpha = 1) like so: geom_segment(data = margins, linewidth = 2.8, mapping = aes(x = polling, xend = actual, y = state_index, yend = state_index), inherit.aes = F, alpha = 1, fill = "white", show.legend = FALSE) + This is a simple copy past from the subsequent geom_link. So we can get rid of the five annotate calls. As for the textbox we could simply add " fill = "white" (instead of transparent / NA) to avoid the respective annotation.
Yeah - I thought I added a note in the video about adding a geom_segment behind the geom_link, but that would make things easier. I think we'd want to use color = "white" rather than fill
The only thing bothering me about the graph is the ordering of states. I would order it by the actual result to get a nicer “flowing” appearance. It seems that the ordering is on the mean of polled and actual, which has no meaning at all.
Thanks for the video!
Wouldn't it be easier to plot a white space just before the geom_link (since this function does not properly deal with alpha = 1) like so:
geom_segment(data = margins, linewidth = 2.8,
mapping = aes(x = polling, xend = actual,
y = state_index, yend = state_index),
inherit.aes = F,
alpha = 1,
fill = "white",
show.legend = FALSE) +
This is a simple copy past from the subsequent geom_link. So we can get rid of the five annotate calls.
As for the textbox we could simply add " fill = "white" (instead of transparent / NA) to avoid the respective annotation.
Yeah - I thought I added a note in the video about adding a geom_segment behind the geom_link, but that would make things easier. I think we'd want to use color = "white" rather than fill
I love ggtext for italicized taxon names.
It's one of the many reasons I love ggtext. There's really no excuse to not italicize names or keep the "g__" prefix on the names 🤓
The only thing bothering me about the graph is the ordering of states. I would order it by the actual result to get a nicer “flowing” appearance. It seems that the ordering is on the mean of polled and actual, which has no meaning at all.
Interesting point! I'd still leave National at the top, but perhaps flip Wisconsin and Michigan. Thanks for watching 🤓