简体   繁体   中英

R- xy scatter plot in 3d using density

I want to visualize an xy scatter in 3d, using the density/overlaps as z values. I guess this would be like using alpha as a z-axis - more overlap = higher z. Suggestions? Perhaps using cloud() in lattice library?

I use rgl for 3D visualization. You can rotate the image in rgl window using your mouse. Wheel zooms in/out.

example(plot3d)
rgl.bg(color = "black") # Space, the final Frontier.

在此输入图像描述

There are a variety of 2d density functions available:

MASS::kde2d
fields::smooth.2d
hexbin::hexbin

In general visualizing 3d clouds of points is rather difficult. Pseudo 3d with surfaces is ok but the points do not display with sufficient depth cues. If you really want to try it, then use the rgl package so you can rotate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM