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

plot formulas doesn't work anymore? #314

Open
jordansread opened this issue Apr 10, 2016 · 6 comments
Open

plot formulas doesn't work anymore? #314

jordansread opened this issue Apr 10, 2016 · 6 comments

Comments

@jordansread
Copy link
Member

not sure why this test doesn't catch it:

test_that("points.gsplot accepts formulas",{
  gs <- gsplot() %>%
       points(y~x, data=list(x=-3:3,y=-3:3))
  expect_equal(gs$view$window$xlim, c(-3,3))
  expect_equal(gs$view$window$ylim, c(-3,3))
  gs

})

This fails outside of the test when printing the gs object:

> gs
 Show Traceback

 Rerun with Debug
 Error in formula.default(object, env = baseenv()) : invalid formula 

This is on master branch v ‘0.5.4’

@jordansread
Copy link
Member Author

Should fix this bug and fix the test

@lindsayplatt
Copy link

lindsayplatt commented Dec 30, 2016

For original issue, see #146 and #159.

In gsplot v0.7.0, this fails when trying to create gs and I think it has to do with changes made to strip_pts. The out object of strip_pts no longer leaves as a vector, but instead as a list so it fails in is.finite() for set_side_lim. See #422

Once the error to generate the gsplot was overcome, the error preventing the plot from printing popped up. It's coming from print >> print.view >> to_gsplot.

Error in terms.formula(formula, data = data) : 
  argument is not a valid model

@ldecicco-USGS
Copy link
Member

strip_pts needs help

@lindsayplatt
Copy link

get rid of strip_pts
have range.side or something:

  • loop through each thing on that side and figure out min and max

@lindsayplatt
Copy link

Might be able to do range() and then get range of ranges? Maybe some nuance w/ NaN, NULLs, etc.

Should have good tests, so we can try this and see what happens.

@lindsayplatt
Copy link

This requires strip_pts to be fixed first. See #452

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

No branches or pull requests

3 participants