Guest User

Untitled

a guest
Jul 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. ggplot(f0peruttnq, aes(f0)) +
  2. geom_histogram(alpha=0.3, fill='white', colour='black')
  3.  
  4. 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))
  5.  
  6. library(ggplot2)
  7. dat <- subset(movies, votes > 1000)
  8. m <- qplot(rating, votes, data=dat, na.rm = T)
  9. bks <- seq(min(dat$rating),max(dat$rating))
  10. m + scale_x_log10(breaks=bks,labels=bks)
  11.  
  12. > data <- log(rnorm(10000, 100, 10)) #simulate some data that looks like yours
  13. > hist(data) # view a normal histogram of the data with log values on the x-axis
  14. > tick_locations = c(4.2, 4.4, 4.6, 4.8, 5.0) # copy the tick locations from the normal plot
  15. > tick_labels = exp(tick_locations) # reverse the log transformation; you can also create this manually
  16. > hist(data, xaxt = "n") # plot without the x-axis
  17. > 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