I wanted to create graphs for some math functions and tried to do this using matplotlib.I need to plot graphs of several functions in one plot sothat these can be compared against each other.
say these are the math functions
2**(math.log(x,2))
2**(2**(math.log(x,2)))
I tried this
from matplotlib.pyplot import plot as plt
x=arange(1000,1010)
y1=[2**(math.log(t,2)) for t in x ]
y2=[2**(2**(math.log(t,2))) for t in x ]
plt.plot(x,y1)
plt.plot(x,y2)
plt.show()
this only shows one graph..that of (x,y2)
how do I make all the graphs show in one plot?
edit:
using plt.plot(x,y1,x,y2) produces this graph

I don’t think they are going to be visible on the same scale. The first one is essentially
y = x,yis about 1000. The second one isy = 2**x, andxstarts at 1000…However, plotting with log scale can help: