[R-SIG-Finance] plot.zoo axis labels/ticks

Gabor Grothendieck ggrothendieck at gmail.com
Fri Feb 1 20:26:06 CET 2008


plot.zoo uses whatever axis function is available for whatever class you
are using.

For example, if you are using Date as your time class then
axis.Date from R is used as default.

The latest version of zoo, 1.4-2, has completely rewritten axis.yearmon
and axis.yearqtr functions that are invoked if you are using yearmon or
yearqtr time class series.

If you want custom axes then for single panel plot.zoo plots you
call axis in the same way that you do with any classic graphics
plot in R.  For multi-panel plot.zoo plots see the examples provided
in ?plot.zoo

For xyplot.zoo plots you do it the same way as for xyplot in lattice
since ultimately lattice xyplot is called.

On Feb 1, 2008 2:03 PM, Markus Loecher <markus at insightfromdata.com> wrote:
> Dear zoo experts,
> While I follow the custom x-axis example in the help file for plot.zoo(), it
> is not clear to me how to easily display ticks at "natural" intervals, such
> as months/weeks/days.
> For example, when I plot a daily series that extends over ~ 2 years, the
> default seems to place labels only at the yearly marks, whereas I would
> often want monthly or quarterly ticks/labels.
>
> Any help would be great,
> Thanks,
> Markus



More information about the R-SIG-Finance mailing list