I'm trying to plot without using Numpy, but what can I write as an alternative to the following functions?
The alternatives I found to some functions gave different outputs.
vel = np.zeros([n, m, 2], dtype = float) -----> vel = [ [ [0.0 for i in range(2)] for j in range(m) ] for k in range(n) ] gives different output.
xlins = np.linspace(0, m-1, m) ------> xlins = [i for i in range(m)] did not run.
psi = 2d array
def PlotData(psi, m, n, scale):
psi = list(map(list, zip(*psi)))
#psi = np.flip(psi, 0)
psi = psi[::-1]
vel = np.zeros([n, m, 2], dtype = float)
#vel = [ [ [0.0 for i in range(2)] for j in range(m) ] for k in range(n)]
#rgb = np.zeros([n, m, 3], dtype = int)
rgb = [ [ [0 for i in range(3)] for j in range(m) ] for k in range(n) ]
.
.
.
.
xlins = np.linspace(0, m-1, m)
#xlins = [i for i in range(m)]
ylins = np.linspace(0, n-1, n)
#ylins = [float(i) for i in range(m)]
plt.streamplot(xlins, ylins, vel[:,:,0], vel[:,:,1], color='k', density=1)
I want to obtain the same output without using Numpy.