Re: [R] plot.zoo labels

From: <ryan.sheftel_at_malbecpartners.com>
Date: Wed, 02 Jul 2008 12:59:53 -0400


Thank you for your time to help. I don't think I was completely clear, I want to keep the axis ticks and labels (which I now see is what R calls the values like "Jan, Feb, Mar") but want to suppress the label titles.

So a generic plot(thisZoo) would produce a plot whose X axis is the dates, tick marks, and the word "Index" below. I just want to eliminate the work "Index". I can set the axis title to "" but I am still using up the white space.

I will dig further into the documentation, but it does not seem this is possible.

Thanks again

"Gabor Grothendieck" <ggrothendieck_at_gmail.com> 07/01/2008 11:42 PM

To
ryan.sheftel_at_malbecpartners.com
cc
r-help_at_r-project.org
Subject
Re: [R] plot.zoo labels

xy.labels is used to control text by the individual points when plotting scatterplots of one zoo series vs. another -- not the axis labels. e.g.

library(zoo)
set.seed(1)
z <- zoo(rnorm(10))
plot(z, z, xy.label = letters[1:10])

Assuming a single panel plot this will suppress the x axis label but still plot the tick marks:

plot(z, xaxt = "n")
axis(1, lab = FALSE) # adds ticks

Also on the ?axis page see padj= and on the ?par page see cex.axis, mar and tcl.

For multipanel plots panel functions are used. See examples in ?plot.zoo and Question 8 of vignette("zoo-faq") These examples cover both single and multipanel plots and illustrate some of these parameters.

Alternately note that xyplot.zoo is based on lattice. See the lattice documentation for that approach.

On Tue, Jul 1, 2008 at 5:25 PM, <ryan.sheftel_at_malbecpartners.com> wrote:
> I would like to know if there is a way to use plot(zoo) and suppress the
> label text to increase the amount of the screen that if for the plot and
> not the labels. I tried xy.labels=FALSE, but that had no effect. Thanks
> [[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.
>

        [[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. Received on Wed 02 Jul 2008 - 20:47:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 23:31:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive