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

Capture par arguments in axis call(s) #456

Closed
jordansread opened this issue Mar 21, 2017 · 7 comments
Closed

Capture par arguments in axis call(s) #456

jordansread opened this issue Mar 21, 2017 · 7 comments
Milestone

Comments

@jordansread
Copy link
Member

related to #437 , but this issue covers the axis call ignoring the option.args given by the user that should influence the rendering of the axis. For example:

points(gsplot(), 1, 0) %>% axis(side=1, tcl = -0.5)

ignores the tcl argument

@jordansread
Copy link
Member Author

I have gone back and forth on where these args should end up, and am suggesting that the are isolated w/ axis and don't bubble up into the side.1$par$tcl arg.

This is the expected behavior as I see it, but this is up for discussion.

@lindsayplatt
Copy link

@jread-usgs are you saying that including things like tcl in axis calls should not do anything? Or including tcl in points calls should not do anything? I agree with the latter, but the former is how base is set up:

plot(1,2)
axis(side=2, tcl=0.5)

image

@lindsayplatt
Copy link

Actually just noticed your comment in #437, #437 (comment). So I agree with you. Arguments affecting axes should not be able to be called in points, lines, etc. It is strange that we have been straying from base behavior in that way. I think repgen will need to be updated if we change this behavior, but I think it is completely reasonable.

# base doesn't work
plot(1,2)
points(1,20000, log='y')
Warning message:
In plot.xy(xy.coords(x, y), type = type, ...) :
  "log" is not a graphical parameter

# gsplot does work
gsplot() %>% points(1,20000, log='y')

@jordansread
Copy link
Member Author

for your first comment, no I wasn't saying that the tcl should be ignored when included in axis, I was saying that we need to keep it and we were mistakenly ignoring it.

Second comment: I disagree, you should be able to modify side properties within a points call and that should all work now (for example, you could put tcl in the points call and it will apply to both sides, but it could be overwritten by an axis call to one of those sides).

@lindsayplatt
Copy link

Wow, I interpreted all of that very incorrectly. So what is meant by "don't bubble up into the side.1$par$tcl" is really just about how the gsplot object appears in the end, not how you can actually specify tcl.

@jordansread
Copy link
Member Author

yeah, my comment about bubbling up is confusing. I was only referring to the args when they are within axis() for that comment.

@lindsayplatt
Copy link

Closed by #459

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

No branches or pull requests

2 participants