R - ggplot2 change x-axis values to non-log values -
i plotting payment distribution information , aggregated data after scaling log-normal (base-e). histograms turn out great want modify x-axis display non-log equivalents.
my current axis displays [0:2.5:10] values alternatively, see values exp(2.5), exp(5), etc.
any suggestions on how accomplish this? can add plotting statement scale x-axis values? maybe there's better approach - thoughts?
current code:
ggplot(plotdata, aes_string(pay, fill = pt)) + geom_histogram(bins = 50) + facet_wrap(~m_p)
not sure if after can change text of x axis labels whatever want using scale_x_continuous.
here's without:
ggplot(data = cars) + geom_histogram(aes(x = speed), binwidth = 1)
here's with:
ggplot(data = cars) + geom_histogram(aes(x = speed), binwidth = 1) + scale_x_continuous(breaks=c(5,10,15,20,25), labels=c(exp(5), exp(10), exp(15), exp(20), exp(25)))
Comments
Post a Comment