data(skincancer)
dev.new()
barplot(1000*cases/population ~ city + ageC, beside=TRUE, col=c("yellow","blue"),
data=skincancer)
legend("topleft", legend=c("St.Paul","Ft.Worth"), title="City",
fill=c("yellow","blue"), bty="n")
Run the code above in your browser using DataLab