diff --git a/plotpy/locale/fr/LC_MESSAGES/plotpy.po b/plotpy/locale/fr/LC_MESSAGES/plotpy.po
index 97dd6c4..01b23a0 100644
--- a/plotpy/locale/fr/LC_MESSAGES/plotpy.po
+++ b/plotpy/locale/fr/LC_MESSAGES/plotpy.po
@@ -355,15 +355,15 @@ msgstr "Police des valeurs"
msgid "Scale"
msgstr "Échelle"
+msgid "logarithmic"
+msgstr "logarithmique"
+
msgid "linear"
msgstr "linéaire"
msgid "date/time"
msgstr "date/heure"
-msgid "logarithmic"
-msgstr "logarithmique"
-
msgid "Lower axis limit"
msgstr "Borne inférieure de l'axe"
@@ -630,12 +630,12 @@ msgstr "Classes"
msgid "Number of bins"
msgstr "Nombre de classes"
-msgid "Minimum value"
-msgstr "Valeur minimale"
-
msgid "Min"
msgstr "Min"
+msgid "Minimum value"
+msgstr "Valeur minimale"
+
msgid "Maximum value"
msgstr "Valeur maximale"
@@ -1422,12 +1422,11 @@ msgid ""
"Keyboard/mouse shortcuts:
\n"
" - single left-click: item (curve, image, ...) selection
\n"
" - single right-click: context-menu relative to selected item
\n"
-" - shift: on-active-curve (or image) cursor (+ control to maintain\n"
-"cursor visible)
\n"
-" - shift + control: on-active-curve cursor (+ control to maintain\n"
-"cursor visible)
\n"
+" - shift: on-active-curve (or image) cursor
\n"
+" - shift + control: on-active-curve cursor (maintained visible)
\n"
" - alt: free cursor
\n"
" - left-click + mouse move: move item (when available)
\n"
+" - control + left-click + mouse move: move label on markers and range selections
\n"
" - middle-click + mouse move: pan
\n"
" - right-click + mouse move: zoom"
msgstr ""
@@ -1687,3 +1686,25 @@ msgstr "Rotation et rognage"
msgid "Show cropping rectangle"
msgstr "Afficher le rectangle de rognage"
+msgid ""
+"Keyboard/mouse shortcuts:
\n"
+" - single left-click: item (curve, image, ...) selection
\n"
+" - single right-click: context-menu relative to selected item
\n"
+" - shift: on-active-curve (or image) cursor (+ control to maintain\n"
+"cursor visible)
\n"
+" - shift + control: on-active-curve cursor (+ control to maintain\n"
+"cursor visible)
\n"
+" - alt: free cursor
\n"
+" - left-click + mouse move: move item (when available)
\n"
+" - middle-click + mouse move: pan
\n"
+" - right-click + mouse move: zoom"
+msgstr ""
+"Raccourcis clavier et souris :
\n"
+" - clique gauche : sélection d'un objet (courbe, image, ...)
\n"
+" - clique droit : menu contextuel relatif à l'objet sélectionné
\n"
+" - shift : curseur sur la courbe (ou l'image) active (+ control pour maintenir le curseur visible)
\n"
+" - shift + control : curseur sur la courbe (ou l'image) active (+ control pour maintenir le curseur visible)
\n"
+" - alt : curseur libre
\n"
+" - clique gauche + déplacement souris : déplacement de l'objet actif (si possible)
\n"
+" - clique du milieu + déplacement souris : translation dans le plan ('pan')
\n"
+" - clique droit + déplacement souris : agrandissement ('zoom')"
diff --git a/plotpy/tools/curve.py b/plotpy/tools/curve.py
index 3285dcb..9ea68f8 100644
--- a/plotpy/tools/curve.py
+++ b/plotpy/tools/curve.py
@@ -142,13 +142,13 @@ class CurveStatsTool(BaseRangeCursorTool):
TITLE = _("Signal statistics")
ICON = "xrange.png"
LABELFUNCS: tuple[tuple[str, Callable[..., Any]], ...] = (
- ("%g < x < %g", lambda *args: (args[0].min(), args[0].max())),
- ("%g < y < %g", lambda *args: (args[1].min(), args[1].max())),
- ("∆x=%g", lambda *args: args[0].max() - args[0].min()),
- ("∆y=%g", lambda *args: args[1].max() - args[1].min()),
- ("<y>=%g", lambda *args: args[1].mean()),
- ("σ(y)=%g", lambda *args: args[1].std()),
- ("∑(y)=%g", lambda *args: np.sum(args[1])),
+ ("%g < x < %g", lambda *args: (np.nanmin(args[0]), np.nanmax(args[0]))),
+ ("%g < y < %g", lambda *args: (np.nanmin(args[1]), np.nanmax(args[1]))),
+ ("∆x=%g", lambda *args: np.nanmax(args[0]) - np.nanmin(args[0])),
+ ("∆y=%g", lambda *args: np.nanmax(args[1]) - np.nanmin(args[1])),
+ ("<y>=%g", lambda *args: np.nanmean(args[1])),
+ ("σ(y)=%g", lambda *args: np.nanstd(args[1])),
+ ("∑(y)=%g", lambda *args: np.nansum(args[1])),
("∫ydx=%g", lambda *args: spt.trapezoid(args[1], args[0])),
)
SHAPECLASS = XRangeSelection
@@ -212,8 +212,8 @@ class YRangeCursorTool(BaseRangeCursorTool):
TITLE = _("Y-range")
ICON = "yrange.png"
LABELFUNCS: tuple[tuple[str, Callable[..., Any]], ...] = (
- ("%g < y < %g", lambda ymin, ymax: (ymin, ymax)),
- ("∆y=%g", lambda ymin, ymax: ymax - ymin),
+ ("%g < y < %g", lambda ymin, ymax: (min(ymin, ymax), max(ymin, ymax))),
+ ("∆y=%g", lambda ymin, ymax: abs(ymax - ymin)),
)
SHAPECLASS = YRangeSelection
diff --git a/scripts/reinstall_dev.py b/scripts/reinstall_dev.py
index 532477d..1ea0e6c 100644
--- a/scripts/reinstall_dev.py
+++ b/scripts/reinstall_dev.py
@@ -3,7 +3,8 @@
Reinstall multiple local libraries in editable mode for development.
Workflow:
- 1) Try to uninstall all target libraries in one command (ignore errors if some are not installed).
+ 1) Try to uninstall all target libraries in one command (ignore errors if some are
+ not installed).
2) Reinstall each library in editable mode from a sibling folder: ../.
This script uses the same Python interpreter that runs it (sys.executable),