PythonQwt 0.12.1__py3-none-any.whl → 0.12.3__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.
Files changed (44) hide show
  1. {PythonQwt-0.12.1.dist-info → PythonQwt-0.12.3.dist-info}/METADATA +5 -8
  2. {PythonQwt-0.12.1.dist-info → PythonQwt-0.12.3.dist-info}/RECORD +43 -43
  3. {PythonQwt-0.12.1.dist-info → PythonQwt-0.12.3.dist-info}/WHEEL +1 -1
  4. qwt/__init__.py +19 -19
  5. qwt/_math.py +6 -6
  6. qwt/column_symbol.py +3 -5
  7. qwt/dyngrid_layout.py +1 -1
  8. qwt/legend.py +9 -8
  9. qwt/null_paintdevice.py +1 -1
  10. qwt/painter.py +0 -1
  11. qwt/painter_command.py +2 -1
  12. qwt/plot.py +1 -1
  13. qwt/plot_curve.py +2 -1
  14. qwt/plot_grid.py +5 -5
  15. qwt/plot_layout.py +8 -2
  16. qwt/plot_marker.py +7 -9
  17. qwt/plot_series.py +2 -3
  18. qwt/qthelpers.py +0 -1
  19. qwt/scale_div.py +2 -2
  20. qwt/scale_draw.py +3 -4
  21. qwt/scale_engine.py +7 -8
  22. qwt/scale_widget.py +11 -9
  23. qwt/tests/__init__.py +8 -2
  24. qwt/tests/comparative_benchmarks.py +1 -1
  25. qwt/tests/test_cartesian.py +1 -2
  26. qwt/tests/test_cpudemo.py +8 -8
  27. qwt/tests/test_curvedemo1.py +3 -4
  28. qwt/tests/test_curvedemo2.py +3 -5
  29. qwt/tests/test_data.py +6 -6
  30. qwt/tests/test_errorbar.py +11 -6
  31. qwt/tests/test_eventfilter.py +1 -1
  32. qwt/tests/test_highdpi.py +36 -0
  33. qwt/tests/test_image.py +7 -8
  34. qwt/tests/test_logcurve.py +1 -1
  35. qwt/tests/test_mapdemo.py +4 -4
  36. qwt/tests/test_multidemo.py +2 -3
  37. qwt/tests/test_simple.py +2 -3
  38. qwt/tests/test_stylesheet.py +9 -0
  39. qwt/toqimage.py +1 -2
  40. qwt/transform.py +2 -2
  41. qwt/tests/conftest.py +0 -9
  42. {PythonQwt-0.12.1.dist-info → PythonQwt-0.12.3.dist-info}/LICENSE +0 -0
  43. {PythonQwt-0.12.1.dist-info → PythonQwt-0.12.3.dist-info}/entry_points.txt +0 -0
  44. {PythonQwt-0.12.1.dist-info → PythonQwt-0.12.3.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PythonQwt
3
- Version: 0.12.1
3
+ Version: 0.12.3
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,11 +686,10 @@ Classifier: Programming Language :: Python :: 3.12
686
686
  Requires-Python: <4,>=3.8
687
687
  Description-Content-Type: text/markdown
688
688
  License-File: LICENSE
689
- Requires-Dist: NumPy >=1.21
689
+ Requires-Dist: NumPy <2,>=1.21
690
690
  Requires-Dist: QtPy >=1.9
691
691
  Provides-Extra: dev
692
- Requires-Dist: black ; extra == 'dev'
693
- Requires-Dist: isort ; extra == 'dev'
692
+ Requires-Dist: ruff ; extra == 'dev'
694
693
  Requires-Dist: pylint ; extra == 'dev'
695
694
  Requires-Dist: Coverage ; extra == 'dev'
696
695
  Provides-Extra: doc
@@ -699,8 +698,6 @@ Requires-Dist: sphinx >6 ; extra == 'doc'
699
698
  Requires-Dist: python-docs-theme ; extra == 'doc'
700
699
  Provides-Extra: test
701
700
  Requires-Dist: pytest ; extra == 'test'
702
- Requires-Dist: pytest-cov ; extra == 'test'
703
- Requires-Dist: pytest-qt ; extra == 'test'
704
701
  Requires-Dist: pytest-xvfb ; extra == 'test'
705
702
 
706
703
  # PythonQwt: Qt plotting widgets for Python
@@ -714,7 +711,7 @@ Requires-Dist: pytest-xvfb ; extra == 'test'
714
711
 
715
712
  ℹ️ Created in 2014 by Pierre Raybaut and maintained by the [PlotPyStack](https://github.com/PlotPyStack) organization.
716
713
 
717
- ![PythonQwt Test Launcher](qwt/tests/data/testlauncher.png)
714
+ ![PythonQwt Test Launcher](https://raw.githubusercontent.com/PlotPyStack/PythonQwt/master/qwt/tests/data/testlauncher.png)
718
715
 
719
716
  The `PythonQwt` project was initiated to solve -at least temporarily- the
720
717
  obsolescence issue of `PyQwt` (the Python-Qwt C++ bindings library) which is
@@ -810,7 +807,7 @@ The `qwt` package short-term roadmap is the following:
810
807
 
811
808
  ### Optional dependencies
812
809
 
813
- - coverage, pytest, pytest-qt, pytest-cov (for unit tests)
810
+ - coverage, pytest (for unit tests)
814
811
  - sphinx (for documentation generation)
815
812
 
816
813
  ## Installation
@@ -1,54 +1,54 @@
1
- qwt/__init__.py,sha256=Mq0jHpQIEsxlB-6HAe93wne_acB4QT8uvE2qW6TX1kY,5693
2
- qwt/_math.py,sha256=Xut9qwwwnzykC5YV2H3h9F4W9z8jv61ckPtMt941hVQ,1584
1
+ qwt/__init__.py,sha256=4bgzU2rJqiyj_nJnth4p1lopOCKM8vAWKD3KWMs4gUI,5917
2
+ qwt/_math.py,sha256=Y4qZ0b3RPSliSUdeqVvR8wJ6tqVIAmqyN1Vldrz1UGg,1576
3
3
  qwt/color_map.py,sha256=D8hCwm6u88vqlDDYd8Cw9H24DDbgv7-3DYmsmu1w_g4,11733
4
- qwt/column_symbol.py,sha256=gY57VFgmLo0JwT-7AK7ITli61WzUAdQptQTcYHQbUdo,5720
5
- qwt/dyngrid_layout.py,sha256=cakSak1zfqucK6ULe1eWdBgOhfQA9sCmkJXwpo_458U,13433
4
+ qwt/column_symbol.py,sha256=d25qz_LtVODQ8sJz1SQXoctoSWqwwbL88kAoeaSMkUo,5716
5
+ qwt/dyngrid_layout.py,sha256=oIE88HSKmN25P4dhBBPfOQK-t4wRnG-IAKlzIDveEyY,13433
6
6
  qwt/graphic.py,sha256=f6IcwY5uxJ3v13xvG0aaF8b8puyuLlB9Yy_ukw6Syj0,28051
7
7
  qwt/interval.py,sha256=N3WrKihuS_VeYSRZxV8Lnp-5Ac39txumFcLHcnDrTTQ,12722
8
- qwt/legend.py,sha256=mEssQrvFmldRNH7I4rCmDtdK30enH1Nwwq0LgGsDZ-w,31236
9
- qwt/null_paintdevice.py,sha256=09zYxGLCkdlRhP4hbNIUz4RzEr1Rteso2Ex55PqOEWA,9136
10
- qwt/painter.py,sha256=PaqiJuMSLF38VxhPK8r1nLlkswVXkHfxKH3PxztCsPI,16540
11
- qwt/painter_command.py,sha256=WMHeAWn5ngsmX8hoIVgICTaD1YPYWzGnfUvy0OVO9wA,6955
12
- qwt/plot.py,sha256=Oe02G7zU09hEy7gIES9xpe4yWqPfLo3zUr8GFg3rajk,75784
8
+ qwt/legend.py,sha256=Y8C5qxaEKnFqbPUxQqlbtEHgz6w_bMd3tNjSr_EPTik,31234
9
+ qwt/null_paintdevice.py,sha256=Hne_os_0ebWPSz66BsxUJsNOkxfVVxnLT5Q930EsnC0,9136
10
+ qwt/painter.py,sha256=UGh-MC_9qw3fNF9GJ_1xbcAkVG6hD5op7jg9M2CcIXI,16527
11
+ qwt/painter_command.py,sha256=b_uZb56YlzYFG3ZmB5ykjkBQQAadQD8epknsQSEai54,6957
12
+ qwt/plot.py,sha256=T0z-0t-4FexibCHMl1NmDxEx9dy5LHg3J0CU80Bs3pg,75777
13
13
  qwt/plot_canvas.py,sha256=BxRz9EJtzmBEntKt-Wug7NIRwX391WxgcTgB3_rqFGo,30273
14
- qwt/plot_curve.py,sha256=BKOOXa7hWvhR3TAMZKl2RVGwqUvthw74Ub5cF1_Wsks,37079
14
+ qwt/plot_curve.py,sha256=2wKjSI-4vfyvVwEvC2esiXH8dATbAm8lQzH5VSSNKqI,37081
15
15
  qwt/plot_directpainter.py,sha256=BKcHrYqKZJ7Y8bMKAlgV-Nmu7mpUue8d-_CSTVxW9Lw,10130
16
- qwt/plot_grid.py,sha256=w4bJhR5VDvoXF0dwjcejYIF6t5nZz7vG1Jdq5g3h_1c,16563
17
- qwt/plot_layout.py,sha256=u2fCBL9YrFAsuVymo8fBK-CQ2DxxOHKQW1D0srtx1v4,46035
18
- qwt/plot_marker.py,sha256=ADrdoYaaRqTiyHt3ypAX_9CQvRPyE6GV3Vrm-6K2m88,21272
16
+ qwt/plot_grid.py,sha256=w9JVrDruw69VMH9hUSnp28XHuQv6WzVn0Nhy6ZWff2A,16563
17
+ qwt/plot_layout.py,sha256=OZ37rC9xHmhl6R_jFGJFNWfqObbOF5dxRdVWbsHUwkM,46139
18
+ qwt/plot_marker.py,sha256=_n7JmVi9rO6fLfSKOG_Xc_gh9amFRhycMDObprAxJ7I,21240
19
19
  qwt/plot_renderer.py,sha256=I4YvEDgA2CTEDq6bj_ptGI214R-QAc184Yp_x7yA-Cg,27166
20
- qwt/plot_series.py,sha256=H-fUfw-0Edfrn8PIpaRQ1T1yqrHMuMDcNJffrM61aHE,11043
21
- qwt/qthelpers.py,sha256=SpR8Gdmj5WXVgustAsT1Y8Q9n8hpLJ9RvT4n8P4eZUc,1480
22
- qwt/scale_div.py,sha256=pZmsg-PIof3yAeLTfiFMC3tMvNSSMHomkYWnAe3eEjw,9276
23
- qwt/scale_draw.py,sha256=zAUhQ6xCbs0fc9YKfszX7GWdBLsazvS7AcQboju-_xc,37890
24
- qwt/scale_engine.py,sha256=2eA491abgPpcIBarszCFSk3IQTy8vGvATDzjzRm6ewo,29070
20
+ qwt/plot_series.py,sha256=Uvk5U8WzuLB4Rmtxg1LL79Kwtb3ow-yxFZSCBguCbtM,11038
21
+ qwt/qthelpers.py,sha256=0ocvS1zvEU_2YQBN99zuXtfmabcA3nl58EZzCycrEZ4,1457
22
+ qwt/scale_div.py,sha256=2Ay5mgduXgSm4OrDMcaEWIzenAiBuEASZRoX99PWEE4,9276
23
+ qwt/scale_draw.py,sha256=0bdr6sy_R6lHDSsjX0EFa2dDPzGq6zWBrNbU2Cca3Y4,37835
24
+ qwt/scale_engine.py,sha256=h5GiwVAphx75DXzm9LCzjHoxz7INGSOYT97sjtGLcd8,29044
25
25
  qwt/scale_map.py,sha256=WobkNna6_RPXYZjGK7gZLykNxN_kYnrcB6fEaWgnL2w,9182
26
- qwt/scale_widget.py,sha256=L5QbEM5E26bd50JD8mMdKrjO_x2ovzopzrulTfjOd1Q,27077
26
+ qwt/scale_widget.py,sha256=RyPD4Hx-ID2O8ibhJrKY0ndLRA3NjVHPOGRIVC5fBBA,27081
27
27
  qwt/symbol.py,sha256=fJwxXcg4wrbi7JJ_PZzzG0CBxwo36KZEXosjXIQSVSY,40371
28
28
  qwt/text.py,sha256=Z3qg6HBKqgCuTPhJ4VpKTqUBGbLtbPMJ-UBI9V6DAGI,42074
29
- qwt/toqimage.py,sha256=XBd1qYgv_FqqmP7BNIWP_5pGDqIwQLUa7Giuj1voEmg,1725
30
- qwt/transform.py,sha256=XgKuvG5odsjBObwDaPYOnM1QVidFFIPaKDPiCl_fg1E,6001
31
- qwt/tests/__init__.py,sha256=hdqKy7NmYU1UX6Nv0-WNLeq84BjglHtAWdtnd2K5U28,1117
32
- qwt/tests/comparative_benchmarks.py,sha256=unAmhNvIo-BexOX0UfsJo7v5_SrBXlEyCJ6SRfgZP6E,1883
33
- qwt/tests/conftest.py,sha256=JHMXAgmHphJ8hWXjqVBBLxe0XlRb3rKOu9GRKVbcr_A,272
29
+ qwt/toqimage.py,sha256=H2u_qDt32n7HGZakWvs3Ve0G3u04Uk2ZQYp8MuZkkmU,1723
30
+ qwt/transform.py,sha256=XA5-y7k6odCFzuNaFcLcX3HX5J2pJrO47AdWkFtmv_0,5992
31
+ qwt/tests/__init__.py,sha256=BNCdp7BHS9JyrFgm-zW_m5Hexr8YxgqTOP-l-v57ZvU,1148
32
+ qwt/tests/comparative_benchmarks.py,sha256=nGhNjsA_pRG4W065fDFpyOQL36fMW6D5TCsLMU39Bhs,1883
34
33
  qwt/tests/test_backingstore.py,sha256=HU9UQmElbQ6X5b3Nbpr8LtGURRZ0vPzhBJ3IlD1_LvA,547
35
34
  qwt/tests/test_bodedemo.py,sha256=_ya6NroUuvGs0BaUcAGn8Adp0ek90JTDevfqN9ew_LE,9691
36
- qwt/tests/test_cartesian.py,sha256=8rA4CgZ8M73-AmOgLDERuW9-3rjD8jVumcV96LPhSbM,3966
37
- qwt/tests/test_cpudemo.py,sha256=uT6KRnDupH3LAC9U0CM6yUf346VH_CGX6xPpLpjwogo,13196
35
+ qwt/tests/test_cartesian.py,sha256=5CJyC85P_YFF5iAIaAL6m7Nt1y1-_UDpZAbHKyIVAFk,3964
36
+ qwt/tests/test_cpudemo.py,sha256=vl_CmMwDSKyhwPztovqryRX265Owq52_G4HGJUBZZi4,13196
38
37
  qwt/tests/test_curvebenchmark1.py,sha256=TNg5ZUZaXYDgy_XwlVP62fm4ePCZYbaepmBwaUoGOMc,5987
39
38
  qwt/tests/test_curvebenchmark2.py,sha256=XBMzvKOkh54InjGEaTlzZtSBXyhZQoYfFXfejrFAMMI,2811
40
- qwt/tests/test_curvedemo1.py,sha256=P_Dz4ZaH_Nw7cO2EHKz2NKiuGuBGfBtCr22W8N82uc8,4311
41
- qwt/tests/test_curvedemo2.py,sha256=xh25WN3Wayh8QF2Rh4GCSVI6M3Q50QqymgkEB5XdF78,4233
42
- qwt/tests/test_data.py,sha256=Qj_sNJHd0o3UF6CI_d-jo5KWLt2bEJzpwF7SRyPm98M,3255
43
- qwt/tests/test_errorbar.py,sha256=WRGm3YqyuC0P8OlC77Zpk1-v6HlgTkNTAyfQREJYrd8,11021
44
- qwt/tests/test_eventfilter.py,sha256=h9fyvbVmnWKOCezxwyJkVBz05GWF6Xu94rX0CMPImzQ,16809
45
- qwt/tests/test_image.py,sha256=1lgyBRmy98RYCFh4IR4Z2Wxe0f5l6H-UiKtI2hO2Amo,6755
39
+ qwt/tests/test_curvedemo1.py,sha256=hwHS6ceSqnvflhIuw_7Y05yroE8cDAvchubOgw3Dzd4,4309
40
+ qwt/tests/test_curvedemo2.py,sha256=IfZIuuIQk2pzOC15pMhzHkHzg9Ey4YvHmDpvP4CyVOY,4207
41
+ qwt/tests/test_data.py,sha256=c-rHb6wUrLK-8NJUI1fnf5c4G-gr0uypzYqCLy4C9EQ,3255
42
+ qwt/tests/test_errorbar.py,sha256=fEcQrMYAQBiHh5SWkBjFMJnQ_caf3hhzlLN26TzEXxA,11133
43
+ qwt/tests/test_eventfilter.py,sha256=sfsxeTb9ddb27rZzqdPBdQwMLkKXCaXTA4qeJwM1j7Q,16800
44
+ qwt/tests/test_highdpi.py,sha256=PJYSUjuf_Pqb7UsB43bi7cMQa2jBF-zjK0BayGbGqPM,1089
45
+ qwt/tests/test_image.py,sha256=IDScsN7Ii-uhNG3lMEXuDXSNQxdfbhr7-qnEMquyWJI,6753
46
46
  qwt/tests/test_loadtest.py,sha256=z2rkUlWSOtFR2ENewKYP-PdomB_NBoqFjUL_UO8yxnc,1693
47
- qwt/tests/test_logcurve.py,sha256=oPmaqSWmAvO38aXUAuvWI7SeWqAGNdXYE2l7mJ6iPvQ,1169
48
- qwt/tests/test_mapdemo.py,sha256=Dilldf16_PToTUgsvLV2oBetCPsriGoSNQa8ceueIPk,3529
49
- qwt/tests/test_multidemo.py,sha256=FqPB8GKALwon42_EifyB5Fa7nQkawKkGh0Jb2Tkrx7Q,2611
50
- qwt/tests/test_simple.py,sha256=uPg3tFCAqvmxM6H5sDStwkPMa-XWCUA22jc0sUTOCH8,2457
51
- qwt/tests/test_stylesheet.py,sha256=xpb5S3PLjOTFy1xq94RYIpUqWvfoIr5Qt1o5oEcmiMA,764
47
+ qwt/tests/test_logcurve.py,sha256=X2HlDICDrTT7uHxCvRnzrhUnVwDiqFai8sKdlYmaLV4,1169
48
+ qwt/tests/test_mapdemo.py,sha256=8PigPTGhQcu1LapvtXCxebjgK78tOTRsD30-BqPpUnM,3529
49
+ qwt/tests/test_multidemo.py,sha256=Mtl_7l1S1g8QLzaP4cyTYHexFtQb-kzCrZwKX0DS_5Q,2609
50
+ qwt/tests/test_simple.py,sha256=BjbDpn8lkGa_2pWFktREdg1bhx1zbmAFXZSDU3ksvxw,2425
51
+ qwt/tests/test_stylesheet.py,sha256=7KxMwAVKVTriPCpgK0GvlEQjbWgULt_nGRHK4ogodqs,987
52
52
  qwt/tests/test_symbols.py,sha256=JSusDGUV7Q6xxMLsINj9wYPGzg9RWf1cdIXKAqTR_us,5808
53
53
  qwt/tests/test_vertical.py,sha256=lBRg8Dyig5xakM8sqnujiCNpDYGK2M-5jrCl5d6R3fU,3369
54
54
  qwt/tests/utils.py,sha256=cZ_qBvLbK2MoH_ZcZfOqYQeWJ3tTMN6fLYwatIF6448,10810
@@ -74,9 +74,9 @@ qwt/tests/data/symbol.svg,sha256=UaJE-IbdgVejSV-WVGzkQf8qWHWXYL2gjglWeNRFg9Y,132
74
74
  qwt/tests/data/symbols.png,sha256=wiqRBc2MJluJ-am9LtZ0K9DHV9BnreYMiEvfzJUFzCk,55586
75
75
  qwt/tests/data/testlauncher.png,sha256=WmucObp30QYYKsVRBs5-6t1aEN0FbIWRmOVFN1gt-vQ,139676
76
76
  qwt/tests/data/vertical.png,sha256=EvyG6q6rZm6pTT08Y_nzdBYCnqmoX1QDuEQtp2pyGlw,34076
77
- PythonQwt-0.12.1.dist-info/LICENSE,sha256=qjEk8TRuXmFS7QC-omINvD1UPGqWaOs6CzcCZoMEhdI,33457
78
- PythonQwt-0.12.1.dist-info/METADATA,sha256=tmSfMusscNgDq2sTqHNayu3qOCxcsPJef2_TVt-bSOI,45528
79
- PythonQwt-0.12.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
80
- PythonQwt-0.12.1.dist-info/entry_points.txt,sha256=pdPda-YcYigCi00hR4tMxWKu6byxM2x3zA8BQFDYvwI,46
81
- PythonQwt-0.12.1.dist-info/top_level.txt,sha256=KB1IBdWRWnaItyJMaECwZiEi1jWt3IvqCrRVVhMjTu8,4
82
- PythonQwt-0.12.1.dist-info/RECORD,,
77
+ PythonQwt-0.12.3.dist-info/LICENSE,sha256=qjEk8TRuXmFS7QC-omINvD1UPGqWaOs6CzcCZoMEhdI,33457
78
+ PythonQwt-0.12.3.dist-info/METADATA,sha256=x9XmN5n8MKcXmtN6CtE9WSaPl3Kt4t3v9-wMkrnzyAQ,45442
79
+ PythonQwt-0.12.3.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
80
+ PythonQwt-0.12.3.dist-info/entry_points.txt,sha256=pdPda-YcYigCi00hR4tMxWKu6byxM2x3zA8BQFDYvwI,46
81
+ PythonQwt-0.12.3.dist-info/top_level.txt,sha256=KB1IBdWRWnaItyJMaECwZiEi1jWt3IvqCrRVVhMjTu8,4
82
+ PythonQwt-0.12.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
qwt/__init__.py CHANGED
@@ -27,36 +27,36 @@ External resources:
27
27
  .. _GitHub: https://github.com/PlotPyStack/PythonQwt
28
28
  """
29
29
 
30
- __version__ = "0.12.1"
31
- QWT_VERSION_STR = "6.1.5"
32
-
33
30
  import warnings
34
31
 
35
- from qwt.color_map import QwtLinearColorMap
32
+ from qwt.color_map import QwtLinearColorMap # noqa: F401
36
33
  from qwt.interval import QwtInterval
37
- from qwt.legend import QwtLegend, QwtLegendData, QwtLegendLabel
38
- from qwt.painter import QwtPainter
39
- from qwt.plot import QwtPlot
40
- from qwt.plot_canvas import QwtPlotCanvas
34
+ from qwt.legend import QwtLegend, QwtLegendData, QwtLegendLabel # noqa: F401
35
+ from qwt.painter import QwtPainter # noqa: F401
36
+ from qwt.plot import QwtPlot # noqa: F401
37
+ from qwt.plot_canvas import QwtPlotCanvas # noqa: F401
41
38
  from qwt.plot_curve import QwtPlotCurve as QPC # see deprecated section
42
- from qwt.plot_curve import QwtPlotItem
43
- from qwt.plot_directpainter import QwtPlotDirectPainter
39
+ from qwt.plot_curve import QwtPlotItem # noqa: F401
40
+ from qwt.plot_directpainter import QwtPlotDirectPainter # noqa: F401
44
41
  from qwt.plot_grid import QwtPlotGrid as QPG # see deprecated section
45
- from qwt.plot_marker import QwtPlotMarker
46
- from qwt.plot_renderer import QwtPlotRenderer
47
- from qwt.plot_series import (
42
+ from qwt.plot_marker import QwtPlotMarker # noqa: F401
43
+ from qwt.plot_renderer import QwtPlotRenderer # noqa: F401
44
+ from qwt.plot_series import ( # noqa: F401
48
45
  QwtPlotSeriesItem,
49
46
  QwtPointArrayData,
50
47
  QwtSeriesData,
51
48
  QwtSeriesStore,
52
49
  )
53
- from qwt.scale_div import QwtScaleDiv
54
- from qwt.scale_draw import QwtAbstractScaleDraw, QwtScaleDraw
55
- from qwt.scale_engine import QwtLinearScaleEngine, QwtLogScaleEngine
56
- from qwt.scale_map import QwtScaleMap
50
+ from qwt.scale_div import QwtScaleDiv # noqa: F401
51
+ from qwt.scale_draw import QwtAbstractScaleDraw, QwtScaleDraw # noqa: F401
52
+ from qwt.scale_engine import QwtLinearScaleEngine, QwtLogScaleEngine # noqa: F401
53
+ from qwt.scale_map import QwtScaleMap # noqa: F401
57
54
  from qwt.symbol import QwtSymbol as QSbl # see deprecated section
58
- from qwt.text import QwtText
59
- from qwt.toqimage import array_to_qimage as toQImage
55
+ from qwt.text import QwtText # noqa: F401
56
+ from qwt.toqimage import array_to_qimage as toQImage # noqa: F401
57
+
58
+ __version__ = "0.12.3"
59
+ QWT_VERSION_STR = "6.1.5"
60
60
 
61
61
 
62
62
  ## ============================================================================
qwt/_math.py CHANGED
@@ -5,10 +5,10 @@
5
5
  # Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
6
6
  # (see LICENSE file for more details)
7
7
 
8
- from qtpy.QtCore import qFuzzyCompare
9
-
10
8
  import math
11
9
 
10
+ from qtpy.QtCore import qFuzzyCompare
11
+
12
12
 
13
13
  def qwtFuzzyCompare(value1, value2, intervalSize):
14
14
  eps = abs(1.0e-6 * intervalSize)
@@ -38,16 +38,16 @@ def qwtSign(x):
38
38
 
39
39
 
40
40
  def qwtSqr(x):
41
- return x ** 2
41
+ return x**2
42
42
 
43
43
 
44
44
  def qwtFastAtan(x):
45
45
  if x < -1.0:
46
- return -0.5 * math.pi - x / (x ** 2 + 0.28)
46
+ return -0.5 * math.pi - x / (x**2 + 0.28)
47
47
  elif x > 1.0:
48
- return 0.5 * math.pi - x / (x ** 2 + 0.28)
48
+ return 0.5 * math.pi - x / (x**2 + 0.28)
49
49
  else:
50
- return x / (1.0 + x ** 2 * 0.28)
50
+ return x / (1.0 + x**2 * 0.28)
51
51
 
52
52
 
53
53
  def qwtFastAtan2(y, x):
qwt/column_symbol.py CHANGED
@@ -5,10 +5,10 @@
5
5
  # Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization
6
6
  # (see LICENSE file for more details)
7
7
 
8
- from qwt.interval import QwtInterval
8
+ from qtpy.QtCore import QLineF, QRectF, Qt
9
+ from qtpy.QtGui import QPalette, QPolygonF
9
10
 
10
- from qtpy.QtGui import QPolygonF, QPalette
11
- from qtpy.QtCore import QRectF, Qt, QLineF
11
+ from qwt.interval import QwtInterval
12
12
 
13
13
 
14
14
  def qwtDrawBox(p, rect, pal, lw):
@@ -80,7 +80,6 @@ class QwtColumnSymbol_PrivateData(object):
80
80
 
81
81
 
82
82
  class QwtColumnSymbol(object):
83
-
84
83
  # enum Style
85
84
  NoStyle = -1
86
85
  Box = 0
@@ -134,7 +133,6 @@ class QwtColumnSymbol(object):
134
133
 
135
134
 
136
135
  class QwtColumnRect(object):
137
-
138
136
  # enum Direction
139
137
  LeftToRight, RightToLeft, BottomToTop, TopToBottom = list(range(4))
140
138
 
qwt/dyngrid_layout.py CHANGED
@@ -15,8 +15,8 @@ The `dyngrid_layout` module provides the `QwtDynGridLayout` class.
15
15
  :members:
16
16
  """
17
17
 
18
+ from qtpy.QtCore import QRect, QSize, Qt
18
19
  from qtpy.QtWidgets import QLayout
19
- from qtpy.QtCore import Qt, QRect, QSize
20
20
 
21
21
 
22
22
  class QwtDynGridLayout_PrivateData(object):
qwt/legend.py CHANGED
@@ -21,22 +21,23 @@ QwtLegend
21
21
 
22
22
  import math
23
23
 
24
+ from qtpy.QtCore import QEvent, QPoint, QRect, QRectF, QSize, Qt, Signal
25
+
26
+ # qDrawWinButton,
27
+ from qtpy.QtGui import QPainter, QPalette, QPixmap
24
28
  from qtpy.QtWidgets import (
29
+ QApplication,
25
30
  QFrame,
26
31
  QScrollArea,
27
- QWidget,
28
- QVBoxLayout,
29
- QApplication,
30
- QStyleOption,
31
32
  QStyle,
32
- # qDrawWinButton,
33
+ QStyleOption,
34
+ QVBoxLayout,
35
+ QWidget,
33
36
  )
34
- from qtpy.QtGui import QPalette, QPixmap, QPainter
35
- from qtpy.QtCore import Signal, QEvent, QSize, Qt, QRect, QRectF, QPoint
36
37
 
37
- from qwt.text import QwtText, QwtTextLabel
38
38
  from qwt.dyngrid_layout import QwtDynGridLayout
39
39
  from qwt.painter import QwtPainter
40
+ from qwt.text import QwtText, QwtTextLabel
40
41
 
41
42
 
42
43
  class QwtLegendData(object):
qwt/null_paintdevice.py CHANGED
@@ -15,7 +15,7 @@ QwtNullPaintDevice
15
15
 
16
16
  import os
17
17
 
18
- from qtpy.QtGui import QPaintEngine, QPainterPath, QPaintDevice
18
+ from qtpy.QtGui import QPaintDevice, QPaintEngine, QPainterPath
19
19
 
20
20
  QT_API = os.environ["QT_API"]
21
21
 
qwt/painter.py CHANGED
@@ -15,7 +15,6 @@ QwtPainterClass
15
15
 
16
16
  from qtpy.QtCore import QLineF, QPoint, QRect, Qt
17
17
  from qtpy.QtGui import (
18
- QBrush,
19
18
  QColor,
20
19
  QLinearGradient,
21
20
  QPaintEngine,
qwt/painter_command.py CHANGED
@@ -13,9 +13,10 @@ QwtPainterCommand
13
13
  :members:
14
14
  """
15
15
 
16
- from qtpy.QtGui import QPainterPath, QPaintEngine
17
16
  import copy
18
17
 
18
+ from qtpy.QtGui import QPaintEngine, QPainterPath
19
+
19
20
 
20
21
  class PixmapData(object):
21
22
  def __init__(self):
qwt/plot.py CHANGED
@@ -610,7 +610,7 @@ class QwtPlot(QFrame):
610
610
  :py:meth:`axisScaleDiv()`
611
611
  """
612
612
  if self.axisValid(axisId):
613
- return self.axisWidget(axisId).scaleDiv.interval()
613
+ return self.axisScaleDiv(axisId).interval()
614
614
  else:
615
615
  return QwtInterval()
616
616
 
qwt/plot_curve.py CHANGED
@@ -36,9 +36,10 @@ from qwt.text import QwtText
36
36
  QT_API = os.environ["QT_API"]
37
37
 
38
38
  if QT_API == "pyside6":
39
- import shiboken6 as shiboken
40
39
  import ctypes
41
40
 
41
+ import shiboken6 as shiboken
42
+
42
43
  import numpy as np
43
44
 
44
45
 
qwt/plot_grid.py CHANGED
@@ -13,13 +13,13 @@ QwtPlotGrid
13
13
  :members:
14
14
  """
15
15
 
16
- from qwt.scale_div import QwtScaleDiv
17
- from qwt.plot import QwtPlotItem
16
+ from qtpy.QtCore import QLineF, Qt
17
+ from qtpy.QtGui import QPen
18
+
18
19
  from qwt._math import qwtFuzzyGreaterOrEqual, qwtFuzzyLessOrEqual
20
+ from qwt.plot import QwtPlotItem
19
21
  from qwt.qthelpers import qcolor_from_str
20
-
21
- from qtpy.QtGui import QPen
22
- from qtpy.QtCore import Qt, QLineF
22
+ from qwt.scale_div import QwtScaleDiv
23
23
 
24
24
 
25
25
  class QwtPlotGrid_PrivateData(object):
qwt/plot_layout.py CHANGED
@@ -136,7 +136,10 @@ class QwtPlotLayout_LayoutData(object):
136
136
  if layout is not None:
137
137
  mgn = layout.contentsMargins()
138
138
  self.canvas.contentsMargins = [
139
- mgn.left(), mgn.top(), mgn.right(), mgn.bottom()
139
+ mgn.left(),
140
+ mgn.top(),
141
+ mgn.right(),
142
+ mgn.bottom(),
140
143
  ]
141
144
 
142
145
 
@@ -575,7 +578,10 @@ class QwtPlotLayout(object):
575
578
  else:
576
579
  mgn = layout.contentsMargins()
577
580
  left, top, right, bottom = (
578
- mgn.left(), mgn.top(), mgn.right(), mgn.bottom()
581
+ mgn.left(),
582
+ mgn.top(),
583
+ mgn.right(),
584
+ mgn.bottom(),
579
585
  )
580
586
  for axis in QwtPlot.AXES:
581
587
  if plot.axisEnabled(axis):
qwt/plot_marker.py CHANGED
@@ -13,14 +13,14 @@ QwtPlotMarker
13
13
  :members:
14
14
  """
15
15
 
16
- from qwt.plot import QwtPlot, QwtPlotItem
17
- from qwt.text import QwtText
16
+ from qtpy.QtCore import QLineF, QPointF, QRect, QRectF, QSizeF, Qt
17
+ from qtpy.QtGui import QPainter, QPen
18
+
18
19
  from qwt.graphic import QwtGraphic
19
- from qwt.symbol import QwtSymbol
20
+ from qwt.plot import QwtPlot, QwtPlotItem
20
21
  from qwt.qthelpers import qcolor_from_str
21
-
22
- from qtpy.QtGui import QPen, QPainter
23
- from qtpy.QtCore import Qt, QPointF, QRectF, QSizeF, QRect, QLineF
22
+ from qwt.symbol import QwtSymbol
23
+ from qwt.text import QwtText
24
24
 
25
25
 
26
26
  class QwtPlotMarker_PrivateData(object):
@@ -240,9 +240,7 @@ class QwtPlotMarker(QwtPlotItem):
240
240
  if self.__data.symbol and self.__data.symbol.style() != QwtSymbol.NoSymbol:
241
241
  sz = self.__data.symbol.size()
242
242
  width, height = int(sz.width()), int(sz.height())
243
- clipRect = QRectF(
244
- canvasRect.adjusted(-width, -height, width, height)
245
- )
243
+ clipRect = QRectF(canvasRect.adjusted(-width, -height, width, height))
246
244
  if clipRect.contains(pos):
247
245
  self.__data.symbol.drawSymbols(painter, [pos])
248
246
  self.drawLabel(painter, canvasRect, pos)
qwt/plot_series.py CHANGED
@@ -20,7 +20,7 @@ QwtSeriesData
20
20
 
21
21
  .. autoclass:: QwtSeriesData
22
22
  :members:
23
-
23
+
24
24
  QwtPointArrayData
25
25
  ~~~~~~~~~~~~~~~~~
26
26
 
@@ -35,12 +35,11 @@ QwtSeriesStore
35
35
  """
36
36
 
37
37
  import numpy as np
38
+ from qtpy.QtCore import QPointF, QRectF, Qt
38
39
 
39
40
  from qwt.plot import QwtPlotItem, QwtPlotItem_PrivateData
40
41
  from qwt.text import QwtText
41
42
 
42
- from qtpy.QtCore import Qt, QRectF, QPointF
43
-
44
43
 
45
44
  class QwtPlotSeriesItem_PrivateData(QwtPlotItem_PrivateData):
46
45
  def __init__(self):
qwt/qthelpers.py CHANGED
@@ -7,7 +7,6 @@
7
7
  """Qt helpers"""
8
8
 
9
9
  import os
10
- import os.path as osp
11
10
 
12
11
  from qtpy import QtCore as QC
13
12
  from qtpy import QtGui as QG
qwt/scale_div.py CHANGED
@@ -13,10 +13,10 @@ QwtScaleDiv
13
13
  :members:
14
14
  """
15
15
 
16
- from qwt.interval import QwtInterval
17
-
18
16
  import copy
19
17
 
18
+ from qwt.interval import QwtInterval
19
+
20
20
 
21
21
  class QwtScaleDiv(object):
22
22
  """
qwt/scale_draw.py CHANGED
@@ -438,14 +438,13 @@ class QwtAbstractScaleDraw(object):
438
438
  :param float value: Value
439
439
  :return: Tuple (tick label, text size)
440
440
  """
441
- lbl, tsize = self.__data.labelCache.get(value, (None, None))
441
+ lbl = self.__data.labelCache.get(value)
442
442
  if lbl is None:
443
443
  lbl = QwtText(self.label(value))
444
444
  lbl.setRenderFlags(0)
445
445
  lbl.setLayoutAttribute(QwtText.MinimumLayout)
446
- tsize = lbl.textSize(font)
447
- self.__data.labelCache[value] = lbl, tsize
448
- return lbl, tsize
446
+ self.__data.labelCache[value] = lbl
447
+ return lbl, lbl.textSize(font)
449
448
 
450
449
  def invalidateCache(self):
451
450
  """
qwt/scale_engine.py CHANGED
@@ -25,17 +25,16 @@ QwtLogScaleEngine
25
25
  :members:
26
26
  """
27
27
 
28
- from qwt.interval import QwtInterval
29
- from qwt.scale_div import QwtScaleDiv
30
- from qwt.transform import QwtLogTransform
31
- from qwt._math import qwtFuzzyCompare
32
- from qwt.transform import QwtTransform
28
+ import math
29
+ import sys
33
30
 
31
+ import numpy as np
34
32
  from qtpy.QtCore import qFuzzyCompare
35
33
 
36
- import sys
37
- import math
38
- import numpy as np
34
+ from qwt._math import qwtFuzzyCompare
35
+ from qwt.interval import QwtInterval
36
+ from qwt.scale_div import QwtScaleDiv
37
+ from qwt.transform import QwtLogTransform, QwtTransform
39
38
 
40
39
  DBL_MAX = sys.float_info.max
41
40
  LOG_MIN = 1.0e-100
qwt/scale_widget.py CHANGED
@@ -15,17 +15,16 @@ QwtScaleWidget
15
15
 
16
16
  import math
17
17
 
18
+ from qtpy.QtCore import QRectF, QSize, Qt, Signal
19
+ from qtpy.QtGui import QPainter, QPalette
20
+ from qtpy.QtWidgets import QSizePolicy, QStyle, QStyleOption, QWidget
21
+
22
+ from qwt.color_map import QwtColorMap, QwtLinearColorMap
23
+ from qwt.interval import QwtInterval
24
+ from qwt.painter import QwtPainter
18
25
  from qwt.scale_draw import QwtScaleDraw
19
26
  from qwt.scale_engine import QwtLinearScaleEngine
20
- from qwt.color_map import QwtLinearColorMap
21
27
  from qwt.text import QwtText
22
- from qwt.painter import QwtPainter
23
- from qwt.interval import QwtInterval
24
- from qwt.color_map import QwtColorMap
25
-
26
- from qtpy.QtGui import QPainter, QPalette
27
- from qtpy.QtWidgets import QWidget, QSizePolicy, QStyleOption, QStyle, QApplication
28
- from qtpy.QtCore import Qt, QRectF, QSize, Signal, QEvent
29
28
 
30
29
 
31
30
  class ColorBar(object):
@@ -639,7 +638,10 @@ class QwtScaleWidget(QWidget):
639
638
  else:
640
639
  mgn = self.layout().contentsMargins()
641
640
  left, top, right, bottom = (
642
- mgn.left(), mgn.top(), mgn.right(), mgn.bottom()
641
+ mgn.left(),
642
+ mgn.top(),
643
+ mgn.right(),
644
+ mgn.bottom(),
643
645
  )
644
646
  return size + QSize(left + right, top + bottom)
645
647
 
qwt/tests/__init__.py CHANGED
@@ -9,10 +9,16 @@ PythonQwt test package
9
9
  ======================
10
10
  """
11
11
 
12
- from qtpy import QtWidgets as QW
13
12
  from qtpy import QtCore as QC
13
+ from qtpy import QtWidgets as QW
14
14
 
15
- from qwt.tests.utils import TestEnvironment, TestLauncher, take_screenshot, run_all_tests, QT_API
15
+ from qwt.tests.utils import (
16
+ QT_API,
17
+ TestEnvironment,
18
+ TestLauncher,
19
+ run_all_tests,
20
+ take_screenshot,
21
+ )
16
22
 
17
23
 
18
24
  def run(wait=True):
@@ -11,8 +11,8 @@ PyQwt5 vs. PythonQwt
11
11
 
12
12
  import os
13
13
  import os.path as osp
14
- import sys
15
14
  import subprocess
15
+ import sys
16
16
  import time
17
17
 
18
18
 
@@ -9,10 +9,9 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import numpy as np
12
-
13
12
  from qtpy.QtCore import Qt
14
13
 
15
- from qwt import QwtPlot, QwtScaleDraw, QwtPlotGrid, QwtPlotCurve, QwtPlotItem
14
+ from qwt import QwtPlot, QwtPlotCurve, QwtPlotGrid, QwtPlotItem, QwtScaleDraw
16
15
  from qwt.tests import utils
17
16
 
18
17
 
qwt/tests/test_cpudemo.py CHANGED
@@ -9,20 +9,20 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import os
12
- import numpy as np
13
12
 
14
- from qtpy.QtWidgets import QWidget, QVBoxLayout, QLabel
15
- from qtpy.QtGui import QColor, QBrush
16
- from qtpy.QtCore import QRect, QTime, Qt
13
+ import numpy as np
14
+ from qtpy.QtCore import QRect, Qt, QTime
15
+ from qtpy.QtGui import QBrush, QColor
16
+ from qtpy.QtWidgets import QLabel, QVBoxLayout, QWidget
17
17
 
18
18
  from qwt import (
19
- QwtPlot,
20
- QwtPlotMarker,
21
- QwtScaleDraw,
22
19
  QwtLegend,
20
+ QwtLegendData,
21
+ QwtPlot,
23
22
  QwtPlotCurve,
24
23
  QwtPlotItem,
25
- QwtLegendData,
24
+ QwtPlotMarker,
25
+ QwtScaleDraw,
26
26
  QwtText,
27
27
  )
28
28
  from qwt.tests import utils
@@ -9,12 +9,11 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import numpy as np
12
-
13
- from qtpy.QtWidgets import QFrame
14
- from qtpy.QtGui import QPen, QBrush, QFont, QPainter
15
12
  from qtpy.QtCore import QSize, Qt
13
+ from qtpy.QtGui import QBrush, QFont, QPainter, QPen
14
+ from qtpy.QtWidgets import QFrame
16
15
 
17
- from qwt import QwtSymbol, QwtPlotCurve, QwtPlotItem, QwtScaleMap
16
+ from qwt import QwtPlotCurve, QwtPlotItem, QwtScaleMap, QwtSymbol
18
17
  from qwt.tests import utils
19
18
 
20
19
 
@@ -9,13 +9,11 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import numpy as np
12
-
12
+ from qtpy.QtCore import QSize, Qt
13
+ from qtpy.QtGui import QBrush, QColor, QPainter, QPalette, QPen
13
14
  from qtpy.QtWidgets import QFrame
14
- from qtpy.QtGui import QPen, QBrush, QColor, QPainter, QPalette
15
- from qtpy.QtCore import QSize
16
- from qtpy.QtCore import Qt
17
15
 
18
- from qwt import QwtScaleMap, QwtSymbol, QwtPlotCurve
16
+ from qwt import QwtPlotCurve, QwtScaleMap, QwtSymbol
19
17
  from qwt.tests import utils
20
18
 
21
19
  Size = 15
qwt/tests/test_data.py CHANGED
@@ -9,19 +9,19 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import random
12
- import numpy as np
13
12
 
14
- from qtpy.QtWidgets import QFrame
15
- from qtpy.QtGui import QPen, QBrush
13
+ import numpy as np
16
14
  from qtpy.QtCore import QSize, Qt
15
+ from qtpy.QtGui import QBrush, QPen
16
+ from qtpy.QtWidgets import QFrame
17
17
 
18
18
  from qwt import (
19
+ QwtAbstractScaleDraw,
20
+ QwtLegend,
19
21
  QwtPlot,
22
+ QwtPlotCurve,
20
23
  QwtPlotMarker,
21
24
  QwtSymbol,
22
- QwtLegend,
23
- QwtPlotCurve,
24
- QwtAbstractScaleDraw,
25
25
  )
26
26
  from qwt.tests import utils
27
27
 
@@ -9,11 +9,10 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import numpy as np
12
+ from qtpy.QtCore import QLineF, QRectF, QSize, Qt
13
+ from qtpy.QtGui import QBrush, QPen
12
14
 
13
- from qtpy.QtGui import QPen, QBrush
14
- from qtpy.QtCore import QSize, QRectF, QLineF, Qt
15
-
16
- from qwt import QwtPlot, QwtSymbol, QwtPlotGrid, QwtPlotCurve
15
+ from qwt import QwtPlot, QwtPlotCurve, QwtPlotGrid, QwtSymbol
17
16
  from qwt.tests import utils
18
17
 
19
18
 
@@ -199,7 +198,10 @@ class ErrorBarPlotCurve(QwtPlotCurve):
199
198
  if self.errorCap > 0:
200
199
  # draw the caps
201
200
  cap = self.errorCap / 2
202
- n, i, = (
201
+ (
202
+ n,
203
+ i,
204
+ ) = (
203
205
  len(y),
204
206
  0,
205
207
  )
@@ -235,7 +237,10 @@ class ErrorBarPlotCurve(QwtPlotCurve):
235
237
  ymin = self.__y - self.__dy[0]
236
238
  ymax = self.__y + self.__dy[1]
237
239
  x = self.__x
238
- n, i, = (
240
+ (
241
+ n,
242
+ i,
243
+ ) = (
239
244
  len(x),
240
245
  0,
241
246
  )
@@ -12,7 +12,7 @@ import os
12
12
 
13
13
  import numpy as np
14
14
  from qtpy.QtCore import QEvent, QObject, QPoint, QRect, QSize, Qt, Signal
15
- from qtpy.QtGui import QBrush, QColor, QPainter, QPen, QPixmap
15
+ from qtpy.QtGui import QBrush, QColor, QPainter, QPen
16
16
  from qtpy.QtWidgets import QApplication, QMainWindow, QToolBar, QWhatsThis, QWidget
17
17
 
18
18
  from qwt import (
@@ -0,0 +1,36 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Licensed under the terms of the PyQwt License
4
+ # Copyright (C) 2003-2009 Gerard Vermeulen, for the original PyQwt example
5
+ # Copyright (c) 2015 Pierre Raybaut, for the PyQt5/PySide port and further
6
+ # developments (e.g. ported to PythonQwt API)
7
+ # (see LICENSE file for more details)
8
+
9
+ SHOW = True # Show test in GUI-based test launcher
10
+
11
+ import os
12
+
13
+ import pytest
14
+
15
+ from qwt.tests import utils
16
+ from qwt.tests.test_simple import SimplePlot
17
+
18
+
19
+ class HighDPIPlot(SimplePlot):
20
+ NUM_POINTS = 5000000 # 5 million points needed to test high DPI support
21
+
22
+
23
+ @pytest.mark.skip(reason="This test is not relevant for the automated test suite")
24
+ def test_highdpi():
25
+ """Test high DPI support"""
26
+
27
+ # Performance should be the same with "1" and "2" scale factors:
28
+ # (as of today, this is not the case, but it has to be fixed in the future:
29
+ # https://github.com/PlotPyStack/PythonQwt/issues/83)
30
+ os.environ["QT_SCALE_FACTOR"] = "2"
31
+
32
+ utils.test_widget(HighDPIPlot, (800, 480))
33
+
34
+
35
+ if __name__ == "__main__":
36
+ test_highdpi()
qwt/tests/test_image.py CHANGED
@@ -9,20 +9,19 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import numpy as np
12
-
13
- from qtpy.QtGui import QPen, qRgb
14
12
  from qtpy.QtCore import Qt
13
+ from qtpy.QtGui import QPen, qRgb
15
14
 
16
15
  from qwt import (
17
- QwtPlot,
18
- QwtPlotMarker,
16
+ QwtInterval,
19
17
  QwtLegend,
20
- QwtPlotGrid,
21
- QwtPlotCurve,
22
- QwtPlotItem,
23
18
  QwtLegendData,
24
19
  QwtLinearColorMap,
25
- QwtInterval,
20
+ QwtPlot,
21
+ QwtPlotCurve,
22
+ QwtPlotGrid,
23
+ QwtPlotItem,
24
+ QwtPlotMarker,
26
25
  QwtScaleMap,
27
26
  toQImage,
28
27
  )
@@ -14,7 +14,7 @@ np.seterr(all="raise")
14
14
 
15
15
  from qtpy.QtCore import Qt
16
16
 
17
- from qwt import QwtPlot, QwtPlotCurve, QwtLogScaleEngine
17
+ from qwt import QwtLogScaleEngine, QwtPlot, QwtPlotCurve
18
18
  from qwt.tests import utils
19
19
 
20
20
 
qwt/tests/test_mapdemo.py CHANGED
@@ -10,13 +10,13 @@ SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import random
12
12
  import time
13
- import numpy as np
14
13
 
15
- from qtpy.QtWidgets import QMainWindow, QToolBar
16
- from qtpy.QtGui import QPen, QBrush
14
+ import numpy as np
17
15
  from qtpy.QtCore import QSize, Qt
16
+ from qtpy.QtGui import QBrush, QPen
17
+ from qtpy.QtWidgets import QMainWindow, QToolBar
18
18
 
19
- from qwt import QwtPlot, QwtSymbol, QwtPlotCurve
19
+ from qwt import QwtPlot, QwtPlotCurve, QwtSymbol
20
20
  from qwt.tests import utils
21
21
 
22
22
 
@@ -9,10 +9,9 @@
9
9
  SHOW = True # Show test in GUI-based test launcher
10
10
 
11
11
  import numpy as np
12
-
13
- from qtpy.QtWidgets import QGridLayout, QWidget
14
- from qtpy.QtGui import QPen
15
12
  from qtpy.QtCore import Qt
13
+ from qtpy.QtGui import QPen
14
+ from qtpy.QtWidgets import QGridLayout, QWidget
16
15
 
17
16
  from qwt import QwtPlot, QwtPlotCurve
18
17
  from qwt.tests import utils
qwt/tests/test_simple.py CHANGED
@@ -20,6 +20,7 @@ FNAMES = ("test_simple.svg", "test_simple.pdf", "test_simple.png")
20
20
 
21
21
 
22
22
  class SimplePlot(qwt.QwtPlot):
23
+ NUM_POINTS = 100
23
24
  TEST_EXPORT = True
24
25
 
25
26
  def __init__(self):
@@ -30,13 +31,11 @@ class SimplePlot(qwt.QwtPlot):
30
31
  self.setAxisTitle(qwt.QwtPlot.yLeft, "Y-axis")
31
32
  self.enableAxis(self.xBottom)
32
33
  self.setCanvasBackground(Qt.white)
33
- canvas = self.canvas()
34
- canvas.setBorderRadius(50)
35
34
 
36
35
  qwt.QwtPlotGrid.make(self, color=Qt.lightGray, width=0, style=Qt.DotLine)
37
36
 
38
37
  # insert a few curves
39
- x = np.arange(0.0, 10.0, 0.1)
38
+ x = np.linspace(0.0, 10.0, self.NUM_POINTS)
40
39
  qwt.QwtPlotCurve.make(x, np.sin(x), "y = sin(x)", self, linecolor="red")
41
40
  qwt.QwtPlotCurve.make(x, np.cos(x), "y = cos(x)", self, linecolor="blue")
42
41
 
@@ -2,7 +2,11 @@
2
2
 
3
3
  SHOW = True # Show test in GUI-based test launcher
4
4
 
5
+ import os
6
+
5
7
  import numpy as np
8
+ import pytest
9
+ import qtpy
6
10
  from qtpy.QtCore import Qt
7
11
 
8
12
  import qwt
@@ -19,6 +23,11 @@ class StyleSheetPlot(qwt.QwtPlot):
19
23
  qwt.QwtPlotCurve.make(x, np.sinc(x), "y = sinc(x)", self, linecolor="green")
20
24
 
21
25
 
26
+ # Skip the test for PySide6 on Linux
27
+ @pytest.mark.skipif(
28
+ qtpy.API_NAME == "PySide6" and os.name == "posix",
29
+ reason="Fails on Linux with PySide6 for unknown reasons",
30
+ )
22
31
  def test_stylesheet():
23
32
  """Stylesheet test"""
24
33
  utils.test_widget(StyleSheetPlot, size=(600, 400))
qwt/toqimage.py CHANGED
@@ -10,9 +10,8 @@ NumPy array to QImage
10
10
  .. autofunction:: array_to_qimage
11
11
  """
12
12
 
13
- from qtpy.QtGui import QImage
14
-
15
13
  import numpy as np
14
+ from qtpy.QtGui import QImage
16
15
 
17
16
 
18
17
  def array_to_qimage(arr, copy=False):
qwt/transform.py CHANGED
@@ -14,7 +14,7 @@ QwtTransform
14
14
 
15
15
  .. autoclass:: QwtTransform
16
16
  :members:
17
-
17
+
18
18
  QwtNullTransform
19
19
  ~~~~~~~~~~~~~~~~
20
20
 
@@ -26,7 +26,7 @@ QwtLogTransform
26
26
 
27
27
  .. autoclass:: QwtLogTransform
28
28
  :members:
29
-
29
+
30
30
  QwtPowerTransform
31
31
  ~~~~~~~~~~~~~~~~~
32
32
 
qwt/tests/conftest.py DELETED
@@ -1,9 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- """pytest configuration for PythonQwt package tests."""
4
-
5
- import os
6
- from qwt.tests.utils import TestEnvironment
7
-
8
- # Set the unattended environment variable to 1 to avoid any user interaction
9
- os.environ[TestEnvironment.UNATTENDED_ENV] = "1"