Skip to content

Commit

Permalink
update packages and addl fig
Browse files Browse the repository at this point in the history
  • Loading branch information
mkapur-noaa committed Dec 10, 2024
1 parent 3d2188f commit f9c39f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ Imports:
magrittr (>= 2.0.0),
sf,
MASS,
rnaturalearth
rnaturalearth,
rnaturalearthdata,
gridExtra
Suggests:
knitr,
rmarkdown
Expand Down
11 changes: 10 additions & 1 deletion vignettes/simulated_example.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ sf_df_clipped <- sf_df[!st_within(sf_df, st_union(us), sparse = FALSE), ]

```{r, echo = FALSE}
# Plot the US polygon and the points outside of it using ggplot2
ggplot() +
p1 <- ggplot( ) +
geom_point(aes(x = age, y = length, color = group), size = 2)+
scale_color_gradient2(low = "blue", mid = "grey90", high = "red", midpoint = 3) +
guides(color = 'none')+
theme_minimal()
p2 <- ggplot() +
geom_sf(data = us, fill = NA, color = 'black') +
geom_sf(data = sf_df_clipped, aes( color =resid, size = length), alpha = 0.9) +
scale_y_continuous(limits = c(50,71)) +
Expand All @@ -147,5 +153,8 @@ ggplot() +
theme_minimal() +
scale_color_gradient2(low = "blue", mid = "grey90", high = "red", midpoint = 0) +
labs(color = 'length residual')
gridExtra::grid.arrange(p1, p2, ncol=2)
```

0 comments on commit f9c39f2

Please sign in to comment.