Skip to content

3.5.0b1: ax.contour generates different artists #20906

@mwaskom

Description

@mwaskom

Bug summary

The artists added when using ax.contour have changed abruptly from 3.4 to the 3.5 beta. This causes issues for workflows that use the artist properties.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

xx, yy = np.mgrid[-3:3:.01, 0:1:.05]
zz = np.sin(xx * yy)

ax = plt.figure().subplots()
ax.contour(xx, yy, zz)
print(ax.collections[0].__class__)

Actual outcome

The result on 3.5.0b1:

<class 'matplotlib.collections.PathCollection'>

Expected outcome

The result on 3.4.1:

<class 'matplotlib.collections.LineCollection'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions