Displaying 20 results from an estimated 1000 matches similar to: "Layering multiple persp plots"
2013 May 16
1
Contour lines in a persp plot
Hello folks,
i'm a R beginner and i want to put in a same plot both contour lines
and persp plot.
For example,
fn<-function(x,y){sin(x)+2*y} #this looks like a corrugated tin roof
x<-seq(from=1,to=100,by=1) #generates a list of x values to sample
y<-seq(from=1,to=100,by=1) #generates a list of y values to sample
z<-outer(x,y,FUN=fn) #applies the funct. across the combos of x
2005 May 30
1
persp, add lines/highlights
Hello R-sters,
I'm trying to add several lines to a response surface that I've plotted
using persp(). I've tried lines() using the "trans3d" function but I've
been unsuccessful in getting it to work (R v2.0.1). Essentially, I'm
trying to highlight one or more of the surface wireframe lines in a
bolder (or different) color. Any tips from those of you who have some
2005 Nov 18
2
Adding points to wireframe
Hi,
I am using function wireframe from package lattice to draw a 3D surface.
I would like to add a few points on the surface. I read in a post from
Deepayan Sarkar that "To do this in a wireframe plot you would probably
use the panel function panel.3dscatter". Does someone have an example?
When calling panel.3dscatter with only x, y and z arguments I get
"argument
2008 Apr 30
2
wireframe - add data points
Hello all,
I’m trying to add some data points to a wireframe. X an Y axis are independent variables, Z axis is predicted probability. I’d like to add the original data points on which the predicted probabilities are based to the wireframe. I’ve followed some of the previous post on this but get stuck :
## first part yields the wireframe##
setwd("C:/Temp")
rnp <-
2011 Mar 04
1
lattice: wireframe "eats up" points; how to make points on wireframe visible?
Dear expeRts,
I would like to add two points to a wireframe plot. The points have (x,y,z) coordinates
where z is determined to be on the wireframe [same z-value]. Now something strange
happens. One point is perfectly plotted, the other isn't shown at all. It only
appears if I move it upwards in z-direction by adding a positive number. So somehow
it disappears in the wireframe-surface
2007 Jul 05
2
Adding points to a wireframe with conditioning variable
I would like to add points to a wireframe but with a conditioning variable. I
found a solution for this without a conditioning variable here,
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/65321.html. Does anyone know
how to plot a wireframe conditioned on a variable and add the points
conditioned on the same variable, similar to the solution at the link above?
2010 Feb 20
1
Add lines (contours) to lattice wireframe plot
Hi,
I draw a surface corresponding to bivariate density of independent
variables (rho=0) using persp(). Then I add a contour line (i.e.,
circle in my case) at a particular density. Below is a minimal example
of what I have so far.
# Bivariate density
dnorm2d <- function(x, y, rho = 0) {
xoy = (x^2 - 2 * rho * x * y + y^2)/(2 * (1 - rho^2))
density = exp(-xoy)/(2 * pi * sqrt(1 - rho^2))
2009 May 05
2
Lattice: use levelplot as panel for wireframe
Hi,
I want to draw a figure similar to http://dsarkar.fhcrc.org/lattice/book/images/Figure_13_07_stdBW.png
from http://lmdvr.r-forge.r-project.org/figures/figures.html (figure
13.7) . However instead of using a contour plot as a panel for the
wireframe I want to use a levelplot. Can somebody help me with this?
Thanks in advance for any help,
Kind regards,
Anton Bossenbroek
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
Hi,
I'm trying to follow the suggestions given by Deepayan Sarkar in this
message:
http://tolstoy.newcastle.edu.au/R/help/05/11/16135.html
to plot 3-D points on a wireframe plot. The problem is that I keep getting a
partly formed plot- with the colored lattice visible but no axis labels or
additional points- with the error message "error using packet 1, 'x' and
'units'
2010 Mar 15
1
Eliminate border in wireframe plot
How can I eliminate the border drawn by default around a wireframe plot? I've tried using border=NA and box=FALSE to no avail.
Scott Waichler
Pacific Northwest National Laboratory
scott.waichler at pnl.gov
2006 Feb 05
1
wireframe zlim option
Hello,
I would like to plot a wireframe of a function which is defined on the
unit square using the lattice library (for trellis-like plots). The plot
contains z-values of about 100 (only in the neighborhood of zero) although
most of the z-values are in the range of -let's say- 0 to 10. If I
evaluate this function on an equidistant grid of 25 points on the unit
square the plot quality is not
2009 Jul 30
2
wireframe color
Hello, hopefully simple question, but I cannot find the answer. I need to
change the color from the standard default. Still want the scaled colors,
but need different colors for different graphs.
Code is:
wireframe(z ~ y*x, mat.df,
drape = TRUE,
zlab = list("Water mass error (%)",rot=92), zlim=c(-50,180),
xlab = list("Resistance error
2012 Mar 28
4
Grafico en 3D
Buenas tardes,
Podria por favor alguien ayudarme a descifrar por que no es posible ver la
grafica 3D cuando se utiliza lattice? Ya se que algunas veces los duendes
hacen de las suyas, pero no estoy seguro de que este sea el caso. He
reiniciado R, cambiado a RStudio y utilizado XP, pero no pasa "nada".
Mi sessionInfo() es:
R version 2.14.0 Patched (2011-11-12 r57642)
Platform:
2010 Jul 06
2
grayscale wireframe??
I need grayscale formatting for a wireframe.
The only col.regions that I can find are color palettes are all colored:
rainbow(n, s = 1, v = 1, start = 0, end = max(1,n - 1)/n,
gamma = 1, alpha = 1)
heat.colors(n, alpha = 1)
terrain.colors(n, alpha = 1)
topo.colors(n, alpha = 1)
cm.colors(n, alpha = 1)
The code follows:
X11()
library(lattice)
par(family="serif", cex=1.2)
2012 May 07
1
wireframe and par(mfrow)
Hello List,
I have some plots with the wireframe() function, and I'd like to
display them in a single jpeg file. I know that par(mfrow=c(x,y)) will
divide my display window in x rows and y columns, and although this
works with plot(), it looks like it's not working with wireframe.
here's my code:
library(lattice)
library(Cairo)
CairoJPEG("wiley-rank.jpeg", width=960,
2010 Apr 06
6
3-D response surface using wireframe()
I am working on plotting a response surface using wireframe(). The default style/orientation is
z
|
|
y |
\ |
\ |
\ |
\ |
\ |
\ |
\ |
\|________________x
0
Now what I want the orientation of axes is:
z
|
|
|
|
2006 Sep 22
4
Creating Movies with R
Dear All,
I'd like to know if it is possible to create animations with R.
To be specific, I attach a code I am using for my research to plot
some analytical results in 3D using the lattice package. It is not
necessary to go through the code.
Simply, it plots some 3D density profiles at two different times
selected by the user.
I wonder if it is possible to use the data generated for different
2009 Sep 23
2
[PATCH node] Introduces the virtual network administration functions.
Moved the node administration elements to a separate submenu.
Created a new network administration menu.
* users can define a network
* users can create a network
* users can destroy a network
* users can undefine a network
* users can list existing networks, including details
Each new command is also available as a separate command line executable
as well.
Signed-off-by: Darryl L. Pierce
2006 Oct 19
1
A question regarding Wireframe in Package Lattice
Hello,
The following code produces a quadrilateral:
q<-matrix(c(1,3,1,2,3,1,2,4,2,1,4,2),nrow=4,byrow=T)
qc<-xyz.coords(q)
wireframe(z~y*x,qc)
I have 2 questions
1) How can i remove the bounding box i.e the cube encompassing the
quadrilateral?
2) Is there any function to get the 2D coordinates of the
quadrilateral actually used in the final plot ? I could manually
2004 May 07
1
plotting planes and lines in wireframe()
Hi R-helpers
I would like to plot some planes which are perpendicular to the x-y
plane, such as x=y. Is there a way to do this in wireframe? I realize
that I am not plotting a function of x, y since there are infinite
number of z's that satisfy the above relation.... Hmm...
Somewhat related, I would also like to plot a line in 3 d space...
Finally, if you are feeling really brave, I