Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d1b8a2

Browse files
committed
Add example docstrings
1 parent c3cce1c commit 6d1b8a2

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

examples/pylab_examples/histogram_demo_cumulative.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Demo of the histogram (hist) function used to plot a cumulative distribution.
3+
4+
"""
15
import numpy as np
26
import matplotlib.pyplot as plt
37
from matplotlib import mlab
@@ -16,7 +20,7 @@
1620
y /= y[-1]
1721
plt.plot(bins, y, 'k--', linewidth=1.5)
1822

19-
# Overlay a reverted cumulative histogram.
23+
# Overlay a reversed cumulative histogram.
2024
plt.hist(x, bins=bins, normed=1, histtype='step', cumulative=-1)
2125

2226
plt.grid(True)

examples/pylab_examples/histogram_demo_histtypes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"""
2+
Demo of the histogram (hist) function with different ``histtype`` settings.
3+
4+
* Histogram with step curve that has a color fill.
5+
* Histogram with with unequal bin widths.
6+
7+
"""
18
import numpy as np
29
import matplotlib.pyplot as plt
310
from matplotlib import mlab

examples/pylab_examples/histogram_demo_multihist.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
Demo of the histogram (hist) function with multiple data sets.
3+
4+
Plot histogram with multiple sample sets and demonstrate:
5+
6+
* Use of legend with multiple sample sets
7+
* Stacked bars
8+
* Step curve with a color fill
9+
* Data sets of different sample sizes
10+
"""
111
import numpy as np
212
import matplotlib.pyplot as plt
313

0 commit comments

Comments
 (0)