| @@ 116-130 (lines=15) @@ | ||
| 113 | xline2.append(x2) |
|
| 114 | y2=line2[0,1] |
|
| 115 | yline2.append(y2) |
|
| 116 | if count==2: |
|
| 117 | print('>> Please choose two points for first line (onset of reduction)') |
|
| 118 | line1 = plt.ginput(2) # it will wait for two clicks |
|
| 119 | line1=np.array(line1) |
|
| 120 | x1=line1[0,0] |
|
| 121 | xline1.append(x1) |
|
| 122 | y1=line1[0,1] |
|
| 123 | yline1.append(y1) |
|
| 124 | print('>> Please choose two points for first line (onset of reduction)') |
|
| 125 | line2 = plt.ginput(2) |
|
| 126 | line2=np.array(line2) |
|
| 127 | x2=line2[0,0] |
|
| 128 | xline2.append(x2) |
|
| 129 | y2=line2[0,1] |
|
| 130 | yline2.append(y2) |
|
| 131 | #Find intersection |
|
| 132 | xdiff = (line1[0][0] - line1[1][0], line2[0][0] - line2[1][0]) |
|
| 133 | ydiff = (line1[0][1] - line1[1][1], line2[0][1] - line2[1][1]) |
|
| @@ 101-115 (lines=15) @@ | ||
| 98 | xline2=[] |
|
| 99 | yline2=[] |
|
| 100 | #Point Clicks and Intersections |
|
| 101 | if count==1: |
|
| 102 | print('>> Please choose two points for first line (onset of oxidation)') |
|
| 103 | line1 = plt.ginput(2) # it will wait for two clicks |
|
| 104 | line1=np.array(line1) |
|
| 105 | x1=line1[0,0] |
|
| 106 | xline1.append(x1) |
|
| 107 | y1=line1[0,1] |
|
| 108 | yline1.append(y1) |
|
| 109 | print('>> Please choose two points for first line (onset of oxidation)') |
|
| 110 | line2 = plt.ginput(2) |
|
| 111 | line2=np.array(line2) |
|
| 112 | x2=line2[0,0] |
|
| 113 | xline2.append(x2) |
|
| 114 | y2=line2[0,1] |
|
| 115 | yline2.append(y2) |
|
| 116 | if count==2: |
|
| 117 | print('>> Please choose two points for first line (onset of reduction)') |
|
| 118 | line1 = plt.ginput(2) # it will wait for two clicks |
|