Dear all, I want some help improve my ggplot as following: Make the plottable area with grid, so is easy one to see where each box refers to x and y values. Add a color bar but with fixed values, that I want to specify. How I can do those two?
Before is some code what I have tried so far. Regards Alex DataToPlot<-matrix(data=seq(1:9),nrow=3,dimnames=list(seq(1,3),seq(4,6))) require(reshape) require(ggplot2) require(raster) tdm <- melt(DataToPlot) p<- ggplot(tdm, aes(x = Var2, y = Var1, fill = factor(value))) + labs(x = "MHz", y = "Threshold", fill = "Duty Cycle") + geom_raster() + scale_fill_discrete() [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.