File "C:\Users\Grapes\Desktop\Workbench\plotnine-scripts\.venv\Lib\site-packages\matplotlib\__init__.py", line 781, in __setitem__
raise ValueError(f"Key {key}: {ve}") from None
ValueError: Key backend: '<object object at 0x000001E0483EF970>' is not a valid value for backend; supported values are ['gtk3agg', 'gtk3cairo', 'gtk4agg', 'gtk4cairo', 'macosx', 'nbagg', 'notebook', 'qtagg', 'qtcairo', 'qt5agg', 'qt5cairo', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wxagg', 'wxcairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
Problem
Hi all, I'm using Plotnine for a first time. Currently migrating my visualizations from matplotlib and I've played around with plotnine's heatmap.
I found a possible bug when running
theme_matplotlib(). The plot works fine withouttheme_matplotlib(), but has a problem when I addtheme_matplotlib()to theggplotReplicate
*.pyfile, not*.ipynb)What I found
BackendRegistry.is_valid_backendmethod with the if-checkbackendis expected to be string, but instead it is received anobject, notstr. This raised the exception. I added a bandaid fix on my local installation to trigger its intended error message instead.tkagg:BackendRegistry.is_valid_backendreceives an object instead of a string.