Thanks, Peter! The use of curve() is nice. (I hadn't come across
that function before, but then ... ).
Thanks also to Mark Difford for a further suggestion.
Ted.
On 11-May-10 18:27:37, Peter Ehlers wrote:
> Ted,
>
> Regarding the addition of a 'line' to a plot with log-y axis,
> there is a bette
Hi All,
You can also add a line using lines() if you transform in the call using the
same log-base---but not via R's log="y" argument (because of what's stored
in par("yaxp")).
##
par(mfrow=c(1,3))
plot(1:10, log="y")
lines(log10(1:10))
par("yaxp")
plot(log10(1:10), yaxt="n")
axis(side=2, at=sa
Ted,
Regarding the addition of a 'line' to a plot with log-y axis,
there is a better way: curve() with 'add=TRUE' will respect
the current plot's log setting:
plot((1:10), log="y", yaxt="n")
axis(side=2, at=c(1,2,5,10))
f <- function(x, a=0, b=1) {a + b*x}
curve(f, add = TRUE)
Is it the tick labels that you want to change?
-Original Message-
From: "Elisabeth Bjerke Rastad"
To: "r-help@r-project.org"
Sent: 5/10/10 11:20 AM
Subject: [R] [Fwd: Re: Plotting log-axis with the exponential base to a plot
with the default logarithm base 10]
Elisabeth and I have been corresponding off-list about this, and
came to a potential solution which is on the lines also outlined
by Mark Difford.
Where Elisabeth (rather, her tutor) may have become confused may
lie in the fact that, with a simple plot(...,log="y"), R will
(by default) make its ow
Elisabeth,
You should listen to Ted (Harding). He answered your question with:
>> the vertical axis is scaled logarithmically with the
>> numerical annotations corresponding to the *raw* values of Y,
>> not to their log-transformed values. Therefore it does not matter
>> what base of logarith
Elisabeth, question to you: How is it that you recognise that it is
"a logaritmic axis with the base of 10", as opposed to any other base?
Ted.
On 10-May-10 17:15:04, Elisabeth Bjerke Rastad wrote:
> Hello!
> Thank you for answering!
> What I am trying to do is to plot my raw values (biomass of di
Hello!
Thank you for answering!
What I am trying to do is to plot my raw values (biomass of different
species) on a logaritmic y-axis with the base of e. When I type "log="y"",
the axis transforms into a logaritmic axis with the base of 10.
Best regards,
Elisabeth
> Dear Elisabeth,
>
> I'm
8 matches
Mail list logo