Skip to content

Commit 5f614f7

Browse files
Merge pull request #65 from PlotPyStack/fix/issues-55-deltacursory
fix/55-deltacursory
2 parents 3ddb839 + 51bca46 commit 5f614f7

3 files changed

Lines changed: 42 additions & 20 deletions

File tree

plotpy/locale/fr/LC_MESSAGES/plotpy.po

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,15 @@ msgstr "Police des valeurs"
355355
msgid "Scale"
356356
msgstr "Échelle"
357357

358+
msgid "logarithmic"
359+
msgstr "logarithmique"
360+
358361
msgid "linear"
359362
msgstr "linéaire"
360363

361364
msgid "date/time"
362365
msgstr "date/heure"
363366

364-
msgid "logarithmic"
365-
msgstr "logarithmique"
366-
367367
msgid "Lower axis limit"
368368
msgstr "Borne inférieure de l'axe"
369369

@@ -630,12 +630,12 @@ msgstr "Classes"
630630
msgid "Number of bins"
631631
msgstr "Nombre de classes"
632632

633-
msgid "Minimum value"
634-
msgstr "Valeur minimale"
635-
636633
msgid "Min"
637634
msgstr "Min"
638635

636+
msgid "Minimum value"
637+
msgstr "Valeur minimale"
638+
639639
msgid "Maximum value"
640640
msgstr "Valeur maximale"
641641

@@ -1422,12 +1422,11 @@ msgid ""
14221422
"<b>Keyboard/mouse shortcuts:</b><br><br>\n"
14231423
" - <u>single left-click</u>: item (curve, image, ...) selection<br>\n"
14241424
" - <u>single right-click</u>: context-menu relative to selected item<br>\n"
1425-
" - <u>shift</u>: on-active-curve (or image) cursor (+ <u>control</u> to maintain\n"
1426-
"cursor visible)<br>\n"
1427-
" - <u>shift + control</u>: on-active-curve cursor (+ <u>control</u> to maintain\n"
1428-
"cursor visible)<br>\n"
1425+
" - <u>shift</u>: on-active-curve (or image) cursor<br>\n"
1426+
" - <u>shift + control</u>: on-active-curve cursor (maintained visible)<br>\n"
14291427
" - <u>alt</u>: free cursor<br>\n"
14301428
" - <u>left-click + mouse move</u>: move item (when available)<br>\n"
1429+
" - <u>control + left-click + mouse move</u>: move label on markers and range selections<br>\n"
14311430
" - <u>middle-click + mouse move</u>: pan<br>\n"
14321431
" - <u>right-click + mouse move</u>: zoom"
14331432
msgstr ""
@@ -1687,3 +1686,25 @@ msgstr "Rotation et rognage"
16871686
msgid "Show cropping rectangle"
16881687
msgstr "Afficher le rectangle de rognage"
16891688

1689+
msgid ""
1690+
"<b>Keyboard/mouse shortcuts:</b><br><br>\n"
1691+
" - <u>single left-click</u>: item (curve, image, ...) selection<br>\n"
1692+
" - <u>single right-click</u>: context-menu relative to selected item<br>\n"
1693+
" - <u>shift</u>: on-active-curve (or image) cursor (+ <u>control</u> to maintain\n"
1694+
"cursor visible)<br>\n"
1695+
" - <u>shift + control</u>: on-active-curve cursor (+ <u>control</u> to maintain\n"
1696+
"cursor visible)<br>\n"
1697+
" - <u>alt</u>: free cursor<br>\n"
1698+
" - <u>left-click + mouse move</u>: move item (when available)<br>\n"
1699+
" - <u>middle-click + mouse move</u>: pan<br>\n"
1700+
" - <u>right-click + mouse move</u>: zoom"
1701+
msgstr ""
1702+
"<b>Raccourcis clavier et souris :</b><br><br>\n"
1703+
" - <u>clique gauche</u> : sélection d'un objet (courbe, image, ...)<br>\n"
1704+
" - <u>clique droit</u> : menu contextuel relatif à l'objet sélectionné<br>\n"
1705+
" - <u>shift</u> : curseur sur la courbe (ou l'image) active (+ <u>control</u> pour maintenir le curseur visible)<br>\n"
1706+
" - <u>shift + control</u> : curseur sur la courbe (ou l'image) active (+ <u>control</u> pour maintenir le curseur visible)<br>\n"
1707+
" - <u>alt</u> : curseur libre<br>\n"
1708+
" - <u>clique gauche + déplacement souris</u> : déplacement de l'objet actif (si possible)<br>\n"
1709+
" - <u>clique du milieu + déplacement souris</u> : translation dans le plan ('pan')<br>\n"
1710+
" - <u>clique droit + déplacement souris</u> : agrandissement ('zoom')"

plotpy/tools/curve.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ class CurveStatsTool(BaseRangeCursorTool):
142142
TITLE = _("Signal statistics")
143143
ICON = "xrange.png"
144144
LABELFUNCS: tuple[tuple[str, Callable[..., Any]], ...] = (
145-
("%g &lt; x &lt; %g", lambda *args: (args[0].min(), args[0].max())),
146-
("%g &lt; y &lt; %g", lambda *args: (args[1].min(), args[1].max())),
147-
("∆x=%g", lambda *args: args[0].max() - args[0].min()),
148-
("∆y=%g", lambda *args: args[1].max() - args[1].min()),
149-
("&lt;y&gt;=%g", lambda *args: args[1].mean()),
150-
("σ(y)=%g", lambda *args: args[1].std()),
151-
("∑(y)=%g", lambda *args: np.sum(args[1])),
145+
("%g &lt; x &lt; %g", lambda *args: (np.nanmin(args[0]), np.nanmax(args[0]))),
146+
("%g &lt; y &lt; %g", lambda *args: (np.nanmin(args[1]), np.nanmax(args[1]))),
147+
("∆x=%g", lambda *args: np.nanmax(args[0]) - np.nanmin(args[0])),
148+
("∆y=%g", lambda *args: np.nanmax(args[1]) - np.nanmin(args[1])),
149+
("&lt;y&gt;=%g", lambda *args: np.nanmean(args[1])),
150+
("σ(y)=%g", lambda *args: np.nanstd(args[1])),
151+
("∑(y)=%g", lambda *args: np.nansum(args[1])),
152152
("∫ydx=%g", lambda *args: spt.trapezoid(args[1], args[0])),
153153
)
154154
SHAPECLASS = XRangeSelection
@@ -212,8 +212,8 @@ class YRangeCursorTool(BaseRangeCursorTool):
212212
TITLE = _("Y-range")
213213
ICON = "yrange.png"
214214
LABELFUNCS: tuple[tuple[str, Callable[..., Any]], ...] = (
215-
("%g &lt; y &lt; %g", lambda ymin, ymax: (ymin, ymax)),
216-
("∆y=%g", lambda ymin, ymax: ymax - ymin),
215+
("%g &lt; y &lt; %g", lambda ymin, ymax: (min(ymin, ymax), max(ymin, ymax))),
216+
("∆y=%g", lambda ymin, ymax: abs(ymax - ymin)),
217217
)
218218
SHAPECLASS = YRangeSelection
219219

scripts/reinstall_dev.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Reinstall multiple local libraries in editable mode for development.
44
55
Workflow:
6-
1) Try to uninstall all target libraries in one command (ignore errors if some are not installed).
6+
1) Try to uninstall all target libraries in one command (ignore errors if some are
7+
not installed).
78
2) Reinstall each library in editable mode from a sibling folder: ../<library>.
89
910
This script uses the same Python interpreter that runs it (sys.executable),

0 commit comments

Comments
 (0)