Skip to content

[Bug]: Lines between points are invisible when there are more than 7 subfigures per row #28893

Closed
@vealocia

Description

@vealocia

Bug summary

When there are more than 7 sub figures per row, the line between points will be invisible for the last several subfigs.

Code for reproduction

import matplotlib.pyplot as plt

subfig_size = (16, 9)

num_subfigs = 10
fig, axes = plt.subplots(1, num_subfigs, figsize=(num_subfigs * subfig_size[0], 1 * subfig_size[1]), dpi=300)
for j in range(num_subfigs):
    xs = list(range(10))
    ax = axes[j]
    
    ax.plot(xs, xs, marker='x', label=f"test", linewidth=3, markersize=10)

plt.savefig('test.jpg')

Actual outcome

test

Expected outcome

Line should be visible!

Additional information

What are the conditions under which this bug happens? input parameters, edge cases, etc?

  • matplotlib==3.9.2
    Has this worked in earlier versions?
  • Tried 3.5.0, but still not works

Operating system

Ubuntu

Matplotlib Version

3.9.2

Matplotlib Backend

qtagg

Python version

3.10.9

Jupyter version

6.5.2

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions