Skip to content

Commit c1ce194

Browse files
committed
converted barb demo to unix new lines
svn path=/trunk/matplotlib/; revision=5823
1 parent 27efbe1 commit c1ce194

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

examples/pylab_examples/barb_demo.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +0,0 @@
1-
'''
2-
Demonstration of wind barb plots
3-
'''
4-
import matplotlib.pyplot as plt
5-
import numpy as np
6-
7-
x = np.linspace(-5, 5, 5)
8-
X,Y = np.meshgrid(x, x)
9-
U, V = 12*X, 12*Y
10-
11-
data = [(-1.5,.5,-6,-6),
12-
(1,-1,-46,46),
13-
(-3,-1,11,-11),
14-
(1,1.5,80,80)]
15-
16-
#Default parameters for arbitrary set of vectors
17-
ax = plt.subplot(2,2,1)
18-
ax.barbs(*zip(*data))
19-
20-
#Default parameters, uniform grid
21-
ax = plt.subplot(2,2,2)
22-
ax.barbs(X, Y, U, V)
23-
24-
#Change parameters for arbitrary set of vectors
25-
ax = plt.subplot(2,2,3)
26-
ax.barbs(flagcolor='r', barbcolor=['b','g'], barb_increments=dict(half=10,
27-
full=20, flag=100), *zip(*data))
28-
29-
#Showing colormapping with uniform grid.
30-
ax = plt.subplot(2,2,4)
31-
ax.barbs(X, Y, U, V, np.sqrt(U*U + V*V), fill_empty=True, rounding=False)
32-
33-
plt.show()

0 commit comments

Comments
 (0)