I was trying to plot the following vector (B = [x, py, -(p+1)z])
from a paper that I'm working on.
I have taken $p$ equal to 1
in order to replicate a graph from the paper.
I wrote the following code to plot the vector,(Best I could do to replicate the original)
import matplotlib.pyplot as plt
from numpy import linspace, meshgrid
A = linspace(-4,4,10)
x,y = meshgrid(A,A)
p = 1
Bx = x
By = p*y
plt.quiver(x,y,Bx,By)
plt.show()`
The output of the graph is below.
But the intended graphs are as follows
I'm trying to plot both of them but the code I wrote only plots the 2D plot.