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