# Add\_surface produced different results from persp3d and persp

**URL:** <https://community.plotly.com/t/add-surface-produced-different-results-from-persp3d-and-persp/13757>\
**Category:** Plotly R\
**Created:** [September 19, 2018, 9:05pm UTC](https://community.plotly.com/t/add-surface-produced-different-results-from-persp3d-and-persp/13757 "2018-09-19T21:05:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cls3415](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@cls3415](https://community.plotly.com/u/cls3415)\
**Post date:** [September 19, 2018, 9:05pm UTC](https://community.plotly.com/t/add-surface-produced-different-results-from-persp3d-and-persp/13757/1 "2018-09-19T21:05:46Z")

</div>

# Hi- Not sure what’s going on, but I got different results between add\_surface and persp3d/persp. Any help is appreciated! Thanks!!

kd \<- with(MASS::geyser, MASS::kde2d(duration, waiting, n = 50))  
plot\_ly(x = kd$x, y = kd$y, z = kd$z) %\>% add\_surface()  
persp3d(x = kd$x, y = kd$y, z = kd$z, col=“yellow3”)  
persp(x = kd$x, y = kd$y, z = kd$z, col=“yellow3”, ticktype = “detailed”, phi=15, theta=45)

 ![persp](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/4/457fc15788caf8e62f1ed4c98d23ab0188bd1d60.png) ![persp3d](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/0/09b6014d593c1b378072c240ba15ef7a11426feb.png) ![PNG](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/1/1ffac310c1b4cd05879a8ffb73fd2cf7cc2a3c2d.jpeg)
