Plotting graphs in Tkinter generated from Pandas dataframe using data from MySQL or SQLite database

preview_player
Показать описание
0:39 Pandas Pie Plot
1:35 Pandas Pie Plot in editor
5:15 Pie Chart in Tkinter
6:14 Line chart
6:19 Both Line chart and Pie chart in same window
9:14 MySQL database connection
9:25 SQLite connection
9:40 Unique class name from student table as options for Combobox
10:24 String Variable
11:30 Function to generate graph
12:44 DataFrame using MySQL database
13:00 Pandas DataFrame read_sql()

We have seen how to create Plots using Pandas DataFRame, now we will create one by importing libraries from matplotlib
Once the graph is ready we will use the same to generate a figure by using get_figure()
We will create a blank tkinter window and them place this graph
plot1 = FigureCanvasTkAgg(fig1, my_w)

We can place multiple plots in same window.
We will read data from our student table kept inside MySQL database or SQLite database. Here we will populate the Combobox options with distinct or unique class names. Once the user select this class name the marks of the students of this class is take and graph is plotted. We can change the graph by using a different selection of class from the combobox.

#TkinterGraph #pandasplotTkinter #mysqldataGraph #tkinterPieGraph #tkinterLineGraph #python #plus2net #PythonGraphs
Рекомендации по теме
Комментарии
Автор

Gracias, me sirvió de mucho tu tutorial 👍

gersonrodriguez