USGS-R / gsplot

plotting foundation for timeseries reporting
Other
6 stars 14 forks source link

be able to use formulas and data lists #422

Closed lindsayplatt closed 7 years ago

lindsayplatt commented 7 years ago

this once worked...

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

in base:

plot(c(-10,10), c(-10,10))
points(y~x, data=list(x=-3:3,y=-3:3), col="red", pch=20)
coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 81.932% when pulling 34c1d36231f63dd2b9732bd00446ad410c9627c4 on lindsaycarr:brokenFormulas into e83939801c276a1aadcc236ddb7a662fb05ad2aa on USGS-R:master.

lindsayplatt commented 7 years ago

Still need to tweak something, but can't seem to figure out what. See #314

lindsayplatt commented 7 years ago

@jiwalker-usgs this isn't actually working - I was hoping for some help on how to get over this error:

Error in terms.formula(formula, data = data) : 
  argument is not a valid model
Called from: terms.formula(formula, data = data)
jiwalker-usgs commented 7 years ago

ah, should have looked at the branch name ;)

lindsayplatt commented 7 years ago

Merging @jread-usgs data frame stuff lost the ability to append mutliple axes (maybe that's why those tests got deleted?!)

gs <- gsplot() %>% 
    points(0:1,0:1) %>% 
    axis(side=1, at=c(0.5,1)) %>% 
    axis(side=1, at=c(0.25, 0.75), append=TRUE)
gs
ldecicco-USGS commented 7 years ago

@jread-usgs I was going to take a crack at trying to fix the various axis issues...but I'm wondering if some of the work here would fix some/all/none of them. Do you think you could take a look to see how close/far this PR is from being merged?

ldecicco-USGS commented 7 years ago

OK, I think this is pretty close. I'm going to merge, and task see if I can get it running soon.

lindsayplatt commented 7 years ago

awesome!