Home > Mobile >  Histogram with log scale using csv in R
Histogram with log scale using csv in R

Time:10-13

I'm trying to create a histogram which will be identical to this image

My csv file contains 2 columns named Value & Count. I found similar histogram

CodePudding user response:

With packages like scales and ggplot2 you can try this :

ggplot(k,aes(y=Count,x=Value)) geom_histogram(stat="identity") scale_y_log10(breaks = trans_breaks("log10", function(x) 10^x),
labels = trans_format("log10", math_format(10^.x)))

You can feel free to change axis label using xlab and ylab function

  • Related