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

Points.formula #159

Merged
merged 9 commits into from
Jul 27, 2015
Merged

Points.formula #159

merged 9 commits into from
Jul 27, 2015

Conversation

jordansread
Copy link
Member

got the other PR in here because I am bad 🎩

This works:

library(gsplot)
plot(-4:4, -4:4, type = "n") 
points(y~x, data=list(x=-3:3,y=-3:3)) 
# or
plot(-4:4, -4:4) 
points(y~x) 

fails for this because it can't find limits:

gs <- gsplot() %>%
    points(y~x, data=list(x=-3:3,y=-3:3))
gs

but this works with a warning triggered by the same thing that makes the above fail:

gs <- gsplot() %>%
    points(y~x, data=list(x=-3:3,y=-3:3), ylim=c(-3,3),xlim=c(-3,3))
gs

The thing that fails is in calc_views, set_view_lim(views), because it doesn't know to dive deeper into the list to get x and y. That might be a relatively simple fix.

@jordansread
Copy link
Member Author

Now this should work for

gs <- gsplot() %>%
    points(y~x, data=list(x=-3:3,y=-3:3))
gs

ldecicco-USGS added a commit that referenced this pull request Jul 27, 2015
@ldecicco-USGS ldecicco-USGS merged commit e238001 into USGS-R:master Jul 27, 2015
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.

2 participants