[R] How do I show real values on a log10 histogram
Martin Maechler
maechler at stat.math.ethz.ch
Wed Mar 27 14:37:58 CET 2013
>>>>> Shane Carey <careyshan at gmail.com>
>>>>> on Tue, 26 Mar 2013 11:03:20 +0000 writes:
> Yup, Ive tried all these things and I think Johns might be
> the best approach,
well, :-)
you have not yet seen the following one :
if(!require("sfsmisc")) install.packages("sfsmisc")
require("sfsmisc")
## the data:
set.seed(1); summary(x <- rlnorm(100, m = 2, sdl = 3))
## the plot (w/o x-axis) :
r <- hist(log10(x), xaxt = "n", xlab = "x [log scale]")
## the nice axis:
axt <- axTicks(1)
eaxis(1, at = axt, labels = pretty10exp(10^axt, drop.1=TRUE))
Martin Maechler,
ETH Zurich
> thanks
> On Tue, Mar 26, 2013 at 11:01 AM, PIKAL Petr
> <petr.pikal at precheza.cz> wrote:
>> Hi
>>
>> maybe axis(3, (x)^10)
>>
>> Regards Petr
>>
>> > -----Original Message----- > From:
>> r-help-bounces at r-project.org [mailto:r-help-bounces at r- >
>> project.org] On Behalf Of Shane Carey > Sent: Tuesday,
>> March 26, 2013 11:19 AM > To: r-help at r-project.org >
>> Subject: [R] How do I show real values on a log10
>> histogram
>> >
>> > Hi,
>> >
>> > I have a histogram with values logged to the base 10
>> >
>> > hist(log10(x),breaks=60)
>> >
>> > How do I show the log values on the x-axis and a second
>> x-axis showing > the real values?
>> >
>> > Thanks
>> >
>> > --
>> > Shane
>> >
>> > [[alternative HTML version deleted]]
>> >
>> > ______________________________________________ >
>> R-help at r-project.org mailing list >
>> https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do
>> read the posting guide http://www.R-project.org/posting-
>> > guide.html > and provide commented, minimal,
>> self-contained, reproducible code.
>>
> --
> Shane
> [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
> read the posting guide
> http://www.R-project.org/posting-guide.html and provide
> commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list