Open grst opened 3 years ago
Maybe always return the figure instead of the axes? Seems to work well with jupyter (doesn't show anything similar to "<Axes: title={'center': 'Number of cells in airr:receptor_subtype by gex:source'}, xlabel='airr:receptor_subtype', ylabel='Number of cells'>".
Accompany with "plotting cookbook",
Something like
def plot_mpl():
with plt.ioff():
fig, ax = plt.subplots()
ax.plot(range(10))
return fig
works well in Jupyter. It shows the figure and one can use the figure object for saving etc. if one wants to.
If someone works in ipython, they'd need to manually call .show()
-- but I think this would be ok.
Follow scanpy's plotting conventions more closely.
show
,ax
,return_fig
?Supersedes #193.