Skip to content
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

Axis log wrong side --- FIX #424

Merged
merged 5 commits into from
Feb 3, 2017

Conversation

lindsayplatt
Copy link

@lindsayplatt lindsayplatt commented Feb 1, 2017

Fixing #414

Test out:

# side 4 logged, side 2 not logged
gs <- gsplot() %>% 
  points(1:3, c(1,10,100)) %>% 
  points(3:5, c(10,100,1000), col="blue", side=4, log='y') %>% 
  axis(side=4)
gs

# side 3 logged, side 1 not logged
gs <- gsplot() %>% 
  points(c(1,10,100), 1:3, side=1) %>% 
  points(c(10,100,1000), 3:5, col="blue", side=3, log='x') %>% 
  axis(side=3)
gs

# side 3 logged, side 1 not logged
gs <- gsplot() %>% 
    points(c(1,10,100), 1:3, side=1) %>% 
    points(c(10,100,1000), 3:5, col="blue", side=3) %>% 
    axis(side=3) %>% 
    view(side=3, log='x')
gs

# side 1 logged, side 3 not logged
gs <- gsplot() %>% 
    points(c(1,10,100), 1:3, side=1) %>% 
    points(c(10,100,1000), 3:5, col="blue", side=3) %>% 
    axis(side=3) %>% 
    view(side=1, log='x')
gs

@lindsayplatt
Copy link
Author

lindsayplatt commented Feb 1, 2017

That last example where we are trying to log side=1 but not side=3 is still wrong. I think it is something with the par setting in the print loop that iterates over each side.

gs <- gsplot() %>% 
    points(c(1,10,100), 1:3, side=1, log='x') %>% 
    points(c(10,100,1000), 3:5, col="blue", side=3) %>% 
    axis(side=3)
gs

@lindsayplatt
Copy link
Author

par culprits for losing labels: mfrow & mfg. When these two were reset together, the labels disappeared. One reset and the other not, did not result in disappearing labels.

We don't really know why....:crystal_ball:

@ldecicco-USGS
Copy link
Member

Funky

@ldecicco-USGS ldecicco-USGS merged commit bd7ab60 into USGS-R:master Feb 3, 2017
@@ -18,6 +18,6 @@ view <- function(object, ...) {
#' @export
view.gsplot <- function(object, ..., side=c(1,2)){
fun.name <- NULL
object <- gather_function_info(object, fun.name, ..., legend.name=NULL, side=c(1,2))
object <- gather_function_info(object, fun.name, ..., legend.name=NULL, side=side)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch here.

@ldecicco-USGS ldecicco-USGS mentioned this pull request Feb 8, 2017
@lindsayplatt lindsayplatt mentioned this pull request Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants