Displaying 20 results from an estimated 191 matches for "zlim".
Did you mean:
ylim
2011 Oct 24
1
Adding points to a wireframe: 'x and units must have length >0' error
...gridd$z
data.frame(x = runif(10, -4, 0), y = runif(10, 0, 40))-> pts1
pts1$z <- pts1$x*pts1$y
# plot
wireframe(z ~ y*x, gridd, drape = TRUE, colorkey= TRUE,
scales = list(arrows = FALSE),
pts = pts1,
panel.3d.wireframe =
function(x, y, z,xlim, ylim, zlim, xlim.scaled, ylim.scaled,
zlim.scaled, pts1, ...)
{
panel.3dwire(x = x, y = y, z = z,
xlim = c(-4, 0),
ylim = c(0, 40),
zlim = c(-160, 0),
xlim.scaled = c(...
2008 Apr 30
2
wireframe - add data points
...en[,2:2]
z <- punten[,3:3]
pts <- data.frame(x=x,y=y,z=z)
##end import original data##
wireframe(status~totalfrost*logtps,abc,scales=list(arrows=TRUE),drape=TRUE, screen =list (x=15, y=-50, z=-105), pts = pts,
panel.3d.wireframe =
function(x, y, z,
xlim, ylim, zlim,
xlim.scaled, ylim.scaled, zlim.scaled,
pts,
...) {
panel.3dwire(x = x, y = y, z = z,
xlim = xlim,
ylim = ylim,
zlim = zlim,...
2012 Feb 09
2
Lattice 3d coordinate transformation
...(0,1,l=10),function(x,y,...)
predict(fit,data.frame(x=x,y=y)))
})
##
# This works to get contours:
require(lattice)
cloud(z~x+y|g,data=d,layout=c(2,1), type='h', lwd=3, par.box=list(lty=0),
scales=list(z=list(arrows=F,tck=0)),
panel.3d.cloud = function(x, y, z,rot.mat, distance,
zlim.scaled, nlevels=20,...){
add.line <- trellis.par.get("add.line")
clines <- contourLines(surf[[packet.number()]],nlevels = nlevels)
for (ll in clines) {
m <- ltransform3dto3d(rbind(ll$x-.5, ll$y-.5,
zlim.scaled[1]), rot.mat,...
2011 Mar 04
1
lattice: wireframe "eats up" points; how to make points on wireframe visible?
...t;- apply(grid, 1, f)
pt.x <- c(0.2, 0.5)
pt.y <- c(0.6, 0.8)
eps <- 0.25
pts <- rbind(c(pt.x, f(pt.x)-eps), c(pt.y, f(pt.y))) # points to add to the wireframe
wireframe(z~x*y, pts=pts, aspect=1, scales=list(col=1, arrows=FALSE),
panel.3d.wireframe = function(x,y,z,xlim,ylim,zlim,xlim.scaled,
ylim.scaled,zlim.scaled,pts,...){
panel.3dwire(x=x, y=y, z=z, xlim=xlim, ylim=ylim, zlim=zlim,
xlim.scaled=xlim.scaled, ylim.scaled=ylim.scaled,
zlim.scaled=zlim.scaled, ...)
panel.3dscatter(x=p...
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?
2012 Feb 05
0
Lattice: correct use of ltransform3dto3d to plot a surface under a cloud ?
...er(seq(0,1,l=10),seq(0,1,l=10),function(x,y,...)
predict(fit,data.frame(x=x,y=y)))
})
###
require(lattice)
# Modified code for plot 13.7 [changed: build clines from surf, -.5
for xy coords (why? don't know, works :), 3dscatter not wire]
panel.3d.contour <- function(x, y, z,rot.mat, distance,
zlim.scaled,nlevels=20,...)
{
add.line <- trellis.par.get("add.line")
clines <- contourLines(surf[[packet.number()]],nlevels = nlevels)
for (ll in clines) {
m <- ltransform3dto3d(rbind(ll$x-.5, ll$y-.5, zlim.scaled[1]),
rot.mat, distance)
panel.lines(m[1,], m[2...
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))
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
2005 Mar 03
1
image() z-values beyond zlim
Dear useRs,
When plotting with image(), I would like the z-values
that extend beyond the upper zlim to be indicated with
one colour, or preferably with som sort of hatching,
as I'm printing in black and white. By default these
values just show up as blank areas in the image. I've
tried all sorts of things, but nothing seems to work
for me.
Any solutions would be greatly appreciated.
c...
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
2006 Feb 05
1
wireframe zlim option
...zero of course dominate
the plot (and all points in the range from 0 to 10 seem to just have the
same height) and as I evaluate more of the points close to 0 this behavior
is obvious. Therefore I would like to restrict the z-values plotted. I
couldn't find any help for that and the usual "zlim=c(0,30)" (which should
only plot the z-values lying in the range from 0 to 30) did not work for
the wireframe function of the lattice package.
The call I tried was
>library(lattice)
>wireframe(z~x*y,zlim=c(0,30),drape=T,distance=0,colorkey=list(tick.number=6))
Any hints are appreciated...
2012 Sep 25
1
RGL plot : cex and zlim arguments do not work
Dear all,
I have a quiet simple problem (shared by a collegue) but no solution at
yet. The arguments I use in bbox3d or text3d do not have any effect on the
graph. I need to use 'cex' and 'zlim' but It does not work. Maybe my
problem could appear trivial but I have spent a lot of time on that.
If you have a solution, please let me know!
stephane
[[alternative HTML version deleted]]
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
2012 May 02
1
rgl.Sweave not producing transparency in pdf plots with alpha
...echo=FALSE, grdevice=rgl.Sweave, fig=TRUE, width=5, height=5,
resolution=100, outputtype=pdf, pdf=TRUE>>=
library(rgl)
data(volcano)
z <- 2 * volcano # Exaggerate the relief
x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W)
zlim <- range(y)
zlen <- zlim[2] - zlim[1] + 1
colorlut <- terrain.colors(zlen) # height color lookup table
col <- colorlut[ z-zlim[1]+1 ] # assign colors to heights for each point
#open3d()
surface3d(x, y, z, color=col, back="lines", alpha=0.75)
@
\end{figure}
\end{document}
2010 Jul 30
2
Layering multiple persp plots
Hi all,
I've got two persp plots with Identical X and Y's, and I'd like to plot them
on the same graph, so that it is obvious where one plot is above the other.
I can't find any mention of this anywhere. Do I need to use wireframe?
Any help is appreciated.
Thanks,
--
Ian Bentley
M.Sc. Candidate
Queen's University
Kingston, Ontario
[[alternative HTML version deleted]]
2017 Jul 26
2
axis() after image.plot() does not work except if points() is inserted between
...25, 30, 12, 22, 32, 35, 13, 25, 38, 40), nrow=3)
(pplt <- par()$plt)
#### [1] 0.08844944 0.95469663 0.14253275 0.88541485
# original problem. Axis() not shown
image.plot(D, col=rev(heat.colors(128)),bty="n", xlab="Lines",
ylab="Columns", cex.lab = 0.5, zlim=range(D, na.rm=TRUE),
las=1, axes=FALSE)
# Check the value of par()$plt; it is indeed modified
par()$plt
#### [1] 0.08844944 0.86408989 0.14253275 0.88541485
# axis() does not work
axis(1, at=seq(from=0, to=1, length=nrow(D)), labels=0:2, cex.axis=0.5)
axis(2, at=seq(from=0, to=1, lengt...
2006 Feb 20
1
Further rgl()/spheres3d() query
...ere from the second
argument appear as flat dark circles. Also the text3d() command only seems
to work for a couple of the positions, with no text added in most cases.
Could anyone offer any suggestions?
g.pca <- prcomp(RtG , retx = TRUE)
scale <- 0.4
bg3d("black")
amp <- 6
zlim <- amp*range(z)
zlen <- (zlim[2] - zlim[1])*100
colorlut <- terrain.colors(zlen) # height color lookup table
col <- colorlut[ ((z*amp)-zlim[1])*100+1 ] # assign colors to heights
surface3d(x,y,z*amp,color=col)
for (i in 1:30) {
for (i in 1) {
pc <- g.pca$rotation[,i]
pc.pos &...
2011 Feb 16
3
image() with a vector
Hi,
I have a vectors x and z, for example,
x <- 0:20
z <- round(runif(20,1,7))
y <- 0.5
and I want to display z as an image. However if I then call image() with a vector
image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),xlab="Year",ylab="Action",yaxt="n",xaxs="r",yaxs="r")
then I get the error
Error in image.default(x, y, t(z), zlim = c(1, 7), col = heat.colors(7), :
dimensions of z are not length(x)(-1) times length(y)(-1)
However,...
2017 Jul 25
0
axis() after image.plot() does not work except if points() is inserted between
...7))
> D <- matrix(c(10, 20, 25, 30, 12, 22, 32, 35, 13, 25, 38, 40), nrow=3)
> p0 <- par(no.readonly=TRUE)
> image.plot(D, col=rev(heat.colors(128)),bty="n", xlab="Lines",
> ylab="Columns", cex.lab = 0.5,
> zlim=c(min(D, na.rm=TRUE),max(D, na.rm=TRUE)),
> las=1, axes=FALSE)
> p1 <- par(no.readonly=TRUE)
> par("usr")
> par("xpd")
> # if you remove this points() function, axis will show nothing.
> points(1.5, 1.5, type="p"...
2006 Aug 15
0
zlim not working in persp3d
Hi list,
I'm trying to limit the z axis plotted using persp3d {rgl} to a given
range. I'm trying the following statement
persp3d(g0,pa,D, xlim=range(g0),ylim=range(pa), zlim=range
(zbounds),col="lightblue")
where g0 and pa are both a range of 20 numbers from 0.05 to 1, and D
is a 20 x 20 matrix with values ranging from 0 to 30000. I'm trying
to set a cap on the Z displayed in the surface to 1000 so I can see
the lower levels in greater detail, bu...