PythonQwt 0.14.0__py3-none-any.whl → 0.14.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PythonQwt
3
- Version: 0.14.0
3
+ Version: 0.14.2
4
4
  Summary: Qt plotting widgets for Python
5
5
  Author-email: Pierre Raybaut <pierre.raybaut@gmail.com>
6
6
  License: PythonQwt License Agreement
@@ -686,19 +686,19 @@ Classifier: Programming Language :: Python :: 3.13
686
686
  Requires-Python: <4,>=3.9
687
687
  Description-Content-Type: text/markdown
688
688
  License-File: LICENSE
689
- Requires-Dist: NumPy >=1.19
690
- Requires-Dist: QtPy >=1.9
689
+ Requires-Dist: NumPy>=1.19
690
+ Requires-Dist: QtPy>=1.9
691
691
  Provides-Extra: dev
692
- Requires-Dist: ruff ; extra == 'dev'
693
- Requires-Dist: pylint ; extra == 'dev'
694
- Requires-Dist: Coverage ; extra == 'dev'
692
+ Requires-Dist: ruff; extra == "dev"
693
+ Requires-Dist: pylint; extra == "dev"
694
+ Requires-Dist: Coverage; extra == "dev"
695
695
  Provides-Extra: doc
696
- Requires-Dist: PyQt5 ; extra == 'doc'
697
- Requires-Dist: sphinx >6 ; extra == 'doc'
698
- Requires-Dist: python-docs-theme ; extra == 'doc'
696
+ Requires-Dist: PyQt5; extra == "doc"
697
+ Requires-Dist: sphinx>6; extra == "doc"
698
+ Requires-Dist: python-docs-theme; extra == "doc"
699
699
  Provides-Extra: test
700
- Requires-Dist: pytest ; extra == 'test'
701
- Requires-Dist: pytest-xvfb ; extra == 'test'
700
+ Requires-Dist: pytest; extra == "test"
701
+ Requires-Dist: pytest-xvfb; extra == "test"
702
702
 
703
703
  # PythonQwt: Qt plotting widgets for Python
704
704
 
@@ -1,4 +1,4 @@
1
- qwt/__init__.py,sha256=5fgDKSS2Ks9TNFxZ4Fl6Rcp3az2IJf9h5KFIHavNJhw,5917
1
+ qwt/__init__.py,sha256=YvqCbw9nuiozTFWi1h7yp6D92bJ3ps-V1mRpWR6M0p0,5917
2
2
  qwt/_math.py,sha256=fNcPJcaK-ldCCFB20T2N58LEkQ1lwZY1-q5veXXhwl8,1501
3
3
  qwt/color_map.py,sha256=fLRpymqOXtLrhuPrbbCxTvNINbr2GH7pYBG4fZidrcs,11812
4
4
  qwt/column_symbol.py,sha256=0aFyQ05ryTKbaSTctkhtXa0pB_tWG444zlH3991_bt0,5760
@@ -9,7 +9,7 @@ qwt/legend.py,sha256=GBUim67HWgwLat5tOWDpK98fWcFxV-RkxWjoyWd9Gao,31313
9
9
  qwt/null_paintdevice.py,sha256=AAVyQCVgZKyIw7i-J9ElB0_-8KRV9OXDr140TwMxLSs,9144
10
10
  qwt/painter.py,sha256=UGh-MC_9qw3fNF9GJ_1xbcAkVG6hD5op7jg9M2CcIXI,16527
11
11
  qwt/painter_command.py,sha256=b_uZb56YlzYFG3ZmB5ykjkBQQAadQD8epknsQSEai54,6957
12
- qwt/plot.py,sha256=ytiyGbLiBwIPj0kQL3pCq5NkiwP1haeBcfS2Qza0R7o,75803
12
+ qwt/plot.py,sha256=XqQHGpsrnMi0KYxFQ7-kGtFor4ekMllzpcKUtY9Jp18,75834
13
13
  qwt/plot_canvas.py,sha256=eYcXJgVc7MaDk5UzSjhcTmc6ptyQWApeaRKWSoi_jeE,30317
14
14
  qwt/plot_curve.py,sha256=ilb1ts7E-Ql-IE3eigjmb5LwjdCf7LMPBlYuu_cjKPw,37061
15
15
  qwt/plot_directpainter.py,sha256=JCWNhCC21L1A1HZnxd-C95QNlrVJbLztmGab-X8gCGc,10165
