Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Deepayan Sarkar
needed. > > > Thanks, Spencer > > > > >> -Original Message----- > >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Spencer > >> Graves > >> Sent: Wednesday, 31 May, 2023 17:45 > >> To: Eric Berger > >> C

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Spencer Graves
That's exactly what I needed. Thanks, Spencer -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Spencer Graves Sent: Wednesday, 31 May, 2023 17:45 To: Eric Berger Cc: r-help Subject: Re: [R] plot level, velocity, acceleration with one x axis On 5/

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Viechtbauer, Wolfgang (NP)
elp-boun...@r-project.org] On Behalf Of Spencer Graves >Sent: Wednesday, 31 May, 2023 17:45 >To: Eric Berger >Cc: r-help >Subject: Re: [R] plot level, velocity, acceleration with one x axis > >On 5/31/23 9:20 AM, Eric Berger wrote: >> I sent you an updated response to deal w

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Spencer Graves
On 5/31/23 9:20 AM, Eric Berger wrote: I sent you an updated response to deal with the redundant copies of the x-axis. Re-sending. par(mfrow=c(3,1)) plot(DAX.[, 1], log='y', ylab='DAX', xaxt="n") plot(DAX.[, 2], ylab='vel (%)', xaxt="n") plot(DAX.[, 3], ylab='accel (%)') I got that.

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Eric Berger
I sent you an updated response to deal with the redundant copies of the x-axis. Re-sending. par(mfrow=c(3,1)) plot(DAX.[, 1], log='y', ylab='DAX', xaxt="n") plot(DAX.[, 2], ylab='vel (%)', xaxt="n") plot(DAX.[, 3], ylab='accel (%)') On Wed, May 31, 2023 at 4:27 PM Spencer Graves wrote: > > > >

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Spencer Graves
On 5/30/23 10:23 AM, Eric Berger wrote: What if you just precede these commands as follows: par(mfrow=c(3,1)) plot(DAX.[, 1], log='y', ylab='DAX') plot(DAX.[, 2], ylab='vel (%)') plot(DAX.[, 3], ylab='accel (%)') Most of the space is consumed with two extraneous copies of the axis. We

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-31 Thread Eric Berger
Slight modification to have the xaxt ticks and labels only appear on the bottom chart par(mfrow=c(3,1)) plot(DAX.[, 1], log='y', ylab='DAX', xaxt="n") plot(DAX.[, 2], ylab='vel (%)', xaxt="n") plot(DAX.[, 3], ylab='accel (%)') On Tue, May 30, 2023 at 6:23 PM Eric Berger wrote: > > What if you

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Eric Berger
What if you just precede these commands as follows: par(mfrow=c(3,1)) plot(DAX.[, 1], log='y', ylab='DAX') plot(DAX.[, 2], ylab='vel (%)') plot(DAX.[, 3], ylab='accel (%)') On Tue, May 30, 2023 at 5:45 PM Spencer Graves wrote: > > > > On 5/30/23 8:48 AM, Eric Berger wrote: > > I am a bit

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Spencer Graves
On 5/30/23 8:48 AM, Eric Berger wrote: I am a bit confused as to what you are trying to achieve - and even if I could guess it is not clear what the interpretation would be. head(DAX) 1628.75 1613.63 1606.51 1621.04 1618.16 1610.61 Including the leading NA's, what would be the 6 leading

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Eric Berger
I am a bit confused as to what you are trying to achieve - and even if I could guess it is not clear what the interpretation would be. > head(DAX) 1628.75 1613.63 1606.51 1621.04 1618.16 1610.61 Including the leading NA's, what would be the 6 leading terms of the 3 series that you want to plot,

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Spencer Graves
On 5/30/23 6:16 AM, Eric Berger wrote: My code assumes that DAX is a ts object, as in your original post. On Tue, May 30, 2023 at 2:06 PM Eric Berger wrote: Untested but why not a <- cbind(log(DAX), exp(diff(log(DAX))), exp(diff(diff(log(DAX) colnames(a) <- c("logDAX", "vel",

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Eric Berger
My code assumes that DAX is a ts object, as in your original post. On Tue, May 30, 2023 at 2:06 PM Eric Berger wrote: > > Untested but why not > > a <- cbind(log(DAX), exp(diff(log(DAX))), exp(diff(diff(log(DAX) > colnames(a) <- c("logDAX", "vel", "accel") > plot(a) > > > On Tue, May 30,

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Eric Berger
Untested but why not a <- cbind(log(DAX), exp(diff(log(DAX))), exp(diff(diff(log(DAX) colnames(a) <- c("logDAX", "vel", "accel") plot(a) On Tue, May 30, 2023 at 1:46 PM Spencer Graves wrote: > > > > On 5/29/23 2:37 AM, Eric Berger wrote: > > How about this: > > > > a <-

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-30 Thread Spencer Graves
On 5/29/23 2:37 AM, Eric Berger wrote: How about this: a <- cbind(AirPassengers, diff(log(AirPassengers)), diff(diff(log(AirPassengers colnames(a)[2:3] <- c("percent increase", "acceleration") plot(a, xlab="year", main="AirPassengers") My real problem is more difficult: I'm

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-29 Thread Spencer Graves
On 5/29/23 2:37 AM, Eric Berger wrote: How about this: a <- cbind(AirPassengers, diff(log(AirPassengers)), diff(diff(log(AirPassengers colnames(a)[2:3] <- c("percent increase", "acceleration") plot(a, xlab="year", main="AirPassengers") That's it. Thanks. sg HTH, Eric On Mon,

Re: [R] plot level, velocity, acceleration with one x axis

2023-05-29 Thread Eric Berger
How about this: a <- cbind(AirPassengers, diff(log(AirPassengers)), diff(diff(log(AirPassengers colnames(a)[2:3] <- c("percent increase", "acceleration") plot(a, xlab="year", main="AirPassengers") HTH, Eric On Mon, May 29, 2023 at 7:57 AM Spencer Graves wrote: > > Hello, All: > > >

[R] plot level, velocity, acceleration with one x axis

2023-05-28 Thread Spencer Graves
Hello, All: I want to plot level, velocity, and acceleration in three panels with only one x axis. The code below does this using "layout". However, I want the three plot areas to be of equal size, and this won't do that: If I stretch the plot vertically, the relative sizes of the three