I wanted to render the following content in a heatmap rather than a countour plot:
When I render the same content via:
p2 <- plot_ly(x=xplot,y=yplot,z=zplot,type="heatmap",zsmooth="best")
I get
I've verified that the limits of xplot
are 100 and 200.
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.
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:
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)