Axis stuff#468
Merged
Merged
Conversation
ldecicco-USGS
commented
Mar 27, 2017
| # expect_true(all.equal(labels[12], as.Date("2013-12-15"), tolerance=0.01)) | ||
| second.axis <- gs$side.1 | ||
| which.axis <- which(names(second.axis)== 'axis') | ||
| labels <- lazyeval::lazy_eval(gs$side.1[[which.axis[2]]]$at, data=list(object=gs)) |
Member
Author
There was a problem hiding this comment.
@jiwalker-usgs I had to add this calculation (which.axis) because the order got jiggered around. It doesn't seem like that would affect your code...but please double check that things are working.
Contributor
There was a problem hiding this comment.
Yeah, this should be fine, I just made a brittle test.
|
Fixing #453. The following examples work with this PR: # this should give a warning - you can't use "log" inside an axis call
gsplot() %>%
points(1:100, 1:100, log="xy", side=c(3,4)) %>%
axis(side=c(1), log="")
Warning message:
In axis(side = side, at = at, labels = labels, ...) :
"log" is not a graphical parameter
# this is how you would have side 3 and 4 logged, but not 1
gsplot() %>%
points(1:100, 1:100, log="xy", side=c(3,4)) %>%
view(side=c(1,2), log='') %>%
axis(side=1)
# this should log sides 3 & 4, but not 1 & 2
gsplot() %>%
points(1:100, 1:100, log="xy", side=c(3,4)) %>%
points(1:10,1:10, log="", side=c(1,2))This is somewhat a continuation of #414. # this has sides 1,2 not logged and side 4 logged (no side 3)
gs <- gsplot() %>%
points(1:2,c(2,25)) %>%
points(c(1,2), c(1, 1000000000), side=4, log='y')
gs |
lindsayplatt
approved these changes
Mar 27, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.