Problem in Plotting and Adding Surface

I´m a R newbie :grin: and currently try to plot my data in a 3d chart with a surface. I tried using the package plotly, but fail to do it.

Now I try find help in this community.

I´ve got a matrix d3 (see below), but in the plot (see link below), either z or x are equal to the data in the matrix. In the plot x is always equal 1 and z is a counting number.

What do I need to change in the code?

Is it maybe how I created the matrix?

d3<- data.matrix(mydataframe[1:3])
         z         y         x
[1,] 75.33333 1566.6667 0.2727273 
[2,] 76.66667 1585.6667 0.2788845
[3,] 75.33333 1462.6667 0.2384615
[4,] 77.66667 1340.6667 0.2489796
[5,] 75.66667 1328.3333 0.3658537
[6,] 83.33333 1315.6667 0.3459716
[...] ...

plot_ly(z = ~d3) %>% add_surface()

The plot looks like that, but it does not express the x,y and z values as in the data.frame.

Cheers for any help! :grinning: