USGS-R / gsplot

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

grid nx & ny are not doing anything #383

Closed lindsayplatt closed 8 years ago

lindsayplatt commented 8 years ago

The arguments nx and ny in grid are not actually being used. Also, the grid lines are plotting overtop of the box.

gs <- gsplot() %>% 
    points(1:10,1:10) %>% 
    grid(nx=NA, ny=2)
gs

Warning messages:
1: In int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
  "nx" is not a graphical parameter
2: In int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
  "ny" is not a graphical parameter

image

jordansread commented 8 years ago

@lindsaycarr is this a deal breaker for stable release?

lindsayplatt commented 8 years ago

I've got a possible fix coming through on branch right now, but yes - repgen uses it a lot

jordansread commented 8 years ago

perhaps related to https://github.com/USGS-R/gsplot/issues/343 ?

lindsayplatt commented 8 years ago

Possibly? But I don't think that covers all the issues (maybe the grid lines over the box). The arguments for ny & nx were not being passed along or used at all. Checkout the graphics::grid function compared to what we have https://github.com/USGS-R/gsplot/blob/master/R/grid.R#L56-L77

lindsayplatt commented 8 years ago

See #384 for a possible solution

jordansread commented 8 years ago

fixed in #386

lindsayplatt commented 8 years ago

@jread-usgs did not close yet because of the box issue. The grid lines are covering the box around the plot

jordansread commented 8 years ago

Oh, missed that. ordering of print?

lindsayplatt commented 8 years ago

Yeah, I think so - looking into it now

lindsayplatt commented 8 years ago

grid lines covering box and tick marks fixed in #390