Marsilea-viz/marsilea

Render figures but not show them

PauBadiaM opened this issue · 2 comments

Hi @Mr-Milk,

Impressive library, looks really nice!

Is there a possibility to render CompositeBoard objects but not "show/print" them?
I tried passing a figure object but it still prints the final plot. Thank you for your time.

I assume you are running in IPython or Jupyter env, if that's the case, you can call plt.close() to close the figure at the end of the code block.
This is a expected behavior of IPython. If you have an active figure open, IPython will just render it at the end of the code block. Marsilea does not control the show or print process internally.
If you want to show the closed figure again, you can do figure.show()

Indeed, this worked flawlessly. Many thanks! 😉