I can't get the x axis in right order

时间:2019-03-19 15:10:05

标签: r ggplot2 axis-labels data-presentation

I'm using gg plot to make a scatter graph with lines. I'm fairly new to this and used a sample r script from a previous practical. The dilution factors are currently not in the right order with the 1/1800 dilution factor values coming before the 1/200 dilution factor values

the image of the plot i have got is here

this is the script i'm using atm

data <- read.table("practicaldata.txt", header = TRUE)
library(ggplot2)

ggplot(data, aes(x=Dilution)) +
  geom_point(aes(y=POS, colour = "Positive Control"))+
  geom_point(aes(y=A, colour = "Vaccine A"))+
  geom_point(aes(y=B, colour = "Vaccine B"))+
  geom_point(aes(y=C, colour = "Vaccine C"))+
  geom_point(aes(y=NEG, colour = "Negative control"))+
  labs(x= "Dilution Factor", y = "Absorbance at 405nm")

How do I make the x axis go in the right order and how do I eventually join up the points on the graph but with points still visible?

0 个答案:

没有答案