USGS-R / gsplot

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

Lost ability to add Dates/ with base R #432

Closed ldecicco-USGS closed 7 years ago

ldecicco-USGS commented 7 years ago

Doing this:

gsplot() %>% points(1:10)
points(5,8, col="blue", pch=20)

produces image

I would expect a blue dot on 5,8

It may have been broken awhile (?) because "unnamed-chunk-19-1.png" should have an extra dot somewhere (or we just didn't notice on a white -> transparent switch).

ldecicco-USGS commented 7 years ago

Seems like PR #431 is fixing this. Except with dates:

date_vector <- seq(as.Date("2010-10-01"), as.Date("2011-09-30"), by="months")
gs <- gsplot() %>% 
           points(date_vector, 1:12)
gs
points(as.Date("2011-01-15"),2.5, col="blue", pch=20)

image

But if I use the index, then it's OK:

gs <- gsplot() %>% 
           points(date_vector, 1:12)
gs
points(3,2.5, col="blue", pch=20)

image

I''m going to alter the title of this bug to reflect that.

ldecicco-USGS commented 7 years ago

Fixed in #431