I am having an issue with trying to dodge points only by the color aesthetic when I am also using another aesthetic for shape. When I add the option to dodge, it dodges the points such that each shape+color option is dodged. Is there a way to specify the dodge such that a single aesthetic is being dodged? The only way I can think is to have two datasets for two separate geom_point's where the shape is manually set but unsure how that might work with the legend.
Example code
ggplot(dat,aes(x = c,y = Mean,color = Group,shape = Interval)) +
geom_point(position = position_dodge2(width = 0.5)) +
labs(y = "Item Average") +
theme(legend.position = "top",
axis.title.y = element_blank(),
axis.text.y = element_text(size = 8)) +
coord_flip()
Tried to specify a group aesthetic within geom_point function itself that would use only that to dodge the points by Group.