I've set up a time series line graph for variables of ratios of housing cost and housing income in R but I'm having no success specifying different point symbols for each variable as suggested in other posts. I'm getting the error message “A continuous variable can not be mapped to shape” against the following (simplified for two variables):
ggplot(housing, aes(year)) +
geom_line(aes(y = Greenwich, colour = "Greenwich"))+
geom_point(aes(y = Greenwich, colour = "Greenwich", shape = 1)) +
scale_shape_identity() + #added missing "+"
geom_line(aes(y = median, colour = "median"))+
geom_point(aes(y = median, colour = "median", shape = 2)) + # added missing parenthesis
scale_shape_identity() + # removed extra parenthesis
ylab("house price to earnings (lower quartile)")+
theme(legend.title=element_blank())
Any suggestions most welcome.