@@ -21,7 +21,7 @@ qwt/plot_series.py,sha256=Wa_Wunu-t_L8vl95RJq6__k-XA8UV2YNIsc8yNGpTT8,10654
21
21
  qwt/qthelpers.py,sha256=GpvLr96Ip8SIGwyFfs0f7ocHyKPB7PEjHBQyrpw84xw,1405
22
22
  qwt/scale_div.py,sha256=2Ay5mgduXgSm4OrDMcaEWIzenAiBuEASZRoX99PWEE4,9276
23
23
  qwt/scale_draw.py,sha256=DvknvoOpEerVqplH-fbEtXQlXrFebUGz-1eS5qJdDWI,36760
24
- qwt/scale_engine.py,sha256=h5GiwVAphx75DXzm9LCzjHoxz7INGSOYT97sjtGLcd8,29044
24
+ qwt/scale_engine.py,sha256=qE6ka3o1JnMh975o9GajUcvTNi7K7WOTe0pYJ40F91s,29080
25
25
  qwt/scale_map.py,sha256=WobkNna6_RPXYZjGK7gZLykNxN_kYnrcB6fEaWgnL2w,9182
26
26
  qwt/scale_widget.py,sha256=p202DrRgMraGbVcubzkatvVXOLbO9CPho729hz6gqa0,27125
27
27
  qwt/symbol.py,sha256=DYMMelQkP7vr8WGo3EFM72CzcWpZEHEYohlLXZEtCsI,39170
@@ -34,14 +34,14 @@ qwt/tests/conftest.py,sha256=akpTe2ofWLsMKqpbxqYURpLOmCdEdXa8MccB1E0GG5M,1690
34
34
  qwt/tests/test_backingstore.py,sha256=AIiRPqcNPY1riXSQXU43tqB2_z02PhxmK1zA4OxQixM,524
35
35
  qwt/tests/test_bodedemo.py,sha256=bOIApjBQA1J4aZkVBnzByiKqhqEcmQpag1TvIfsuHMs,9386
36
36
  qwt/tests/test_cartesian.py,sha256=0VCrvclqbQJSEGhWpZLq6brA9Qm9oRIgluEBbxOTOds,3855
37
- qwt/tests/test_cpudemo.py,sha256=HmqbszGiKscrDaZ1vK9huJLFq7shoDBDelZQvxetUE4,12796
37
+ qwt/tests/test_cpudemo.py,sha256=ss4TXlJelYdj9ylaQkuFhCPm1R4htxoWiVugFT6I06M,12843
38
38
  qwt/tests/test_curvebenchmark1.py,sha256=3LOBbNhH8Wl4zPg1mc5nkfjNfgTKcnYtFRDxJM3f0NM,5797
39
39
  qwt/tests/test_curvebenchmark2.py,sha256=5TYkVuWuP8-Tp7gphsaF_ys3cufHkzKstFDHb9BCOAg,2720
40
40
  qwt/tests/test_curvedemo1.py,sha256=3jAq_pQ52F2HyO3WlDWUn43vNVw8q_g5OQ_hcseaD4s,4181
41
41
  qwt/tests/test_curvedemo2.py,sha256=FkPbP6OvetMGx2jmEuhc6NLPQKxhVI8XmiUIBcm-0eU,4080
42
42
  qwt/tests/test_data.py,sha256=XNP4rtQEpxKP3ry7E2C9pFbeizh-x-7ArHE9gsjd1MU,3149
43
43
  qwt/tests/test_errorbar.py,sha256=ecJ_YHcx1RhCS9_BKKoNYz6bOuuqapRPGL2Vp_r3O1U,10807
44
- qwt/tests/test_eventfilter.py,sha256=e_3n3ofnX_oViqRTycXnTIBfEAuhb9J2DFBYnXzLoqA,16321
44
+ qwt/tests/test_eventfilter.py,sha256=31vCsCzRcoq3cyMlDAH5fthA45QqeFXKaWyhfZME6rE,16441
45
45
  qwt/tests/test_highdpi.py,sha256=Xafo016q-RX4918JddBGD60HZ4GpuYJBJokEO15md24,1053
46
46
  qwt/tests/test_image.py,sha256=yY_AplKEdm-M7uB5G50p4E68ZzNamYvGSfN5rvlVPPM,6549
47
47
  qwt/tests/test_loadtest.py,sha256=UwCiClFfDMEpbWSpsUb8cCrSfVm3RF9KJuZ2aznCd7o,1635
