Skip to content
Snippets Groups Projects
Commit 3cdbe879 authored by Francois POLACK's avatar Francois POLACK
Browse files

Fix : click and drag bug outside lines

add:	print  Fractal coefficient of the segments on line mode exit
parent 90a6c9aa
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,11 @@ class Crms_fig(fig.Figure):
if len(self.vertices) >0:
self.line.set_marker("") # no marker
self.redraw_line()
for p in self.vertices:
print(p)
for ind in range(len(self.vertices)-1):
print("2alpha", 2 *(np.log(self.vertices[ind+1][1])-np.log(self.vertices[ind][1]))/
(np.log(self.vertices[ind+1][0])-np.log(self.vertices[ind][0])))
self.lineedit=False
self.canvas.set_cursor(1)
......@@ -156,6 +161,8 @@ class Crms_fig(fig.Figure):
self.vertices.insert(index,(event.xdata,event.ydata))
x,y=zip(*self.vertices)
self.line.set_data(list(x),list(y))
else:
return
self.index=index
self.mvcid = self.canvas.mpl_connect('motion_notify_event', self.on_mouse_move)
self.brcid = self.canvas.mpl_connect('button_release_event', self.on_button_release)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment