search for: zlab

Displaying 20 results from an estimated 143 matches for "zlab".

Did you mean: slab
2011 Oct 27
2
vis.gam zlab problem
...aving trouble figuring out how to relabel the z-axis (image attached). It is currently labeled as "linear predictor," but I would like to change it to a different name. Currently I am using this code: vis.gam(model1,theta=320,ticktype="detailed",color="gray",nCol=12, zlab="BCS") However, when run R states: Error in persp.default(m1, m2, z, col = col, zlim = c(min.z, max.z), xlab = view[1], : formal argument "zlab" matched by multiple actual arguments Any assistance would be greatly appreciated!! -Jared http://r.789695.n4.nabble.com/fi...
2009 Aug 30
3
Computer Modern Fonts in R graphic
...m", > "cm-lgc/fonts/afm/public/cm-lgc/fcmbi8a.afm", > "cmsyase.afm")) > postscriptFonts(CM=CM) > pdf("snxsm.pdf") > par(family="CM") > persp(sn,sm,z,xlab="SN", ylab="SM",zlab="VI",theta=-20,phi=20,r=5,shade=0.01,col=color[facetcol]) > dev.off() It works fine, until the persp() function, there I get: > persp(sn,sm,z,xlab="SN", ylab="SM",zlab="VI",theta=-20,phi=20,r=5,shade=0.01,col=color[facetcol]) > Error in persp.defau...
2010 Aug 09
1
creating pdf of wireframe
...light to dark grey for better visibility trellis.device(pdf,file="PostAll.pdf", width = 5, height = 5) trellis.par.set("plot.line", list(lwd=0.15)); top.left <- wireframe(post1, xlab=list("p(adj-N)", cex=.7, rot=30),ylab=list("p(num-N)", cex=.7, rot=-45),zlab=list("posterior", cex=.7, rot=90),col.regions=newcols(100), drape=TRUE,colorkey=TRUE, lwd=0.15, zoom=1, scales = list(z = list(distance = 0.5), x = list(distance = 0.5), y = list(distance = 0.5))); top.right <- wireframe(post2, xlab=list("p(adj-N)", cex=.7, rot=30),ylab=list...
2011 Sep 06
1
object.size() not recognized within .First()
...,where) load(where,.GlobalEnv) setwd(rwhere) } cat("\n") cat(paste("Okay, I've got you working/saving in ", getwd()[1],"\n",sep="")) } BIG=function(n=10,removeask=T) { z <- sapply(ls(pos=1), function(x)object.size(get(x))) zlab=names(z) z=as.matrix(rev(sort(z))) zlab=as.matrix(rev(sort(zlab))) myzmat=data.frame(id=1:n,name=zlab[1:n],size=z[1:n]) row.names(myzmat)=NULL print(myzmat) cat("\nGive c() vector of id's to delete, or return to exit\n") thechosen=readline() if (thechosen==&quo...
2011 Sep 09
1
rgl: axis/viewport/box problems in persp3d()
Dear expeRts, I am a new user of rgl, below is my first trial to plot a simple function in 3d. I managed to put the axes in the right locations, but: (1) The xlab, ylab, and zlab arguments are ignored; how can I put in axes labels? (2) Since I removed the axes in persp3d() the viewport is too small; is it possible to keep the size of the viewport? (3) The box is not correctly drawn, there are two "holes", one in (0,0,1) and one in (1,1,0); how can I fix th...
2007 Oct 29
2
Changing size of lattice plot?
...andom numbers, as follows: library(gsl) library(lattice) q <- qrng_alloc(type="sobol", 3) npoints <- 200 rs <- qrng_get(q,npoints) # Plot the normal variates in a 3-dim cube p1 <- cloud(rnorm(npoints) ~ rnorm(npoints) + rnorm(npoints), xlab="x", ylab="y", zlab="z", pch=21, main=paste(npoints,"3-Dimensional ~N(0,1)")) p2 <- cloud(rs[,1] ~ rs[,2] + rs[,3], xlab="x", ylab="y", zlab="z", pch=21, main=paste(npoints,"3-Dimensional Sobol")) print(p1, split=c(1,1,2,1), more=TRUE) print(p2, split=c(2,...
2007 Sep 10
1
persp() problem
...------------ D <- c(1,2,3,4,5,6,7,8,9,10) M <- c(11,12,13,14,15,16,17,18,19,20) DM <- cbind(D,M) persp(DM, theta = 40, phi = 30, expand = 0.5, col = "lightblue", ltheta = 120, shade = 0.75, ticktype = "detailed", xlab = "X", ylab = "Y", zlab = "Z") --------------------- But I want the axis to count 1 by ones. So I try: ----------------- D <- c(1,2,3,4,5,6,7,8,9,10) M <- c(11,12,13,14,15,16,17,18,19,20) DM <- cbind(D,M) x <- 1*0:10 y <- 1*0:20 persp(x,y,DM, theta = 40, phi = 30, expand = 0.5, col = "lig...
2004 Aug 10
1
persp, array and colors
...1:6 y <- 1:5 z <- mm[,,1] z1 <- mm[,,2] ## surface with heights and colors ## related to the first matrix (no good) persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = colo, ltheta = 120, ticktype = "detailed", xlab = "X", ylab = "Y", zlab = "values" ) ## surface with heights and colors ## related to the second matrix (no good as well) persp(x, y, z1, theta = 30, phi = 30, expand = 0.5, col = colo, ltheta = 120, ticktype = "detailed", xlab = "X", ylab = "Y", zlab = "value...
2011 Jul 28
2
Animated gif or something similar in R?
...dotcol=c(rep('red2',5),rep('green2',5),rep('blue2',5),rep('yellow1',5),rep('purple2',5)) ) #this call doesn't show the right colors--why? plot3d(clusset, xlim=c(0,25), ylim=c(0,25), zlim=c(0,25),xlab='',ylab='',zlab='', col=clusset$dotcol, radius=1, type='s') #but if I redefine the colors again and call, it does clusset$dotcol<-c(rep('red2',5),rep('green2',5),rep('blue2',5),rep('yellow1',5),rep('purple2',5)) plot3d(clusset, xlim=c(0,25), ylim=c(0,25)...
2013 Oct 15
1
plotting a marginal distribution on the plane behind a persp() plot
...ginal distribution on the plane behind a persp() plot. My existing code is: library(MASS) X <- mvrnorm(1000,mu=c(0,0),Sigma=matrix(c(1,0,0,1),2)) X.kde <- kde2d(X[,1],X[,2],n=25) # X.kde is list: $x 1*n, $y 1*n, $z n*n persp(X.kde,phi=30,theta=60,xlab="x_b",ylab="x_a",zlab="f") ->res Any suggestions are very appreciated. Thank you, Colin [[alternative HTML version deleted]]
2011 Oct 07
1
axes3d/bbox3d - axis values not fixed
...r normal (auto-hide) and I'd like the other two axes to be custom character vectors that auto-hide. Example: x <- 1:10 y <- 1:10 z <- matrix(outer(x-5,y-5) + rnorm(100), 10, 10) open3d() persp3d(x, y, z, col="red", alpha=0.7, aspect=c(1,1,0.5),xlab='',ylab='',zlab='', axes=F) For the above, axes=F for demonstration purposes only. Now when I call: axes3d() ...the axis values hide/behave the way I want, but I want my own characters in there instead of the values that default. Trying again: open3d() persp3d(x, y, z, col="red", alpha=0.7, asp...
2017 Jun 01
2
Question on function "scatterplot3d"
...h! Hanna C <- runif(30) B <- rep(1:3, each=10) A <- rep(1:10,3) scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red", main = "", grid=TRUE, col.grid="lightgreen", xlab="x", ylab="y", zlab="z") [[alternative HTML version deleted]]
2017 Oct 19
1
overlaying points and lines on a surface3d rgl plot with axes
...bels plotted also. Here is what I have tried with an example data set : library(rgl) vol2 <- 2*volcano # Exaggerate the relief library(reshape) mvol2 <- melt(vol2) str(mvol2) # First, persp and persp3d plots do not succeed #persp(mvol2$X1,mvol2$X2,vol2,xlab="X2",ylab="X1",zlab="value",axes=TRUE,ticktype="detailed",cex.lab=1) persp3d(mvol2$X2,mvol2$X1,vol2,axes=TRUE) # Error - Increasing 'x' and 'y' values expected ?? # Next, tried to get the axes with the plot3d command plot3d(mvol2$X1,mvol2$X2,mvol2$value,type="n",xlab=&quot...
2008 Aug 02
3
Bubble plots
Is there a way to create a 'bubble plot' in R? For example, if we define the following data frame containing the level of y observed for 5 patients at three time points: time<-c(rep('time 1',5),rep('time 2',5),rep('time 3',5))
2008 Feb 15
2
wire.frame tick labels from matrix
...ep(c("X1","X2","X3","X4","X5","X6"),6) meanz=colMeans(z) mat.x <- matrix(meanz, nrow=6, ncol=6, byrow=TRUE) colnames(mat.x)<- c(0,1,2,3,4,5) rownames(mat.x)<-c(0,5,10,15,20,25) mat.x library(lattice) wireframe(mat.x,drape=TRUE,zlab=list("Proportion Error of Estimate", rot=90), xlab="Resistance Error (%) ",ylab="Length Error (%)",scale=list(arrows=FALSE)) detach(z) detach(sen) -- Keith Cox, Ph.D. Sitka Sound Science Center Fisheries Biologist P.O. Box 464 Sitka, Alaska, 99835 907 752-0563 marl...
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]]
2002 Aug 12
1
question about cloud() in lattice package
...any way of representing such information with the cloud() function. Is there a way I can draw lines along each axis on the plot. Any help would be greatly appreciated. Many Thanks Rishabh THE SCRIPT: s3d <- scatterplot3d(x, y, z, type="n", xlab="x", ylab="y", zlab="z") for (g in unique(G)) { bxp.stx <- boxplot.stats(x[G==levels(G)[g]]) bxp.sty <- boxplot.stats(y[G==levels(G)[g]]) bxp.stz <- boxplot.stats(z[G==levels(G)[g]]) lines(s3d$xyz.convert(bxp.stx$stats[c(3, 3)], bxp.sty$stats[c(3, 3)], bxp.stz$stats[c(1, 5)])) l...
2008 Jan 26
2
scatterplot3d with categorical data
...nly want 3 points on each axis. So I try: require(scatterplot3d) mymat<-data.frame( x=c(1,1,1,2,2,2,3,3,3), y=c(1,2,3,1,2,3,1,2,3), z=c(1,2,3,4,5,6,7,8,9)) scatterplot3d(mymat, type="h", lwd=5, pch=" ", xlab="xlabel", ylab="ylabel", zlab="zlabel", xlim=c(1,3), ylim=c(1,3), lab=c(3,3), x.ticklabs=c("Low","Medium","High"), y.ticklabs=c("Green","Blue","Black"), main="My Bar Plot") But I still get x ticks at 1, 1.5, 2, 2.5, 3 on both x and y ax...
2008 Nov 26
1
Smoothed 3D plots
...2, 1, 1, 0, 2, 1, 2, 0, 1, 2, 2, 2, 0, 1, 1, 0, 0, 0)), .Names = c("y", "h4", "h11"), class = "data.frame", row.names = c(NA, -28L)) # ------------ # Some plots # ------------ # Option 1 require(Rcmdr) with(res, scatter3d(h4,ypred,h11, xlab='Chr4',zlab='Chr11', ylab='Ratio',fit=c("linear","quadratic")) ) # Option 2 require(scatterplot3d) with(res, scatterplot3d(h4,ypred,h11, xlab='Chr4',zlab='Chr11',ylab='Ratio') ) # ------------- # Session info # ------------- R version 2.8.0 Patched...
2009 Mar 29
2
number of ticks in a persp() plot
...I obtain seven of them. Is it possible to gain full control over them in such a plot? Here is my code: matlines=matrix(c(1:7,3:9,3:9,2:8),nrow=7,ncol=4) persp(x=seq(1,7,1),y=seq(0,3,1),z=matlines,theta=-30,phi=25,zlim=c(0,10),d=5,ticktype="detailed",xlab="x", ylab="y",zlab="z") [[alternative HTML version deleted]]