[R] Barplots: Editing the frequency x-axis names

Knut Krueger rh at family-krueger.com
Fri Jun 8 09:32:32 CEST 2007


Tom.O schrieb:
> Hi
> I have a timeSeries object (X) with monthly returns. I want to display the
> returns with a barplot, which I can fix easily. But my problem is labaling
> the x-axis, if I use the positions from the timeseries It gets very messy. I
> have tried rotating and changing the font size but it doesn't do the trick.
> I think the optimal solution for my purpose is too only display every second
> or third date, pherhaps only use every 12 month. But how do I do that?
>
> Thanks Tom
>   
I think you could use:

library(chron):
f.e
x <- c(dates(02/27/92),dates(02/27/95))
y <- c(10,50)
plot(x, y)

Regards Knut



More information about the R-help mailing list