Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18b16f3

Browse files
authored
Merge pull request matplotlib#25044 from yuzie007/hexbin-lw
Modify `hexbin` to respect :rc:`patch.linewidth`
2 parents 042b886 + b091098 commit 18b16f3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``hexbin`` now defaults to ``rcParams["patch.linewidth"]``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The default value of the *linewidths* argument of `.Axes.hexbin` has
5+
been changed from ``1.0`` to :rc:`patch.linewidth`. This improves the
6+
consistency with `.QuadMesh` in `.Axes.pcolormesh` and `.Axes.hist2d`.

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4892,7 +4892,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
48924892
The alpha blending value, between 0 (transparent) and 1 (opaque).
48934893
48944894
linewidths : float, default: *None*
4895-
If *None*, defaults to 1.0.
4895+
If *None*, defaults to :rc:`patch.linewidth`.
48964896
48974897
edgecolors : {'face', 'none', *None*} or color, default: 'face'
48984898
The color of the hexagon edges. Possible values are:
@@ -5038,7 +5038,7 @@ def reduce_C_function(C: array) -> float
50385038
[[.5, -.5], [.5, .5], [0., 1.], [-.5, .5], [-.5, -.5], [0., -1.]])
50395039

50405040
if linewidths is None:
5041-
linewidths = [1.0]
5041+
linewidths = [mpl.rcParams['patch.linewidth']]
50425042

50435043
if xscale == 'log' or yscale == 'log':
50445044
polygons = np.expand_dims(polygon, 0) + np.expand_dims(offsets, 1)

0 commit comments

Comments
 (0)