Hi guys,
I'm totally new to R. I'm trying to create a ggplot.
This is the code I am using right now:
ggplot(data = Mittel_tab, aes(y=Beschriftung_links))+
geom_point(aes(x=Registerkasse),size=4,color="grey35")+theme_bw()+theme(panel.grid = element_blank(), panel.grid.major.y = element_line(color = "grey",linetype = "dotted"))+
geom_point(aes(x=ScanGo),size=4,color="lightsalmon")+theme_bw()+theme(panel.grid = element_blank(), panel.grid.major.y = element_line(color = "grey",linetype = "dotted"))+
labs(x="",y="",title = "Wie empfinden Sie den herkömmlichen Kassiervorgang/ Scan & Go im LEH?")+ theme(plot.title = element_text(hjust=0.5,size = 9, face = "bold"))+
xlim (0,101)
So far this works quite good but I have to add a second axis on the right side (Because it is contrasting pair, the negative one at the left and the positive one on right, for example inefficient and efficient). Also I like to add a legend for the colors and connecting lines between the dots.
In the end it should look like this ( I marked the missing data in red):
I don't know what I am doing wrong. I just copied the code (yes, the package is installed), but the contrasting pairs still do not appear in the ggplot.
If you include spaces in columns (or any other objects) they must be surrounded by tick marks ``, but you will make life easier by avoiding this and renaming these using e.g. an underscore _.