Skip to content

Commit 515f513

Browse files
committed
Rename 'cmap.edgefix' setting to 'edgefix'
1 parent 59ac10f commit 515f513

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

proplot/axes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@
461461
edgefix : bool or float, optional
462462
Whether to fix the common issue where white lines appear between adjacent
463463
patches in saved vector graphics. This can slow down figure rendering.
464-
Default is :rc:`cmap.edgefix`. If ``True``, a small default linewidth is
464+
Default is :rc:`edgefix`. If ``True``, a small default linewidth is
465465
used to cover up the white lines. If float, this linewidth is used.
466466
"""
467467
docstring._snippet_manager['axes.edgefix'] = _edgefix_docstring

proplot/axes/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2605,7 +2605,7 @@ def _apply_edgefix(self, obj, edgefix=None, **kwargs):
26052605
# See: https://stackoverflow.com/q/15003353/4970632
26062606
# NOTE: Use default edge width used for pcolor grid box edges. This is thick
26072607
# enough to hide lines but thin enough to not add 'dots' to corners of boxes.
2608-
edgefix = _not_none(edgefix, rc['cmap.edgefix'], True)
2608+
edgefix = _not_none(edgefix, rc.edgefix, True)
26092609
linewidth = EDGEWIDTH if edgefix is True else 0 if edgefix is False else edgefix
26102610
if not linewidth:
26112611
return

proplot/internals/rcsetup.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,15 +1004,6 @@ def copy(self):
10041004
_validate_cmap('continuous'),
10051005
'Default colormap for diverging datasets.'
10061006
),
1007-
'cmap.edgefix': (
1008-
True,
1009-
_validate_bool,
1010-
'Whether to fix the `white-lines-between-filled-contours '
1011-
'<https://stackoverflow.com/q/8263769/4970632>`__ and '
1012-
'`white-lines-between-pcolor-rectangles '
1013-
'<https://stackoverflow.com/q/27092991/4970632>`__ issues. If float, '
1014-
'this linewidth is used to fix the issue.'
1015-
),
10161007
'cmap.inbounds': (
10171008
True,
10181009
_validate_bool,
@@ -1051,6 +1042,15 @@ def copy(self):
10511042
'Default colormap for sequential datasets. Alias for :rcraw:`image.cmap`.'
10521043
),
10531044

1045+
# Special setting
1046+
'edgefix': (
1047+
True,
1048+
_validate_bool,
1049+
'Whether to fix issues with "white lines" appearing between patches '
1050+
'in saved vector graphics and with vector graphic backends. Applies '
1051+
'to colorbar levels and bar, area, pcolor, and contour plots.'
1052+
),
1053+
10541054
# Font settings
10551055
'font.name': (
10561056
FONTNAME,
@@ -1870,7 +1870,8 @@ def copy(self):
18701870
'image.levels': ('cmap.levels', '0.8'),
18711871
'image.inbounds': ('cmap.inbounds', '0.8'),
18721872
'image.discrete': ('cmap.discrete', '0.8'),
1873-
'image.edgefix': ('cmap.edgefix', '0.8'),
1873+
'image.edgefix': ('edgefix', '0.8'),
1874+
'cmap.edgefix': ('edgefix', '0.8'),
18741875
'tick.ratio': ('tick.widthratio', '0.8'),
18751876
'grid.ratio': ('grid.widthratio', '0.8'),
18761877
'abc.style': ('abc', '0.8'),

0 commit comments

Comments
 (0)