I would like to plot x^c for different values of c on the same graph using just for loop and matplotlib library, with different colors for each function . When I try using for loop, the output just shows one graph.
****CODE****
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
plt.figure()
x = np.linspace(0,1,100)
for i in range(-10,10,21):
if i<0:
plt.plot(x,x**(abs(1/i)))
elif i>0:
plt.plot(x,x**i)
plt.show()
