Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timeseries plots to show percentiles and other statistics of the population

Consider the examples for tsplot (time-series plot) in seaborn, e.g. the one shown below.

Do pandas, matplotlib or seaborn include similar functionality to plot translucent bands representing percentiles or standard deviations of a population provided in a dataframe?

Reading the documentation, it looks like sns.tsplot plots confidence intervals for the sampling distribution of the estimator via bootstrapping, which is of course different.

enter image description here

like image 689
Amelio Vazquez-Reina Avatar asked Nov 10 '22 01:11

Amelio Vazquez-Reina


1 Answers

Worth mentioning that the proposal by raphael conflates percentiles and confidence intervals, which are very different statistics. For example, if you use ci=[0,100] in tsplot, you will not get bands showing the minimum and maximum of your data. An issue requesting inclusion of percentiles was raised on the Seaborn github page in January 2016, with a clear--and curt--reply that this was not currently possible.

A potential work-around has been posted here.

like image 64
David Diaz Avatar answered Nov 14 '22 21:11

David Diaz