= numbers.rgb.fig # matplotlib figure
a print(type(a))
a
<class 'matplotlib.figure.Figure'>
.fig
.rgb
, .chans
and .plt
all have a .fig
attribute that returns a matplotlib figure object.
You can save the figure by calling its savefig
method:
Axes
All functions allow an ax=
argument that accepts an existing Axes
object into which they will plot:
By default, the Lovely functions will call plt.close(fig)
on the figures they create.
This prevents displaying the figures twice when running in Jupyter.
If you are not using Jupyter, here are 2 configuration options you might want to set:
fig_close=False
fig_show=True
If set, lovely will call plt.show()
after each figure creation.
You donβt need to set fig_close=False
manually.
Note, plt.show()
closes all figures.