Hi,
I got this error "Error in (function (s, units = "user", cex = NULL, font = NULL, vfont = NULL, :
plot.new has not been called yet"
code:
tlibrary(ggplot2)
#grafiek leeftijd tot omtrek
data<-Orange_15column
ggplot(data, aes(x=age), color=group) +
#lines tree
geom_line( aes(y=circum1), size=1,colour="blue") +
geom_line( aes(y=circum2), size=1,colour="green") +
geom_line( aes(y=circum3), size=1,colour="yellow") +
geom_line( aes(y=circum4), size=1,colour="orange") +
geom_line( aes(y=circum5), size=1,colour="white") +
#lines climate
geom_line( aes(y=appreciationavg*10, size=1), colour="red") +
geom_line( aes(y=tempmax, size=1), colour="red") +
geom_line( aes(y=tempmin, size=1), colour="red")+
geom_line( aes(y=percipation_max, size=1),colour="red")
legend("right",
pch = 16,
cex = 0.8,
horiz = FALSE,
legend = c("Tree1","Tree2","Tree3","Tree4","Tree5"),
col = c("blue","green","yellow","orange","white"))
Thanks in advance for help,
Nobel