You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: backend_cairo set_context() is broken for cairocffi #26523
Saving an SVG via cairocffi this way worked in 3.5.2, but fails in 3.6.x - 3.7.2 .
I see though that it's just a cairocffi issue; switching to pycairo seems to work so for now I will give that a try.
File ".../.venv/lib/python3.11/site-packages/matplotlib/backends/backend_cairo.py", line 484, in _save
self._renderer.set_context(cairo.Context(surface))
File ".../.venv/lib/python3.11/site-packages/matplotlib/backends/backend_cairo.py", line 99, in set_context
size = rect.width, rect.height
^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'width'
Expected outcome
savefig should save the fig
Additional information
this is with:
matplotlib==3.7.2
cairocffi==1.6.1
and the brew install of cairo 1.16.0_5
Activity
QuLogic commentedon Aug 18, 2023
Bisect points to #22004.
Fix size inferral when using cairocffi