patchwork icon indicating copy to clipboard operation
patchwork copied to clipboard

A function like get_max_dim() but for comparing plot_dimension objects?

Open thomasggodfrey opened this issue 2 years ago • 0 comments

I have a project with multiple scripts that produces a lot of plots at different points, in different scripts. I'm currently aligning plots produced 'within scripts' but not 'between scripts'. If I want to align the plots 'between scripts', I will need to re-import them all at once and then use get_max_dim() and set_dim, or align_patches(), to find and set each of them to the dimensions of the largest plot.

I was thinking it might be useful to have a function that can compare plot_dimension objects and 'get the max' dim from a set of plot dimension objects. Then you could save out the max dims within each script and compare those, rather than the plots themselves. You would still have to think carefully about your workflow and how to use the 'final max dim' object to set dimensions of all your plots, but it might make for cleaner code/a cleaner structure to your project to have a get_max_dims function for comparing plot_dimension objects.

thanks for all your hard work on the package, Tom

thomasggodfrey avatar Sep 07 '23 10:09 thomasggodfrey