We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If the user wanted to call axis.Date or axis.POSIXct...they'd have problems:
gs <- gsplot() %>% points(x=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 20), y=1:20,axes=FALSE) %>% axis(1, at=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 5)) gs
The text was updated successfully, but these errors were encountered:
in base, this would require you to do:
plot(x=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 20), y=1:20,axes=FALSE, ylab=NA,xlab=NA) axis.Date(1, at=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 5)) box()
because axis(1, at=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 5)) does the same thing as gsplot's axis
axis(1, at=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 5))
axis
options:
axis.Date
axis.POSIXct
gs <- gsplot() %>% points(x=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 20), y=1:20,axes=FALSE) %>% axis.Date(1, at=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 5)) gs
x
names(formals(graphics::axis)) [1] "side" "at" "labels" "tick" "line" "pos" "outer" "font" "lty" "lwd" "lwd.ticks" "col" "col.ticks" "hadj" "padj" "..." names(formals(graphics::axis.Date)) [1] "side" "x" "at" "format" "labels" "..."
probably doable though.
I think the way it works right now might not be a bug, since it mimics the way base would do it.
But, it does bring up the issue of trying to use a function that gsplot doesn't have an override for:
gsplot
gs <- gsplot() %>% points(x=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 20), y=1:20,axes=FALSE) %>% axis.Date(1, at=seq.Date(as.Date("2000-01-01"),as.Date("2010-01-01"),length.out = 5)) Error in side%%2 : non-numeric argument to binary operator
which is not a very helpful error
Sorry, something went wrong.
@ldecicco-USGS @jread-usgs not sure what the original issue with this was, but with what is currently on the master branch, I get:
lindsayplatt
No branches or pull requests
If the user wanted to call axis.Date or axis.POSIXct...they'd have problems:
The text was updated successfully, but these errors were encountered: