Relative Content

Tag Archive for rggplot2dplyr

How do I plot two geom_textlines + one geom_bar in a single ggplot?

I’m attempting a plot involving two geom_textlines plus a geom_bar. I think my problem has to do with telling ggplot where to use which parts of the df. The closest I’ve come is filtering longdf to make the geom_textline plot work, but that prevents plotting the geom_bar (I think) by preventing filter(vars == "New Wins"). As you can see, I’m trying to complete the task using dplyr.

Problems adding errorbars to a clustered column chart in ggplot2

I am trying to add SEM errorbars to a ggplot clustered bar chart but they are all appearing on top of eachother in the middle bar of each cluster, rather than over the corresponding bar. I am not sure how to fix this. I have tried manually fixing the dodge applied.
code to create sample data: