# NOT RUN {
# See examples in help(gaisl)
# The following code shows how to obtain graphs using the
# ggplot2 plotting system
# }
# NOT RUN {
GA <- gaisl(...)
out <- plot(GA)
library(reshape2)
df <- melt(out, id.var = "iter")
library(ggplot2)
ggplot(df, aes(x = iter, y = value, group = variable, colour = variable)) +
xlab("Generation") + ylab("Fitness values") +
geom_line(size = 0.8) +
scale_colour_brewer(palette = "Paired") +
theme_bw() +
theme(legend.title = element_blank())
# }
Run the code above in your browser using DataLab