PythonQwt 0.14.3__tar.gz → 0.14.5__tar.gz

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 (131) hide show
  1. {pythonqwt-0.14.3/PythonQwt.egg-info → pythonqwt-0.14.5}/PKG-INFO +3 -2
  2. {pythonqwt-0.14.3 → pythonqwt-0.14.5/PythonQwt.egg-info}/PKG-INFO +3 -2
  3. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/pyproject.toml +1 -0
  4. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/__init__.py +1 -1
  5. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/graphic.py +7 -7
  6. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/painter.py +1 -1
  7. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot.py +2 -1
  8. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_curve.py +1 -2
  9. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/scale_engine.py +10 -10
  10. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_cpudemo.py +3 -3
  11. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/LICENSE +0 -0
  12. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/MANIFEST.in +0 -0
  13. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/PythonQwt-tests.desktop +0 -0
  14. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/PythonQwt.egg-info/SOURCES.txt +0 -0
  15. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/PythonQwt.egg-info/dependency_links.txt +0 -0
  16. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/PythonQwt.egg-info/entry_points.txt +0 -0
  17. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/PythonQwt.egg-info/requires.txt +0 -0
  18. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/PythonQwt.egg-info/top_level.txt +0 -0
  19. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/README.md +0 -0
  20. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/_static/PythonQwt_logo.png +0 -0
  21. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/_static/QwtPlot_example.png +0 -0
  22. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/_static/panorama.png +0 -0
  23. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/_static/symbol_path_example.png +0 -0
  24. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/conf.py +0 -0
  25. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/bodedemo.rst +0 -0
  26. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/cartesian.rst +0 -0
  27. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/cpudemo.rst +0 -0
  28. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/curvebenchmark1.rst +0 -0
  29. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/curvebenchmark2.rst +0 -0
  30. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/curvedemo1.rst +0 -0
  31. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/curvedemo2.rst +0 -0
  32. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/data.rst +0 -0
  33. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/errorbar.rst +0 -0
  34. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/eventfilter.rst +0 -0
  35. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/image.rst +0 -0
  36. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/index.rst +0 -0
  37. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/logcurve.rst +0 -0
  38. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/mapdemo.rst +0 -0
  39. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/multidemo.rst +0 -0
  40. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/simple.rst +0 -0
  41. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/examples/vertical.rst +0 -0
  42. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/index.rst +0 -0
  43. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/installation.rst +0 -0
  44. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/overview.rst +0 -0
  45. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/plot_example.py +0 -0
  46. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/graphic.rst +0 -0
  47. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/index.rst +0 -0
  48. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/interval.rst +0 -0
  49. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/plot.rst +0 -0
  50. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/plot_directpainter.rst +0 -0
  51. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/plot_layout.rst +0 -0
  52. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/plot_series.rst +0 -0
  53. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/scale.rst +0 -0
  54. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/symbol.rst +0 -0
  55. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/text.rst +0 -0
  56. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/toqimage.rst +0 -0
  57. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/reference/transform.rst +0 -0
  58. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/requirements.txt +0 -0
  59. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/doc/symbol_path_example.py +0 -0
  60. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/_math.py +0 -0
  61. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/color_map.py +0 -0
  62. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/column_symbol.py +0 -0
  63. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/dyngrid_layout.py +0 -0
  64. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/interval.py +0 -0
  65. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/legend.py +0 -0
  66. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/null_paintdevice.py +0 -0
  67. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/painter_command.py +0 -0
  68. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_canvas.py +0 -0
  69. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_directpainter.py +0 -0
  70. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_grid.py +0 -0
  71. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_layout.py +0 -0
  72. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_marker.py +0 -0
  73. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_renderer.py +0 -0
  74. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/plot_series.py +0 -0
  75. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/qthelpers.py +0 -0
  76. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/scale_div.py +0 -0
  77. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/scale_draw.py +0 -0
  78. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/scale_map.py +0 -0
  79. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/scale_widget.py +0 -0
  80. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/symbol.py +0 -0
  81. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/__init__.py +0 -0
  82. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/comparative_benchmarks.py +0 -0
  83. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/conftest.py +0 -0
  84. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/PythonQwt.svg +0 -0
  85. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/bodedemo.png +0 -0
  86. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/cartesian.png +0 -0
  87. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/cpudemo.png +0 -0
  88. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/curvebenchmark1.png +0 -0
  89. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/curvebenchmark2.png +0 -0
  90. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/curvedemo1.png +0 -0
  91. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/curvedemo2.png +0 -0
  92. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/data.png +0 -0
  93. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/errorbar.png +0 -0
  94. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/eventfilter.png +0 -0
  95. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/image.png +0 -0
  96. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/loadtest.png +0 -0
  97. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/logcurve.png +0 -0
  98. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/mapdemo.png +0 -0
  99. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/multidemo.png +0 -0
  100. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/simple.png +0 -0
  101. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/stylesheet.png +0 -0
  102. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/symbol.svg +0 -0
  103. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/symbols.png +0 -0
  104. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/testlauncher.png +0 -0
  105. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/data/vertical.png +0 -0
  106. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_backingstore.py +0 -0
  107. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_bodedemo.py +0 -0
  108. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_cartesian.py +0 -0
  109. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_curvebenchmark1.py +0 -0
  110. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_curvebenchmark2.py +0 -0
  111. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_curvedemo1.py +0 -0
  112. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_curvedemo2.py +0 -0
  113. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_data.py +0 -0
  114. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_errorbar.py +0 -0
  115. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_eventfilter.py +0 -0
  116. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_highdpi.py +0 -0
  117. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_image.py +0 -0
  118. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_loadtest.py +0 -0
  119. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_logcurve.py +0 -0
  120. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_mapdemo.py +0 -0
  121. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_multidemo.py +0 -0
  122. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_relativemargin.py +0 -0
  123. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_simple.py +0 -0
  124. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_stylesheet.py +0 -0
  125. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_symbols.py +0 -0
  126. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/test_vertical.py +0 -0
  127. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/tests/utils.py +0 -0
  128. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/text.py +0 -0
  129. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/toqimage.py +0 -0
  130. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/qwt/transform.py +0 -0
  131. {pythonqwt-0.14.3 → pythonqwt-0.14.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: PythonQwt
3
- Version: 0.14.3
3
+ Version: 0.14.5
4
4
  Summary: Qt plotting widgets for Python
5
5
  Author-email: Pierre Raybaut <pierre.raybaut@gmail.com>
6
6
  License: PythonQwt License Agreement
@@ -699,6 +699,7 @@ Requires-Dist: python-docs-theme; extra == "doc"
699
699
  Provides-Extra: test
700
700
  Requires-Dist: pytest; extra == "test"
701
701
  Requires-Dist: pytest-xvfb; extra == "test"
702
+ Dynamic: license-file
702
703
 
703
704
  # PythonQwt: Qt plotting widgets for Python
704
705
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: PythonQwt
3
- Version: 0.14.3
3
+ Version: 0.14.5
4
4
  Summary: Qt plotting widgets for Python
5
5
  Author-email: Pierre Raybaut <pierre.raybaut@gmail.com>
6
6
  License: PythonQwt License Agreement
@@ -699,6 +699,7 @@ Requires-Dist: python-docs-theme; extra == "doc"
699
699
  Provides-Extra: test
700
700
  Requires-Dist: pytest; extra == "test"
701
701
  Requires-Dist: pytest-xvfb; extra == "test"
702
+ Dynamic: license-file
702
703
 
703
704
  # PythonQwt: Qt plotting widgets for Python
704
705
 
@@ -69,6 +69,7 @@ target-version = "py39" # Assume Python 3.9.
69
69
  select = ["E", "F", "W", "I", "NPY201"]
70
70
  ignore = [
71
71
  "E203", # space before : (needed for how black formats slicing)
72
+ "E501", # line too long
72
73
  ]
73
74
 
74
75
  [tool.ruff.format]
@@ -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.3"
58
+ __version__ = "0.14.5"
59
59
  QWT_VERSION_STR = "6.1.5"
60
60
 
61
61
 
@@ -139,20 +139,20 @@ class PathInfo(object):
139
139
  rect = transform.mapRect(self.__boundingRect)
140
140
  else:
141
141
  rect = transform.mapRect(self.__pointRect)
142
- l = abs(self.__pointRect.left() - self.__boundingRect.left())
143
- r = abs(self.__pointRect.right() - self.__boundingRect.right())
144
- t = abs(self.__pointRect.top() - self.__boundingRect.top())
145
- b = abs(self.__pointRect.bottom() - self.__boundingRect.bottom())
146
- rect.adjust(-l, -t, r, b)
142
+ left_diff = abs(self.__pointRect.left() - self.__boundingRect.left())
143
+ right_diff = abs(self.__pointRect.right() - self.__boundingRect.right())
144
+ top_diff = abs(self.__pointRect.top() - self.__boundingRect.top())
145
+ bottom_diff = abs(self.__pointRect.bottom() - self.__boundingRect.bottom())
146
+ rect.adjust(-left_diff, -top_diff, right_diff, bottom_diff)
147
147
  return rect
148
148
 
149
149
  def scaleFactorX(self, pathRect, targetRect, scalePens):
150
150
  if pathRect.width() <= 0.0:
151
151
  return 0.0
152
152
  p0 = self.__pointRect.center()
153
- l = abs(pathRect.left() - p0.x())
153
+ left_diff = abs(pathRect.left() - p0.x())
154
154
  r = abs(pathRect.right() - p0.x())
155
- w = 2.0 * min([l, r]) * targetRect.width() / pathRect.width()
155
+ w = 2.0 * min([left_diff, r]) * targetRect.width() / pathRect.width()
156
156
  if scalePens and self.__scalablePen:
157
157
  sx = w / self.__boundingRect.width()
158
158
  else:
@@ -393,7 +393,7 @@ class QwtPainterClass(object):
393
393
  if widget.testAttribute(Qt.WA_StyledBackground):
394
394
  opt = QStyleOption()
395
395
  opt.initFrom(widget)
396
- opt.rect = rect
396
+ opt.rect = rect.toRect()
397
397
  widget.style().drawPrimitive(QStyle.PE_Widget, opt, painter, widget)
398
398
  else:
399
399
  brush = widget.palette().brush(widget.backgroundRole())
@@ -1391,7 +1391,7 @@ class QwtPlot(QFrame):
1391
1391
  :py:meth:`QwtPlotItem.getCanvasMarginHint()`
1392
1392
  """
1393
1393
  maps = [self.canvasMap(axisId) for axisId in self.AXES]
1394
- self.drawItems(painter, self.__data.canvas.contentsRect(), maps)
1394
+ self.drawItems(painter, QRectF(self.__data.canvas.contentsRect()), maps)
1395
1395
 
1396
1396
  def drawItems(self, painter, canvasRect, maps):
1397
1397
  """
@@ -1553,6 +1553,7 @@ class QwtPlot(QFrame):
1553
1553
  self.__data.layout.setLegendPosition(pos, ratio)
1554
1554
  if legend != self.__data.legend:
1555
1555
  if self.__data.legend and self.__data.legend.parent() is self:
1556
+ self.__data.legend.setParent(None)
1556
1557
  del self.__data.legend
1557
1558
  self.__data.legend = legend
1558
1559
  if self.__data.legend:
@@ -16,6 +16,7 @@ QwtPlotCurve
16
16
  import math
17
17
  import os
18
18
 
19
+ import numpy as np
19
20
  from qtpy.QtCore import QLineF, QPointF, QRectF, QSize, Qt
20
21
  from qtpy.QtGui import QBrush, QColor, QPainter, QPen, QPolygonF
21
22
 
@@ -40,8 +41,6 @@ if QT_API == "pyside6":
40
41
 
41
42
  import shiboken6 as shiboken
42
43
 
43
- import numpy as np
44
-
45
44
 
46
45
  def qwtUpdateLegendIconSize(curve):
47
46
  if curve.symbol() and curve.testLegendAttribute(QwtPlotCurve.LegendShowSymbol):
@@ -198,7 +198,7 @@ class QwtScaleEngine(object):
198
198
  self.__data = QwtScaleEngine_PrivateData()
199
199
  self.setBase(base)
200
200
 
201
- def autoScale(self, maxNumSteps, x1, x2, stepSize, relative_margin=0.0):
201
+ def autoScale(self, maxNumSteps, x1, x2, stepSize, relativeMargin=0.0):
202
202
  """
203
203
  Align and divide an interval
204
204
 
@@ -206,7 +206,7 @@ class QwtScaleEngine(object):
206
206
  :param float x1: First limit of the interval (In/Out)
207
207
  :param float x2: Second limit of the interval (In/Out)
208
208
  :param float stepSize: Step size
209
- :param float relative_margin: Margin as a fraction of the interval width
209
+ :param float relativeMargin: Margin as a fraction of the interval width
210
210
  :return: tuple (x1, x2, stepSize)
211
211
  """
212
212
  pass
@@ -474,7 +474,7 @@ class QwtLinearScaleEngine(QwtScaleEngine):
474
474
  def __init__(self, base=10):
475
475
  super(QwtLinearScaleEngine, self).__init__(base)
476
476
 
477
- def autoScale(self, maxNumSteps, x1, x2, stepSize, relative_margin=0.0):
477
+ def autoScale(self, maxNumSteps, x1, x2, stepSize, relativeMargin=0.0):
478
478
  """
479
479
  Align and divide an interval
480
480
 
@@ -482,7 +482,7 @@ class QwtLinearScaleEngine(QwtScaleEngine):
482
482
  :param float x1: First limit of the interval (In/Out)
483
483
  :param float x2: Second limit of the interval (In/Out)
484
484
  :param float stepSize: Step size
485
- :param float relative_margin: Margin as a fraction of the interval width
485
+ :param float relativeMargin: Margin as a fraction of the interval width
486
486
  :return: tuple (x1, x2, stepSize)
487
487
 
488
488
  .. seealso::
@@ -490,8 +490,8 @@ class QwtLinearScaleEngine(QwtScaleEngine):
490
490
  :py:meth:`setAttribute()`
491
491
  """
492
492
  # Apply the relative margin (fraction of the interval width) in linear space:
493
- if relative_margin > 0.0:
494
- margin = (x2 - x1) * relative_margin
493
+ if relativeMargin > 0.0:
494
+ margin = (x2 - x1) * relativeMargin
495
495
  x1 -= margin
496
496
  x2 += margin
497
497
 
@@ -648,7 +648,7 @@ class QwtLogScaleEngine(QwtScaleEngine):
648
648
  super(QwtLogScaleEngine, self).__init__(base)
649
649
  self.setTransformation(QwtLogTransform())
650
650
 
651
- def autoScale(self, maxNumSteps, x1, x2, stepSize, relative_margin=0.0):
651
+ def autoScale(self, maxNumSteps, x1, x2, stepSize, relativeMargin=0.0):
652
652
  """
653
653
  Align and divide an interval
654
654
 
@@ -656,7 +656,7 @@ class QwtLogScaleEngine(QwtScaleEngine):
656
656
  :param float x1: First limit of the interval (In/Out)
657
657
  :param float x2: Second limit of the interval (In/Out)
658
658
  :param float stepSize: Step size
659
- :param float relative_margin: Margin as a fraction of the interval width
659
+ :param float relativeMargin: Margin as a fraction of the interval width
660
660
  :return: tuple (x1, x2, stepSize)
661
661
 
662
662
  .. seealso::
@@ -669,10 +669,10 @@ class QwtLogScaleEngine(QwtScaleEngine):
669
669
 
670
670
  # Apply the relative margin (fraction of the interval width) in logarithmic
671
671
  # space, and convert back to linear space.
672
- if relative_margin is not None:
672
+ if relativeMargin is not None:
673
673
  x1 = min(max([x1, LOG_MIN]), LOG_MAX)
674
674
  x2 = min(max([x2, LOG_MIN]), LOG_MAX)
675
- log_margin = math.log(x2 / x1, logBase) * relative_margin
675
+ log_margin = math.log(x2 / x1, logBase) * relativeMargin
676
676
  x1 /= math.pow(logBase, log_margin)
677
677
  x2 *= math.pow(logBase, log_margin)
678
678
 
@@ -11,7 +11,7 @@ SHOW = True # Show test in GUI-based test launcher
11
11
  import os
12
12
 
13
13
  import numpy as np
14
- from qtpy.QtCore import QRect, Qt, QTime
14
+ from qtpy.QtCore import QRectF, Qt, QTime
15
15
  from qtpy.QtGui import QBrush, QColor
16
16
  from qtpy.QtWidgets import QLabel, QVBoxLayout, QWidget
17
17
 
@@ -225,7 +225,7 @@ class CpuPieMarker(QwtPlotMarker):
225
225
 
226
226
  def draw(self, painter, xMap, yMap, rect):
227
227
  margin = 5
228
- pieRect = QRect()
228
+ pieRect = QRectF()
229
229
  pieRect.setX(rect.x() + margin)
230
230
  pieRect.setY(rect.y() + margin)
231
231
  pieRect.setHeight(int(yMap.transform(80.0)))
@@ -263,7 +263,7 @@ class Background(QwtPlotItem):
263
263
 
264
264
  def draw(self, painter, xMap, yMap, rect):
265
265
  c = QColor(Qt.white)
266
- r = QRect(rect)
266
+ r = QRectF(rect)
267
267
 
268
268
  for i in range(100, 0, -10):
269
269
  r.setBottom(int(yMap.transform(i - 10)))
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes