Color not showing up on ggplot2 graph, and I have the group for color specified. Help?

ggplot(data = df.combo, mapping=aes(x = water_mgL, y = mp_mgm2), color=trt, group=trt) + 
geom_errorbarh(mapping=aes(xmax = water_mgL + tccwater.se, xmin = water_mgL - tccwater.se), colour="black", height=0.07, size=0.5) +
geom_errorbar(mapping=aes(ymax = mp_mgm2 + tccmp.se, ymin = mp_mgm2 - tccmp.se), colour="black", width=0.001, size=0.5) + stat_function(fun = function(x) (10^2.8154)*x^1.8740) +stat_function(fun = function(x) (10^3.9288)*x^2.8528) + stat_function(fun = function(x) (10^1.3715)*x^0.9219) + stat_function(fun = function(x) (10^2.3791)*x^1.4030) +
    geom_point(size=2) + scale_colour_hue(name="Microplastic",    
                     breaks=c("212HDPE", "500HDPE","212PP","500PP"),
                     labels=c("212 H", "500 H","212 P", "500 P"), l=40) +
    xlab("TCC in Water (mg TCC/L water)") +
    ylab("TCC on Microplastics (mg/"~m^2*" of polymer)") + ylim(0,2.15) + xlim(0, 0.045) +  theme_bw()

https://i.redd.it/ul77xwejxc231.jpg

Where am I screwing up?

Posted Jun 4, 2019, 3:22 PM UTC

29
Loading comments…