Skip to content

Commit f405a32

Browse files
authored
addressing small change comments
1 parent 44e584c commit f405a32

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/statistics/plot_hist.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#
2222
# To generate a 1D histogram we only need a single vector of numbers. For a 2D
2323
# histogram we'll need a second vector. We'll generate both below, and show
24-
# the histogram for each vector
24+
# the histogram for each vector.
2525

2626
N_points = 100000
2727
n_bins = 20
@@ -44,7 +44,7 @@
4444
# The histogram method returns (among other things) a `patches` object. This
4545
# gives us access to the properties of the objects drawn. Using this, we can
4646
# edit the histogram to our liking. Let's change the color of each bar
47-
# based on its y value
47+
# based on its y value.
4848

4949
fig, axs = plt.subplots(1, 2, figsize=(10, 5), tight_layout=True)
5050

@@ -62,7 +62,7 @@
6262
color = plt.cm.viridis(norm(thisfrac))
6363
thispatch.set_facecolor(color)
6464

65-
# We can also normalize our inputs by the total number of counts.
65+
# We can also normalize our inputs by the total number of counts
6666
axs[1].hist(x, bins=n_bins, normed=True)
6767

6868
# Now we format the y-axis to display percentage
@@ -79,12 +79,13 @@
7979
fig, ax = plt.subplots(tight_layout=True)
8080
hist = ax.hist2d(x, y)
8181

82+
8283
###############################################################################
8384
# Customizing your histogram
8485
# --------------------------
8586
#
8687
# Customizing a 2D histogram is similar to the 1D case, you can control
87-
# visual components such as the bin size or color normalization
88+
# visual components such as the bin size or color normalization.
8889

8990
fig, axs = plt.subplots(1, 3, figsize=(15, 5), sharex=True, sharey=True,
9091
tight_layout=True)

0 commit comments

Comments
 (0)