Python Forum
Create multiple quiver plots 3D array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create multiple quiver plots 3D array
#1
I am trying to create multiple (this can either be animated or navigated through using matplotlib tools) 2D quiver plots from 3D arrays.

My inputs are u and v which are large 3d Arrays with the same shape.

Any help would be amazing.

#Define x and y 
fig, quiv = plt.subplots(figsize=(8.2,6.4))
a = np.arange(0,u.shape[2],1)
b = np.arange(0,u.shape[1],1)
A , B = np.meshgrid(a,b)


#Plot the first frame 
Q = quiv.quiver(A,B,u[0,:,:],v[0,:,:])
quiv.xaxis.set_ticks([])
quiv.yaxis.set_ticks([])


#Not a clue from here on...
def update_quiver(i):
    Q.set_UVC(U[i, ...], V[i, ...])
    return Q

anim = animation.FuncAnimation(fig, update_quiver, fargs=(Q, A, B, i),interval=1, blit=False)

plt.show()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Loading multiple JSON files to create a csv 0LI5A3A 0 2,106 Jun-28-2020, 10:35 PM
Last Post: 0LI5A3A
  Plots issue shane1236 1 2,090 Aug-06-2019, 10:00 AM
Last Post: shane1236
  Add space between plots AdWill97 0 2,059 May-15-2019, 02:04 PM
Last Post: AdWill97
  How to change the resolution of an image and save multiple plots. pianistseb 1 2,377 Dec-11-2018, 07:45 PM
Last Post: micseydel
  2D to 3D plots ekq378 0 10,526 Nov-14-2018, 06:13 PM
Last Post: ekq378
  Three-dimensional Contour Plots minifizikus 1 3,269 Sep-13-2018, 10:56 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020