MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / raise_if_exceeds

Method raise_if_exceeds

lib/matplotlib/ticker.py:1764–1780  ·  view source on GitHub ↗

Log at WARNING level if *locs* is longer than `Locator.MAXTICKS`. This is intended to be called immediately before returning *locs* from ``__call__`` to inform users in case their Locator returns a huge number of ticks, causing Matplotlib to run out of memory.

(self, locs)

Source from the content-addressed store, hash-verified

1762 raise NotImplementedError('Derived must override')
1763
1764 def raise_if_exceeds(self, locs):
1765 """
1766 Log at WARNING level if *locs* is longer than `Locator.MAXTICKS`.
1767
1768 This is intended to be called immediately before returning *locs* from
1769 ``__call__`` to inform users in case their Locator returns a huge
1770 number of ticks, causing Matplotlib to run out of memory.
1771
1772 The "strange" name of this method dates back to when it would raise an
1773 exception instead of emitting a log.
1774 """
1775 if len(locs) >= self.MAXTICKS:
1776 _log.warning(
1777 "Locator attempting to generate %s ticks ([%s, ..., %s]), "
1778 "which exceeds Locator.MAXTICKS (%s).",
1779 len(locs), locs[0], locs[-1], self.MAXTICKS)
1780 return locs
1781
1782 def nonsingular(self, v0, v1):
1783 """

Callers 10

tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
tick_valuesMethod · 0.80
__call__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected