Here is the link to the original problem. Briefly, I was unable to plot a custom x-axis showing abbreviated months in a time series plot of a zoo object.

In the `plot.zoo()`

function set `xaxt = "n"`

to suppress plotting of the x-axis

Since I needed abbreviated months to be plotted as the x-axis, I loaded a csv file with the dates of the first of each month as follows and converted it to dates:

“month”

2004-12-01

2005-01-01

2005-02-01

…

(I included Dec 2004, because otherwise “Jan” would not be plotted)

`month < - read.csv("~/R/2005months.csv")`

`month$month < - as.Date(month$month, "%Y-%m-%d")`

After the `plot.zoo`

command I added the following line –

`axis(1, month$month, format(month$month, "%b"))`

The solution was inspired by a post from Gabor Grothendieck on r-help. The original solution is still the only way to plot abbreviated months for time series plots of monthly averages.

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** Greg's Research » R**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** axis, plot, R, Research, zoo