@@ -4080,15 +4080,6 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
40804080 """
40814081 Make a hexagonal binning plot.
40824082
4083- Call signature::
4084-
4085- hexbin(x, y, C = None, gridsize = 100, bins = None,
4086- xscale = 'linear', yscale = 'linear',
4087- cmap=None, norm=None, vmin=None, vmax=None,
4088- alpha=None, linewidths=None, edgecolors='none'
4089- reduce_C_function = np.mean, mincnt=None, marginals=True
4090- **kwargs)
4091-
40924083 Make a hexagonal binning plot of *x* versus *y*, where *x*,
40934084 *y* are 1-D sequences of the same length, *N*. If *C* is *None*
40944085 (the default), this is a histogram of the number of occurences
@@ -4101,112 +4092,113 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
41014092 specified, it must also be a 1-D sequence of the same length
41024093 as *x* and *y*.)
41034094
4104- *x*, *y* and/or *C* may be masked arrays, in which case only
4105- unmasked points will be plotted.
4106-
4107- Optional keyword arguments:
4108-
4109- *gridsize*: [ 100 | integer ]
4110- The number of hexagons in the *x*-direction, default is
4111- 100. The corresponding number of hexagons in the
4112- *y*-direction is chosen such that the hexagons are
4113- approximately regular. Alternatively, gridsize can be a
4114- tuple with two elements specifying the number of hexagons
4115- in the *x*-direction and the *y*-direction.
4095+ Parameters
4096+ ----------
4097+ x, y : array or masked array
41164098
4117- *bins*: [ *None* | 'log' | integer | sequence ]
4118- If *None*, no binning is applied; the color of each hexagon
4119- directly corresponds to its count value.
4099+ C : array or masked array, optional, default is *None*
41204100
4121- If 'log', use a logarithmic scale for the color
4122- map. Internally, :math:`log_{10}(i+1)` is used to
4123- determine the hexagon color.
4101+ gridsize : int or (int, int), optional, default is 100
4102+ The number of hexagons in the *x*-direction, default is
4103+ 100. The corresponding number of hexagons in the
4104+ *y*-direction is chosen such that the hexagons are
4105+ approximately regular. Alternatively, gridsize can be a
4106+ tuple with two elements specifying the number of hexagons
4107+ in the *x*-direction and the *y*-direction.
41244108
4125- If an integer, divide the counts in the specified number
4126- of bins, and color the hexagons accordingly.
4109+ bins : {'log'} or int or sequence, optional, default is *None*
4110+ If *None*, no binning is applied; the color of each hexagon
4111+ directly corresponds to its count value.
41274112
4128- If a sequence of values, the values of the lower bound of
4129- the bins to be used.
4113+ If 'log', use a logarithmic scale for the color
4114+ map. Internally, :math:`log_{10}(i+1)` is used to
4115+ determine the hexagon color.
41304116
4131- *xscale*: [ 'linear' | 'log' ]
4132- Use a linear or log10 scale on the horizontal axis .
4117+ If an integer, divide the counts in the specified number
4118+ of bins, and color the hexagons accordingly .
41334119
4134- *yscale*: [ 'linear' | 'log' ]
4135- Use a linear or log10 scale on the vertical axis .
4120+ If a sequence of values, the values of the lower bound of
4121+ the bins to be used .
41364122
4137- *mincnt*: [ *None* | a positive integer ]
4138- If not *None*, only display cells with more than *mincnt*
4139- number of points in the cell
4123+ xscale : {'linear', 'log'}, optional, default is 'linear'
4124+ Use a linear or log10 scale on the horizontal axis.
41404125
4141- *marginals*: [ *True* | *False* ]
4142- if marginals is *True*, plot the marginal density as
4143- colormapped rectagles along the bottom of the x-axis and
4144- left of the y-axis
4126+ yscale : {'linear', 'log'}, optional, default is 'linear'
4127+ Use a linear or log10 scale on the vertical axis.
41454128
4146- *extent*: [ *None* | scalars (left, right, bottom, top) ]
4147- The limits of the bins. The default assigns the limits
4148- based on *gridsize*, *x*, *y*, *xscale* and *yscale*.
4129+ mincnt : int > 0, optional, default is *None*
4130+ If not *None*, only display cells with more than *mincnt*
4131+ number of points in the cell
41494132
4150- If *xscale* or *yscale* is set to 'log', the limits are
4151- expected to be the exponent for a power of 10. E.g. for
4152- x-limits of 1 and 50 in 'linear' scale and y-limits
4153- of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3).
4133+ marginals : bool, optional, default is *False*
4134+ if marginals is *True*, plot the marginal density as
4135+ colormapped rectagles along the bottom of the x-axis and
4136+ left of the y-axis
41544137
4155- Other keyword arguments controlling color mapping and normalization
4156- arguments:
4138+ extent : scalar, optional, default is *None*
4139+ The limits of the bins. The default assigns the limits
4140+ based on *gridsize*, *x*, *y*, *xscale* and *yscale*.
41574141
4158- *cmap*: [ *None* | Colormap ]
4159- a :class:`matplotlib.colors.Colormap` instance. If *None*,
4160- defaults to rc ``image.cmap``.
4142+ If *xscale* or *yscale* is set to 'log', the limits are
4143+ expected to be the exponent for a power of 10. E.g. for
4144+ x-limits of 1 and 50 in 'linear' scale and y-limits
4145+ of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3).
41614146
4162- *norm*: [ *None* | Normalize ]
4163- :class:`matplotlib.colors.Normalize` instance is used to
4164- scale luminance data to 0,1.
4147+ Order of scalars is (left, right, bottom, top).
41654148
4166- *vmin* / *vmax*: scalar
4167- *vmin* and *vmax* are used in conjunction with *norm* to normalize
4168- luminance data. If either are *None*, the min and max of the color
4169- array *C* is used. Note if you pass a norm instance, your settings
4170- for *vmin* and *vmax* will be ignored .
4149+ Other parameters
4150+ ----------------
4151+ cmap : object, optional, default is *None*
4152+ a :class:`matplotlib.colors.Colormap` instance. If *None*,
4153+ defaults to rc ``image.cmap`` .
41714154
4172- *alpha*: scalar between 0 and 1, or *None*
4173- the alpha value for the patches
4155+ norm : object, optional, default is *None*
4156+ :class:`matplotlib.colors.Normalize` instance is used to
4157+ scale luminance data to 0,1.
41744158
4175- *linewidths*: [ *None* | scalar ]
4176- If *None*, defaults to 1.0. Note that this is a tuple, and
4177- if you set the linewidths argument you must set it as a
4178- sequence of floats, as required by
4179- :class:`~matplotlib.collections.RegularPolyCollection` .
4159+ vmin, vmax : scalar, optional, default is *None*
4160+ *vmin* and *vmax* are used in conjunction with *norm* to
4161+ normalize luminance data. If *None*, the min and max of the
4162+ color array *C* are used. Note if you pass a norm instance
4163+ your settings for *vmin* and *vmax* will be ignored .
41804164
4181- Other keyword arguments controlling the Collection properties:
4165+ alpha : scalar between 0 and 1, optional, default is *None*
4166+ the alpha value for the patches
41824167
4183- *edgecolors*: [ *None* | ``'none'`` | mpl color | color sequence ]
4184- If ``'none'``, draws the edges in the same color as the fill color.
4185- This is the default, as it avoids unsightly unpainted pixels
4186- between the hexagons.
4168+ linewidths : scalar, optional, default is *None*
4169+ If *None*, defaults to 1.0.
41874170
4188- If *None*, draws the outlines in the default color.
4171+ edgecolors : {'none'} or mpl color, optional, default is 'none'
4172+ If 'none', draws the edges in the same color as the fill color.
4173+ This is the default, as it avoids unsightly unpainted pixels
4174+ between the hexagons.
41894175
4190- If a matplotlib color arg or sequence of rgba tuples, draws the
4191- outlines in the specified color.
4176+ If *None*, draws outlines in the default color.
41924177
4193- Here are the standard descriptions of all the
4194- :class:`~matplotlib.collections.Collection` kwargs:
4178+ If a matplotlib color arg, draws outlines in the specified color.
41954179
4196- %(Collection)s
4180+ Returns
4181+ -------
4182+ object
4183+ a :class:`~matplotlib.collections.PolyCollection` instance; use
4184+ :meth:`~matplotlib.collections.PolyCollection.get_array` on
4185+ this :class:`~matplotlib.collections.PolyCollection` to get
4186+ the counts in each hexagon.
41974187
4198- The return value is a
4199- :class:`~matplotlib.collections.PolyCollection` instance; use
4200- :meth:`~matplotlib.collections.PolyCollection.get_array` on
4201- this :class:`~matplotlib.collections.PolyCollection` to get
4202- the counts in each hexagon. If *marginals* is *True*, horizontal
4203- bar and vertical bar (both PolyCollections) will be attached
4204- to the return collection as attributes *hbar* and *vbar*.
4188+ If *marginals* is *True*, horizontal
4189+ bar and vertical bar (both PolyCollections) will be attached
4190+ to the return collection as attributes *hbar* and *vbar*.
42054191
4192+ Examples
4193+ --------
4194+ .. plot:: mpl_examples/pylab_examples/hexbin_demo.py
42064195
4207- **Example:**
4196+ Notes
4197+ --------
4198+ The standard descriptions of all the
4199+ :class:`~matplotlib.collections.Collection` parameters:
42084200
4209- .. plot:: mpl_examples/pylab_examples/hexbin_demo.py
4201+ %(Collection)s
42104202
42114203 """
42124204
0 commit comments