Black Lives Matter. Please consider donating to Black Girls Code today.

3d plot with 2d axis

I posted on here awhile back with an issue but i am still not able to resolve it.

I am creating a 3d plot that contains a line object inside. Whenever we plot this in matlab it displays correctly but the conversion to a plotly plot seems to convert some of the plot into 2d objects. (1st picture)
Do you know why this is happening?

The picture below is a different plot but similar to what the plot in question should look like.