Skip to content

Commit

Permalink
API: Remove lw clipping for dash scaling and tweak pattern
Browse files Browse the repository at this point in the history
Close #7991
  • Loading branch information
tacaswell committed Feb 17, 2017
1 parent af37a47 commit 276e1e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def _get_dash_pattern(style):
def _scale_dashes(offset, dashes, lw):
if not rcParams['lines.scale_dashes']:
return offset, dashes
scale = max(2.0, lw)

scaled_offset = scaled_dashes = None
if offset is not None:
scaled_offset = offset * scale
scaled_offset = offset * lw
if dashes is not None:
scaled_dashes = [x * scale if x is not None else None
scaled_dashes = [x * lw if x is not None else None
for x in dashes]

return scaled_offset, scaled_dashes
Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,9 +923,9 @@ def validate_animation_writer_path(p):
'lines.solid_joinstyle': ['round', validate_joinstyle],
'lines.dash_capstyle': ['butt', validate_capstyle],
'lines.solid_capstyle': ['projecting', validate_capstyle],
'lines.dashed_pattern': [[2.8, 1.2], validate_nseq_float()],
'lines.dashdot_pattern': [[4.8, 1.2, 0.8, 1.2], validate_nseq_float()],
'lines.dotted_pattern': [[1.1, 1.1], validate_nseq_float()],
'lines.dashed_pattern': [[3.7, 1.6], validate_nseq_float()],
'lines.dashdot_pattern': [[6.4, 1.6, 1, 1.6], validate_nseq_float()],
'lines.dotted_pattern': [[1, 1.65], validate_nseq_float()],
'lines.scale_dashes': [True, validate_bool],

# marker props
Expand Down

0 comments on commit 276e1e9

Please sign in to comment.