|
5 | 5 | from matplotlib import pyplot as plt |
6 | 6 | from numpy import where |
7 | 7 |
|
8 | | -import py_eddy_tracker.gui |
9 | 8 | from py_eddy_tracker import data |
| 9 | +from py_eddy_tracker.gui import GUI_AXES |
10 | 10 | from py_eddy_tracker.observations.network import NetworkObservations |
11 | 11 |
|
12 | 12 | # %% |
|
266 | 266 | # %% |
267 | 267 | # Only a map can be tricky to understand, with a timeline it's easier! |
268 | 268 | fig = plt.figure(figsize=(15, 8)) |
269 | | -ax = fig.add_axes([0.04, 0.06, 0.94, 0.88], projection="full_axes") |
| 269 | +ax = fig.add_axes([0.04, 0.06, 0.94, 0.88], projection=GUI_AXES) |
270 | 270 | n.plot(ax, color_cycle=n.COLORS) |
271 | 271 | ax.set_xlim(17.5, 27.5), ax.set_ylim(31, 36), ax.grid() |
272 | 272 | ax = fig.add_axes([0.08, 0.7, 0.7, 0.3]) |
|
278 | 278 | # ----------------- |
279 | 279 | # Display the position of the eddies after a merging |
280 | 280 | fig = plt.figure(figsize=(15, 8)) |
281 | | -ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection="full_axes") |
| 281 | +ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection=GUI_AXES) |
282 | 282 | n.plot(ax, color_cycle=n.COLORS) |
283 | 283 | m1, m0, m0_stop = n.merging_event(triplet=True) |
284 | 284 | m1.display(ax, color="violet", lw=2, label="Eddies after merging") |
|
296 | 296 | # ------------------ |
297 | 297 | # Display the position of the eddies before a splitting |
298 | 298 | fig = plt.figure(figsize=(15, 8)) |
299 | | -ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection="full_axes") |
| 299 | +ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection=GUI_AXES) |
300 | 300 | n.plot(ax, color_cycle=n.COLORS) |
301 | 301 | s0, s1, s1_start = n.spliting_event(triplet=True) |
302 | 302 | s0.display(ax, color="violet", lw=2, label="Eddies before splitting") |
|
314 | 314 | # --------------- |
315 | 315 | # Display the starting position of non-splitted eddies |
316 | 316 | fig = plt.figure(figsize=(15, 8)) |
317 | | -ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection="full_axes") |
| 317 | +ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection=GUI_AXES) |
318 | 318 | birth = n.birth_event() |
319 | 319 | birth.display(ax) |
320 | 320 | ax.set_xlim(17.5, 27.5), ax.set_ylim(31, 36), ax.grid() |
|
325 | 325 | # --------------- |
326 | 326 | # Display the last position of non-merged eddies |
327 | 327 | fig = plt.figure(figsize=(15, 8)) |
328 | | -ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection="full_axes") |
| 328 | +ax = fig.add_axes([0.04, 0.06, 0.90, 0.88], projection=GUI_AXES) |
329 | 329 | death = n.death_event() |
330 | 330 | death.display(ax) |
331 | 331 | ax.set_xlim(17.5, 27.5), ax.set_ylim(31, 36), ax.grid() |
|
0 commit comments