title: Why does R plot_ly heatmap extend x limits of my data?
body: <p>I wanted to render the following content in a heatmap rather than a countour plot:</p>
  
  <p><a href="https://i.stack.imgur.com/Mn5xs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mn5xs.png" alt="enter image description here"></a></p>
  
  <p>When I render the same content via:</p>
  
  <pre><code>p2 &lt;- plot_ly(x=xplot,y=yplot,z=zplot,type="heatmap",zsmooth="best")
  </code></pre>
  
  <p>I get</p>
  
  <p><a href="https://i.stack.imgur.com/g9Hba.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g9Hba.png" alt="enter image description here"></a></p>
  
  <p>I've verified that the limits of <code>xplot</code> are 100 and 200.  </p>
  
  <p>Why does plot_ly show the x-axis ranging from 50 to 250?  I thought maybe it had to do with the way data gets "z-smoothed", but the y-axis seems to be untouched.</p>
  
  <hr>
  
  <p>The dataset I am trying to plot has 2,500 points, but I believe you should be able to see the same behavior with the following data:</p>
  
  <pre><code>xplot = c(100, 100, 200, 200, 200, 200, 200)
  yplot = c(98, 100, 184, 188, 192, 196, 200)
  zplot = c(557740.27, 562123.04,  23871.66,  24987.45,  25735.05,  26106.02,  26095.27)
  </code></pre>