Composing figures, or plot(plt1, plt2, plt3, ...)
#4231
asinghvi17
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Plots.jl has
plot(p1, p2, p3, ...)
which take multiple "plots", basically multiple GridLayouts in Makie parlance, and places them together into a single Figure. I've also seen a number of people ask in forums about this.Generally it is pretty easy to just change your code to "move axes" from different figures into the same figure, but I wanted to do it assuming that you needed to integrate a figure generated by some black-box function into your Figure.
Turns out that it is actually pretty easy! All I need to do is hook up interactivity, but otherwise this works pretty much perfectly.
The code is below - you basically call
move!(newfig[i, j], oldfig.layout)
. You can also move a GridLayout from one figure to another, which is pretty neat!Would appreciate some advice on how to hook up interactivity (and potentially remove the previous stuff).
Beta Was this translation helpful? Give feedback.
All reactions