I have the following code that produces a graph. I want to loop around this code and input different values for the y = (which is currently XYZ). For each ggplot graph I want to save the output. For example first loop would be y = XYZ, second loop y = ABC, third loop y = QRS etc.
UK<-ggplot(Diff, aes(x = FactSet.Fund.Code , y = XYZ, colour = Fund.Manager.x))
UK<- UK + geom_point(data = subset(Diff,DeskName.x=="UK Equities"), size = 6)
UK<- UK + theme(axis.text = element_text(angle = 90))