okno = Tk() okno.config(padx=10, pady=10) okno.title("Grafy funkcGrafy funkcí") ##### Matematické funkce fceVar=IntVar() # proměnná určuje výběr funkce fceMin=StringVar() fceMax=StringVar() fceFrame = LabelFrame(okno, text="Graf matematické funkce", padx=5, pady=5) fceFrame.grid(column=0, row=0, sticky=W+E ) Radiobutton(fceFrame,text="sin" , variable=fceVar, value=0).grid(column=0, row=0,sticky=W) Radiobutton(fceFrame,text="log" , variable=fceVar, value=1).grid(column=0, row=1) Radiobutton(fceFrame,text="exp" , variable=fceVar, value=2).grid(column=0, row=2) fceFrame.grid_columnconfigure(1, weight=1) fceMin.set('Od') fceMax.set('Do') Entry(fceFrame, textvariable=fceMin, width=7).grid(column=1, row=0, sticky=E) Entry(fceFrame, textvariable=fceMax, width=7).grid(column=1, row=1, sticky=E) Button(okno, text="Vytvoř graf").grid(column=1, row=0, sticky=W+E+N+S) ##### graf ze souboru souborVar = StringVar() # jméno souboru souborFrame = LabelFrame(okno, text="Graf funkce ze souboru", padx=5, pady=5) souborFrame.grid(column=0, row=1, sticky=W+E) souborFrame.grid_columnconfigure(0, weight=1) souborVar.set('/cesta/k/souboru') Entry(souborFrame, textvariable=souborVar).grid(sticky=W) Button(souborFrame, text='Vyber soubor').grid(sticky=E) Button(okno, text="Vytvoř graf").grid(column=1, row=1, sticky=W+E+N+S) ##### popisky os osyFrame = LabelFrame(okno, text="Popisky os", padx=5, pady=5, width=10) osyFrame.grid(column=0, row=2, sticky=W+E ) Label(osyFrame, text='osa X').grid() Label(osyFrame, text='osa Y').grid() osaxVar= StringVar() osayVar= StringVar() Entry(osyFrame, textvariable=osaxVar, width=15).grid(column=1, row=0) Entry(osyFrame, textvariable=osayVar, width=15).grid(column=1, row=1)