[R] zuzufarah Help with ggplot 2 error: Aesthetics must either be length one, or the same length as the dataProblems

2014-06-20 Thread Zayd Farah
WUA_table<-WUA.df[,2:dim(WUA.df)[2]] WUA_discharge<-WUA.df[,1] colour_scheme<-palette(rainbow(dim(WUA_table)[2])) # Main scatterplot p1 <- ggplot(NULL, aes(WUA_discharge,WUA_table)) + geom_line() + scale_color_manual(values=colour_scheme)+ scale_x_continuous(expand = c(0, 0)) + scale_y_con

[R] (no subject)

2014-06-24 Thread Zayd Farah
I hope the following script is reproducible enough to highlight my issue, which is to automatically (in this case by loop, but it does not necessarily have to be by a loop) add geom_line layers for each column of mydata to the ggplot variable p1. for some reason doing this only works by manually ad