1

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.
My output

But the intended graphs are as follows
Graphs from the paper

I'm trying to plot both of them but the code I wrote only plots the 2D plot.

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
SMA47
  • 11
  • 2

0 Answers0