Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

boxplot treats iterables differently by type #2539

Copy link
Copy link
Closed
@jseabold

Description

@jseabold
Issue body actions

It's stated in the documentation, but I find this behavior to be rather wart-y, and it led to some bugs in statsmodels. Why treat x array different from x sequence of lists?

For an array it iterates over the first axis

import numpy as np
import matplotlib.pyplot as plt

x = np.random.normal(size=(2,1000))
fig, ax = plt.subplots()

ax.boxplot(x.T)

for lists it iterates over the zero axis

fig, ax = plt.subplots()
ax.boxplot([x[0,:],x[1,:]])

Why the distinction? I'd expect them to be the same (i.e., the list gets an np.asarray call) and it seems inconsistent that they're not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.