-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created new plot for Anchor River Optimum Yeild profile, that removes…
… other panels and only shows 90% MSY line, and updates the escapement goal shading to 3200-6400. OYP_plotUpdate.R creates the new figure. Updated plot_profile() function within the plot.R script, to include an option for selection 70,80,90 % MSY lines to include in figure. The old function is just commented out.
- Loading branch information
1 parent
42b47fa
commit aca5593
Showing
2 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Update to Optimal Yeild Profile plot as requested 9/21/2023 - | ||
# Removed other panels, updated Esc goal range to 3200-6400 , remove 70 & 80% lines | ||
|
||
|
||
#### Import data and Function #### | ||
packs <- c("jagsUI", "tidyverse") | ||
lapply(packs, require, character.only = TRUE) | ||
|
||
#source functions | ||
function_files <- list.files(path=".\\functions") | ||
lapply(function_files, function(x) source(paste0(".\\functions\\", x))) | ||
|
||
#load datasets | ||
data_names <- list.files(path=".\\data") | ||
lapply(data_names, function(x) load(paste0(".\\data\\", x), .GlobalEnv)) | ||
|
||
post <- readRDS(".\\output\\post_1977on") #OUTPUT is currently located in S:\RTS\Reimer\Anchor_River_Chinook | ||
|
||
#### | ||
|
||
|
||
|
||
#### Create Plot #### | ||
|
||
profile_full <- get_profile(post) | ||
OYP_update = plot_profile(profile_full,rug=FALSE ,goal_range = c(3200, 6400),profiles = c("OYP"),percent = c("90"))+ | ||
scale_x_continuous("Spawners", breaks = seq(0, 9000,800), labels = scales::comma)+theme(legend.position = "none")+ | ||
labs(caption = " | ||
Probability of achieving sustained yield within 90 percent of maximum sustained yield for Anchor River Chinook salmon. | ||
The shaded area represents to escapement goal recommendation of 3,200-6,400 Chinook salmon. | ||
")+ | ||
theme(plot.caption = element_text(hjust=0)) | ||
OYP_update | ||
|
||
#### | ||
|
||
#ggsave("OYP_update.png",height = 3,width = 9,units = "in") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters