-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patchwork extension #95
Conversation
- required specifying exact types accepted for `addplots.jl` to avoid MethodErrors on dispatch - doesn't work for more than 2 | operations instead needs to be written as |(plot, plot, plot)
I'm not 100% sure how to solve the problem, but maybe the answer is to manually set the colsizes to be equal in GridLayout's options? See here for accepted options: https://docs.makie.org/stable/explanations/specapi/#advanced_spec_layouting |
The other thing - at least for |
Sorry, had some testing imports leftover that broke the Github Action. Should be ready now. |
I’ll merge this on the weekend - apparently there are merge conflicts and I don’t want to try to resolve them on my phone! |
This PR extends the patchwork functionality from #61 for arbitrary numbers of
GGPlots
andGGPlotGrids
. It adds tests and docs for these as well.Although it's all working pretty well, there does seem to be one hiccup that I'm not sure how to overcome. In summary, we can do more than two operations with
+
simultaneously but not with|
or/
. i.e.plot + plot + plot
gives 3 side by side plots of equal width whereasplot | plot | plot
has two of 1/4 width and one of1/2
. This is effectively because the+
operator works with variable number of arguments while the|
,/
process one by one. I'm not sure how to get around this as it has to do with how the operator expression is parsed.You can explore this by looking at the difference between
Meta.parse("1 + 2 + 3").args
andMeta.parse("1 | 2 | 3").args
.