Scale & set up RGB axes in 3D plot

I am trying to plot a wave function over one dimension that has both real and imaginary parts. I have created an animation of the 3D plot as shown in the screenshot below:

Wave function

I would like to spread the plot along the x-axis (which currently is vertical) and set it up with a set of 3 RGB axes that intersect at (0,0,0). I have included the code I am using to animate the plot below:

import matplotlib.pyplot as plt
import matplotlib.animation as animation
import mpl_toolkits.mplot3d.axes3d as p3

fig = plt.figure()
ax = fig.gca(projection='3d')
line, = ax.plot(REAL[0,:],IMAG[0,:],x,"r",linewidth=0.5)

def animacio(i):
    ax.collections.clear()
    line.set_data(REAL[i,:],IMAG[i,:])
    line.set_3d_properties(x, 'z')
    return line,

ani = animation.FuncAnimation(fig,animacio,interval=50, frames=Nt,repeat=True)
nom = 'EvoluciĆ³_'
ani.save(str(nom)+'['+str(V0)+','+str(L)+','+str(l)+','+str(xi)+','+str(sigmax)+','+str(T)+']'+'.mp4', writer="ffmpeg", dpi=300)
plt.show()

print('Animation saved as: '+str(nom)+'['+str(V0)+','+str(L)+','+str(l)+','+str(xi)+','+str(sigmax)+','+str(T)+']'+'.mp4')

I am looking for a way to spread the plot along the x-axis and set it up with 3 RGB axes that intersect at (0,0,0). Is there a straightforward way to do this?

To spread the plot along the x-axis and set it up with 3 RGB axes that intersect at (0,0,0), you can modify the code by adding the following lines:

# Set the limits of the x, y, and z axes
ax.set_xlim3d([xmin, xmax])
ax.set_ylim3d([ymin, ymax])
ax.set_zlim3d([zmin, zmax])

# Set the positions and colors of the RGB axes
ax.plot([0, length], [0, 0], [0, 0], color='red')
ax.plot([0, 0], [0, length], [0, 0], color='green')
ax.plot([0, 0], [0, 0], [0, length], color='blue')

Replace xmin, xmax, ymin, ymax, zmin, zmax with the desired limits of each axis. Replace length with the desired length of each axis. This will create 3 RGB axes that intersect at (0,0,0) and spread the plot along the x-axis.