second plot first steps
This commit is contained in:
parent
c31bafba81
commit
1b2a03b7f6
20
JFSphoto.py
20
JFSphoto.py
@ -399,9 +399,26 @@ class Jfsphoto (object):
|
||||
|
||||
|
||||
def do_math(self,panel):
|
||||
|
||||
def onclick(event):
|
||||
self.ax2.clear()
|
||||
print('%s click: button=%d, xdata=%f, ydata=%f' %('double' if event.dblclick else 'single', event.button,
|
||||
event.xdata, event.ydata))
|
||||
x=[]
|
||||
y=[]
|
||||
for xx in self.col_list:
|
||||
x.append(int(xx))
|
||||
yy = event.xdata
|
||||
p = int((yy - self.nm_left)*(1/self.nm_step))
|
||||
if self.ok.get() < 3:
|
||||
yy = self.df.iloc[p][xx]
|
||||
elif self.ok.get()==3:
|
||||
yy = self.df.iloc[p][xx+'_abs']
|
||||
elif self.ok.get()==4:
|
||||
yy = self.df.iloc[p][xx+'_trans']
|
||||
y.append(yy)
|
||||
self.ax2.plot(x, y, linewidth=0.6)
|
||||
self.canvas.draw()
|
||||
|
||||
def on_key_press(event):
|
||||
print("you pressed {}".format(event.key))
|
||||
@ -433,7 +450,8 @@ class Jfsphoto (object):
|
||||
self.ctr_mid.grid(row=0, column=0, sticky="nsew")
|
||||
self.ctr_right.grid(row=0, column=1, sticky="ns")
|
||||
self.fig = plt.Figure(figsize=(8,4),dpi=120)
|
||||
plt.rc('legend',fontsize=8)
|
||||
plt.rcParams.update({'font.size': 5})
|
||||
plt.rc('legend',fontsize=5)
|
||||
|
||||
self.ax1 = self.fig.add_subplot(2,3,(1,5))
|
||||
self.ax2 = self.fig.add_subplot(2,3,3)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user