I am trying to create a simple line plot and jitter the lines.
library(ggplot2)
test=read.table(text= "
group x y
1 1 17
1 2 16
2 1 13
2 2 12.5
", header=TRUE, sep="" )
pd <- position_dodge(.2)
qplot(x=x, y=y, data=test, group=group, colour=group ) +
geom_line(position=pd )+
geom_point(position=pd, size=6)
I am getting
ymax not defined: adjusting position using y instead
ymax not defined: adjusting position using y instead
warnings and somehow two symbols are displayed for each data point instead of one:

I assume the ymax warning has something to do with getting two symbols. I’d appreciate any help. thanks!
1 Answer