I like to switch x axis with y axis after plotting a graph with matplotlib? Any easy way for it? Thanks in advance.
You can simply switch x and y parameters in the plot function:
I[3]: x = np.linspace(0,2*np.pi, 100) I[4]: y = np.sin(x) I[5]: plt.plot(x,y) I[6]: plt.figure(); plt.plot(y,x)