@@ -52,7 +52,7 @@ qwt/tests/test_simple.py,sha256=4opQp_-RkcVdpRyYSh89ddBkeXCPrppB-_2KTiu5vjI,2347
52
52
  qwt/tests/test_stylesheet.py,sha256=cuL1iY4pp5ZoMX4OI86amJA6R5SzQsH1JUWLtEiitZ4,950
53
53
  qwt/tests/test_symbols.py,sha256=YcGM0_Em8QtcbqpLSU98PxvGo7BIIYviP2o_4Fg2LbI,5607
54
54
  qwt/tests/test_vertical.py,sha256=hWhPASIRb1nrd6d3m3dPoccwl5RoCVH_r_C8VK2znMI,3285
55
- qwt/tests/utils.py,sha256=MjbMUX_mARGSnlRumuIynvIr7Kcl23iOLdmwhG01wMQ,10510
55
+ qwt/tests/utils.py,sha256=kmAl8B0yKq1FCzVU4pBDAXwcQUGa4BE8m6FsNECEVEQ,10584
56
56
  qwt/tests/data/PythonQwt.svg,sha256=t-NYdVPqz7BcqtXNWCJvo8udrRmtGh57ksSYWUl1h4o,15232
57
57
  qwt/tests/data/bodedemo.png,sha256=8jP1YLE6HdwjEmrQyJclLxiYI4Zs4t0z0BoN1JT3GPQ,24414
58
58
  qwt/tests/data/cartesian.png,sha256=Cwbn5Jy3VT-OisFHxzMCVbfdbJacUMZ9uGCD9sCxA-Q,51094
@@ -75,9 +75,9 @@ qwt/tests/data/symbol.svg,sha256=ONkkohVqpg3OO2-XEZge7UZLqqNyOQXbSpLgHXcTBFU,127
75
75
  qwt/tests/data/symbols.png,sha256=wiqRBc2MJluJ-am9LtZ0K9DHV9BnreYMiEvfzJUFzCk,55586
76
76
  qwt/tests/data/testlauncher.png,sha256=WmucObp30QYYKsVRBs5-6t1aEN0FbIWRmOVFN1gt-vQ,139676
77
77
  qwt/tests/data/vertical.png,sha256=EvyG6q6rZm6pTT08Y_nzdBYCnqmoX1QDuEQtp2pyGlw,34076
78
- PythonQwt-0.14.0.dist-info/LICENSE,sha256=qjEk8TRuXmFS7QC-omINvD1UPGqWaOs6CzcCZoMEhdI,33457
79
- PythonQwt-0.14.0.dist-info/METADATA,sha256=8xgtk16wDdGBEA5B7M8-0-uVNCFmbUjdFvXmye86OKg,45064
80
- PythonQwt-0.14.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
81
- PythonQwt-0.14.0.dist-info/entry_points.txt,sha256=pdPda-YcYigCi00hR4tMxWKu6byxM2x3zA8BQFDYvwI,46
82
- PythonQwt-0.14.0.dist-info/top_level.txt,sha256=KB1IBdWRWnaItyJMaECwZiEi1jWt3IvqCrRVVhMjTu8,4
83
- PythonQwt-0.14.0.dist-info/RECORD,,
78
+ PythonQwt-0.14.2.dist-info/LICENSE,sha256=qjEk8TRuXmFS7QC-omINvD1UPGqWaOs6CzcCZoMEhdI,33457
79
+ PythonQwt-0.14.2.dist-info/METADATA,sha256=3APkiCdDzEo4WSjgOs216rYfcBkdeLgQgN4KmY4A9FA,45053
80
+ PythonQwt-0.14.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
81
+ PythonQwt-0.14.2.dist-info/entry_points.txt,sha256=pdPda-YcYigCi00hR4tMxWKu6byxM2x3zA8BQFDYvwI,46
82
+ PythonQwt-0.14.2.dist-info/top_level.txt,sha256=KB1IBdWRWnaItyJMaECwZiEi1jWt3IvqCrRVVhMjTu8,4
83
+ PythonQwt-0.14.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
qwt/__init__.py CHANGED
@@ -55,7 +55,7 @@ from qwt.symbol import QwtSymbol as QSbl # see deprecated section
55
55
  from qwt.text import QwtText # noqa: F401
56
56
  from qwt.toqimage import array_to_qimage as toQImage # noqa: F401
57
57
 
58
- __version__ = "0.14.0"
58
+ __version__ = "0.14.2"
59
59
  QWT_VERSION_STR = "6.1.5"
60
60
 
61
61
 
