[R-SIG-Finance] Problem with plot.xts
Gabor Grothendieck
ggrothendieck at gmail.com
Wed Dec 23 15:39:16 CET 2009
Note that if you wish to use as.zoo then this will get rid of the axis markings:
library(xts)
data(sample_matrix)
sample.xts <- as.xts(sample_matrix)
plot(as.zoo(sample.xts[,1]), xaxt = "n", yaxt = "n", xlab = "", ylab = "")
Also note that zoo has both plot.zoo and xyplot.zoo where the latter
implements time series plotting in lattice. The help files and the
three vignettes.
On Tue, Dec 22, 2009 at 10:11 PM, Jeff Ryan <jeff.a.ryan at gmail.com> wrote:
> Pierre,
>
> xts wasn't meant to include much in the way of graphics. quantmod was
> designed for that.
>
> For more complete standard graphical capabilities simply convert to zoo.
>
> plot(as.zoo(x))
>
> If there is a need at some point that can't be sufficiently addressed
> with zoo or quantmod, it may be a good case for extending xts in that
> direction, but for now the above alternatives are better.
>
> Best,
> Jeff
>
> On Tue, Dec 22, 2009 at 6:09 PM, Pierre Lapointe <pierrelap at gmail.com> wrote:
>> Hello,
>>
>> I want to draw a plot.xts without any axis or labels (I need to
>> overlay 2 plots with par (new=TRUE). )
>>
>> Unfortunately, the axes = FALSE argument is overridden in the function.
>>
>> Here's my code. I only want the data line. No axes or labels.
>>
>> library(xts)
>> data(sample_matrix)
>> sample.xts <- as.xts(sample_matrix)
>> plot(sample.xts[,1],type="l",axes=FALSE,xlab="",ylab="",auto.grid=FALSE)
>>
>> I'm on Vista. R 2.10.0
>>
>> BTW, what is the "ann" argument in the function supposed to do?
>>
>> Thanks.
>>
>> _______________________________________________
>> 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.
>>
>
>
>
> --
> Jeffrey Ryan
> jeffrey.ryan at insightalgo.com
>
> ia: insight algorithmics
> www.insightalgo.com
>
> _______________________________________________
> 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.
>
More information about the R-SIG-Finance
mailing list