Seaborn: distplot(data, cumulative=True)

Created on 2 Sep 2016  路  3Comments  路  Source: mwaskom/seaborn

Hi, is there a way to do what the title suggests? Suppose I want to plot a cumulative histogram + its CDF:

import numpy as np
import pandas as pd
import seaborn as sns
s = pd.Series(np.random.normal(size=1000))

I can plot the cumulative histogram using pandas with s.hist(cumulative=True, normed=1), and I can plot the kde fit using seaborn with sns.kdeplot(s, cumulative=True), but why not implementing something like distplot(s, cumulative=True)?

Most helpful comment

Actually, you can do something like distplot(s, hist_kws={'cumulative': True}, kde_kws={'cumulative': True}).

All 3 comments

Hi, is there a way to do what the title suggests?

No, there isn't, sorry.

Actually, you can do something like distplot(s, hist_kws={'cumulative': True}, kde_kws={'cumulative': True}).

sns.kdeplot(s, cumulative=True) does what you want.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

queryous picture queryous  路  4Comments

ConstantinoSchillebeeckx picture ConstantinoSchillebeeckx  路  4Comments

vinay-jayaram picture vinay-jayaram  路  3Comments

rrbarbosa picture rrbarbosa  路  3Comments

stonebig picture stonebig  路  4Comments