import os
import sys
import csv
import numpy as np
import pandas as pd
import tkinter as tk
from tkinter import *
from pandas import DataFrame
import matplotlib.pyplot as plt
from tkinter.filedialog import askopenfilename
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
root = tk.Tk()
root.attributes('-fullscreen',True)
def pencere():
app = QApplication(sys.argv)
window = QWidget()
sys.exit(app.exec())
def donothing():
filewin = Toplevel(root)
button = Button(filewin)
df = pd.read_csv(r'C:\Users\Admin\PycharmProjects\deneme.py\veri.csv')
print(df.info)
figure1 = plt.Figure(figsize=(5, 5), dpi=90)
ax1 = figure1.add_subplot(211)
bar1 = FigureCanvasTkAgg(figure1, root)
bar1.get_tk_widget().grid(padx=1000, pady='0')
df.plot(kind='bar', legend=True, ax=ax1)
figure2 = plt.Figure(figsize=(5, 5), dpi=90)
ax2 = figure2.add_subplot(211)
line2 = FigureCanvasTkAgg(figure2, root)
line2.get_tk_widget().grid(padx=1000,pady='0')
df.plot(kind='line', legend=True, ax=ax2, color='r', marker='o', fontsize=10)
def save():
filemenu = [('All Files', '.'),
('Python Files', '.py'),
('Text Document', '.txt')]
file = save(filetypes=filemenu, defaultextension=filemenu)
menubar = Menu(root)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="New", command=donothing)
filemenu.add_command(label="Open", command=open)
filemenu.add_command(label="Save", command=lambda: save)
filemenu.add_command(label="Save as", command=lambda: save)
filemenu.add_command(label="Close", command=sys.exit)
filemenu.add_separator()
filemenu.add_command(label="Exit", command=exit)
menubar.add_cascade(label="File", menu=filemenu)
editmenu = Menu(menubar, tearoff=0)
editmenu.add_command(label="Undo", command=donothing)
editmenu.add_separator()
editmenu.add_command(label="Cut", command=donothing)
editmenu.add_command(label="Copy", command=donothing)
editmenu.add_command(label="Paste", command=donothing)
editmenu.add_command(label="Delete", command=donothing)
editmenu.add_command(label="Select All", command=donothing)
menubar.add_cascade(label="Edit", menu=editmenu)
helpmenu = Menu(menubar, tearoff=0)
helpmenu.add_command(label="Help Index", command=donothing)
helpmenu.add_command(label="About...", command=donothing)
menubar.add_cascade(label="Help", menu=helpmenu)
button1 = Button(root, text="Giriş yap",command=exit)
button1.place(x=20,y=100)
root.config(menu=menubar)
mainloop()
if name=="main":
Tk()
root.mainloop()