Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface plot interprets dims 1 and 2 of a matrix to be y and x (should be reversed) #2381

Open
fang-zhaoyuan opened this issue Aug 21, 2024 · 0 comments

Comments

@fang-zhaoyuan
Copy link

fang-zhaoyuan commented Aug 21, 2024

For example:

plot_ly(z = ~volcano, type = "surface")

Obviously, the 1st dimension of matrix volcano is interpreted as the 'y', while the 2nd dimension as the 'x'.

However, a more natural order is: 1st dimension of matrix to be 'x', while the 2nd dimension to be 'y'. Such interpretation is in other R packages such as MASS: the function kde2d() will returns x, y and z matrix, where the dim1 and 2 of z is x and y respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant