matplotlib output not showing in jupyter notebook with qiime2 environment


I am mostly using qiime2 via python API in jupyter notebook.
Great to have all commands and visualizations on one page.
The problem is I cannot see usual plots from matplotlib on the same notebook with qiime2 visualizations.

The output looks like this:

  1. <seaborn.axisgrid.FacetGrid at 0x7f8bae852c70>
  2. AxesSubplot:ylabel='ID'
    and does nothing.

What I do now is saving figures and check them in another tab.
Same things occur in qiime2-2020.6 and later versions up to 2022.2 environments,
last one freshly installed.
Figures are displayed when I use matplotlib in non-qiime2 environments.
Any thoughts what may be causing it and way around it?

Best regards,

I moved your questions to 'Other bioinformatics tools' section since it is related more to Jupyter notebooks rather than qiime2 issues.
I use matplotlib inside if Qiime2 environments quite often via Jupyter lab, no problems so far.
Just in case - did you try to put %matplotlib inline somewhere when importing libraries?



Thank you for the fast reply.
It works!
Somehow I thought it is deprecated because usually I don't have to type it.

I am not aware of it but probably in newer versions. I think you can't install the latest version of Jupyter inside of Qiime2 environment because of python version and other dependencies. It is why the same code works outside of environment but not showing figures inside.