title: Python Matplotlib Taylor Series Graph lines doesn't works
body: <p>I have a problem!! I need to do a "first three terms taylor's series graph of A<em>cos(B</em>x) from x1 to x2. I have to get inputs from user and I want A,B,x1 and x2 as a float number. I handled the formula so I will put it in here. I NEED HELP ABOUT GRAPH. It doesn't works I don't know why its happening, please help me. Here is the codes:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  A = float(input("For A, please enter a value: "))
  B = float(input("For B, please enter a value: "))
  x1 = float(input("For x1, please enter a value between -10 and +10: "))
  
  if (-10)&lt;=x1&lt;=(10):
      x2 = float(input("For x2, please enter a value between -10 and +10: "))
  else:
     print ("x1 must be greater than or equal to -10 OR less than or equal to 10")
     quit()
  
  
  a0 = A*np.cos(B*(x1))
  a1 = ((-A)*B)*np.sin(B*(x1))
  a2 = ((-A)*(B**2))*np.cos(B*(x1))
  
  
  data1 = (((a0)*((x1-x2)**0))/np.math.factorial(0))
  data2 =(((a0)*((x1-x2)**0))/np.math.factorial(0))+(((a1)*((x1-x2)**1))/np.math.factorial(1))
  data3 = (((a0)*((x1-x2)**0))/np.math.factorial(0))+(((a1)*((x1-x2)**1))/np.math.factorial(1))+(((a2)*((x1-x2)**2))/np.math.factorial(2))
  
  plt.figure()
  plt.plot(data1, label="1. term",color="red")
  plt.plot(data2, label="2. term",color="yellow")
  plt.plot(data3, label="3. term",color="green")
  
  
  plt.xlabel("x label")
  plt.ylabel("y label")
  plt.axis([-10,10,-10,10])
  plt.show()
  
  </code></pre>