|
1 | 1 | import matplotlib.pyplot as plt |
| 2 | +from matplotlib.transforms import offset_copy |
2 | 3 | import numpy as np |
3 | 4 |
|
4 | 5 | from ..tools import generate_monte_carlo_ellipses, import_optional_dependency |
@@ -114,9 +115,20 @@ def ellipses( |
114 | 115 | ) |
115 | 116 |
|
116 | 117 | plt.legend() |
| 118 | + |
117 | 119 | ax.set_title("1$\\sigma$, 2$\\sigma$ and 3$\\sigma$ Monte Carlo Ellipses") |
118 | | - ax.set_ylabel("North (m)") |
119 | | - ax.set_xlabel("East (m)") |
| 120 | + north_south_offset = offset_copy( |
| 121 | + ax.transAxes, fig=plt.gcf(), x=-72, y=0, units="points" |
| 122 | + ) |
| 123 | + east_west_offset = offset_copy( |
| 124 | + ax.transAxes, fig=plt.gcf(), x=0, y=-30, units="points" |
| 125 | + ) |
| 126 | + ax.text(0, 0, "West", va="bottom", ha="center", transform=east_west_offset) |
| 127 | + ax.text(1, 0, "East", va="bottom", ha="center", transform=east_west_offset) |
| 128 | + ax.text(0, 0, "South", va="bottom", ha="left", transform=north_south_offset) |
| 129 | + ax.text(0, 1, "North", va="top", ha="left", transform=north_south_offset) |
| 130 | + ax.set_ylabel("Y (m)") |
| 131 | + ax.set_xlabel("X (m)") |
120 | 132 |
|
121 | 133 | # Add background image to plot |
122 | 134 | # TODO: In the future, integrate with other libraries to plot the map (e.g. cartopy, ee, etc.) |
|
0 commit comments