Skip to content

Commit f9c3061

Browse files
committed
Allow to change more paremeter in GUI
1 parent b7aa15e commit f9c3061

File tree

1 file changed

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

1 file changed

+4
-5
lines changed

src/py_eddy_tracker/appli/gui.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(
3939
self.time_field = False
4040
self.txt = None
4141
self.ax = None
42+
self.kw_label = dict()
4243
self.setup(**kwargs)
4344

4445
def setup(
@@ -53,6 +54,8 @@ def setup(
5354
position=(0.05, 0.05, 0.9, 0.9),
5455
**kwargs,
5556
):
57+
self.kw_label["fontsize"] = kwargs.pop("fontsize", 12)
58+
self.kw_label["fontweight"] = kwargs.pop("fontweight", "demibold")
5659
# To text each visible eddy
5760
if field_txt:
5861
self.field_txt = self.eddy[field_txt]
@@ -210,11 +213,7 @@ def update(self):
210213
if self.field_txt is not None:
211214
for i in where(m)[0]:
212215
mappable = self.ax.text(
213-
self.x_core[i],
214-
self.y_core[i],
215-
self.field_txt[i],
216-
fontsize=12,
217-
fontweight="demibold",
216+
self.x_core[i], self.y_core[i], self.field_txt[i], **self.kw_label
218217
)
219218
self.mappables.append(mappable)
220219
self.ax.draw_artist(mappable)

0 commit comments

Comments
 (0)