Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c03532c

Browse files
authored
updated gtk backend
for fixing this error: ``` File "/home/mab/.local/lib/python3.10/site-packages/matplotlib/backends/_backend_gtk.py", line 236, in resize toolbar_size = self.toolbar.size_request() AttributeError: 'NavigationToolbar2GTK4' object has no attribute 'size_request'. Did you mean: 'get_size_request'? ```
1 parent f7c5396 commit c03532c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/_backend_gtk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def resize(self, width, height):
233233
width = int(width / self.canvas.device_pixel_ratio)
234234
height = int(height / self.canvas.device_pixel_ratio)
235235
if self.toolbar:
236-
toolbar_size = self.toolbar.size_request()
236+
toolbar_size = self.toolbar.get_size_request()
237237
height += toolbar_size.height
238238
canvas_size = self.canvas.get_allocation()
239239
if self._gtk_ver >= 4 or canvas_size.width == canvas_size.height == 1:

0 commit comments

Comments
 (0)