title: Plotting specific points on a graph
body: <p>I need some help with plotting data on graphs. So I would like to plot this data from a machine called a mass spectrometer. The data consists of intensity (plotted on y axis) and Mass/charge ration (m/z) (plotted on the x axis). In this task, I have to plot the data (which I have successfully done) and label all the peaks on the data that have an intensity of half of the maximum (which I have failed to complete successfully). This is what I have done so far but I continually get <code>ValueErrors</code>.  Any help is appreciated! Thanks</p>
  <pre><code>plt.clf()
  xs = np.arange(0,10,1)
  ys = np.random.normal(loc=3, scale=0.4, size=10)
  
  plt.plot(xs,ys)
  Max_y= ys.max()
  HalfMax_y=Max_y/2
  if ys &gt; HalfMax_y:
  
      for x,y in zip(xs, ys):
  
          label = &quot;{:.3f}&quot;.format(y)
  
          plt.annotate(label,
                       (x,y),
                       textcoords=&quot;offset points&quot;,
                       xytext=(0,10), 
                       ha='center',
                       arrowprops=dict(arrowstyle=&quot;-&gt;&quot;, color='green'))
      plt.show()
  </code></pre>
  <p>Here is the error message for context:</p>
  <pre><code>ValueError                                Traceback (most recent call last)
  &lt;ipython-input-11-284991f08763&gt; in &lt;module&gt;
        6 Max_y= ys.max()
        7 HalfMax_y=Max_y/2
  ----&gt; 8 if ys &gt; HalfMax_y:
        9 
       10     for x,y in zip(xs, ys):
  
  ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>