title: How do you plot trajectory using read in values for x and y position?
body: <p>I have tried to plot trajectory of a bouncing ball by reading in a file that contains 3 columns of data such as, t, x and y. t is time with x and y respectively being the positions of the ball. I read in the data as lists for each variable. I am somewhat new to python so I don't know what I'm doing wrong. I am trying to take my x and y values and insert them into the theta list. I am getting a syntax error on the &quot;plt.plot(t, 0)&quot; line.</p>
  <pre><code>import matplotlib.pyplot as plt
  import math as math
  filename = 'NewTrackerVid_.txt'
  infile = open(filename, 'r') # Open file for reading
  line = infile.readline() # Read first line
  # Read x and y coordinates from the file and store in lists
  t = []
  x = []
  y = []
  
  for line in infile:
      words = line.split() # Split line into words
      t.append(float(words[0]))
      x.append(float(words[1]))
      y.append(float(words[2]))
  
  infile.close()
  
  θ = []
  
  for i in range(len(x)):
      θ.append(float(math.tan(y[i] / x[i])
  
  plt.plot(t, θ)
  plt.xlabel('t')
  plt.ylabel('θ')
  plt.title(&quot;Trajectory vs Time&quot;)
  </code></pre>