Skip to content

Commit cbf1267

Browse files
committed
Choose txt field for anim
1 parent edc832b commit cbf1267

File tree

1 file changed

+4
-1
lines changed
  • src/py_eddy_tracker/appli

1 file changed

+4
-1
lines changed

src/py_eddy_tracker/appli/gui.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__(
3434
self.sleep_event = sleep_event
3535
self.mappables = list()
3636
self.field_color = None
37+
self.field_txt = None
3738
self.time_field = False
3839
self.setup(**kwargs)
3940

@@ -42,12 +43,14 @@ def setup(
4243
cmap="jet",
4344
lut=None,
4445
field_color="time",
46+
field_txt="track",
4547
range_color=(None, None),
4648
nb_step=25,
4749
figsize=(8, 6),
4850
**kwargs,
4951
):
5052
self.field_color = self.eddy[field_color].astype("f4")
53+
self.field_txt = self.eddy[field_txt]
5154
rg = range_color
5255
if rg[0] is None and rg[1] is None and field_color == "time":
5356
self.time_field = True
@@ -183,7 +186,7 @@ def update(self):
183186
# Update id txt
184187
for i in where(m)[0]:
185188
mappable = self.ax.text(
186-
self.x_core[i], self.y_core[i], self.track[i], fontsize=8
189+
self.x_core[i], self.y_core[i], self.field_txt[i], fontsize=8
187190
)
188191
self.mappables.append(mappable)
189192
self.ax.draw_artist(mappable)

0 commit comments

Comments
 (0)