Conda-forge: When should I depend on matplotlib instead of matplotlib-base?

I’ve read the conda-forge documentation about depending on matplotlib vs matplotlib-base that states:

matplotlib on conda-forge comes in two parts. The core library is in matplotlib-base . The actual matplotlib package is this core library plus pyqt . Most, if not all, packages that have dependence at runtime on matplotlib should list this dependence as matplotlib-base unless they explicitly need pyqt . The idea is that a user installing matplotlib explicitly would get a full featured installation with pyqt . However, pyqt is a rather large package, so not requiring it indirectly is better for performance. Note that you may need to include a yum_requirements.txt file in your recipe with

I don’t feel like this helped me understand when to depend on matplotlib instead of matplotlib-base. That is: how do you know when you explicitly need pyqt?

If a user does conda install -n clean-environment -c conda-forge mypackage and the entire dependency tree for mypackage only depends on matplotlib-base (i.e. pyqt is not installed), will users of mypackage still be able to use matplotlib?

Poking around the conda-forge/matplotlib-feedstock (#2 and #178), I think I can answer myself here:

According to conda-forge/matplotlib-feedstock#178:

Due to the new backend fallback mechanism in Matplotlib 3.0.0, a user who choses to install matplotlib-core will get the TkAgg backend automatically

matplotlib-core in the absence of other backends will use Python’s Tk as the backend by default. It’s less pretty than a qt backend, but works fine.

That is: how do you know when you explicitly need pyqt ?

My understanding is that pyqt is only necessary if mypackage has code that was specific to the pyqt backend, either importing pyqt or does matplotlib.use(<qt backend>).

Would you like to open a PR improving the docs :)?

Something that would change the explanation to help the you of two days ago would be great. There’s a guide on The Matplotlib Developers' Guide — Matplotlib 3.3.4.post2588+gafbcb505f documentation and you can also get pointers on working on the docs on matplotlib/matplotlib - Gitter

(one side note - don’t build the docs locally it takes forever so just the automated checks on a pull request do it)

I’m open to making a PR. Since this is conda-specific, is this in scope for the Matplotlib docs? I imagine it’s only relevant to package developers or users who are keen on not picking up a dependency on pyqt from matplotlib. If this is in scope, any suggestions on what section of the docs it belongs in?