similar to: overlaying a contour line in a levelplot

Displaying 20 results from an estimated 1000 matches similar to: "overlaying a contour line in a levelplot"

2005 Apr 20
7
A question about function behavior
Hello, I have been trying to figure this one out, but don't seem to go anywhere. I have a function like this: a = function(t) { max(0,t+1) } very simple, but if I pass a vector of n values to this function I expect n evaluations of max and instead I get only one value (the largest value of them all..). Is there anyway to do this without invoking a for loop? thanks, Jorge
2009 Aug 19
1
Lattice: Drawing a single contour line with a negative value fails
Hi everybody, I want to add a single contourline to a levelplot. While everything works fine if the value at which the line should be drawn is positive, there is an error if the value is negative: library(lattice) my.panel <- function(..., at, contour=FALSE, labels=NULL) { panel.levelplot(..., at=at, contour=contour, labels=labels) panel.contourplot(..., contour=TRUE,
2007 Jul 24
3
Overlaying a single contour from a new data array in levelplot
Dear R-Help community, I am trying to overlay a single contour line over a correlation plot using levelplot in the lattice package. These are the two arrays: 1) a correlation plot over Africa - so each grid square is a different colour dependent on correlation - this is in an array: result_cor with dim[465,465] 2) a single contour line from a ***different data source*** - this is from data
2009 Feb 27
1
levelplot help needed
Hi there, I'm looking for someone who can give me some hints how to make a nice levelplot. As an example, I have the following code: # create some example data # -------------------------------------- xl <- 4 yl <- 10 my.data <- sapply(1:xl, FUN = function(x) { rnorm( yl, mean = x) }) x_label <- rep(c("X Label 1", "X Label 2", "X Label 3", "X
2010 Apr 21
1
overlaying a levelplot on a map plot
I've generated a levelplot showing the density distribution of a species derived from survey transects, with lon, lat co-ordinates. I'd like to overlay this on a map of the study region specified by: map('worldHires', xlim = range(mlon), ylim = range(mlat)), where mlon, mlat specifies the study region. I've tried plotting the map first, then using the options: 'add=TRUE,
2010 Jul 27
6
Eval() or parse() do not work inside function
I am writing a function where the arguments are names of objects or variable names in a data frame. To convert the strings to the objects I am using eval(parse(text=name)): f.graph.two.vbs<-function(dataname,v1){ val<-paste(dataname,v1,sep="$") val<-eval(parse(text=val)) val } However running this returns an error:
2006 Feb 10
1
the proper way to use panel functions in lattice package?
Hi, I was trying to stack a topographic map readed in from esri shapefile with a contour map and a vector map. However, the plotMap(maptools) and contourplot(lattice) do not seem to work well on top of each other. Here is part of my code. xrange<-range(225000:350000) yrange<-range(2685000:2810000) basemap <- read.shape("Twn25_town_dxf_Polygon.shp")
2004 Aug 31
1
add single contour line to levelplot
Hello, I want to add a single contour line to a levelplot but can't figure out how to do it 'on-the-fly'. When I include the last line in the code below, I get the following error: Error in NextMethod("[") : Argument "subscripts" is missing, with no default Any tips on how to fix this are greatly appreciated! Ian Jonsen
2009 Nov 09
1
How to change color the default in levelplot() ?
Dear R communities May I seek your advices on how to change color the default in levelplot(), e.g. from the default of pink and light blue, to e.g. red and green ? The levelplot function has 1 of the arguments being panel (which is actually panel.levelplot), but I am not sure where the commands to alter the color. For example, I type: p1<-levelplot(my.mat,colorkey=FALSE), how could I
2004 Feb 25
2
levelplot add line
R folks, I can't seem to find the instructions in the help files for the lattice package that explain how to add lines, such as with lines() or ?, to a levelplot. I'd be grateful if someone could point me in the proper direction. Cheers, Jeff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jeff Jorgensen Center for Limnology jcjorgensen at wisc.edu
2006 Sep 13
1
forcing levelplot to use relative cuts (ie cuts for each panel)
Dear guRus, I'm having trouble producing a levelplot with relative cuts for each panel (my data has large differences in scales, so I want to use quantiles for each panel). My attempts to change the 'at' argument in panel.levelplot function have not met with success. Below is a toy example. xy <- expand.grid(x = 1:3, y = 1:3) aaa <- rbind(cbind(xy, z = 1:9, site =
2005 Jan 26
2
postscript() and levelplot() in a for loop
Hi, I like to produce a series of levelplot graphs in postscript file, so I put the trunk of codes including postscript() and levelplot() in a for loop. The codes work fine outside the loop, but only produce empty .ps file when being put within the loop. Is it a problem associated with postscript() or levelplot()? How to get around the problem? Many thanks! Yan [[alternative HTML
2008 Oct 17
1
padding "bug" in lattice/levelplot
Hello, I have encountered some unexpected behaviour with levelplot that may simply be a misunderstanding on my part. If I create a levelplot from a matrix with named columns, some "padding" space appears at the top and bottom of the heatmap. Here is an example, and I've used panel.fill to make the space I'm speaking of evident (in green).
2010 May 21
3
Levelplot
Dear mailing list, I am trying to find out, how do a levelplot without labels on the x- and y-axis. The labels=FALSE does not work...can anyone help me? m <- matrix(1:25, ncol=5) levelplot(m, labels=F) Regards, Benedikt
2004 Apr 27
1
helps on levelplot
I'm a new user of levelplot, and are not familiar with the terminology very well. Is the bar alongside the levelplot indicating color or shade call "colorkey"? I have to adjust the size of its label, but couldn't make it so far. This is how I did: levelplot(z~x*y, grid, at=seq(0,1,by=0.1), colorkey=list(labels=list(cex=2))) But I got error message "Error in
2010 Mar 31
2
lattice: how to add points to the plot generated by levelplot()?
I am using levelplot() function from pkg:lattice and I want to add some points to the plot generated by levelplot() similarly as in basic R graphic sequence: plot(...); points(...), but it does not work. I was reading documentation for lattice, but so far without much success. I would very much appreciate some tips. Best regards, Ryszard
2013 Feb 20
1
Problem with levelplot() in a loop
Dear R users, I am trying to print heatmaps in a loop (with a pause). Idea is to visualize changing correlations over time and for testing I wrote this simple (reproducible) code below. My problem is that levelplot() does not produce any output when I run the code (though heatmap does). Ideally I would like to use levelplot() as it produces a neat index on the side indicating the color and the
2010 Mar 26
1
How can I make a lattice::levelplot block size uniform
Dear lattice::levelplot users, I would like to use levelplot to plot uniformly sized blocks. Here is an example: require (lattice) u = runif(10) * 10 v = runif(10) * 10 z = runif(10) levelplot ( z ~ u + v, aspect="iso" ) The resultant figures have points (blocks) that are of variable size that attempt to fill in the space along each u, v dimension. Is it possible to force each point
2007 Jun 27
1
levelplot in lattice
Hi, I'm new to lattice. So please kindly be patient with me. I'm trying to arrange groups of levelplots into 3 rows as follows: Row1: Probabilities as functions of x and y, and conditioned on an event factor vector factor("a","b","c") Row2: Number of days as functions of x and y, and conditioned on, again the same event
2004 Mar 09
2
levelplot problems !!!
Dear R users, I have changed my R version to the new 1.8.1 and some problems appears when using the previous levelplot code. This is a simple example: a <-1:10 b <-11:20 j <- rnorm(100) grid<-expand.grid(a = a, b = b) levelplot(j~a*b, grid) Normaly in my previous vs this was suffice to produce the levelplot. Now, an empty R graphics device appears with the following error