Skip to content

boxplot not showing symbols with seaborn style sheet #13022

Closed

Description

@RinaldoB

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:

Activity

  1. timhoffm commented on Dec 25, 2018

    @timhoffm
    Member

    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})
    
  2. added this to the v3.1 milestone on Dec 25, 2018
  3. mwaskom commented on Mar 9, 2019

    @mwaskom

    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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions