Displaying 20 results from an estimated 8000 matches similar to: "arrows on contour lines"
2004 Sep 08
3
do.call("[", ...) question
Hi again everyone
I have an arbitrarily dimensional array "a" and a list "jj" of length
length(dim(a)). The elements of jj are vectors of indexes.
How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ?
Toy example follows:
a <- matrix(1:30,5,6)
jj <- list(5:1,6:1)
I want the following
a[ jj[[1]],jj[[2]] ]
How do I do this?
OBAttempts:
2004 Oct 26
1
persp(), scatterplot3d(), "..." argument
Hello list.
I very often need 3d scatterplots, and use scatterplot3D quite a lot.
I am trying to modify persp() to plot scatterplots, and make use of
the theta and phi arguments that persp() offers. I am having some
difficulty passing the correct arguments to persp().
Here is my function so far. Much of it is copied from the persp() manpage.
points3d <- function(x,y,z,
2004 Oct 26
1
persp(), scatterplot3d(), "..." argument
Hello list.
I very often need 3d scatterplots, and use scatterplot3D quite a lot.
I am trying to modify persp() to plot scatterplots, and make use of
the theta and phi arguments that persp() offers. I am having some
difficulty passing the correct arguments to persp().
Here is my function so far. Much of it is copied from the persp() manpage.
points3d <- function(x,y,z,
2010 Nov 19
1
Using image/contour with unevenly spaced data...
Is it possible to plot unevenly spaced data with image/contour function?
Below is an example of the type uneven data that I'm trying to plot with
image/contour functions. For example, I would like to have the x-distance on
the x-axis and y-distance on the y-axis and then the temperature values
determine the color used. Unfortunately this data was sampled such that it is
not evenly
2004 Oct 01
2
multiple dimensional diag()
Hi
I have two arbitrarily dimensioned arrays, "a" and "b", with
length(dim(a))==length(dim(b)). I want to form a sort of
"corner-to-corner" version of abind(), or a multidimensional version
of blockdiag().
In the case of matrices, the function is easy to write and if
a=matrix(1,3,4) and b=matrix(2,2,2), then adiag(a,b) would return:
[,1] [,2] [,3] [,4] [,5]
2010 Nov 21
1
Alternatives to image(...) and filled.contour(...) for 2-D filled Plots
By any chance are there any alternatives to image(...) and filled.contour(...)
I used Rseek to search for that very topic, but didn't turn over any leads...
http://www.rseek.org/?cx=010923144343702598753%3Aboaz1reyxd4&newwindow=1&q=alternative+to+image+and+filled.contour&sa=Search&cof=FORID%3A11&siteurl=www.rseek.org%252F#1238
I'm sure there are some out there, but
2009 Oct 13
1
vis.gam() contour plots
Greetings,
I have what I hope is a simple question. I would like to change my
contour interval on the vis.gam( plot.type="contour") in the mgcv
package. Is this a situation where I need to modify the function or is
there a default value I can change?
Thanks
2011 Dec 22
1
overlaid filled contour plots
I'm trying to make a set of contour plots of bivariate kernel density
estimates, showing three such plots overlaid,
similar to this plot
http://euclid.psych.yorku.ca/SCS/Private/Test/ridge-boot2.pdf
except that I would like to have the contours *filled* (using
transparent colors). To make this reproducible, I've
saved the results of KernSmooth::bkde2D() in the following file:
2012 Sep 19
2
Help reproducing a contour plot
Hi All,
I am trying to reproduce this using R instead.
[image: Full-size image (38 K)]
I tried using the following code
*SChla <- read.csv("SM_Chla_data.csv")*
*Atlantis <- SChla[16:66,]*
*head(Atlantis)*
*
*
Seamount Station Depth Pico Nano Micro Total_Ch dbar Latitude
Longitud
16 Atlantis 1217 Surface 0.0639 0.1560 0.0398 0.2597 2.082 -32.71450
57.29733
2004 Jun 11
4
rownames of single row matrices
Hi
I want to extract rows of a matrix, and preserve rownames even if only
one row is selected. Toy example:
R> a <- matrix(1:9,3,3)
R> rownames(a) <- letters[1:3]
R> colnames(a) <- LETTERS[1:3]
R> a
A B C
a 1 4 7
b 2 5 8
c 3 6 9
Extract the first two rows:
R> wanted <- 1:2
R> a[wanted,]
A B C
a 1 4 7
b 2 5 8
rownames come through fine. Now extract just
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
2013 Jan 16
1
setting the legend scale in contour plots
Hi,
I'd like to compare SST data for year 2000 with SST for year 2001. I managed
to get filled contour plots showing monthly SST for both years (12 plots for
each year, 24 plots in total). In order to compare year 2000 and year 2001,
however, I'd need to have the same legend scale (same color bar) in both
years plots.
Thus, my question is: is there a way to set the legend scale in
2011 Feb 11
2
Using filled.contour and contour functions together
Dear R help contributors,
I'd like to plot ground temperature with time on X-axis and depth on Y-axis
on this datasets ( http://r.789695.n4.nabble.com/file/n3301033/NEdaily.csv
NEdaily.csv ), and to do so I use the following commands:
library(RSEIS)
xNE <- seq(1, as.numeric(as.Date(max(NEdaily[[1]])) -
as.Date(min(NEdaily[[1]]))), 1)
yNE <- rev(c(-0.3, -0.5, -0.7, -0.9, -1.1,
2008 Apr 23
4
filled contour plots
hello everyone,
I was wondering if anybody can help me solve 2
problems related to the function filled.contour.
I am entering the following R command:
filled.contour(xx,yy,P1, nlevels=20,color=cm.colors,
plot.axes={
contour(xx,yy,P1,add=T,col="grey",
nlevels=20, drawlabels=F)
axis(1,1:length(xx),labels=xlabels)
2004 Nov 15
2
argument rationalization
Hi
I am writing a bunch of functions that take two, three or four
arguments. These functions operate on vectors of the same length;
but I want the function
to behave sensibly if one or more arguments are scalars. "+" does
this for two arguments:
"+"(1:10,3) # interpreted as "+"(1:10,rep(3,10))
But my functions can take more arguments. Say f() takes three:
2007 Jan 01
4
Help with filled.contour()
The following plot is a first approximation to what I need:
***********************************
mu1 <- 0
mu2 <- 5
s <- 1
x <- seq(-2.5, 7.5, length = 41)
y <- seq(-2.5, 2.5, length = 41)
f <- function(x,y){
term1 <- 1/(2*pi*sqrt(s*s))
term2 <- -1/2
term3 <- (x - mu1)^2/s
term4 <- (y - mu1)^2/s
term5 <- (x - mu2)^2/s
term1*(.5 * exp(term2*(term3 + term4)) + .5 *
2005 Jun 13
3
extracting components of a list
Hi
how do I extract those components of a list that satisfy a certain
requirement? If
jj <- list(list(a=1,b=4:7),list(a=5,b=3:6),list(a=10,b=4:5))
I want just the components of jj that have b[1] ==4 which in this case
would be the first and
third of jj, viz list (jj[[1]],jj[[3]]).
How to do this efficiently?
My only idea was to loop through jj, and set unwanted components to
NULL,
2004 Oct 18
2
concatenating lists elementwise
Hi
How do I concatenate two lists element-by-element?
Example:
list.1 <- list(temperature=c("hot","cold") , size=c("big","medium"))
list.2 <- list(temperature=c("lukewarm") , size=c("massive","tiny"))
list.wanted <- list(temperature=c("hot","cold","lukewarm") ,
2002 Dec 04
1
Help: add arrows on a filled.contour figure
Dear All
I would like to use filled.contour to plot something with arrows on it. I did it in this way:
filled.contour(1:nx,1:nz,u,col=gray(rev((0:20/20))))
for (j in zseq ) for (i in xseq) arrows(i, j, i+u[i,j],j+w[i,j],length=angleng,angle=angarrow,code=2, lwd=1,col="black")
The peoblem is that the arrows use the whole device area, including the key on the right hand side of the
2004 Nov 11
1
axis lines crossing at origin
Hi
how do I make my axes cross at the origin?
x <- seq(from=-pi,to=pi,len=30)
plot(x,sin(x))
makes the axes cross at about (-pi,-1).
How do I get my x and y axes to cross in the centre of the graph,
with the sine curve passing through
the intersection?
I couldn't find anything in ?par or ?axis; searching R-FAQ for "axis"
didn't help.
--
Robin Hankin
Uncertainty