579 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
80
views
Using rgl plots in Quarto: HTML and PDF
In a book I'm writing using Quarto, I'd like to include rgl plots and produce HTML (dynamic) and PDF (static) versions where the plots look more or less the same.
I'm nearly there, but with some ...
4
votes
1
answer
99
views
How to plot log transformed data in rgl 3d plot?
I do a 3d plot with the rgl package and I want to use a log transformed z axes. What I do is:
# Dummy data.
x <- seq(1, 2, length = 10); y <- seq(1, 3, length = 10)
z <- outer(x, y, function(...
2
votes
1
answer
62
views
How can I get the "smooth=FALSE" argument in rgl to work in RMarkdown?
When I make a checkered surface by setting smooth=FALSE in the rgl package in R, it appears correctly in my computer's rgl window, but not in knitted R Markdown documents nor in the RStudio viewer, ...
0
votes
1
answer
77
views
How to increase the space between grid lines in rgl::surface3d?
I do 3d plots with the rgl package. Here is some code:
# Plot function.
my_plot <- function(x, y, z){
colours <- heat.colors(length(unique(z))); minval <- min(z); maxval <- max(z) + 10
...
0
votes
1
answer
87
views
Plotting polygons with holes in rgl?
I have various polygons, created with the terra package, which I want to plot using the rgl package. But they have holes. And I can't seem to understand how to use rgl to do so. In the example of the ...
Zoe's user avatar
- 1,000
1
vote
1
answer
182
views
Using rgl's extrude3d() function to make a 3D mesh from polygons in R
I'm trying to make a 3D OBJ file using R. My initial data is a Geopackage with multiple polygons. And I want to 'extrude' each polygon to make them 3d. The extrude amount should be determined by the ...
1
vote
1
answer
257
views
plotting 3d ellipses using R plotly
I'm having issues with plotly: essentially, I've been plotting PCA data and I need to plot them in 3D. Hence, plotly which supports that. I can plot the scores without any issues, the problem is when ...
3
votes
1
answer
183
views
How can I plot contour lines on a sphere?
Suppose I have an rgl spherical object and I want to plot contours on the surface of this sphere. I figure that the contourLines3d function from the rgl R package is my best bet, so I'm going to adapt ...
1
vote
1
answer
141
views
From hypervolume to 3D solid graph RStudio
I'm looking for an advice about how to do something similar to the following 3D graph using the package Hypervolume and rgl, to display the hypervolume overlap between my data.:
I'm running the ...
0
votes
2
answers
72
views
Control space between data lines in a 3D plot
I am new on Stack Overflow. I have a 3D plot, like in this topic : R : plot multiple chronicles separated on 3d plot
Here is a reproducible example (edited) :
library(rgl)
# example data
Month <- ...
0
votes
1
answer
58
views
Displaying an updating network graph without reloading wireframe
Problem: Iterating across network display algorithms provides updates to each nodes' XYZ coordinate. Trying to graph this in a smooth way does not seem to be able to avoid the wireframe reloading, ...
0
votes
0
answers
49
views
Callback behavior for objects with the same scene ID
I can't quite explain it, but the callback function doesn't seem to be working properly with the same scene ID. Only callbacks prepared later seem to be processed.
I don't think it will be a problem ...
0
votes
1
answer
55
views
setUserCallbacks() to scene generated with newSubscene3d()
I'm having trouble figuring out how to apply the callback function set by setUserCallbacks() to scene generated with newSubscene3d(), except for the first scene.
In the example below, the added scene ...
1
vote
1
answer
223
views
How to use point shapes other than spheres in rgl?
I'm trying to illustrate the idea of projections using points on a cube, shown with rgl and what that
looks like in various 2D projections.
My goal is to use different colors and shapes to distinguish ...
0
votes
1
answer
298
views
I can't get rgl to save snapshots or gifs
I can't figure out what is missing to run rgl smoothly. My code and output:
pacman::p_load("rgl", "scales", "magick","webshot2")
rgl::plot3d(1:20, 1:20, 1:20)
...