(self, vmin, vmax)
| 2611 | return vmin, vmax |
| 2612 | |
| 2613 | def nonsingular(self, vmin, vmax): |
| 2614 | if vmin > vmax: |
| 2615 | vmin, vmax = vmax, vmin |
| 2616 | if not np.isfinite(vmin) or not np.isfinite(vmax): |
| 2617 | vmin, vmax = 1, 10 # Initial range, no data plotted yet. |
| 2618 | elif vmax <= 0: |
| 2619 | _api.warn_external( |
| 2620 | "Data has no positive values, and therefore cannot be " |
| 2621 | "log-scaled.") |
| 2622 | vmin, vmax = 1, 10 |
| 2623 | else: |
| 2624 | # Consider shared axises |
| 2625 | minpos = min(axis.get_minpos() for axis in self.axis._get_shared_axis()) |
| 2626 | if not np.isfinite(minpos): |
| 2627 | minpos = 1e-300 # This should never take effect. |
| 2628 | if vmin <= 0: |
| 2629 | vmin = minpos |
| 2630 | if vmin == vmax: |
| 2631 | vmin = _decade_less(vmin, self._base) |
| 2632 | vmax = _decade_greater(vmax, self._base) |
| 2633 | return vmin, vmax |
| 2634 | |
| 2635 | |
| 2636 | class SymmetricalLogLocator(Locator): |
no test coverage detected