A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.hexbin.html below:

matplotlib.pyplot.hexbin — Matplotlib 3.1.2 documentation

Make a 2D hexagonal binning plot of points x, y.

If C is None, the value of the hexagon is determined by the number of points in the hexagon. Otherwise, C specifies values at the coordinate (x[i], y[i]). For each hexagon, these values are reduced using reduce_C_function.

Parameters:
x, y : array-like

The data positions. x and y must be of the same length.

C : array-like, optional

If given, these values are accumulated in the bins. Otherwise, every point has a value of 1. Must be of the same length as x and y.

gridsize : int or (int, int), default: 100

If a single int, the number of hexagons in the x-direction. The number of hexagons in the y-direction is chosen such that the hexagons are approximately regular.

Alternatively, if a tuple (nx, ny), the number of hexagons in the x-direction and the y-direction.

bins : 'log' or int or sequence, default: None

Discretization of the hexagon values.

xscale : {'linear', 'log'}, default: 'linear'

Use a linear or log10 scale on the horizontal axis.

yscale : {'linear', 'log'}, default: 'linear'

Use a linear or log10 scale on the vertical axis.

mincnt : int > 0, default: None

If not None, only display cells with more than mincnt number of points in the cell.

marginals : bool, default: False

If marginals is True, plot the marginal density as colormapped rectangles along the bottom of the x-axis and left of the y-axis.

extent : float, default: None

The limits of the bins. The default assigns the limits based on gridsize, x, y, xscale and yscale.

If xscale or yscale is set to 'log', the limits are expected to be the exponent for a power of 10. E.g. for x-limits of 1 and 50 in 'linear' scale and y-limits of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3).

Order of scalars is (left, right, bottom, top).

Returns:
polycollection : PolyCollection

A PolyCollection defining the hexagonal bins.

If marginals is True, horizontal bar and vertical bar (both PolyCollections) will be attached to the return collection as attributes hbar and vbar.

Other Parameters:
cmap : str or Colormap, optional

The Colormap instance or registered colormap name used to map the bin values to colors. Defaults to rcParams["image.cmap"] = 'viridis'.

norm : Normalize, optional

The Normalize instance scales the bin values to the canonical colormap range [0, 1] for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling.

vmin, vmax : float, optional, default: None

The colorbar range. If None, suitable min/max values are automatically chosen by the Normalize instance (defaults to the respective min/max values of the bins in case of the default linear scaling). This is ignored if norm is given.

alpha : float between 0 and 1, optional

The alpha blending value, between 0 (transparent) and 1 (opaque).

linewidths : float, default: None

If None, defaults to 1.0.

edgecolors : {'face', 'none', None} or color, default: 'face'

The color of the hexagon edges. Possible values are:

reduce_C_function : callable, default is numpy.mean

The function to aggregate C within the bins. It is ignored if C is not given. This must have the signature:

def reduce_C_function(C: array) -> float

Commonly used functions are:

**kwargs : PolyCollection properties

All other keyword arguments are passed on to PolyCollection:

Property Description agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha float or None animated bool antialiased or aa or antialiaseds bool or sequence of bools array ndarray capstyle {'butt', 'round', 'projecting'} clim a length 2 sequence of floats; may be overridden in methods that have vmin and vmax kwargs. clip_box Bbox clip_on bool clip_path [(Path, Transform) | Patch | None] cmap colormap or registered colormap name color color or sequence of rgba tuples contains callable edgecolor or ec or edgecolors color or sequence of colors or 'face' facecolor or facecolors or fc color or sequence of colors figure Figure gid str hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} in_layout bool joinstyle {'miter', 'round', 'bevel'} label object linestyle or dashes or linestyles or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...} linewidth or linewidths or lw float or sequence of floats norm Normalize offset_position {'screen', 'data'} offsets float or sequence of floats path_effects AbstractPathEffect picker None or bool or float or callable pickradius unknown rasterized bool or None sketch_params (scale: float, length: float, randomness: float) snap bool or None transform Transform url str urls List[str] or None visible bool zorder float

Note

In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]:

Objects passed as data must support item access (data[<arg>]) and membership test (<arg> in data).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4