Oleg Melnikov
Oleg Melnikov

Reputation: 3298

Aspect ratio in plot3D::persp3D in R

Anyone knows how to alter width-length aspect ratio of xy plane with plot3D package? For example, how to make x axis appear twice the length of y axis (without changing data values):

plot3D::persp3D(z = volcano)

image

Upvotes: 4

Views: 2136

Answers (1)

Karolis Koncevičius
Karolis Koncevičius

Reputation: 9656

This worked for me:

persp3D(x=1:nrow(volcano)*2, y=1:ncol(volcano), z=volcano, scale=FALSE)

image

Upvotes: 3

Related Questions