@@ -575,19 +575,28 @@ def set_scientific(self, b):
575
575
self ._scientific = bool (b )
576
576
577
577
def set_powerlimits (self , lims ):
578
- """
579
- Sets size thresholds for scientific notation.
578
+ r """
579
+ Set size thresholds for scientific notation.
580
580
581
581
Parameters
582
582
----------
583
- lims : (min_exp, max_exp)
584
- A tuple containing the powers of 10 that determine the switchover
585
- threshold. Numbers below ``10**min_exp`` and above ``10**max_exp``
586
- will be displayed in scientific notation.
587
-
588
- For example, ``formatter.set_powerlimits((-3, 4))`` sets the
589
- pre-2007 default in which scientific notation is used for
590
- numbers less than 1e-3 or greater than 1e4.
583
+ lims : (int, int)
584
+ A tuple *(min_exp, max_exp)* containing the powers of 10 that
585
+ determine the switchover threshold. For a number representable as
586
+ :math:`a \times 10^\mathrm{exp}`` with :math:`1 <= |a| < 10`,
587
+ scientific notation will be used if ``exp <= min_exp`` or
588
+ ``exp >= max_exp``.
589
+
590
+ In particular numbers with *exp* equal to the thresholds are
591
+ written in scientific notation.
592
+
593
+ Typically, *min_exp* will be negative and *max_exp* will be
594
+ positive.
595
+
596
+ For example, ``formatter.set_powerlimits((-3, 4))`` will provide
597
+ the following formatting:
598
+ :math:`1 \times 10^{-3}, 9.9 \times 10^{-3}, 0.01,`
599
+ :math:`9999, 1 \times 10^4`.
591
600
592
601
See Also
593
602
--------
0 commit comments