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

Skip to content

Commit 248399e

Browse files
authored
Merge pull request #12016 from akhilman/fix-gtk3agg-attribute-error
Fix AttributeError in GTK3Agg backend
2 parents 7c0e760 + 34f9125 commit 248399e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_gtk3agg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22

3+
from .. import cbook
34
from . import backend_agg, backend_cairo, backend_gtk3
45
from .backend_cairo import cairo
56
from .backend_gtk3 import Gtk, _BackendGTK3
@@ -42,7 +43,7 @@ def on_draw_event(self, widget, ctx):
4243
width = int(bbox.x1) - int(bbox.x0)
4344
height = int(bbox.y1) - int(bbox.y0)
4445

45-
buf = backend_cairo._unmultipled_rgba8888_to_premultiplied_argb32(
46+
buf = cbook._unmultipled_rgba8888_to_premultiplied_argb32(
4647
np.asarray(self.copy_from_bbox(bbox)))
4748
image = cairo.ImageSurface.create_for_data(
4849
buf.ravel().data, cairo.FORMAT_ARGB32, width, height)

0 commit comments

Comments
 (0)