Questions tagged [plot3d]

plot3D is a package for use with R that includes functions for visualizing 2-D and 3-D data, including perspective plots, slice plots, surface plots, and scatter plots.

plot3D is an R package that includes functions for visualizing 2-D and 3-D data. Many of the functions are extensions of R’s persp() or image() functions.

The package can be used to make 3D scatter plots, surface plots, slice plots, and to visualize oceanographic data.

Repositories

Vignettes

Related Packages

  • Package (also includes the plot3D() function)
  • Package (Plots a three dimensional (3D) point cloud.)
  • Package plot3Drgl (The 'rgl' implementation of plot3D functions.)
94 questions
2
votes
1 answer

Plotting a multiple linear regression in R using scatter3D() (package plot3D)

I have the following data in a csv…
royer
  • 615
  • 1
  • 6
  • 19
2
votes
1 answer

3D scatterplot done with plot3D producing strange behaviour

I'm trying to display a plane of best fit within a 3D scatter plot using the library plot3D. When the code below is run everything seems fine enough, but if I replace the fit with the second fit I get strange behaviour, the plane is no longer a flat…
Geoff
  • 925
  • 4
  • 14
  • 36
2
votes
1 answer

Overlapping labels with the plot3D package in R

I am currently creating a 3D scatterplot using the plot3D package in R, and I wanted to add data labels to my data points. However, some of my data points have the same values with each other, and I wanted to find a solution similar to ggrepel that…
nilesguo
  • 162
  • 1
  • 14
2
votes
2 answers

Making a 4D plot in R with different x, y, z colors and lengths

I have a 30 x 16 x 9 matrix that I would like to visualize via a 4-D plot in R. I have tried scatter3D() in packages plot3d and scatterplot3d. x <- seq(10, 300, 10) y <- seq(5.0, 20.0, 1.0) z <- c(seq(0.5, 4, 0.5), 10) …
harmony
  • 111
  • 1
  • 9
2
votes
2 answers

Increasing 3D surface plot thickness using the Plot3D package in R

Is there a way to increase a 3D surface plot thickness like the plots here using the persp3D() function in the plot3D package in R? Can't seem to find anything in the documentation.
user2566907
  • 99
  • 10
2
votes
2 answers

Add grid over 3D surface using persp3D (plot3D package)

I'm trying to add a grid on top of a 3D surface created with persp3D (package plot3D), however I can't sort a way of doing it without causing a deformation on the grid. library(plot3D) data("volcano") volcano is a 3D matrix that can be used to…
Pedro Rocha
  • 79
  • 1
  • 10
2
votes
1 answer

Setting the margins in scatter3D from plot3D package in R

I am creating a 3D scatter plot using the scatter3D function from the plot3D library. My problem is that I can not set the margins around the plot. More specifically I need more space at the bottom. I used both the arguments mai and mar suggested…
rf7
  • 1,993
  • 4
  • 21
  • 35
2
votes
1 answer

GLM prediction for surface plot in scatter3D() in R

I'm trying to produce a surface plot with overlain points from a binomial GLM using the scatter3D() function. To do this I am using predict() to predict the z-surface for different values of x and y. # Data: library(plot3D) structure(list( x =…
Calen
  • 305
  • 4
  • 17
2
votes
1 answer

3D scatterplot with regions for different variables in R

I have a dataset and each entry contains data of a form (x0,x1,y0,y1,...). Suppose that x0,x1 are cost and y0,y1 are time. I want to plot a scatterplot where for each entry a "bubble" is used to display the area captured by (x0,x1,y0,y1) in the 2D…
STiGMa
  • 906
  • 3
  • 11
  • 24
2
votes
0 answers

Personalizing a 3D plot with package plot3d in R

I would like to personalize my plot3d by adding a full grid and inserting a gray background. Also, I would like to put the labels on the middle of the scaled axes. I couldn't add the grid by using the grid() function. This is my reproducible…
Ruser
  • 85
  • 1
  • 7
2
votes
2 answers

Trying to reproduce a 3D picture in R of a Rate or a Proportion with plot3D

I saw this 3D picture the other day in a journal that describes the evolution over time of Birth Rates between 1980-1999 by age. The vertical line is the birth rates. The two horizontal lines are, age, and year. I really would like to reproduce one…
giac
  • 4,261
  • 5
  • 30
  • 59
2
votes
0 answers

Drawing a 3D scatterplot with plot3D in R

I have the following plot that I want to use with plot3D. The commands I use are the following: library("plot3D"); N <- 100 xs <- runif(N) * 87 ys <- runif(N) * 61 zs <- runif(N)*50 + 154 # scatter + surface scatter3D(xs, ys, zs,…
kloop
  • 4,537
  • 13
  • 42
  • 66
1
vote
1 answer

Plotting 3d in python with DiracDelta function

I am trying to plot a two variable function A simple function x*DiracDelta(y)+y*DiracDelta(x) code will work with simple function without DiracDelta But when I enter the delta function, it gives an error? Can you help me find the problem with this…
1
vote
0 answers

Color by group and legend in plot3D

I'm trying to create my own 3D histogram using plot3D, so I took a look at this page as a starter before applying it on my own data. The code is clear and straightforward enough but I wonder how I can group rows of data (formatted as matrix indices…
Chris T.
  • 1,699
  • 7
  • 23
  • 45
1
vote
1 answer

render_highquality from rayshader R package only rendering black .png image

I'm following this tutorial: https://www.youtube.com/watch?v=zgFXVhmKNbU&lc=Ugxj9Lfa6m7FfLaJlzN4AaABAg.9kn2A9lbmnP9kn2SD5s2vs In the video render_highquality function exports 3d plot successfully as .png image. My code runs fine, everything up until…
Diego Plata
  • 51
  • 1
  • 7