I am plotting a 3D surface image (similar to the volcano data example):
plot_ly(z = ~volcano) %>% add_surface()
The only difference is that my data is related to geographical coordinates (on the x and y axes). What I would like to now do is overlay/underlay a real map onto this graph as an additional surface, either as map tiles or even just as a plain jpg/png file.
I’ve downloaded a detailed map image with the exact same co-ordinates/dimensions as my plot. I’ve already spent many hours trying to figure out how to add an image as a flat surface layer to the 3D plot, but have not yet succeeded.
I can see how to add additional plotted surfaces by adding:
%>% add_surface(z = z_matrix)
but specifying an image here doesn’t work (needs a matrix).
I’ve also looked into trying to add it as a background image, as you would in a 2D plot, but this doesn’t work in 3D plots.
I’ve seen a similar implementation in python of mapping an image onto a surface (thanks to a tip by @jackparmer via github), but am still having trouble figuring out how to map an image onto a 3d surface using
Has anyone done something similar? Is there any other way this can be achieved?