I draw a simple histogram of data sampled, say, by 10%. I want to rely on the y axis, but since the data is sampled, I want them to be scaled accordingly. If I used basic graphics, I would do something like
foo <- rnorm(50) foo.hist <- hist(foo,plot=F) foo.hist$counts <- foo.hist$counts * 10 plot(foo.hist)
Is there an easy way to do this with ggplot2? .. There are all kinds of "canned" transformations of the y axis (scale_y_log (), etc.); is there something more universal?
source share