X Tutup
Skip to content

pyplot.subplots did not return the type of object specified in the documentation #8397

@mcyc

Description

@mcyc

Bug report

Bug summary

  • pyplot.subplots from matplotlib version 2.0.0 is returning ax as a matplotlib.axes._subplots.AxesSubplot object instead of an Axes objects specified in the documentation (see http://matplotlib.org/).
  • Note: matplotlib.axes.Axes objects are much more useful to work with than matplotlib.axes._subplots.AxesSubplot objects.

Code for reproduction

  • A minimum code snippet:
# Paste your code here
from matplotlib import pyplot as plt
f, ax = plt.subplots()
type(ax)
print type(ax)

Actual outcome

# The console output:
<class 'matplotlib.axes._subplots.AxesSubplot'>

Expected outcome

  • According to the documentation, the returned ax should be a matplotlib.axes.Axes object.

Matplotlib version

  • Matplotlib version: 2.0.0
  • Python version: 2.7.12
  • Platform OSX (10.11.6)
  • Matplotlib and Python installed via anaconda

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup