Skip to content

Commit 2cf8408

Browse files
committed
organizing things
1 parent 32d7737 commit 2cf8408

File tree

6 files changed

+150
-42
lines changed

6 files changed

+150
-42
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Graphython
2-
Graphython app is a graph making program. It makes matplotlib graphs more easy to visualize.
3-
This program takes n_rows x 2_columns.
4-
5-
future_scope.py is intentioned for project scope expansion in the deconvolution of curves
2+
**Graphython application is a graph making program.**
3+
## Attributes
4+
1. It makes use of matplotlib graphs more easy to visualize.
5+
2. This program takes n_rows x 2_columns.
6+
3. ***future_scope.py*** is intentioned for project scope expansion in the deconvolution of curves
67

78
## Requirements
89
Python 3.6+
910
* NumPy (`pip install numpy`)
1011
* Pandas (`pip install pandas`)
1112
* MatplotLib (`pip install matplotlib`)
12-
* Lmfit (`pip install lmfit`)
1313

1414
## Project demo
15-
![image](https://user-images.githubusercontent.com/63915540/158064240-d8bdbd8c-7ff5-416c-86ed-b0db84a4b61f.png)
15+
![app-window](https://user-images.githubusercontent.com/63915540/158064240-d8bdbd8c-7ff5-416c-86ed-b0db84a4b61f.png)
1616

1717

1818
## Contributing

assets/gicon.ico

205 KB
Binary file not shown.

assets/gicon.png

8.84 KB
Loading

assets/gicon.svg

+105
Loading

future_scope.py

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
import random
2+
import numpy as np
3+
import pandas as pd
4+
import tkinter as tk
5+
from tkinter import messagebox as msg
6+
from tkinter import ttk, Menu, Spinbox, filedialog, scrolledtext
7+
import matplotlib as mpl
8+
from matplotlib import pyplot as plt
9+
from matplotlib.backends.backend_tkagg import (
10+
FigureCanvasTkAgg, NavigationToolbar2Tk)
11+
from matplotlib.figure import Figure
212
import lmfit.models as mdl
313

414
# =============| Import Button function |=============#

main.py

+29-36
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1+
import numpy as np
2+
import pandas as pd
13
import tkinter as tk
24
from tkinter import messagebox as msg
35
from tkinter import ttk, Menu, Spinbox, filedialog, scrolledtext
46
import matplotlib as mpl
5-
import numpy as np
6-
import pandas as pd
7+
from matplotlib import pyplot as plt
78
from matplotlib.backends.backend_tkagg import (
89
FigureCanvasTkAgg, NavigationToolbar2Tk)
910
from matplotlib.figure import Figure
10-
from matplotlib import pyplot as plt
11+
1112

1213
# =====================================================#
1314
# ======= Initial Parameters =======#
1415
# =====================================================#
1516

1617
mpl.use("TkAgg")
1718
mpl.style.use('seaborn-bright')
18-
root = tk.Tk()
19-
# root.geometry("800x600")
20-
root.resizable(True, False)
21-
root.title('GraphMaker')
19+
app = tk.Tk()
20+
# app.geometry("800x600")
21+
app.resizable(True, False)
22+
app.title('GraphMaker')
2223

2324
# =====================================================#
2425
# ========= Functions Area =========#
@@ -127,13 +128,13 @@ def info_call():
127128

128129
# ===========| Message Box |============#
129130
def _msgBox():
130-
msg.showinfo('About GraphMaker', 'This program was made in python with Tkinter module.\nYear of development: 2020.')
131+
msg.showinfo('About GraphMaker', 'This program is made in Python with Tkinter module.\nYear of development: 2020.')
131132

132133

133134
# =========| Exit GUI cleanly |=========#
134135
def _quit():
135-
root.quit()
136-
root.destroy()
136+
app.quit()
137+
app.destroy()
137138
exit()
138139

139140

@@ -149,21 +150,13 @@ def widget_func(widget, tabName, text_, textv_, he_, wi_, command_, c_, r_, py_,
149150
sticky=stik_)
150151

151152

152-
# ==============| Widgets func |==============#
153-
'''class getWidget:
154-
def __init__(self, widget, tabName, text_, textv, height, width,
155-
command, column, row, py, px, cs, rs, stik_, **kwargs):
156-
self.textv = textv
157-
self.stik_ = stik_
158-
self.tabname = tabname
159-
'''
160-
# ======================================================================================# #### ####
161-
# ======================= Menu Area =======================# ## |##| ##
162-
# ======================================================================================# ## ## ##
153+
# ======================================================================================#
154+
# ======================= Menu Area =======================#
155+
# ======================================================================================#
163156

164157
# -------------------| Menu Bar |-------------------#
165-
menu_bar = Menu(root)
166-
root.config(menu=menu_bar)
158+
menu_bar = Menu(app)
159+
app.config(menu=menu_bar)
167160

168161
# -------------------| File Menu |------------------#
169162
file_menu = Menu(menu_bar, tearoff=0)
@@ -177,18 +170,18 @@ def __init__(self, widget, tabName, text_, textv, height, width,
177170
help_menu.add_command(label="About", command=_msgBox)
178171
menu_bar.add_cascade(label="Help", menu=help_menu)
179172

180-
# ======================================================================================# ##########
181-
# ======================= Multi-Tab ======================# ##
182-
# ======================================================================================# ##
173+
# ======================================================================================#
174+
# ======================= Multi-Tab ======================#
175+
# ======================================================================================#
183176

184-
tabControl = ttk.Notebook(root)
177+
tabControl = ttk.Notebook(app)
185178
tab_1 = ttk.Frame(tabControl)
186179
tabControl.add(tab_1, text=' Graph ')
187180
tabControl.pack(expand=1, fill="both")
188181

189-
# ####################################################################################### ##
190-
# #################### Tab-1 Area ########################## ##
191-
# ####################################################################################### ##
182+
# #######################################################################################
183+
# #################### Tab-1 Area ##########################
184+
# #######################################################################################
192185

193186
# =================| Graph-Canvas Frame |=================#
194187
graph_frame = ttk.LabelFrame(tab_1, text=' Graph Canvas ')
@@ -262,13 +255,13 @@ def __init__(self, widget, tabName, text_, textv, height, width,
262255
curRad2 = tk.Radiobutton(grid_, text="Off", variable=radVar, value=0, ).grid(column=1, row=15, )
263256

264257
# ==========================| Button Area |==========================#
265-
widget_func('btn', plotting, 'Add', None, None, None, openFile, 1, 16, 10, 0, 1, 1, None) # Add btn
266-
widget_func('btn', plotting, 'Plot', None, None, None, plotGraph, 1, 17, 1, 0, 1, 1, None) # Plot btn
267-
widget_func('btn', plotting, 'Refresh', None, None, None, re_fresh, 1, 18, 10, 0, 1, 1, None) # Refresh btn
268-
widget_func('btn', plotting, 'Close', None, None, None, _quit, 1, 19, 1, 0, 1, 1, None) # Close btn
258+
widget_func('btn', plotting, 'Add', None, None, None, openFile, 1, 16, 10, 0, 1, 1, None)
259+
widget_func('btn', plotting, 'Plot', None, None, None, plotGraph, 1, 17, 1, 0, 1, 1, None)
260+
widget_func('btn', plotting, 'Refresh', None, None, None, re_fresh, 1, 18, 10, 0, 1, 1, None)
261+
widget_func('btn', plotting, 'Close', None, None, None, _quit, 1, 19, 1, 0, 1, 1, None)
269262

270263

271264
# =============| Program Icon |=============#
272-
root.iconbitmap('gicon.ico')
265+
app.iconbitmap('gicon.ico')
273266

274-
root.mainloop()
267+
app.mainloop()

0 commit comments

Comments
 (0)