similar to: How to color a region in a contour plot with the contour being the boundary?

Displaying 20 results from an estimated 3000 matches similar to: "How to color a region in a contour plot with the contour being the boundary?"

2007 Feb 22
3
several Filled.contour plots on the same device...
hello - a question about filled.contour plots, for which i haven't found a response in previous posts - sorry if already treated. i'd like to draw several filled.contour plots (that is, maps) on the same device (a postscript file, actually). I know about layout(matrix) , split.screen or par(mfrow) : it works well for simple plots, but with filled.contour plots, i get several pages
2003 Jan 21
1
[R] proposal: lattice/levelplot: panel.catlevelplot
I suggest to add a panel function to levelplot (or perhaps to an other 3d lattice function) which is able to translate the z values into the size of the rectangles. It could be used to display categorical data. I append the proposed code and two examples: - panel.catlevelplot() - example1.catlevelplot.esoph() - example2.catlevelplot.esoph() Wolfram Fischer #------ CODE
2011 May 06
1
How to alter circle size
Hello all, I'm trying to create a heatmap using 2 matrices I have: z and v. Both matrices represent different correlations for the same independent variables. The problem I have is that I wish to have the values from matrix z to be represented by color intensity while having the values from matrix v to be represented by circle size. I currently have the following in front of me and an unsure
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 *
2006 Nov 30
2
margins within plotting region
Hi list, there always seem to be a small margin between the actual plot and the axes/box around the plot. For instance, in plot(c(0,1),c(0,1)) the 2 points do not lay on the box around the plot but slightly more to the center. Which parameter controls this margin and is it possible to eliminate it? thanks, Wouter
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
2005 Apr 20
1
overlaying a contour line in a levelplot
Hello there, I am creating a series of images using levelplot but I also want to overlay a contour for a particular value as reference. Here is the levelplot command for the image: print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab= NULL,col.regions=heat.colors(100)[100:1]),split=c(1,1,1,1),more=T) and then to add the contour plot (I only want a contour at level 5):
2003 Aug 21
2
levelplot behaviour for panel with constants
In the example: x = rep(c(0,0,1,1),4) y = rep(c(0,1,0,1),4) z = c(1,0,1,0,0,0,1,1,0,1,0,0,1,1,1,1) f = as.factor(c(rep("a",4),rep("b",4),rep("c",4),rep("d",4))) levelplot(z~x+y|f,data.frame(x=x,y=y,z=z,f=f)) I noted that the last ("d") plot remains empty. I guess the reason for this is that the values are constant (1), but I consider it more
2006 Feb 12
1
contour lines for levelplot
Hi, I would like to add contour lines to a (trellis/lattice-) levelplot. Sure, there is the "contour=TRUE" argument, but this uses "cuts=..." (which is usually chosen very high for my plots. I guess cuts=99 is the best you can do (?)) for plotting the contour lines. Furthermore, I do not like the numbering of the contour lines this way. Therefore, I tried to add a
2013 Mar 08
3
2D filled.contour plot with 1D histograms by axes
Hi everyone, I hope this question is beyond "read the manual". My task is simple, just to plot the following, but the plot in the middle should be a filled.contour plot: http://gallery.r-enthusiasts.com/graph/Scatterplot_with_marginal_histograms_78 Background: I prefer filled.contour rather than hist2d. Because, I could use kernel smooth, so the plot for discrete data won't be too
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 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,
2004 Jun 07
1
contour lines on levelplot?
With "image" and "contour", one can get both colors and lines to enhance the image of a contour plot. What's the best way to do this with Lattice graphics? The following is one ugly hack, producing the desired result after much trial and error (R 1.9.1 alpha under Windows 2000): # setup DF <- expand.grid(x=1:3, y=1:3) DF$z <- (DF$x+DF$y) # Traditional
2007 Apr 04
2
Annotate a levelplot (using abline) - Difficulty with trellis.
Hi, I am generating a beautiful plot with the 'levelplot' function over my square matrix of data. In order to help visualise the data I would like to draw a diagonal line on the matrix. Because the plot is actually a trellis object, I am having difficulty working out how to do this. I have been reading around, but I don't see any easy solution to the problem. (Most of the docs I have
2006 Jan 09
1
How to use filled.contour(x,y,z) data for levelplot(z)?
Dear all, We used the following function to create a spatial plot of a raster image: filled.contour(xx,yy,zz, color = terrain.colors, nlevels=10, main=naamjaar, plot.axes = { contour(Xcoord/1000,Ycoord/1000,lim.data, nlevels = 4, col=4,drawlabels = T, axes = FALSE, frame.plot = FFALSE, add = TRUE);axis(1); axis(2);
2004 Mar 19
5
asp=1 and aspect ratio
Hi everyone I want a square scatterplot with abline(0,1) going exactly through the SW and NE corners. By "square" I mean that the plotting region is exactly square, and that the axis limits are identical. x <- 1:20 y <- x+rep(c(-1,1),10) lims <- range(c(x,y)) None of the following do this: plot(x,y) ; abline(0,1) #not square plot(x,y,asp=1);abline(0,1) #diagonal
2002 Oct 10
1
contour in lattice
Hi I'm using lattice's function levelplot but when I choose the flag contour =TRUE I get very strange results. It looks like the contour lines have nothing to do with the "image" plot under ... Is there some known problem with this function ? Regards EJ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2012 Jan 08
2
need help with axis ticks
hi, i am using par(mrow=c(6,6)) function to get 6x6 plots on one screen. the problem that i am having is that the axis tick labels are far away from the ticks and going into previous plots (see attached figure). i need to know how can i reduce the distance between the ticks and their values (y axis values).the part of the code that i am using (after reading in the data) to create the top row is:
2009 Apr 08
1
how to adjust titles on sub-plots in levelplot / contour plot?
Hello, I have a (relatively long) function script that generates a levelplot. I don't want to include all of the code, so I have attached in file "miniDataSet.csv" an example for the data set "miniDataSet" that is called below. The function works OK, except that when the variables in the "splitCol" column get very large (as they are in this data set I
2004 Aug 04
1
Horizontal color bar in filled.contour()
Hello. I was wondering if it is possible to put the color bar (key) on the bottom of the graph, like the "horizontal" toggle in image.plot, rather than on the right side. Does anyone know if this is possible? --jenny