8000 Clean up and move barh_demo · matplotlib/matplotlib@917c329 · GitHub
[go: up one dir, main page]

Skip to content

Commit 917c329

Browse files
committed
Clean up and move barh_demo
1 parent 8f4be5b commit 917c329

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""
2+
Simple demo of a horizontal bar chart.
3+
"""
4+
import matplotlib.pyplot as plt; plt.rcdefaults()
5+
from mpltools import style; style.use('gallery')
6+
import numpy as np
7+
import matplotlib.pyplot as plt
8+
9+
10+
# Example data
11+
people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')
12+
y_pos = np.arange(len(people))
13+
performance = 3 + 10 * np.random.rand(len(people))
14+
error = np.random.rand(len(people))
15+
16+
plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4)
17+
plt.yticks(y_pos, people)
18+
plt.xlabel('Performance')
19+
plt.title('How fast do you want to go today?')
20+
21+
plt.show()

examples/pylab_examples/barh_demo.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/tests/backend_driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
files = dict()
5353

5454
files['lines'] = [
55+
'barh_demo.py',
5556
'fill_demo.py',
5657
'fill_demo_features.py',
5758
'line_demo_dash_control.py',
@@ -115,7 +116,6 @@
115116
'barb_demo.py',
116117
'barchart_demo.py',
117118
'barcode_demo.py',
118-
'barh_demo.py',
119119
'boxplot_demo.py',
120120
'broken_barh.py',
121121
'clippedline.py',

0 commit comments

Comments
 (0)
0