I am trying to replicate the example shown here, made with rayshader
package:
If you want to save them as .png, you're using the right function, but you've to open the rgl window, i.e. first launch the plot, then save it. Something like this:
plot_gg( mtplot
, width = 3.5
, height = 3.5
, sunangle = 225
)
render_snapshot("path\\to\\your\\folder\\plot1.png",clear = TRUE)
# close rgl window
rgl.close()