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

Method __init__

lib/matplotlib/ticker.py:2125–2162  ·  view source on GitHub ↗

Parameters ---------- nbins : int or 'auto', default: 10 Maximum number of intervals; one less than max number of ticks. If the string 'auto', the number of bins will be automatically determined based on the length of the axis. s

(self, nbins=None, **kwargs)

Source from the content-addressed store, hash-verified

2123 min_n_ticks=2)
2124
2125 def __init__(self, nbins=None, **kwargs):
2126 """
2127 Parameters
2128 ----------
2129 nbins : int or 'auto', default: 10
2130 Maximum number of intervals; one less than max number of
2131 ticks. If the string 'auto', the number of bins will be
2132 automatically determined based on the length of the axis.
2133
2134 steps : array-like, optional
2135 Sequence of acceptable tick multiples, starting with 1 and
2136 ending with 10. For example, if ``steps=[1, 2, 4, 5, 10]``,
2137 ``20, 40, 60`` or ``0.4, 0.6, 0.8`` would be possible
2138 sets of ticks because they are multiples of 2.
2139 ``30, 60, 90`` would not be generated because 3 does not
2140 appear in this example list of steps.
2141
2142 integer : bool, default: False
2143 If True, ticks will take only integer values, provided at least
2144 *min_n_ticks* integers are found within the view limits.
2145
2146 symmetric : bool, default: False
2147 If True, autoscaling will result in a range symmetric about zero.
2148
2149 prune : {'lower', 'upper', 'both', None}, default: None
2150 Remove the 'lower' tick, the 'upper' tick, or ticks on 'both' sides
2151 *if they fall exactly on an axis' edge* (this typically occurs when
2152 :rc:`axes.autolimit_mode` is 'round_numbers'). Removing such ticks
2153 is mostly useful for stacked or ganged plots, where the upper tick
2154 of an Axes overlaps with the lower tick of the axes above it.
2155
2156 min_n_ticks : int, default: 2
2157 Relax *nbins* and *integer* constraints if necessary to obtain
2158 this minimum number of ticks.
2159 """
2160 if nbins is not None:
2161 kwargs['nbins'] = nbins
2162 self.set_params(**{**self.default_params, **kwargs})
2163
2164 @staticmethod
2165 def _validate_steps(steps):

Callers

nothing calls this directly

Calls 1

set_paramsMethod · 0.95

Tested by

no test coverage detected