Set hexbin default linecolor to 'face' #7500

Merged
merged 3 commits into from Nov 23, 2016
@@ -560,6 +560,13 @@ or by setting::
in your :file:`matplotlibrc` file.
+``hexbin``
+----------
+
+The default value of the ``linecolor`` kwarg for `~matplotlib.Axes.hexbin` has
+changed from ``'none'`` to ``'face'``. If 'none' is now supplied, no line edges
+are drawn around the hexagons.
@tacaswell

tacaswell Nov 23, 2016

Owner

This should note that the default behavior has not changed (just the meaning of 'none').

+
``bar`` and ``barh``
====================
@@ -0,0 +1,5 @@
+Hexbin default line color
+-------------------------
+
+The default ``linecolor`` kwarg for :func:`hexbin` is now ``'face'``, and
+supplying ``'none'`` now prevents lines from being drawn around the hexagons.
@@ -4069,7 +4069,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
def hexbin(self, x, y, C=None, gridsize=100, bins=None,
xscale='linear', yscale='linear', extent=None,
cmap=None, norm=None, vmin=None, vmax=None,
- alpha=None, linewidths=None, edgecolors='none',
+ alpha=None, linewidths=None, edgecolors='face',
reduce_C_function=np.mean, mincnt=None, marginals=False,
**kwargs):
"""
@@ -4163,10 +4163,13 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
linewidths : scalar, optional, default is *None*
If *None*, defaults to 1.0.
- edgecolors : {'none'} or mpl color, optional, default is 'none'
- If 'none', draws the edges in the same color as the fill color.
- This is the default, as it avoids unsightly unpainted pixels
- between the hexagons.
+ edgecolors : {'face', 'none', *None*} or mpl color, optional, default\
+ is 'face'
+
+ If 'face', draws the edges in the same color as the fill color.
+
+ If 'none', no edge is drawn; this can sometimes lead to unsightly
+ unpainted pixels between the hexagons.
If *None*, draws outlines in the default color.
@@ -4353,8 +4356,6 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
polygon[:, 0] = sx * np.array([0.5, 0.5, 0.0, -0.5, -0.5, 0.0])
polygon[:, 1] = sy * np.array([-0.5, 0.5, 1.0, 0.5, -0.5, -1.0]) / 3.0
- if edgecolors == 'none':
- edgecolors = 'face'
if linewidths is None:
linewidths = [1.0]