✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Z axis of Plotly 3D surface not matching

I am trying to understand the underlying structure of the dataframe that been used to plot the 3D surfaces in plotly

The following code is used to plot the 3D surfaces

library(plotly)
plot_ly(z = volcano, type = "surface") 

This gives the following output:

Here the z-axis value is 189, but when I try

volcano[31, 20] 

it gives me 168. So I am trying to understand from where the 189 in the picture come from?