USGS-R / gsplot

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

lost date formatting/handling #395

Closed lindsayplatt closed 8 years ago

lindsayplatt commented 8 years ago

dates are coerced to numeric now

some_dates <- seq(as.POSIXct("2010-10-01"), as.POSIXct("2011-09-30"), by="month")
gs <- gsplot() %>% 
  points(some_dates, 1:12)
gs

image

jordansread commented 8 years ago

weird part is that xlim is correct:

xlim(gs)
$side.1
[1] "2010-10-01 CDT" "2011-09-01 CDT"

is the bug in draw_axis?

jordansread commented 8 years ago

Note what draw_custom_grid does, which draw_axis does not do (see #343 ?)

if(is.numeric(lim)){
    at <- axTicks(side)
  } else{
    fun <- getFromNamespace(paste0('axis.',class(lim)[1L]),'graphics')
    at <- fun(side, x = lim, lwd=0, lwd.ticks=0, labels = FALSE)
  }

but that is for at, not for the label

lindsayplatt commented 8 years ago

see #396