Skip to content

Commit 53fd1a8

Browse files
authored
Merge pull request #21115 from timhoffm/doc-errorbar-plot-types
Improve errorbar plot types example
2 parents e272daa + 42ff09f commit 53fd1a8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plot_types/stats/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _stats_plots:
22

3-
Specialized statistics plots
4-
----------------------------
3+
Statistics plots
4+
----------------
55

6-
Specialized plots for statistical analysis.
6+
Plots for statistical analysis.

plot_types/stats/errorbar_plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# make data:
1414
np.random.seed(1)
1515
x = [2, 4, 6]
16-
y = [4, 5, 4]
17-
yerr = np.random.uniform(0.5, 1.5, 3)
16+
y = [3.6, 5, 4.2]
17+
yerr = [0.9, 1.2, 0.5]
1818

1919
# plot:
2020
fig, ax = plt.subplots()
2121

22-
ax.errorbar(x, y, yerr, linewidth=2, capsize=6)
22+
ax.errorbar(x, y, yerr, fmt='o', linewidth=2, capsize=6)
2323

2424
ax.set(xlim=(0, 8), xticks=np.arange(1, 8),
2525
ylim=(0, 8), yticks=np.arange(1, 8))

0 commit comments

Comments
 (0)