I searched online and found no example of doing so; the API does not seem to contain function that supports this either. I already opened an issue at the GitHub project, but no response yet.
But this feature is often needed: creating and displaying multiple figure windows in a single script. My script often generates many figures, with each consisting of multiple subplots. Saving them to disk while only showing the last one is a workaround which wastes time (to open those files) and confuses users of the script.
I know how to do multiple plot windows in PyPlot.jl and Plots.jl, but I’m focused on GR.jl here because:
Although I love PyPlot.jl, the problem is I had various annoying issues due to Python distribution version and matplotlib backend compatibility. Sometimes if I do not choose qt4agg as backend, the whole Julia will crash due to some bizarre binary error (I’m on Windows 10). But some Python distribution didn’t have qt4agg installed by default. I’m concerned that co-workers using my script need to worry about not only packages on Julia but also packages on Python, resulting in resistance to adoption. In addition, plotting large data sets in PyPlot is a little slow.
I tried to like Plots.jl but couldn’t. There are too many plotting packages to choose from, each with its own advantages, disadvantages, and surprises. Main issue for me is I often generate plots with many subplots, and the outcome seems to be quite inconsistent across different backends for Plots.jl. Even the GR backend does not work all the time as expected for subplots.
So I’m back to the simpler GR.jl: the grammar is sufficiently close to Matlab and matplotlib that I can pick it up quickly, and I am confident my colleagues can, as well. Time to first plot is short and updates to plots are fast. And, no dependency on Python. The only 3 things I am missing are: (1) Multiple plot windows (this question); (2) Zoom / pan / 3D rotate / read data off the plots (in a default plot without custom coding). (3) Saving a plot’s data for re-opening as an interactive plot (matplotlib does not have this last one reliably either - one can serialize/de-serialize a binary object, but cannot re-open if saved by a different matplotlib version; only Matlab has this feature).
I can tolerate the lack of (2) and (3) for now, but (1) is so essential that before I learn how to do it, I have to stick with PyPlot.
Thanks to anyone who can give me some information on this topic!