Skip to content

Commit

Permalink
add smooth plot
Browse files Browse the repository at this point in the history
showing all vars * sites
  • Loading branch information
dlebauer authored Dec 13, 2022
1 parent 0961741 commit 5ce96b9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions notes/gefs_forecasts.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,16 @@ ggplot(data = ens_forecast) +
facet_wrap(~meta_station_name, ncol = 6) +
theme_bw()
ggplot(data = ens_forecast) +
geom_line(aes(x = time, y = TMP, color = meta_station_name)) +
facet_wrap(~ens, ncol = 6)
#geom_sf(aes(fill = TMP)) +
facet_wrap(~meta_station_name, ncol = 6) +
scale_fill_viridis_c(option = "plasma", na.value = "white") +
theme_void() +
theme(legend.position = "none")
ens_long <- ens_forecast |>
tidyr::pivot_longer(cols = -c(ens, FID, meta_station_name, meta_station_id, time, geometry),
names_to = "var",
values_to = "value") |>
mutate(time = lubridate::ymd_hms(time))
a <- ggplot(data = ens_long) +
geom_smooth(aes(x = time, y = value, color = meta_station_name)) +
facet_wrap(~var, ncol = 4, scales = 'free_y')
ggsave(a, width = 20, height = 10, filename = 'fig.pdf')
```

```{r}
Expand Down

0 comments on commit 5ce96b9

Please sign in to comment.