Skip to content

DataFrame.boxplot returns a dict instead of axes #4264

Closed
@fonnesbeck

Description

@fonnesbeck

The docstring for DataFRame.boxplot claims that the method returns matplotlib axes:

Returns
-------
ax : matplotlib.axes.AxesSubplot

In fact, it instead returns a dict:

In [71]: data.boxplot()
Out[71]:
{'boxes': [<matplotlib.lines.Line2D at 0x10e376110>,
  <matplotlib.lines.Line2D at 0x10e491350>,
  <matplotlib.lines.Line2D at 0x10e477590>,
  <matplotlib.lines.Line2D at 0x10eb0e7d0>,
  <matplotlib.lines.Line2D at 0x10eb3da10>,
  <matplotlib.lines.Line2D at 0x10eb7ec50>,
  <matplotlib.lines.Line2D at 0x10eb9be90>],
 'caps': [<matplotlib.lines.Line2D at 0x10e3ab5d0>,
  <matplotlib.lines.Line2D at 0x10ebbc4d0>,
  <matplotlib.lines.Line2D at 0x10e357690>,
  ...
  <matplotlib.lines.Line2D at 0x10eb020d0>,
  <matplotlib.lines.Line2D at 0x10eb02710>,
  <matplotlib.lines.Line2D at 0x10eb0b310>,
  <matplotlib.lines.Line2D at 0x10eb0b950>,
  <matplotlib.lines.Line2D at 0x10eb9a550>,
  <matplotlib.lines.Line2D at 0x10eb9ab90>]}

Aside from being inconsistent with the documentation, this is inconvenient because I am no longer able to manipulate the axes of the plot directly.

Using Pandas 0.12.0.dev-af85719

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions