timjmiller / wham

State-space, age-structured fish stock assessment model
https://timjmiller.github.io/wham
Other
32 stars 16 forks source link

plot multiple projections #41

Closed JDeroba closed 3 years ago

JDeroba commented 3 years ago

I suggest a plot option that plots multiple projection results within the same panel, that way you don't have to compare among multiple panels to figure out how different projections are. A fancy version might allow a user to choose which confidence intervals get plotted for each selected set of projections. plot_wham_output(modproj[[1:3]], dir.main=file.path(getwd(),paste0("proj",1:3)), out.type='html', plotCI=c(FALSE,TRUE,FALSE)) So I envision the line of code above saying, "plot the projection results for models 1 to 3 from the mod_proj list in the same panel, and the plotCI thing at the end says plot the CI only for model 2".

brianstock-NOAA commented 3 years ago

Agreed, that'd be good. I'm working on adding functionality to plot multiple models together as we speak. Going to expand compare_wham_models to have plot and table options.

I hadn't thought of having an option to only plot the projection period. That's good, will add. Should be the same code as what I was going to do, just restricting the years. Would it be useful to be more generic and have people specify which years to plot? That could then be the projection years only. Or it could be the last couple model years + proj. Or last ten model years, etc.

And yeah, a toggle to turn on/off the CI would be good.

JDeroba commented 3 years ago

Inevitably, if you hard code something (e.g., plot couple model years + proj), then someone will submit a request for something different. So do something generic and have people specify which years, but perhaps set a default (e.g., all model and proj years, couple model years +proj). At least that is my take.

brianstock-NOAA commented 3 years ago

compare_wham_models can now do this, check out the new vignette: https://timjmiller.github.io/wham/articles/ex8_compare.html. None of those models have projections, but it works the same and by default adds a vertical dashed line at the terminal model year.