Skip to content

Matplotlib version >> 3.6.2, gives AttributeError: 'Line2D' object has no attribute '_us_dashSeq' #580

Open
@VijayN10

Description

@VijayN10

I was unable to save the plot as a TikZ file after upgrading to latest version of matplotlib. It was giving an error of
AttributeError: 'Line2D' object has no attribute '_us_dashSeq'

For plotting, I was using the following code. The error was identified with line style and markevery function.

line_styles = ['-', '--', '-.', ':', '-']
markers = ['o', 's', '^', '*', 'd']

plt.plot(x_sph_dp1, y_sph_dp1, label='dp = 0.2', color='red', linestyle=line_styles[0], marker=markers[0], linewidth=2, markevery=(0, 10))
plt.plot(x_sph_dp2, y_sph_dp2, label='dp = 0.1', color='orange', linestyle=line_styles[1], marker=markers[1], linewidth=2, markevery=(0, 10))
plt.plot(x_sph_dp2, y_sph_dp2, label='dp = 0.05', color='orange', linestyle=line_styles[2], marker=markers[2], linewidth=2, markevery=(0, 10))
plt.plot(x_exp, y_exp, label='Experiment', color='blue', linestyle=line_styles[3], marker=markers[3], linewidth=2, markevery=(0, 2))
plt.plot(x_vof, y_vof, label='VOF', color='green', linestyle=line_styles[4], marker=markers[4], linewidth=2, markevery=(0, 2))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions