I have a function that creates a Makie plot. I want it to display that plot by default, but to also return other information, let’s say fig and ax, so it can be called as fig, ax = myplot(x). I’m using show == true && display(fig) in the function so as to have the option to avoid displaying the figure.
So far everything is great so far, but the problem is how to make it easy to show the figure in Pluto as well. I know that myplot(x)[1] will do the trick, but would it be possible to show it with directly with myplot(x) or to find a more elegant solution?
Thanks!