Merge pull request #1681 from borglab/fix-1675
commit
9d70605d48
|
@ -32,6 +32,7 @@ from gtsam import Marginals, Point2, Point3, Pose2, Pose3, Values
|
|||
# 2D 39.34693 86.46647 98.88910 99.96645 99.99963
|
||||
# 3D 19.87480 73.85359 97.07091 99.88660 99.99846
|
||||
|
||||
|
||||
def set_axes_equal(fignum: int) -> None:
|
||||
"""
|
||||
Make axes of 3D plot have equal scale so that spheres appear as spheres,
|
||||
|
@ -127,8 +128,7 @@ def plot_covariance_ellipse_3d(axes,
|
|||
axes.plot_surface(x, y, z, alpha=alpha, cmap='hot')
|
||||
|
||||
|
||||
def plot_covariance_ellipse_2d(axes,
|
||||
origin: Point2,
|
||||
def plot_covariance_ellipse_2d(axes, origin: Point2,
|
||||
covariance: np.ndarray) -> None:
|
||||
"""
|
||||
Plots a Gaussian as an uncertainty ellipse
|
||||
|
@ -154,7 +154,7 @@ def plot_covariance_ellipse_2d(axes,
|
|||
e1 = patches.Ellipse(origin,
|
||||
np.sqrt(w[0]) * 2 * k,
|
||||
np.sqrt(w[1]) * 2 * k,
|
||||
np.rad2deg(angle),
|
||||
angle=np.rad2deg(angle),
|
||||
fill=False)
|
||||
axes.add_patch(e1)
|
||||
|
||||
|
@ -180,6 +180,7 @@ def plot_point2_on_axes(axes,
|
|||
if P is not None:
|
||||
plot_covariance_ellipse_2d(axes, point, P)
|
||||
|
||||
|
||||
def plot_point2(
|
||||
fignum: int,
|
||||
point: Point2,
|
||||
|
|
Loading…
Reference in New Issue