Skip to main content

More graceful handling of outliers in plots

Project description

outlier_plotting

More graceful handling of outliers in plots. Currently supports most of seaborn categorical scatter, distributional and estimate plots.

Functionality

handle_outliers remove outliers from the plot and show them as text boxes. It can be used with most seaborn plotting function that works with long-form data as well as kdeplot.

Notable exceptions are:

  • countplot
  • lineplot
  • scatterplot

Please not that only inliers are passed into the plotting function, consequently density estimates and functionals are only computed on that subset and not representative of the whole data.

Example

from outlier_plotting.sns import handle_outliers
import seaborn as sns
from matplotlib import pyplot as plt

plt.title('Showing Outliers')
sns.boxplot(data=df, y = 'type', x='value')
plt.show()

plt.title('With Outlier Handling')
handle_outliers(data=df, y = 'type', x='value', plotter=sns.boxplot)
plt.show()

png

png

For more examples, see examples.ipynb.

Installation

conda

conda env create -f environment.yml

##PyPI

pip install outlier-plotting

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for outlier-plotting, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size outlier_plotting-0.2.1-py3-none-any.whl (6.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size outlier_plotting-0.2.1.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page