working on math 3Dplot
This commit is contained in:
parent
c78c7ed4d8
commit
49da6885cb
32
JFSphoto.py
32
JFSphoto.py
@ -401,13 +401,17 @@ class Jfsphoto (object):
|
||||
#print(panel.SHvalue.get())
|
||||
#panel.bcollect.invoke()
|
||||
stati = [("Raw",1),("Raw + Baseline",2),("Transmission",4),("Absorbanz",3)]
|
||||
self.proji3d = False
|
||||
|
||||
def toggle():
|
||||
if self.kbtn.config('relief')[-1] == 'sunken':
|
||||
self.kbtn.config(relief='raised')
|
||||
self.do_2dprint()
|
||||
self.proji3d=False
|
||||
else:
|
||||
self.kbtn.config(relief='sunken')
|
||||
self.do_3dprint()
|
||||
self.proji3d=True
|
||||
|
||||
win = tk.Toplevel()
|
||||
self.center = tk.Frame(win, bg='gray2', width=800, height=400, padx=3, pady=3)
|
||||
@ -462,7 +466,7 @@ class Jfsphoto (object):
|
||||
def do_3dprint(self):
|
||||
self.ax1 = self.fig.gca(projection='3d')
|
||||
for xx in self.col_list:
|
||||
self.df.plot(x = 'nmscale',y = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
self.df.plot(y = 'nmscale',x = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
self.canvas.draw()
|
||||
|
||||
def show_selected(self):
|
||||
@ -500,11 +504,6 @@ class Jfsphoto (object):
|
||||
self.ok.set(1)
|
||||
self.canvas.draw()
|
||||
|
||||
# def kini(self):
|
||||
# self.load_kinetics("kini.dat")
|
||||
# self.calculate()
|
||||
# self.show_first_look()
|
||||
|
||||
|
||||
def do_get_range(self):
|
||||
self.right = 0
|
||||
@ -545,22 +544,43 @@ class Jfsphoto (object):
|
||||
#c[i] = np.log10(b[i]/y[i])
|
||||
self.df[xx+'_trans'] = c
|
||||
|
||||
# self.ax1 = self.fig.gca(projection='3d')
|
||||
# for xx in self.col_list:
|
||||
# self.df.plot(y = 'nmscale',x = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
|
||||
|
||||
def look(self):
|
||||
self.ax1.clear()
|
||||
if self.proji3d==True:
|
||||
self.ax1 = self.fig.gca(projection='3d')
|
||||
else:
|
||||
self.ax1 = self.fig.add_subplot(111)
|
||||
if self.ok.get()==1:
|
||||
for xx in self.col_list:
|
||||
if self.proji3d==True:
|
||||
self.df.plot(x= 'nmscale',y = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
else:
|
||||
self.df.plot(x = 'nmscale',y = xx, linewidth=0.6,ax=self.ax1)
|
||||
elif self.ok.get()==2:
|
||||
for xx in self.col_list:
|
||||
if self.proji3d==True:
|
||||
self.df.plot(x= 'nmscale',y = xx, zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
else:
|
||||
self.df.plot(x = 'nmscale',y = xx, linewidth=0.6,ax=self.ax1)
|
||||
self.df.plot(x = 'nmscale',y = 'baseline', color='blue',linewidth=0.6,ax=self.ax1)
|
||||
self.df.plot(x = 'nmscale',y = 'darkline', color='black',linewidth=0.6,ax=self.ax1)
|
||||
elif self.ok.get()==3:
|
||||
for xx in self.col_list:
|
||||
if self.proji3d==True:
|
||||
self.df.plot(x= 'nmscale',y = xx+'_abs', zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
else:
|
||||
self.df.plot(x = 'nmscale',y = xx+'_abs', linewidth=0.6,ax=self.ax1)
|
||||
self.ax1.set_xlim([self.nm_left+self.left*self.nm_step, self.nm_left+self.right*self.nm_step])
|
||||
elif self.ok.get()==4:
|
||||
for xx in self.col_list:
|
||||
if self.proji3d==True:
|
||||
self.df.plot(x= 'nmscale',y = xx+'_trans', zs= int(xx), linewidth=0.6,ax=self.ax1)
|
||||
else:
|
||||
self.df.plot(x = 'nmscale',y = xx+'_trans',linewidth=0.6,ax=self.ax1)
|
||||
self.ax1.set_xlim([self.nm_left+self.left*self.nm_step, self.nm_left+self.right*self.nm_step])
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user