from tkinter import * from tkinter import ttk root = Tk() root.title("Построение графика функции") root.geometry('1020x620') canvas = Canvas(root,width = 1020, height = 620, bg ="#1D2456") canvas.grid() for y in range(21): k = 50 * y canvas.create_line(10+k,610,10+k,10,width =1,fill='#2F8856') for x in range(13): k = 50 * x canvas.create_line(10,10+k,1010,10+k,width =1,fill='#2F8856') canvas.create_line(310,10,310,610,width = 1 , arrow= FIRST, fill = "white") canvas.create_line(310,310,1010,310,width = 1 , arrow= LAST, fill = "white") def roots(): yr = ttk.Label(root,text = "Ось x") y1 = ttk.Button(root,text="Назначить") yr.grid() y1.grid() roots() root.mainloop()