You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()
The text was updated successfully, but these errors were encountered:
Does not look like a bug, just special case. I can suppress the red horizontal line and vertical blue lines through medianprops and whiskerprops, respectively.
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
props = {'linewidth': 0}
plt.boxplot(data, showcaps=False, showfliers=False, showbox=False,
medianprops=props, whiskerprops=props)
plt.show()
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.]The text was updated successfully, but these errors were encountered: