[R] plot.zoo labels

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jul 3 01:05:53 CEST 2008


xlab = "" and ylab = "" suppress the labels but that won't change the
margins.  For that you need to set mar=   .  If z is a zoo object:

plot(z, xlab = "", ylab = "", mar=...)

See ?par for description of mar.


On Wed, Jul 2, 2008 at 12:59 PM,  <ryan.sheftel at malbecpartners.com> wrote:
> 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.
>



More information about the R-help mailing list