@@ -198,15 +198,15 @@ def __init__(self, base=10):
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
205
205
:param int maxNumSteps: Max. number of steps
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,24 +474,24 @@ 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
481
481
:param int maxNumSteps: Max. number of steps
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::
489
489
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,15 +648,15 @@ def __init__(self, base=10):
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
655
655
:param int maxNumSteps: Max. number of steps
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 @@ def autoScale(self, maxNumSteps, x1, x2, stepSize, relative_margin=0.0):
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
0 commit comments