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
I found with GTK3Cairo backend FigureCanvas has neither fig.canvas.get_renderer() nor fig.canvas.renderer. I changed the code (at __init__.py line 35) so I could use this
AttributeError: 'FigureCanvasGTK3Cairo' object has no attribute 'renderer'
As I don't feel this is a clean patch and I want to discuss before submitting a pull request. I also seen there were an issue with macos backend and I guess the first try statement is there for that reason. I would suggest hasattr or isinstance tests but there could be a clean a way I'm not aware. Any suggestions ?
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting this. An annoying problem... I would re-write it according to your hasattr suggestion to avoid deeply nested indentations, especially if there are some backends with other inconsistent behaviour. But if you could also report this to matplotlib devs it would be helpful in the long run, this might just be an inconsistency they could easily fix.
Hi,
I found with GTK3Cairo backend
FigureCanvas
has neitherfig.canvas.get_renderer()
norfig.canvas.renderer
. I changed the code (at__init__.py
line 35) so I could use thisand get rid of
As I don't feel this is a clean patch and I want to discuss before submitting a pull request. I also seen there were an issue with macos backend and I guess the first
try
statement is there for that reason. I would suggesthasattr
orisinstance
tests but there could be a clean a way I'm not aware. Any suggestions ?The text was updated successfully, but these errors were encountered: