Skip to content

Commit

Permalink
include print()
Browse files Browse the repository at this point in the history
  • Loading branch information
ericward-noaa committed Mar 30, 2017
1 parent 4aeecfa commit 03c2261
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Binary file added Ecosystem_EBS_plots.pdf
Binary file not shown.
Binary file added Ecosystem_EGOA_plots.pdf
Binary file not shown.
Binary file added Ecosystem_WGOA_plots.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions fit_dfas.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ for (i in 1:nrow(dfa_data)) {
pdf(paste0(dfa_data$names[i], "_plots.pdf"))
rotated = rotate_trends(dfa_summary$best_model)
# trends
plot_trends(rotated, years = as.numeric(colnames(Y)))
print(plot_trends(rotated, years = as.numeric(colnames(Y))))
# loadings
plot_loadings(rotated)
print(plot_loadings(rotated))
# predicted values with data
plot_fitted(dfa_summary$best_model)
print(plot_fitted(dfa_summary$best_model))
dev.off()

}
Expand Down
8 changes: 4 additions & 4 deletions fit_dfas_ecosystem.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ for (i in 1:length(regions)) {
pdf(paste0("Ecosystem_", regions[i], "_plots.pdf"))
rotated = rotate_trends(dfa_summary$best_model)
# trends
plot_trends(rotated, years = as.numeric(colnames(Y)))
print(plot_trends(rotated, years = as.numeric(colnames(Y))))
# loadings
plot_loadings(rotated, names = names)
print(plot_loadings(rotated, names = names))
if(ncol(rotated$Z_rot_mean)==2) {
plot(rotated$Z_rot_mean[,1], rotated$Z_rot_mean[,2], col="white",
xlab="Loading 1", ylab = "Loading 2")
Expand All @@ -55,8 +55,8 @@ for (i in 1:length(regions)) {
lines(c(0,0), c(-10,10))
}
# predicted values with data
plot_fitted(dfa_summary$best_model, names=names) +
theme(strip.text.x = element_text(size = 6))
print(plot_fitted(dfa_summary$best_model, names=names) +
theme(strip.text.x = element_text(size = 6)))
dev.off()

}

0 comments on commit 03c2261

Please sign in to comment.