angeris / cfmm-routing-code

Convex optimization for fun and profit.
253 stars 47 forks source link

ValueError on `text.latex.preamble` parameter #11

Open mmsaki opened 7 months ago

mmsaki commented 7 months ago

Erorr

ValueError: Key text.latex.preamble: Could not convert ['\\usepackage{gensymb}'] to str

See more of this issue here documented https://github.com/matplotlib/matplotlib/issues/26464

Fix

def latexify(fig_width=None, fig_height=None, font_size=12, columns=2):
    params = {'backend': 'ps',
        # Fix: This is expecting a string instead of array
        'text.latex.preamble': '\\usepackage{gensymb}',
    }