qwt/plot.py CHANGED
@@ -954,7 +954,7 @@ class QwtPlot(QFrame):
954
954
  d.isValid = False
955
955
  minValue = intv_i.minValue()
956
956
  maxValue = intv_i.maxValue()
957
- d.scaleEngine.autoScale(d.maxMajor, minValue, maxValue, stepSize)
957
+ minValue, maxValue, stepSize = d.scaleEngine.autoScale(d.maxMajor, minValue, maxValue, stepSize)
958
958
  if not d.isValid:
959
959
  d.scaleDiv = d.scaleEngine.divideScale(
960
960
  minValue, maxValue, d.maxMajor, d.maxMinor, stepSize
qwt/scale_engine.py CHANGED
@@ -674,10 +674,9 @@ class QwtLogScaleEngine(QwtScaleEngine):
674
674
  linearInterval = linearInterval.limited(LOG_MIN, LOG_MAX)
675
675
 
676
676
  if linearInterval.maxValue() / linearInterval.minValue() < logBase:
677
- if stepSize < 0.0:
678
- stepSize = -math.log(abs(stepSize), logBase)
679
- else:
680
- stepSize = math.log(stepSize, logBase)
677
+ # The min / max interval is too short to be represented as a log scale.
678
+ # Set the step to 0, so that a new step is calculated and a linear scale is used.
679
+ stepSize = 0.0
681
680
  return x1, x2, stepSize
682
681
 
683
682
  logRef = 1.0
qwt/tests/test_cpudemo.py CHANGED
@@ -202,10 +202,11 @@ class CpuStat:
202
202
 
203
203
  def __lookup(self):
204
204
  if os.path.exists("/proc/stat"):
205
- for line in open("/proc/stat"):
206
- words = line.split()
207
- if words[0] == "cpu" and len(words) >= 5:
208
- return [float(w) for w in words[1:]]
205
+ with open("/proc/stat") as file:
206
+ for line in file:
207
+ words = line.split()
208
+ if words[0] == "cpu" and len(words) >= 5:
209
+ return [float(w) for w in words[1:]]
209
210
  else:
210
211
  result = CpuStat.dummyValues[CpuStat.counter]
211
212
  CpuStat.counter += 1
@@ -243,7 +243,10 @@ class CanvasPicker(QObject):
243
243
  if event.type() == QEvent.FocusIn:
244
244
  self.__showCursor(True)
245
245
  if event.type() == QEvent.FocusOut:
246
- self.__showCursor(False)
246
+ try:
247
+ self.__showCursor(False)
248
+ except RuntimeError:
249
+ pass # ignore error when closing the application
247
250
  if event.type() == QEvent.Paint:
248
251
  QApplication.postEvent(self, QEvent(QEvent.User))
249
252
  elif event.type() == QEvent.MouseButtonPress:
qwt/tests/utils.py CHANGED
@@ -237,11 +237,16 @@ class TestCentralWidget(QW.QWidget):
237
237
  super(TestCentralWidget, self).__init__(parent)
238
238
  self.widget_name = widget_name
239
239
  self.plots = None
240
- self.widget_of_interest = self.parent()
241
240
  self.setLayout(QW.QVBoxLayout())
242
241
  self.options = TestOptions(self)
243
242
  self.add_widget(self.options)
244
243
 
244
+ def get_widget_of_interest(self):
245
+ """Return widget of interest"""
246
+ if self.plots is not None and len(self.plots) == 1:
247
+ return self.plots[0]
248
+ return self.parent()
249
+
245
250
  def add_widget(self, widget):
246
251
  """Add new sub-widget"""
247
252
  self.layout().addWidget(widget)
@@ -257,8 +262,6 @@ class TestCentralWidget(QW.QWidget):
257
262
  plot_name, "Enable new flat style option", plot.setFlatStyle
258
263
  )
259
264
  widget.setChecked(plot.flatStyle())
260
- if len(self.plots) == 1:
261
- self.widget_of_interest = self.plots[0]
262
265
 
263
266
 
264
267
  def take_screenshot(widget):
@@ -297,7 +300,7 @@ def test_widget(widget_class, size=None, title=None, options=True):
297
300
  central_widget = TestCentralWidget(widget_name, parent=window)
298
301
  central_widget.add_widget(widget)
299
302
  window.setCentralWidget(central_widget)
300
- widget_of_interest = central_widget.widget_of_interest
303
+ widget_of_interest = central_widget.get_widget_of_interest()
301
304
  else:
302
305
  widget_of_interest = window
303
306
  widget_of_interest.setObjectName(widget_name)