mwxlib 0.95.7__py3-none-any.whl → 0.95.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mwxlib might be problematic. Click here for more details.
- mwx/__init__.py +2 -10
- mwx/controls.py +1 -1
- mwx/framework.py +1 -1
- mwx/graphman.py +6 -3
- mwx/matplot2.py +19 -4
- mwx/matplot2lg.py +10 -5
- mwx/nutshell.py +2 -3
- {mwxlib-0.95.7.dist-info → mwxlib-0.95.9.dist-info}/METADATA +1 -1
- {mwxlib-0.95.7.dist-info → mwxlib-0.95.9.dist-info}/RECORD +12 -12
- {mwxlib-0.95.7.dist-info → mwxlib-0.95.9.dist-info}/LICENSE +0 -0
- {mwxlib-0.95.7.dist-info → mwxlib-0.95.9.dist-info}/WHEEL +0 -0
- {mwxlib-0.95.7.dist-info → mwxlib-0.95.9.dist-info}/top_level.txt +0 -0
mwx/__init__.py
CHANGED
|
@@ -7,20 +7,12 @@ from .framework import Menu, MenuBar, StatusBar
|
|
|
7
7
|
from .framework import Frame, MiniFrame, ShellFrame, deb
|
|
8
8
|
|
|
9
9
|
## Controls
|
|
10
|
-
## from . import controls
|
|
11
10
|
from .controls import Param, LParam, Knob, ControlPanel, Clipboard, Icon
|
|
12
11
|
from .controls import Button, ToggleButton, TextCtrl, Choice, Gauge, Indicator
|
|
13
12
|
|
|
14
13
|
## Plugman
|
|
15
|
-
## from . import
|
|
16
|
-
## from .graphman import
|
|
17
|
-
|
|
18
|
-
## Matplot
|
|
19
|
-
## from .matplot2 import MatplotPanel
|
|
20
|
-
## from .matplot2g import GraphPlot
|
|
21
|
-
## from .matplot2lg import LinePlot
|
|
22
|
-
## from .matplot2lg import Histogram
|
|
23
|
-
## from .matplot2lg import LineProfile
|
|
14
|
+
## from .graphman import Frame as GraphmanFrame, Layer, Thread, Graph
|
|
15
|
+
## from .graphman import MatplotPanel, GraphPlot, LinePlot, LineProfile, Histogram
|
|
24
16
|
|
|
25
17
|
## Gnuplot
|
|
26
18
|
## from .mgplt import Gnuplot, GnuplotFrame
|
mwx/controls.py
CHANGED
|
@@ -1225,7 +1225,7 @@ class Indicator(wx.Control):
|
|
|
1225
1225
|
self.Refresh()
|
|
1226
1226
|
|
|
1227
1227
|
def update_design(self, **kwargs):
|
|
1228
|
-
"""Update design
|
|
1228
|
+
"""Update multiple design properties at once.
|
|
1229
1229
|
|
|
1230
1230
|
This method is useful for changing colors, spacing, radius, etc.
|
|
1231
1231
|
The best size will be automatically invalidated and re-calculated.
|
mwx/framework.py
CHANGED
mwx/graphman.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
from functools import wraps
|
|
5
5
|
from importlib import reload, import_module
|
|
6
6
|
from contextlib import contextmanager
|
|
7
|
-
from pprint import
|
|
7
|
+
from pprint import pformat
|
|
8
8
|
from bdb import BdbQuit
|
|
9
9
|
import subprocess
|
|
10
10
|
import threading
|
|
@@ -29,7 +29,11 @@ from . import framework as mwx
|
|
|
29
29
|
from .utilus import funcall as _F
|
|
30
30
|
from .controls import ControlPanel, Icon
|
|
31
31
|
from .framework import CtrlInterface, AuiNotebook
|
|
32
|
+
|
|
33
|
+
from .matplot2 import MatplotPanel # noqa
|
|
32
34
|
from .matplot2g import GraphPlot
|
|
35
|
+
from .matplot2lg import LinePlot # noqa
|
|
36
|
+
from .matplot2lg import LineProfile # noqa
|
|
33
37
|
from .matplot2lg import Histogram
|
|
34
38
|
|
|
35
39
|
|
|
@@ -1531,8 +1535,7 @@ class Frame(mwx.Frame):
|
|
|
1531
1535
|
new.update(res) # copy res back keeping new order.
|
|
1532
1536
|
|
|
1533
1537
|
with open(filename, 'w') as o:
|
|
1534
|
-
|
|
1535
|
-
pprint(tuple(new.items()), stream=o)
|
|
1538
|
+
print(pformat(tuple(new.items())), file=o)
|
|
1536
1539
|
|
|
1537
1540
|
except Exception as e:
|
|
1538
1541
|
print("- Failed to write attributes:", e)
|
mwx/matplot2.py
CHANGED
|
@@ -38,17 +38,32 @@ if matplotlib.parse_version(matplotlib.__version__).release < (3,8,0):
|
|
|
38
38
|
if 1:
|
|
39
39
|
class Cursor(Cursor):
|
|
40
40
|
def onmove(self, event):
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
"""Internal event handler to draw the cursor when the mouse moves.
|
|
42
|
+
(override) If the cursor is off the axes, the xdata and ydata will
|
|
43
|
+
be None, and will simply be cleared rather than drawn.
|
|
44
|
+
"""
|
|
45
|
+
if self.ignore(event):
|
|
43
46
|
return
|
|
47
|
+
if not self.canvas.widgetlock.available(self):
|
|
48
|
+
return
|
|
49
|
+
|
|
44
50
|
## xdata, ydata = self._get_data_coords(event) # >= 3.8 only
|
|
45
51
|
xdata, ydata = event.xdata, event.ydata
|
|
46
52
|
self.linev.set_xdata((xdata, xdata))
|
|
47
53
|
self.linev.set_visible(self.visible and self.vertOn)
|
|
48
54
|
self.lineh.set_ydata((ydata, ydata))
|
|
49
55
|
self.lineh.set_visible(self.visible and self.horizOn)
|
|
50
|
-
if self.visible and (self.vertOn or self.horizOn):
|
|
51
|
-
|
|
56
|
+
if not (self.visible and (self.vertOn or self.horizOn)):
|
|
57
|
+
return
|
|
58
|
+
## Redraw.
|
|
59
|
+
if self.useblit:
|
|
60
|
+
if self.background is not None:
|
|
61
|
+
self.canvas.restore_region(self.background)
|
|
62
|
+
self.ax.draw_artist(self.linev)
|
|
63
|
+
self.ax.draw_artist(self.lineh)
|
|
64
|
+
self.canvas.blit(self.ax.bbox)
|
|
65
|
+
else:
|
|
66
|
+
self.canvas.draw_idle()
|
|
52
67
|
|
|
53
68
|
|
|
54
69
|
class MatplotPanel(wx.Panel):
|
mwx/matplot2lg.py
CHANGED
|
@@ -57,6 +57,9 @@ class LinePlot(MatplotPanel):
|
|
|
57
57
|
self.__region = None
|
|
58
58
|
self.__annotations = []
|
|
59
59
|
|
|
60
|
+
## Note for matplotlib >= 3.9.0:
|
|
61
|
+
## axhspan and axvspan now return Rectangles, not Polygons.
|
|
62
|
+
#<matplotlib.patches.Rectangle>
|
|
60
63
|
#<matplotlib.patches.Polygon>
|
|
61
64
|
self.__vspan = self.axes.axvspan(0, 0,
|
|
62
65
|
color='none', ls='dashed', lw=1, ec='black', visible=0, zorder=2)
|
|
@@ -81,7 +84,11 @@ class LinePlot(MatplotPanel):
|
|
|
81
84
|
elif b > r: b = r
|
|
82
85
|
v = np.array((a, b))
|
|
83
86
|
self.__vspan.set_visible(1)
|
|
84
|
-
|
|
87
|
+
try:
|
|
88
|
+
self.__vspan.set_x(a)
|
|
89
|
+
self.__vspan.set_width(b-a)
|
|
90
|
+
except AttributeError:
|
|
91
|
+
self.__vspan.set_xy(((a,0), (a,1), (b,1), (b,0)))
|
|
85
92
|
self.handler('region_set', self.frame)
|
|
86
93
|
else:
|
|
87
94
|
self.__vspan.set_visible(0)
|
|
@@ -299,11 +306,9 @@ class Histogram(LinePlot):
|
|
|
299
306
|
self.__frame = frame # update reference of the frame
|
|
300
307
|
if frame:
|
|
301
308
|
try:
|
|
302
|
-
|
|
303
|
-
h, w = image.shape
|
|
304
|
-
x, y = frame.__data # reuse the data unless,
|
|
309
|
+
x, y = frame.__data # reuse cached data
|
|
305
310
|
except Exception:
|
|
306
|
-
x, y = frame.__data = self.calc(frame) # histogram_data buffer
|
|
311
|
+
x, y = frame.__data = self.calc(frame) # new histogram_data buffer
|
|
307
312
|
|
|
308
313
|
self.__plot.set_data(x, y)
|
|
309
314
|
self.xlim = x.min(), x.max()
|
mwx/nutshell.py
CHANGED
|
@@ -867,7 +867,7 @@ class EditorInterface(CtrlInterface):
|
|
|
867
867
|
self.Overtype = mode if mode is not None else not self.Overtype
|
|
868
868
|
|
|
869
869
|
def wrap(self, mode=1):
|
|
870
|
-
"""
|
|
870
|
+
"""Set whether text is word wrapped.
|
|
871
871
|
|
|
872
872
|
(override) mode in {0:no-wrap, 1:word-wrap, 2:char-wrap,
|
|
873
873
|
3:whitespace-wrap, None:toggle}
|
|
@@ -1800,8 +1800,7 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
1800
1800
|
evt.Skip()
|
|
1801
1801
|
|
|
1802
1802
|
def set_attributes(self, buf=None, **kwargs):
|
|
1803
|
-
"""
|
|
1804
|
-
that apply to all buffers contained in the EditorBook.
|
|
1803
|
+
"""Set multiple properties at once to the buffer(s).
|
|
1805
1804
|
|
|
1806
1805
|
Args:
|
|
1807
1806
|
buf : a buffer to apply (if None, applies to all buffers).
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
mwx/__init__.py,sha256=
|
|
1
|
+
mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
|
|
2
2
|
mwx/bookshelf.py,sha256=DAhMQk3_J4rdE50adBMFu5wNz3WdMh_zzJ37O9ncceo,5103
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
5
|
-
mwx/graphman.py,sha256=
|
|
3
|
+
mwx/controls.py,sha256=IAT3l3-azlPFtMc2VGNMiQhI390ExW0S4CgjEOKFI4s,48200
|
|
4
|
+
mwx/framework.py,sha256=OVFv_5c-vrXRuvWm9YN8cHWmvN-svodmMAnlOAPBwQ4,75669
|
|
5
|
+
mwx/graphman.py,sha256=NBe58KdAstFNPqyEmpPMMmWwjtNgJB7HumSI7-gjw54,70533
|
|
6
6
|
mwx/images.py,sha256=gyvqW4TLWdJMKmsaWiPiV_PuHJM1GbHgeELERLwGzg8,45291
|
|
7
|
-
mwx/matplot2.py,sha256=
|
|
7
|
+
mwx/matplot2.py,sha256=1ISXVwqlu1EJKe5JXmBC2tuecsRoFzJrMZsqQMxdC50,33432
|
|
8
8
|
mwx/matplot2g.py,sha256=KIuownEsF7t2RgHn3kOxjBXbKOdfS99X_CtQweG_FrM,65471
|
|
9
|
-
mwx/matplot2lg.py,sha256=
|
|
9
|
+
mwx/matplot2lg.py,sha256=pcu1oDPE_BlpFqNGPPKf9vpTuDs_h_u3OTRAJx5-Sds,27392
|
|
10
10
|
mwx/mgplt.py,sha256=ITzxA97yDwr_35BUk5OqnyskSuKVDbpf2AQCKY1jHTI,5671
|
|
11
|
-
mwx/nutshell.py,sha256=
|
|
11
|
+
mwx/nutshell.py,sha256=pbsQATwt906lOXGFWJmuwZIwU_ve78o46I2g5zNjvG4,137050
|
|
12
12
|
mwx/utilus.py,sha256=Uwj6vbNUUztwOswPG75xtsT2y_PZqh3QiJraxmA9iT0,37401
|
|
13
13
|
mwx/wxmon.py,sha256=6es-jVz9Ht7vZnG7VBJcaNYLHY0PnZtij60SXcZRTeY,12727
|
|
14
14
|
mwx/wxpdb.py,sha256=lLowkkAgMhPFHAfklD7wZHq0qbSMjRxnBFtSajmVgME,19133
|
|
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=RaYOj-YKrpLqhT8TkBRDX1TQnSPv90V185j8OjrWJTs
|
|
|
21
21
|
mwx/plugins/line_profile.py,sha256=--9NIc3x5EfRB3L59JvD7rzENQHyiYfu7wWJo6AuMkA,820
|
|
22
22
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
23
23
|
mwx/py/filling.py,sha256=KaHooM32hrGGgqw75Cbt8lAvACwC6RXadob9LGgNnEc,16806
|
|
24
|
-
mwxlib-0.95.
|
|
25
|
-
mwxlib-0.95.
|
|
26
|
-
mwxlib-0.95.
|
|
27
|
-
mwxlib-0.95.
|
|
28
|
-
mwxlib-0.95.
|
|
24
|
+
mwxlib-0.95.9.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.95.9.dist-info/METADATA,sha256=TpQuGm-jesDFI2I-g8nwPcIqT7Edpv4_pM1ZFBb3gwo,1925
|
|
26
|
+
mwxlib-0.95.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
27
|
+
mwxlib-0.95.9.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.95.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|