rgl

Installing rgl on Ubuntu and Mac: X11 not found

六眼飞鱼酱① 提交于 2019-12-17 07:20:53
问题 I have seen this question here: Error in loading rgl package with Mac OS X but there is no mentioning about installation error, which is my case. I cannot install rgl package, using this command in R : source("http://bioconductor.org/biocLite.R") biocLite("rgl") The following error is displayed: configure: error: X11 not found but required, configure aborted. ERROR: configuration failed for package ‘rgl’ * removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’ I checked

Why do I need SVN to install rgl from github using install_github? [duplicate]

ぃ、小莉子 提交于 2019-12-14 02:30:13
问题 This question already has an answer here : How do I install the latest version of rgl? (1 answer) Closed 2 years ago . It was surprising to find install_github failing with a message "SVN does not seem to be installed on your system" indicating that SVN was needed. This followed the advice from a well-known rgl installation question How do I install the latest version of rgl. I could install it manually, but I did not understand the message and posted the question in the title. After some

draw cube into 3D scatterplot in RGL

安稳与你 提交于 2019-12-12 17:01:58
问题 I'm trying to add a smaller cube/mesh (with specified side length) to a 3D scatterplot. I'd like for the cube to be positioned at the origin. How would I go about doing that? I've played around with cube3d() but I can't seem to position the cube right nor make it a mesh (so I can see the data points it contains. Here's what I have: library(rgl) x <- runif(100) y <- runif(100) z <- runif(100) plot3d(x,y,z, type="p", col="red", xlab="x", ylab="y", zlab="z", site=5, lwd=15) 回答1: There is a

How to build rgl with freeType on Windows

此生再无相见时 提交于 2019-12-12 13:28:34
问题 I am trying (and ever so miserably failing) to build the rgl package with freeType on Windows, since, as it turns out, the rgl Windows binary I have installed via the Rgui doesn't include freeType support. (The reason I need it is this!) I'm not used to building things from source - so all the build instructions in the appropriate ReadMe files are basically indecipherable to me... I know this is a pathetic request but could someone please please give me a dummy's guide as to how to go about

Fill an outline in rgl

此生再无相见时 提交于 2019-12-12 13:26:40
问题 The following code draws some points and connects them with lines. I want to to fill in the area enclosed by the lines choosing color and alpha. I can't seem to see how to do that using rgl # Open plot and add axes open3d() decorate3d(xlim=c(0,4), ylim=c(0,4), zlim=c(0,4), xlab = NULL, ylab = NULL, zlab = NULL, box = FALSE, axes = FALSE, main = "", sub = NULL, top = TRUE, aspect = FALSE) axis3d(edge="z", col="blue") axis3d(edge="x", col="green") axis3d(edge="y", col="green") # Draw some

How to extract values from a 3D kernel density plot built in R using 'ks' and 'rgl'

倖福魔咒の 提交于 2019-12-11 22:53:50
问题 I've been using the 'ks' package along with the 'rgl' package to produce 3D kernel density estimates and 3D plots of these. This first part has worked out fine (brief example below). What I can't figure out is if it's possible to extract the values of the kernels for the given xyz locations used to build the kernels in the first place. In other words, extract the values for points in a 3D plot, akin to the extract command used for 2D surfaces in the 'raster' package. Does anyone have

How to achieve smoothed surfaces from points in grouped data?

感情迁移 提交于 2019-12-11 15:13:33
问题 With ggplot(.) + geom_smooth() we can achieve nice curves through points with grouped data. library(ggplot2) span <- 10 ggplot(data, aes(x = x, y = value, group = n)) + geom_smooth(aes(linetype = n), color = "blue", se = FALSE) Now I have a third dimension and want to visualize the relation between value and the two variables var1, var2 in 3D. I made several attempts of which only car::scatter3d brought me more closely to what I want. But I couldn't find a "smooth" option there and also no

WebGL rendering with rgl 0.93.935 R package

与世无争的帅哥 提交于 2019-12-11 14:28:01
问题 The following R code generates an HTML file and opens it in the browser: library(rgl) M <- rbind( c(0,0,0), c(-1,4,0), c(4,9,0), c(6,3,0) ) quads3d(M,col='red') browseURL(paste("file://", writeWebGL(dir=file.path(tempdir(), "webGL"), width=500), sep="")) The rendering is an interactive planar polyhedron in the 3D space. With the latest version of the rgl package ( 0.93.935 ), the HTML rendering does not work for Windows users (as well as iOS users, I think) with default configuration browser.

Vary color with height (z) for an rgl surface plot

无人久伴 提交于 2019-12-11 13:27:25
问题 I have a matrix of x,y, and z values (19,268 values) that are arranged as a surface. I plotted the surface using: rgl::surface3d(mat$x, mat$y, mat$z, color="grey") But, I want the color to vary with height (my Z values). The z-values range from -1.377385 to 29.93678 . How can I make my plot color vary with height? 回答1: You haven't given a reproducible example, so I don't know if these results will be satisfactory, but the general idea is that the color argument can be an array of the same

From POV-Ray to rgl

两盒软妹~` 提交于 2019-12-11 07:25:55
问题 I've followed this tutorial to export a POV-Ray graphic to a STL file, through Meshlab. I've also tried the export to the OBJ format. Everything seems to work fine from the creation of the POV-Ray graphic to the exporting in Meshlab. But then I've tried to render the graphic in R with the functions readSTL and readOBJ of the rgl package, and the problem is here. In fact, the exported STL file is empty: solid STL generated by MeshLab endsolid vcg So, of course, rgl::readSTL renders nothing in