Math: output dataframe
This commit is contained in:
parent
28762ed524
commit
c0e50e6c8c
@ -295,7 +295,7 @@ class buildpanel(tk.Frame):
|
|||||||
self.jfspkine2 = tk.Entry(self.jfslf1,width=4)
|
self.jfspkine2 = tk.Entry(self.jfslf1,width=4)
|
||||||
self.jfspkine2.grid(row=1,column=1,sticky='e')
|
self.jfspkine2.grid(row=1,column=1,sticky='e')
|
||||||
|
|
||||||
self.jfspdmath = tk.Button(self,text='Math..',fg="blue", command=loaddata)
|
self.jfspdmath = tk.Button(self,text='Math..',fg="blue", command=self.jf.do_math)
|
||||||
self.jfspdmath.grid(row=save_row,column=4,sticky='e')
|
self.jfspdmath.grid(row=save_row,column=4,sticky='e')
|
||||||
|
|
||||||
### Reset changes from loading phometerfile
|
### Reset changes from loading phometerfile
|
||||||
|
|||||||
16
JFSphoto.py
16
JFSphoto.py
@ -8,6 +8,11 @@ import numpy as np
|
|||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import config
|
import config
|
||||||
|
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
#matplotlib.use("TkAgg")
|
||||||
|
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
|
||||||
|
from matplotlib.figure import Figure
|
||||||
####################################### object
|
####################################### object
|
||||||
|
|
||||||
class Jfsphoto (object):
|
class Jfsphoto (object):
|
||||||
@ -265,5 +270,12 @@ class Jfsphoto (object):
|
|||||||
except IOError:
|
except IOError:
|
||||||
print("By the great otter!","No config.ini file")
|
print("By the great otter!","No config.ini file")
|
||||||
|
|
||||||
|
def do_math(self):
|
||||||
|
root = tk.Tk()
|
||||||
|
root.title("Mathoptions")
|
||||||
|
fig = plt.Figure(figsize=(8,4),dpi=100)
|
||||||
|
ax1 = fig.add_subplot(111)
|
||||||
|
self.df.plot(x = 'nmscale',y = 'p1', color='red',linewidth=0.6,ax=ax1)
|
||||||
|
canvas = FigureCanvasTkAgg(fig, master = root)
|
||||||
|
canvas._tkcanvas.pack(side = tk.TOP, fill = tk.BOTH, expand = 1)
|
||||||
|
root.mainloop()
|
||||||
Loading…
Reference in New Issue
Block a user