library(rJava) library(xlsxjars) setwd("/Users/charlotterunzel/Desktop") library(xlsx) T <- read.xlsx("Temperature Flux.xlsx", sheetName="All2") library(ggplot2) a <- ggplot(data=T, aes(x = Time, y = Temp, color=Depth)) + geom_smooth(method="loess") + geom_point() + xlab('Time') + ylab('Temperature (ÂșC)') + facet_wrap(~Flux) + scale_color_manual(values = c("0.5m" = "lightblue3", "1m" = "lightpink3")) a