X Tutup
Skip to content

matplotlib.pyplot.boxplot ignored showmeans keyword #5816

@cswarth

Description

@cswarth

I'm trying to suppress all graphical elements of a boxplot in order to take advantage of the scaling it provides for subsequent point plots. Unless I'm misunderstanding the intent of the showmeans keyword, it appears to not work as advertised.

[edit : wait - that red line is the median, isn't it? showmeans probably doesn't do what I think it does and I need to some other keyword to suppress the red line and the small vertical lines too.]

import sys
import matplotlib.pyplot as plt
import numpy as np
print("python", sys.version)
print("matplotlib version", matplotlib.__version__)
print("numpy version", np.__version__)
# fake up some data
spread = np.random.rand(50) * 100
center = np.ones(25) * 50
flier_high = np.random.rand(10) * 100 + 100
flier_low = np.random.rand(10) * -100
data = np.concatenate((spread, center, flier_high, flier_low), 0)

# basic plot
plt.boxplot(data, showcaps=False, showmeans=False, showbox=False, showfliers=False)

plt.show()

screen shot 2016-01-08 at 3 39 44 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup