An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20100331/6b156122/attachment.pl>
plot log scale on y axis using zoo object (with plot.zoo)
4 messages · Pierre Lapointe, Brian G. Peterson, Jeff Ryan
try chartSeries with log.scale=TRUE
On 03/31/2010 02:40 PM, Pierre Lapointe wrote:
Hi,
I'd like to plot a times series with a log on the y-axis. I'm plotting a zoo
object as it is easier to format the dates on the x-axis. Unfortunately,
log="y" does not work with plot.zoo. Any idea?
Here's a reproducible example
x<-seq(1,10000,length.out=10)
plot(x,log="y",type="l") #works
z<- zoo(seq(1,10000,length.out=10),
as.Date(c("1992-01-10", "1992-01-17", "1992-01-24", "1992-01-31",
"1992-02-07", "1992-02-14", "1992-02-21", "1992-02-28", "1992-03-06",
"1992-03-13")))
plot(z,log="y") #gives error
#Warning message:
#In plot.xy(xy.coords(x, y), type = type, ...) :
# "log" is not a graphical parameter
[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20100331/4c13f39b/attachment.pl>
A warning isn't an error. As far as I can tell my output works using:
plot(zoo(1:10,1:10)) plot(zoo(1:10,1:10),log='y')
Warning message: In plot.xy(xy.coords(x, y), type = type, ...) : "log" is not a graphical parameter Jeff
On Wed, Mar 31, 2010 at 2:40 PM, Pierre Lapointe <pierrelap at gmail.com> wrote:
Hi,
I'd like to plot a times series with a log on the y-axis. I'm plotting a zoo
object as it is easier to format the dates on the x-axis. Unfortunately,
log="y" does not work with plot.zoo. Any idea?
Here's a reproducible example
x <-seq(1,10000,length.out=10)
plot(x,log="y",type="l") ?#works
z <- zoo(seq(1,10000,length.out=10),
? ? as.Date(c("1992-01-10", "1992-01-17", "1992-01-24", "1992-01-31",
? ? ? "1992-02-07", "1992-02-14", "1992-02-21", "1992-02-28", "1992-03-06",
? ? ? "1992-03-13")))
plot(z,log="y") ? ? ? ? ?#gives error
#Warning message:
#In plot.xy(xy.coords(x, y), type = type, ...) :
# ?"log" is not a graphical parameter
? ? ? ?[[alternative HTML version deleted]]
_______________________________________________ R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
Jeffrey Ryan jeffrey.ryan at insightalgo.com ia: insight algorithmics www.insightalgo.com