(beta, points, color='r', ax=None, display=False, mode='all', export=False, img_name='default_img_name')
| 141 | return ax |
| 142 | |
| 143 | def plot_plane_normal(beta, points, color='r', ax=None, display=False, mode='all', export=False, img_name='default_img_name'): |
| 144 | normal = beta[0:2].tolist() |
| 145 | normal.append(-1.0) |
| 146 | normal = normal / np.sqrt(np.sum(np.square(normal))) |
| 147 | normals = np.expand_dims(normal, 0).repeat(len(points[0]), axis=0).T |
| 148 | if mode == 'all': |
| 149 | ax.quiver(points[0,:], points[1, :], points[2, :], -normals[0, :], -normals[1, :], -normals[2, :], length=0.2, |
| 150 | normalize=True, color=color) |
| 151 | else: |
| 152 | ax.quiver(points[0,0], points[1, 0], points[2, 0], -normals[0, 0], -normals[1, 0], -normals[2, 0], length=0.2, |
| 153 | normalize=True, color=color) |
| 154 | |
| 155 | if display: |
| 156 | plt.show() |
| 157 | if export: |
| 158 | plt.savefig(img_name) |
| 159 | |
| 160 | |
| 161 | def plot_normals(normals, points, color='r', ax=None, display=False, mode='all', export=False, img_name='default_img_name'): |
nothing calls this directly
no outgoing calls
no test coverage detected