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

Skip to content

Commit 0cfb4fe

Browse files
committed
Get rid of annoying border for Tk Canvases
1 parent e2a8342 commit 0cfb4fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ def __init__(self, figure, master=None, resize_callback=None):
222222
t1,t2,w,h = self.figure.bbox.bounds
223223
w, h = int(w), int(h)
224224
self._tkcanvas = Tk.Canvas(
225-
master=master, width=w, height=h, borderwidth=4)
225+
master=master, width=w, height=h, borderwidth=0,
226+
highlightthickness=0)
226227
self._tkphoto = Tk.PhotoImage(
227228
master=self._tkcanvas, width=w, height=h)
228229
self._tkcanvas.create_image(w//2, h//2, image=self._tkphoto)

0 commit comments

Comments
 (0)