-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plot function does not accept "quarters" in tick options anymore #256
Comments
Thanks for the report. Though this did not throw an error in v0.10-2, it doesn't appear to have worked correctly. For example: library(xts)
data("sample_matrix")
x <- as.xts(sample_matrix, dateFormat = "Date")
axTicksByTime(x)
# Jan 02 2007 Jan 08 2007 Jan 15 2007 Jan 22 2007 Jan 29 2007 Feb 05 2007 Feb 12 2007 Feb 19 2007
# 1 7 14 21 28 35 42 49
# Feb 26 2007 Mar 05 2007 Mar 12 2007 Mar 19 2007 Mar 26 2007 Apr 02 2007 Apr 09 2007 Apr 16 2007
# 56 63 70 77 84 91 98 105
# Apr 23 2007 Apr 30 2007 May 07 2007 May 14 2007 May 21 2007 May 28 2007 Jun 04 2007 Jun 11 2007
# 112 119 126 133 140 147 154 161
# Jun 18 2007 Jun 25 2007 Jun 30 2007
# 168 175 180
axTicksByTime(x, "quarter") # same as "auto"
# Jan 02 2007 Jan 08 2007 Jan 15 2007 Jan 22 2007 Jan 29 2007 Feb 05 2007 Feb 12 2007 Feb 19 2007
# 1 7 14 21 28 35 42 49
# Feb 26 2007 Mar 05 2007 Mar 12 2007 Mar 19 2007 Mar 26 2007 Apr 02 2007 Apr 09 2007 Apr 16 2007
# 56 63 70 77 84 91 98 105
# Apr 23 2007 Apr 30 2007 May 07 2007 May 14 2007 May 21 2007 May 28 2007 Jun 04 2007 Jun 11 2007
# 112 119 126 133 140 147 154 161
# Jun 18 2007 Jun 25 2007 Jun 30 2007
# 168 175 180
packageVersion("xts")
# [1] '0.10.2' |
Thank you for your prompt answer. I notice that I now use the version 0.11-0 of xts and your example above throws an error: axTicksByTime(x, "quarter") |
Yes, I confirm that it throws an error in 0.11-0. My comment was that the output in 0.10-2 was not correct. It returned weekly locations, not quarterly. |
It appears the Windows device doesn't plot the newline on the axis label like the X11 device does. Fix the test to account for this difference in axTicksByTime(). See #256.
In the new release the plot function sends an error when using
"quarters"
for the optionmajors.ticks
orminor.ticks
. I expect it to plot with a tick mark every quarter.The text was updated successfully, but these errors were encountered: