similar to: Color facets by z-level (solved by creating example)

Displaying 20 results from an estimated 5000 matches similar to: "Color facets by z-level (solved by creating example)"

2011 Mar 18
0
keep color range constant across three persp() graphs
Hi All. I have created two, 3-D, color graphs using persp(). Z values range from 1 to 100 on the first plot, and 0.5 to 50 on the second plot. I would like to keep the color range constant between the two graphs, rather than each graph showing the full range of colors. So the first graph should go from yellow to red and the second graph should go from yellow to orange. Below I present a
2007 Sep 10
1
persp() problem
I am having some trouble getting the persp() package to change the x and y axis on a 3d plot. It defaults to the [0,1] interval and when I try to change it I get errors. Example: This works: ------------ 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,
2012 Jul 05
1
Adding Text to a persp plot using specific coordinates
Hi folks, I'm experiencing some hassle to add some text on a persp plot... Here is the code to generate the persp plot: x <- seq(-1.95, 1.95, length = 30) y <- seq(-1.95, 1.95, length = 30) z <- outer(x, y, function(a,b) a*b^2) persp(x, y, z,xlim=c(-2,2),ylim=c(-2,2),zlim=c(-8,8), phi=30, theta=-30,nticks=8,ticktype="detailed") I've tried the text() function :
2009 Mar 29
2
number of ticks in a persp() plot
Hi, I am trying to specify four ticks (at 0,1,2,3 for the y axis) in a persp plot but the defaults overrule my specification and 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)
2008 Jun 12
1
Problems with mars in R in the case of nonlinear functions
Hi, I'm trying to use mars function in R to interpolate nonlinear multivariate functions. However, it seems that mars gives me a fit which uses only very few basis function and it underfits very badly. For example, I have tried the following code to test mars: require("mda") f <- function(x,y) { x^2-y^2 }; #f <- function(x,y) { x+2*y }; # Grid x <-
2002 Mar 18
2
persp(): add second plane (second, long question)
Thank you for your replies so far. Sorry for bothering you again, but I'm still not able to get what I need as I don't understand all parts of the replies (just using R for easy things....). Is there a code for plane3d() like some of you sent me for points3d()? I was not able to get that out of the scatterplot3d package... What I can do is to get the x,y and z-range for the xlim,ylim and
2009 Nov 22
1
"Over-coloring" facets on persp() plot
Dear R Community: Recently, I have managed to plot some really useful graphs of my research data using persp(). I have even figured out how to overplot rectangular regions (corresponding to submatrices) with a different color. This is accomplished by using par(new=T). I am now searching for a way to "highlight" a set of (possibly non-contiguous) facets with a specific color,
2011 Oct 27
2
vis.gam zlab problem
I am using the mgcv package to develop vis.gam plots and having 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
2010 Nov 25
1
Help in improving the style of R plots
Dear all, I am running a MCMC on my data, and I want to plot the results of the simulation. I want to dedicate a page in the PS file for each element in my sample, and in each page I need to plot 8 quadrants. In attachment you find my first attemp (just the first page). Here are my troubles (I'm sorry if they are stupid, but I am a newby with R): -) I need to substitute the greek letters
2005 Feb 16
5
Repeating grey scale in graph?
Dear R users, Could somebody tell me why the grey color ramp is repeated in this graph, eventhough the ramp values go from 0 to 1? I must be missing something obvious, but I can not see it! z <- c(0.064329041,0.117243316,0.161565116,0.19923015,0.231642175,0.259835539,0.284571226, 0.038507288,0.094184749,0.140959431,0.180803984,0.215159105,0.245096084,0.271412845,
2002 Nov 04
0
persp(), x- and y-axis with character strings
Dear R list, I want to plot the yield curve in a 3D graph: the x-axis refers to time; the y-axis refers to the maturities and the z-axis are the yields. The following code works fine: persp(y, x, as.matrix(ypper), xlab="Last 50 periods", ylab="Maturities (months)",zlab="Yields", zlim=c(3,6),theta=130, phi=15, col="Seagreen", box=T,
2004 Aug 10
1
persp, array and colors
Dear R-users, I'd like to plot a three-dimensional surface and at the meantime I'm using an array. I would like to have the values of my first matrix in the heights of the plot and the colors of the single facet taking into account the second matrix. I hope that the next code will help all of you to understand better my issue, Thanks in advance, Giancarlo ############################ ##
1999 Feb 01
0
persp on x,y,z
I have 3 vectors x,y,z: x<-c(-2.88,-1.92,-.96,0,.96,1.92,2.88,3.84, -1.92,-.96,0,.96,1.92,2.88,3.84, -.96,0,.96,1.92,2.88,3.84, 0,.96,1.92,2.88,3.84, .96,1.92,2.88,3.84, 1.92,2.88,3.84, 2.88,3.84, 3.84) y<-c(rep(-3.84,8), rep(-2.88,7), rep(-1.92,6), rep(-.96,5), rep(0,4), rep(.96,3), rep(1.92,2), 2.88) z<-c(.65,1.78,2.4,2.54,3.04,2.22,2.97,3.56, .745,1.287,1.98,1.91,2.02,2.24,2.95,
2017 Oct 19
1
overlaying points and lines on a surface3d rgl plot with axes
Hi R users and experts, I am interested in learning more about the use of 3D plots. Specifically, I want to add points and lines to a surface plot. And get the axes and labels 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
2011 Mar 29
1
Dirichlet surface
Dear list members, I want to draw surfaces of Dirichlet distributions with different parameter settings. My code is the following: #<begin code> a1 <- a2 <- a3 <- 2 #a2 <- .5 #a3 <- .5 x1 <- x2 <- seq(0.01, .99, by=.01) f <- function(x1, x2){ term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3)) term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
2012 Nov 05
0
slider control questions
DeaR UseRs, I have the following code (see below). It is working as expected although I have two problems/questions: - how can I set the size of the graph? It may sound silly, but I couldnt figure that out - is it possible to export this small "interactive aplication" to html or a latex document, or maybe pdf? Thank you for your attentions. Best wishes: Daniel the code:
2012 Jul 30
2
mgcv 1.7-19, vis.gam(): "invalid 'z' limits'
Hi everyone, I ran a binomial GAM consisting of a tensor product of two continuous variables, a continuous parametric term and crossed random intercepts on a data set with 13,042 rows. When trying to plot the tensor product with vis.gam(), I get the following error message: Error in persp.default(m1, m2, z, col = col, zlim = c(min.z, max.z), xlab = view[1], : invalid 'z' limits In
2003 Jun 01
1
persp & colors
Dear R experts! I use image() & persp() functions for color plotting z(x,y)-type graphics. In image() colors correspond to z-values, that's what I want. OTOH, in persp() the col option means: col: the color(s) of the surface facets. Transparent colours are ignored. This is recycled to the (nx-1)(ny-1) facets. but I'd like to persp()' colors behave like in
1998 Dec 04
1
contour labelling [was "Re: image ()"]
> From: Bill Simpson <wsimpson at uwinnipeg.ca> > Subject: Re: contour labelling [was "Re: [R] image ()"] > MIME-Version: 1.0 > > > We may be missing the crux here: was it to have a means of > > displaying such surfaces? > > Yes, bang on. I knew of the > existence of the Delaunay code in the R libraries. Yes I want > to make a picture that
2007 Mar 16
0
How can I place axis annotations away from axis?
Hello Experts I have the following codes and data for 2 interpolation plots. http://www.nabble.com/file/7206/3d_plot_data.txt 3d_plot_data.txt data<-read.table("3d_plot_data.txt", header=T) attach(data) par(mfrow=c(1,2)) library(akima) interpolation<-interp(rr,veg_r,predict) persp(interpolation,theta = -45, phi = 30, ticktype = "detailed", nticks=4, cex=0.8,