Skip to content

boxplot not showing symbols with seaborn style sheet #13022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RinaldoB opened this issue Dec 19, 2018 · 2 comments
Closed

boxplot not showing symbols with seaborn style sheet #13022

RinaldoB opened this issue Dec 19, 2018 · 2 comments

Comments

@RinaldoB
Copy link

RinaldoB commented Dec 19, 2018

Bug report

Bug summary
When the seaborn style sheet is used, outlier points in plots generated with boxplot are not displayed.

Code for reproduction

%matplotlib notebook
import matplotlib.pyplot as plt
plt.style.use('seaborn')
plt.figure()
plt.boxplot([0,0,0,1])

Actual outcome

image

Expected outcome
image

Matplotlib version

  • Operating system: Linux
  • Matplotlib version: 3.0.1
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version: 3
  • Jupyter version (if applicable):
  • Other libraries:
@timhoffm
Copy link
Member

timhoffm commented Dec 25, 2018

This is actually due to an unfortunate default value for lines.markeredgewidth = 0 in seaborn.mplstyle.

For now, a possible workaround is using the flierprops parameter:

plt.boxplot([0,0,0,1], flierprops={'markeredgewidth': 1})

@mwaskom
Copy link

mwaskom commented Mar 9, 2019

This is actually due to an unfortunate default value for lines.markeredgewidth = 0 in seaborn.mplstyle.

It's also due to the fact that matplotlib's style sheets are out of sync with actual parameters seaborn sets:

import seaborn as sns
import matplotlib.pyplot as plt

sns.set()
plt.boxplot([0, 1, 2] * 50 + [10])
print(sns.__version__)
0.9.0

image

(By the way, the original example surprises me for other reasons. In Tukey's definition, box plots should only represents values that exist in the data set. How is 0.2 getting in there?)

@timhoffm timhoffm mentioned this issue Mar 16, 2019
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants