Skip to content

solves Line2D attribute error with matplotlib 3.7.0 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/tikzplotlib/_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,12 @@ def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None):
default_dashOffset, default_dashSeq = mpl.lines._get_dash_pattern(line_style)

# get dash format of line under test
dashSeq = line._us_dashSeq
dashOffset = line._us_dashOffset
try:
dashOffset, dashSeq = line._dash_pattern[:2]
except AttributeError:
# backwards-compatibility with matplotlib < 3.7.0
dashOffset = line._us_dashOffset
dashSeq = line._us_dashSeq```

lst = list()
if dashSeq != default_dashSeq:
Expand Down