[R-SIG-Finance] Chart formats

Jeff Ryan jeff.a.ryan at gmail.com
Fri May 1 17:15:52 CEST 2009



plot(GS[,1], major.ticks="years", major.format="%Y")


On Fri, May 1, 2009 at 10:10 AM, Heiko Mayer <Heiko-Mayer at gmx.de> wrote:
> Hi all,
> I am trying to get a chart with "years" shown only on the x-axis (e.g. 2005,2006,2007). However, xts and ts always show the day, month and year as shown below. I can hardly believe, the only solution is manually creating a character vector. Does anyone know a smarter idea? Or is there a library I might have overseen providing this functionality?
> library(xts)
> library(quantmod)
> getSymbols("GS")
> plot(GS[,1],major.ticks='years')
> Thanks,
> Heiko
> --
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.

Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics

More information about the R-SIG-Finance mailing list