-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_nsrkc.R
77 lines (56 loc) · 1.89 KB
/
plot_nsrkc.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#require(devtools)
#devtools::install_github("seacode/gmacs", subdir = "/gmr", ref = "develop")
# ploting for model 1 under smbkc18a folder - using gmr and Jim's code
in_path<-"C:/gmacs/gmr/R/"
library(miceadds)
library(ggplot2)
library(ggridges)
library(dplyr)
library(PBSmodelling)
library(reshape2)
source.all( path=in_path, grepstring="\\.R", print.source=TRUE, file_sep="__" )
mod_names <- c("nsrkc")
.MODELDIR = c("./nsrkc/")
.THEME = theme_bw(base_size = 12, base_family = "") +
theme(strip.text.x = element_text(margin= margin(1,0,1,0)),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank(),
panel.background = element_blank(),
strip.background = element_rect(color="white",fill="white"))
.OVERLAY = TRUE
.SEX = c("Aggregate","Male","Female")
.FLEET = c("Winter_com","Summer_com","ADFG Trawl")
.TYPE = c("Retained","Discarded","Total")
.SHELL = c("New","Old")
.MATURITY = c("Aggregate","Mature","Immature")
.SEAS = c("1","2","3","4","5","6","7")
fn <- paste0(.MODELDIR, "gmacs")
M <- lapply(fn, read_admb) #need .prj file to run gmacs and need .rep file here
names(M) <- mod_names
plot_catch(M)
plot_cpue(M, ShowEstErr = TRUE, "ADFG Trawl", ylab = "Survey biomass")
plot_molt_prob(M)
plot_F(M,in_leg_x=.2,in_leg_y=.9)
plot_growth_inc(M)
plot_selectivity(M)
plot_recruitment(M)
mdf <- .get_sizeComps_df(M)
for(x in 1:length(mdf))
{
png(paste("nsrkc/plots/size_comp_",x,".png",sep=""),height=8,width=8,res=1200,units='in')
plot_size_comps(M,which=x)
dev.off()
}
for(x in 1:length(mdf))
{
png(paste("nsrkc/plots/size_ridges_",x,".png",sep=""),height=8,width=8,res=1200,units='in')
plot_size_ridges(M,which=x)
dev.off()
}
plot_natural_mortality(M, plt_knots = FALSE)
plot_ssb(M)
plot_recruitment_size(M)
plot_growth_transition(M)
plot_size_transition(M)
plot_numbers(M)