Re: [R] Weekdays only on x-axis

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed, 16 Apr 2008 18:30:44 -0400

If z is your zoo object then you plot it like this:

plot(zoo(coredata(z)), xaxt = "n")

and then add a custom axis using axis or Axis. Also the quantmod package has this type of graphics built in.

On Wed, Apr 16, 2008 at 3:57 PM, rsan <ryan.sandor_at_credit-suisse.com> wrote:
>
> Hi All,
>
> I am a relative newbie at R and I am trying to plot some intraday price data
> over a long period of time. I would like to use a weekday(only) scale for
> x-axis. Can anyone tell me how to go about this?
>
> When I plot just the prices it looks fine, but when I add in the Dates/Times
> vs prices - I get gaps on the weekends and holidays... by default R wants to
> use a continuous time scale inclusive of weekends
>
> i looked at zoo and gap.plot from plotrix but neither of these seem to do
> what I want...
>
> Any help is much appreciated
>
> Cheers
> --
> View this message in context: http://www.nabble.com/Weekdays-only-on-x-axis-tp16732269p16732269.html
>
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



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. Received on Wed 16 Apr 2008 - 22:35:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 Apr 2008 - 23:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive