second plot first steps

This commit is contained in:
jens 2020-12-26 14:40:55 +01:00
parent c31bafba81
commit 1b2a03b7f6

View File

@ -399,13 +399,30 @@ 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))
key_press_handler(event, self.canvas, self.toolbar1)
print("you pressed {}".format(event.key))
key_press_handler(event, self.canvas, self.toolbar1)
#print(panel.SHvalue.get())
#panel.bcollect.invoke()
@ -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)