Tkinter + matplotlib

Hello, such a problem, I wrote to move the 2D figure according to the chart. But when I enter the coordinates of the shift, the chart is displayed in the console. I would like it to be displayed in a window.

from tkinter import *
from tkinter.messagebox import showinfo
import math
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT


def click():
a=int(Enter1.get())
b=int(Enter2.get())

x1=300
y1=100
x2=100
y2=100
x3=100
y3=300
x4=300
y4=300

x1 = x1 + a
y1 = y1 + b
x2 = x2 + a
y2 = y2 + b
x3 = x3 + a
y3 = y3 + b
x4 = x4 + a
y4 = y4 + b

x5 =
y5 =
plt.plot(x5,y5)
plt.show()

root = Tk()

root = ‘#fafafa’
root.title('Prog')
root.geometry('500x500')

canvas = Canvas(root,height = 500,width = 500)
canvas.pack()

frame = Frame(root,bg=“#62a77c”)
frame.place(relwidth=1, relheight=1)

info=Label(text='Здравсвуйте,введите цифры!')
info.pack(side = TOP)

Enter1=Entry(frame,bg='white')
Enter1.pack(side = BOTTOM,pady= 50)

Enter2=Entry(frame,bg='white')
Enter2.pack(side = BOTTOM,pady= 0)

Click=Button(root,text= “Enter a numbers!”,command=click)
Click.pack(side = BOTTOM,pady= 5)

root.mainloop()