Skip to content

Commit

Permalink
relabel Var to Group
Browse files Browse the repository at this point in the history
  • Loading branch information
sgaichas committed Feb 29, 2024
1 parent 34be589 commit 6221985
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/plot_rec_hms.r
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ plot_rec_hms <- function(shadedRegion = NULL,
# e.g., calculate mean, max or other needed values to join below
fix <- ecodata::rec_hms |>
dplyr::filter(EPU %in% filterEPUs) |>
tidyr::separate(col = Var,into = c("Var","Trash"),sep="-") |>
tidyr::separate(col = Var,into = c("Group","Trash"),sep="-") |>
dplyr::mutate(Value = Value/1000)


Expand All @@ -39,15 +39,15 @@ plot_rec_hms <- function(shadedRegion = NULL,
# xmin = setup$x.shade.min , xmax = setup$x.shade.max
#
p <- fix |>
ggplot2::ggplot(ggplot2::aes(x = Time, y = Value, color = Var))+
ggplot2::ggplot(ggplot2::aes(x = Time, y = Value, color = Group))+
ggplot2::annotate("rect", fill = setup$shade.fill, alpha = setup$shade.alpha,
xmin = setup$x.shade.min , xmax = setup$x.shade.max,
ymin = -Inf, ymax = Inf) +
ggplot2::geom_point()+
ggplot2::geom_line()+
ggplot2::ggtitle("Recreational Shark Landings")+
ggplot2::ylab(expression("Number of Fish (1000s)"))+
ggplot2::xlab(ggplot2::element_blank())+
ggplot2::xlab(ggplot2::element_blank()) +

# ecodata::geom_gls()+
ecodata::theme_ts()+
Expand Down

0 comments on commit 6221985

Please sign in to comment.