Skip to content

Regression in add_subplot.. #17343

@jklymak

Description

@jklymak

#16527 419fafe added checks for add_subplot that break:

import matplotlib.pyplot as plt

fig = plt.figure()

ax = fig.add_subplot(3, 4, 1)
ax2 = fig.add_subplot(3, 2, (3, 5))
plt.show()

Old behaviour

Figure_1

New behaviour:

  ax2 = fig.add_subplot(3, 2, (3, 5))
Traceback (most recent call last):
  File "testPlots.py", line 6, in <module>
    ax2 = fig.add_subplot(3, 2, (3, 5))
  File "/Users/jklymak/matplotlib/lib/matplotlib/figure.py", line 1376, in add_subplot
    args = tuple(map(int, args))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'tuple'

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy