A container for the objects defining tick position and format. Attributes ---------- locator : `~matplotlib.ticker.Locator` subclass Determines the positions of the ticks. formatter : `~matplotlib.ticker.Formatter` subclass Determines the format of the tick labe
| 508 | |
| 509 | |
| 510 | class Ticker: |
| 511 | """ |
| 512 | A container for the objects defining tick position and format. |
| 513 | |
| 514 | Attributes |
| 515 | ---------- |
| 516 | locator : `~matplotlib.ticker.Locator` subclass |
| 517 | Determines the positions of the ticks. |
| 518 | formatter : `~matplotlib.ticker.Formatter` subclass |
| 519 | Determines the format of the tick labels. |
| 520 | """ |
| 521 | |
| 522 | def __init__(self): |
| 523 | self._locator = None |
| 524 | self._formatter = None |
| 525 | self._locator_is_default = True |
| 526 | self._formatter_is_default = True |
| 527 | |
| 528 | @property |
| 529 | def locator(self): |
| 530 | return self._locator |
| 531 | |
| 532 | @locator.setter |
| 533 | def locator(self, locator): |
| 534 | if not isinstance(locator, mticker.Locator): |
| 535 | raise TypeError('locator must be a subclass of ' |
| 536 | 'matplotlib.ticker.Locator') |
| 537 | self._locator = locator |
| 538 | |
| 539 | @property |
| 540 | def formatter(self): |
| 541 | return self._formatter |
| 542 | |
| 543 | @formatter.setter |
| 544 | def formatter(self, formatter): |
| 545 | if not isinstance(formatter, mticker.Formatter): |
| 546 | raise TypeError('formatter must be a subclass of ' |
| 547 | 'matplotlib.ticker.Formatter') |
| 548 | self._formatter = formatter |
| 549 | |
| 550 | |
| 551 | class _LazyTickList: |
no outgoing calls
no test coverage detected
searching dependent graphs…