how to disable all quadrants and enable only one in 3D plot quiver

42 Views Asked by At

I have the following 3D plot in quiver. My question is that I have 3 lists x,y,z, and the derivatives u,v, and w lists. My question is how can I make only one quadrant visible? which means if x and y are positive, and z is negative only draw the points starting with these values. Given that all numbers in my system are from -1 to 1.

b=75
T=50
#steps = 20
steps = 4
valuelist = [0]


for i in range(1,steps+1):
  valuelist = [-i/steps] + valuelist
  valuelist.append(i/steps)

print(valuelist)
r= len(valuelist)
x, y, z = np.meshgrid(np.linspace(-1,1,r),
                      np.linspace(-1,1,r),
                      np.linspace(-1,1,r))
u = np.zeros((r,r,r))
v = np.zeros((r,r,r))
w = np.zeros((r,r,r))
for i in range(r):
  for j in range(r):
    for k in range(r):
        initial_values= [valuelist[i],valuelist[j],valuelist[k]]
        u[i,j,k] = derivative-one-step(initial_values,b)[0]
        v[i,j,k] = derivative-one-step(initial_values,b)[1] 
        w[i,j,k] = derivative-one-step(initial_values,b)[2] 
0

There are 0 best solutions below