Skip to content

BUG: MatplotlibDeprecationWarning: The is_first_col function was deprecated in Matplotlib 3.4 #40714

Closed
@arnaujc91

Description

@arnaujc91
import pandas as pd
from matplotlib import pyplot as plt

series = [pd.Series([1,2,3,4]) for _ in range(4)]

nrow, ncol = 2, 2
fig, axes = plt.subplots(nrow, ncol)
axes = axes.reshape(-1)
for i, s in enumerate(series):
    s.plot(ax=axes[i])

plt.tight_layout()

Problem description

After executing the previous code the following message from Matplotlib is shown:

The is_first_col function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use ax.get_subplotspec().is_first_col() instead.
  if ax.is_first_col():

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCIContinuous IntegrationDependenciesRequired and optional dependenciesVisualizationplotting

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions