Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ggplot(f0peruttnq, aes(f0)) +
- geom_histogram(alpha=0.3, fill='white', colour='black')
- ggplot(data, aes(V2)) + geom_histogram(alpha=0.3, fill='white', colour='black')+scale_x_log10(breaks=c(50,100,150,200,250),labels=c(50,100,150,200,250))
- library(ggplot2)
- dat <- subset(movies, votes > 1000)
- m <- qplot(rating, votes, data=dat, na.rm = T)
- bks <- seq(min(dat$rating),max(dat$rating))
- m + scale_x_log10(breaks=bks,labels=bks)
- > data <- log(rnorm(10000, 100, 10)) #simulate some data that looks like yours
- > hist(data) # view a normal histogram of the data with log values on the x-axis
- > tick_locations = c(4.2, 4.4, 4.6, 4.8, 5.0) # copy the tick locations from the normal plot
- > tick_labels = exp(tick_locations) # reverse the log transformation; you can also create this manually
- > hist(data, xaxt = "n") # plot without the x-axis
- > axis(1, at = tick_locations, labels = tick_labels) # add the x-axis with the de-transformed values
Add Comment
Please, Sign In to add comment