Questions tagged [rgl]

`rgl` is a 3D visualization device system for R, using OpenGL as the rendering backend.

The rgl package is a 3D visualization device system for R based on OpenGL. An rgl device at its core is a real-time 3D engine written in C++. It provides an interactive viewpoint navigation facility (mouse + wheel support) and an R programming interface.

Features:

  • Cross-platform (Mac OS X, Win32, Unix/X11)
  • R programming interface
  • Interactive viewpoint navigation
  • Automatic data focus Geometry primitives: points, lines, triangles, quads, texts, spheres, 3D sprites, particles, terrain
  • Up to eight light sources
  • Alpha-blending (transparency)
  • Side-dependant rendering
  • Texture-mapping with mipmap support
  • Environmental effects: fogging, background sphere
  • Bounding box with axis ticks marks
  • Undo operation

Resources:

558 questions
10
votes
2 answers

car::scatter3d in R - labeling axis better

I'm using scatter3d and the 3 axes just have two endpoint values. how can I get labels throughout the entire axis, just like the normal plot() function does?
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
10
votes
1 answer

3D Plotting in R - Using a 4th dimension of color

I am using the plot3d function to make a 3d plot in my R script. I'd like to add a 4th dimension, which will be color. How can I do this? Specifically, assume I have the following code: plot3d(x, y, z, col=cols, size=2, type='s') how would I…
CodeGuy
  • 28,427
  • 76
  • 200
  • 317
10
votes
2 answers

Plotting a number of inequalities as planes

I would like to plot a number of planes, each is an inequality. After I have plottet all the planes, I would like to have them combined, and color the area inside these lines. Image drawing a lot of 3d lines and coloring the area inside - this is…
Thorst
  • 1,590
  • 1
  • 21
  • 35
10
votes
1 answer

How to export an interactive rgl 3D Plot to share or publish?

I have made an interactive 3D plot in R using the rgl package. I would like to be able to send it (and keep it interactive) to a colleague so she can present it (rotate it) in a meeting on her laptop. Is there a way to do this? Here is the code I…
Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46
10
votes
1 answer

Adding a legend to an rgl 3d plot

I am trying to draw a 3d plot using rgl with colors legend indicating which color refer to which class (called…
user3628777
  • 529
  • 3
  • 10
  • 20
10
votes
4 answers

Put a fixed title in an interactive 3D plot using rgl package, R

I am trying to add a fixed title to an interactive 3d plot using the rgl package from R, but so far I haven't been able to do it. I also would like to have one main title and a subtitle under the main title. Here is a sample…
user1626688
  • 1,583
  • 4
  • 18
  • 27
10
votes
1 answer

R - Plot a region described by planes with rgl

I want to plot a polyhedron, which is described by the following inequalities: 3*x+5*y+9*z<=500 4*x+5*z<=350 2*y+3*z<=150 x,y,z>=0 It is a linear program. The objective function is: 4*x+3*y+6*z The polyhedron is the feasible region for this…
cjena
  • 307
  • 1
  • 3
  • 9
9
votes
1 answer

plotting label names onto 3D plot generated by plot3d (rgl)

I would like to plot results from a MDS analysis with 3 dimensions using plot3d() (rgl). Data and code look like this: threedim$points [,1] [,2] [,3] [,4] Dutch -6.45931417 -2.1589222 -5.829244 …
Annemarie
  • 689
  • 6
  • 14
  • 28
9
votes
1 answer

3d scatterplot with colored spheres with R and Rgl

I want to create a 3d scatter plot of spheres with their color being the fourth dimension. I have the data in a csv file where each line indicates the x,y,z position of a particle and I have a column which tells me the value of the particle (1,2 or…
Yotam
  • 10,295
  • 30
  • 88
  • 128
9
votes
1 answer

How to render scatter3d inside shiny page instead of popup

I'm looking at implementing 3D interactive plots in my shiny App, and so far I've been using plotly. However, plotly has one major disadvantage, it's extremely slow when rendering. I've done checks, and the whole creation of updated outplot$plot <-…
Mark
  • 2,789
  • 1
  • 26
  • 66
9
votes
1 answer

Using rgl with headless display

I installed Xfvb and instantiated a display instance: $ Xvfb :2 -screen 0 1280x960x24 & I then installed R 3.2.5 and rgl 0.95.1441 separately from source, and I opened R with a connection to DISPLAY on port 2. I then tried to run a test rgl session…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
9
votes
4 answers

Troubles installing "rgl" on Ubuntu

It seems that I have troubles isntalling the rgl package on Ubuntu. When running install.packages("rgl") I got the following error checking for gcc... gcc -std=gnu99 checking whether the C compiler works... yes checking for C compiler default…
Steef Gregor
  • 544
  • 1
  • 7
  • 21
9
votes
4 answers

Setting size of the rgl device

I have a problem with the fullscreen / non-fullscreen of my rgl device. Currently I use R 3.00 I plot a persp3d plot (library rgl) into my device, it opens in a quite small window: The R code: persp3d(x, y, z, theta=50, phi=25, expand=0.75,…
Jen Bohold
  • 1,038
  • 2
  • 10
  • 17
8
votes
3 answers

How do I install the R package rgl on Ubuntu 9.10, using R version 2.12.1?

I'm trying to install the R package rgl on Ubuntu 9.10. I'm using R version 2.12.1. I got the following error: "configure: error: missing required header GL/gl.h" Edit: My original question did not specify that the operating system must be Ubuntu…
BenH
  • 2,100
  • 2
  • 22
  • 33
8
votes
1 answer

View an rgl plot using Microsoft Azure Machine Learning

Using an "execute R script module" in Azure-ml studio, when I plot to an rgl device, I get a broken image icon under the graphics section of the R Device output. Is there some way to view (and even interact with) the resulting rgl device? If not…
Jota
  • 17,281
  • 7
  • 63
  • 93
1
2
3
37 38