title: How to plot a bisector line on Plotly
body: <p>I have a Scatter chart and I need to trace the bisector line on it. I'm wondering if there is a automated way on Plotly to generate that, or a simplified way to calculate the equation in python to generate the list of values and trace the line.</p>
  <p>My code:</p>
  <pre class="lang-py prettyprint-override"><code>trace1 = go.Scatter(
      x = eixo_x, # My list of values for 'x'
      y = eixo_y, # My list of values for 'y'
      mode = 'markers',
      marker = dict(color = 'rgb(0, 176, 240)')
  )
  
  dados = [trace1]
  layout = go.Layout(
      title = 'Unitários Observados | Unitários Estimados',
      autosize = False,
      width = 1000,
      height = 500,
      xaxis = dict(
          showgrid = True),
      yaxis = dict(
          tickmode = 'array',
          showgrid = True
      )
  )
  
  fig = go.Figure(data = dados, layout = layout)
  fig.show()
  </code></pre>
  <p>My Plot:</p>
  <p><a href="https://i.stack.imgur.com/roHCR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/roHCR.png" alt="enter image description here" /></a></p>
  <p>Now I need to plot a line on diagonal, the bisector.</p>
  <p><strong>EDIT</strong></p>
  <p>There are a few questions about bisector, but not for Plotly.</p>
  <p><strong>EDIT 2</strong></p>
  <blockquote>
  <p>In geometry, bisection is the division of something into two equal or congruent parts, usually by a line, which is then called a bisector. <a href="https://en.wikipedia.org/wiki/Bisection" rel="nofollow noreferrer">Wikipedia</a></p>
  </blockquote>
  <p>Example:</p>
  <p><a href="https://i.stack.imgur.com/S5bjo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S5bjo.png" alt="enter image description here" /></a></p>