-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I accepted your pull request but had meant to first pull my dev-andy changes into main, and so reverted the pull request. Else I'm getting tangled up!
Also, the plotting didn't quite work. I think some issues are:
coastline_north_americacould be simplified, as it includes provinces and states that I don't think we really need. And goes out to Hawaii.plot(coastline_north_america)gives
Though the actual .rda file is not too big, so maybe this isn't such a problem?
north_america_eez.rdais 16 Mb, which is the second biggest object in the package (but has no time component), so I think it would be worth getting it smaller, as it will make the loading of pacea take longer.
Also, it has amr_dfclass; not sure what that is. Looks different to the bc one:
> class(north_america_eez)
[1] "sf" "mr_df" "tbl_df" "tbl" "data.frame"
> class(bc_eez)
[1] "sf" "data.frame"
>
Think we need to have a bit of wrangling like for the BC objects in data-raw/coastline, though I'm no expert on this stuff (I can ask someone to help this week maybe).
And plot(north_america_eez) gives this:
which is probably okay (you wouldn't just plot this), but seems to be missing Alaska coast?
- I tried this, which I thought would work, but doesn't quite:
plot.pacea_st(glorys_bottom_temperature,
bc = FALSE,
eez = FALSE,
north_america = TRUE,
restrict_plot = TRUE)
The restrict_plot should automatically redo (crop) the axes, but I wonder if it's due to the projections being used (and the option is being ignored). Maybe removing Hawaii will help, not sure.
- Given the plotting uses ggplot, I wonder if we could just add the north america coast etc. to marea, and just add new options to the end of:
plot.marea_st <- function(x,
...){
pacea:::plot.pacea_st(x,
bc = FALSE,
eez = FALSE,
...)
}
So something like:
plot.marea_st <- function(x,
...){
tplot <- pacea:::plot.pacea_st(x,
bc = FALSE,
eez = FALSE,
...)
if(north_america == TRUE){
tplot <- tplot +
geom_sf(data = coastline_north_america, fill = NA, lty = "dotted")
}
}
Then also try the restrict_plot option like in plot.pacea_st().


