math_fontfamily error with latest matplotlib and schemdraw

Issue #69 resolved
Sai Charan created an issue

I am using schemdraw version 0.15 in google colab jupyter notebook with python version 3.7 and matplotlib version 3.2.2 (last supported version for python 3.7). I couldn’t use labels in my design because it gives me math.fontfamily error. Same issue is seen with earlier version of schemdraw too.

However I don’t see this with later versions of python except for python 3.7 even though schemdraw doc mentions that python 3.7 should also satisfy its requirements.

Let me know if more explanation or any other info is needed

Comments (3)

  1. cdelker repo owner

    Matplotlib’s `mathfont_family` was added in 3.4, so that needs to be the minimum matplotlib version listed in setup.py.

    However, Python 3.7 is compatible with Matplotlib up to 3.5, so schemdraw+matplotlib still works with Python 3.7.

    Unless you’re actually using Matplotlib’s canvas for something else, you can tell schemdraw to draw direct to svg and bypass the Matplotlib dependency altogether:

    schemdraw.use('svg')
    

  2. Sai Charan reporter

    Thanks @cdelker . This last one worked! you are right about the python and matplotlib version relation, but for some reason I couldn’t get rid of the error.

  3. Log in to comment