seaborn
seaborn copied to clipboard
Ability to pass `num` through to `plt.figure`
Hello. I would like to be able to provide a value to the num
and clear
arguments accepted by plt.figure
(matplotlib docs) when using figure-level functions.
Without Seaborn, I would have something like this for exploratory data analysis:
fig, ax = plt.subplots(num="Project X", clear=True)
ax.plot(...)
plt.show()
I would run this file (from within IntelliJ) and a Figure would appear in a separate application window, which I move to my second monitor. (The window takes on the name "Project X".)
Then I think a bit and tinker and re-run the code. Because num
already exists, the existing figure (and application window) is reused and neatly updates on my other monitor, not opening a new window every time I run the code. It's a nice workflow especially on big plots where trying to cram everything into a notebook results in scroll fatigue.
But it seems I can't do this with Seaborn. I understand the reasons for wanting Seaborn to have full control of the figure (I think) but would it cause any problems to allow passing num
and clear
, or even something like fig_kws
?
I'm aware that the rest of the planet uses Notebooks :) so maybe my workflow is a bit niche to worry about, but if this is possible that would be excellent.
Thanks!
I've just stumbled upon https://github.com/mwaskom/seaborn/issues/2830 so this is perhaps a duplicate...