27c2dc10bb9f83026db6378c151d8108fc044af8,examples/images_contours_and_fields/barb_demo.py,,,#,11

Before Change


// Identical plot to panel 2 in the first figure, but with the point at
// (0.5, 0.25) missing (masked)
fig2 = plt.figure()
ax = fig2.add_subplot(1, 1, 1)
ax.barbs(data["x"], data["y"], masked_u, data["v"], length=8, pivot="middle")

plt.show()

After Change


data = np.array(data, dtype=[("x", np.float32), ("y", np.float32),
                             ("u", np.float32), ("v", np.float32)])

fig1, axs1 = plt.subplots(nrows=2, ncols=2)
// Default parameters, uniform grid
axs1[0, 0].barbs(X, Y, U, V)

// Arbitrary set of vectors, make them longer and change the pivot point
// (point around which they"re rotated) to be the middle
axs1[0, 1].barbs(data["x"], data["y"], data["u"], data["v"], length=8, pivot="middle")

// Showing colormapping with uniform grid.  Fill the circle for an empty barb,
// don"t round the values, and change some of the size parameters
axs1[1, 0].barbs(X, Y, U, V, np.sqrt(U * U + V * V), fill_empty=True, rounding=False,
                 sizes=dict(emptybarb=0.25, spacing=0.2, height=0.3))

// Change colors as well as the increments for parts of the barbs
axs1[1, 1].barbs(data["x"], data["y"], data["u"], data["v"], flagcolor="r",
                 barbcolor=["b", "g"], flip_barb=True,
                 barb_increments=dict(half=10, full=20, flag=100))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: matplotlib/matplotlib
Commit Name: 27c2dc10bb9f83026db6378c151d8108fc044af8
Time: 2018-06-27
Author: jklymak@gmail.com
File Name: examples/images_contours_and_fields/barb_demo.py
Class Name:
Method Name:


Project Name: matplotlib/matplotlib
Commit Name: 869bd95b3d8eb4e333f303a7fd25cb84f1b66c6f
Time: 2017-05-29
Author: quantum.analyst@gmail.com
File Name: examples/pylab_examples/spy_demos.py
Class Name:
Method Name:


Project Name: matplotlib/matplotlib
Commit Name: 27c2dc10bb9f83026db6378c151d8108fc044af8
Time: 2018-06-27
Author: jklymak@gmail.com
File Name: examples/images_contours_and_fields/barb_demo.py
Class Name:
Method Name:


Project Name: matplotlib/matplotlib
Commit Name: ec5e8863a6352da673b55cb971529f38278cf64e
Time: 2018-03-26
Author: pmhobson@gmail.com
File Name: examples/images_contours_and_fields/barb_demo.py
Class Name:
Method Name: