ringbp icon indicating copy to clipboard operation
ringbp copied to clipboard

`plot` function for simulation output?

Open joshwlambert opened this issue 4 months ago • 1 comments

Do we want to add a (S3 method) plotting function for the output from scenario_sim() to enable users to easily plot results?

I think it would be good to provide a plotting function with useful defaults and labels which outputs a ggplot object for the user to easily edit.

I'd be interested to hear thoughts on if a plot() method would be useful, if so whether we should use {ggplot2}, base R or another plotting framework (considerations of dependencies), and if there are any learnings from similar packages that provide a plot() method (e.g. {EpiNow2}).

joshwlambert avatar Sep 15 '25 14:09 joshwlambert

I'm generally skeptical of pulling in more dependencies, but I do think it's useful to provide users a standard-ish way to have this sort of capability.

Could be done with vignette snippet? Maybe something in inst? Also possible with an extension package, but that's a bit unwieldy for both users and dev.

I think vignette is best - would also show the interior code where people might want a specialized tweak.

pearsonca avatar Sep 15 '25 14:09 pearsonca