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

ylim accessor shows diff limits than gsplot object when axis reversed #442

Closed
lindsayplatt opened this issue Feb 15, 2017 · 3 comments
Closed
Labels
Milestone

Comments

@lindsayplatt
Copy link

Is it weird that for reverse axes, ylim() accessor function returns the limits already reversed, but they are not reversed in the actual object because we reverse everything on print? Or is this the expected behavior?

Came up with AQCU because we are manually changing the yaxis limits so that error bars do not get cutoff. See USGS-R/repgen#583 in repgen.

gs <- gsplot() %>% 
    points(1:10) %>% 
    axis(side=2, reverse=TRUE)

gs[['side.2']][['lim']]
[1]  1 10

ylim(gs)
$side.2
[1] 10  1
@jordansread
Copy link
Member

This is the expected behavior and is one of the reasons why repgen should use the accessors instead of using the lim slot directly.

@jordansread
Copy link
Member

@lindsaycarr instead of adding that repgen code, we might want to create a gsplot issue that adds the error_bar args to the list of things that the limit calculation uses.

@lindsayplatt lindsayplatt added this to the 0.8.0 milestone Mar 20, 2017
@lindsayplatt
Copy link
Author

Behavior is as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants