TidierOrg / TidierPlots.jl

Tidier data visualization in Julia, modeled after the ggplot2 R package.
MIT License
218 stars 8 forks source link

add plot_layout basic functionality #99

Closed cnrrobertson closed 4 months ago

cnrrobertson commented 5 months ago

Addresses #61. This is an implementation of the patchwork plot_layout function that allows for controlling the number of rows, columns, in which direction plots are inputted (row-wise or column-wise), and their relative widths and heights. It is still missing some pieces:

I'm not sure how much of the above is currently feasible with Makie's SpecApi tools (like manipulating shared axes between plots in a GridLayout), so it would probably have to be done as post processing somehow. Or maybe time for some upstream contribution!

In the meantime, this does work with both GGPlot and GGPlotGrid inputs but it's most straightforward to use only + operations.

rdboyes commented 4 months ago

Hey @cnrrobertson - I'm inclined to merge this, close the initial issue that called for "basic patchwork functionality" and add issues to track your future changes. Is there anything stopping this from being included as it is? Its ok if its a "work in progress" - the whole package is, after all

cnrrobertson commented 4 months ago

Sorry for the delay @rdboyes, I have been traveling. It is functional as is, so I see no reason it couldn't be merged. I can put the checklist above as a new issue.

rdboyes commented 4 months ago

No need to apologize! I'm merging this now - thanks for the contribution