similar to: integrate over polygon

Displaying 20 results from an estimated 4000 matches similar to: "integrate over polygon"

2007 Oct 17
4
polygon overlapping
Hi there, Is there any package which can calculate the overlapping area of two polygons or output the coordinates of the overlapping of two polygons? Thanks. Haiyong
2001 Feb 13
3
xfig boxplot (polygon) bug??
There appears to be a bug in the R xfig() driver. When I run a simple example, eg > data(InsectSprays) > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") the boxplot is fine. Doing the same thing after > xfig(file='test.fig') and then opening in Xfig (ver3.2 patchlevel 2) on my Linux box produces boxplots where the boxes, although correctly shaded in,
2001 Feb 13
3
xfig boxplot (polygon) bug??
There appears to be a bug in the R xfig() driver. When I run a simple example, eg > data(InsectSprays) > boxplot(count ~ spray, data = InsectSprays, col = "lightgray") the boxplot is fine. Doing the same thing after > xfig(file='test.fig') and then opening in Xfig (ver3.2 patchlevel 2) on my Linux box produces boxplots where the boxes, although correctly shaded in,
2009 Jul 22
1
R extract vertices for polygon
Dear R users, I'm trying to extract from a given matrix (GROUP) the coordinates of the vertices of the different groups (i.e. 3, 7, 1 . . .) to plot the polygons to delineate the area in which each group "wins" and colour it diferentially. I can make a simple point plot, but I would like to add polygons with full colored area. The example is with a 5x5 matrix, but I'm working
2004 Jun 14
2
ordering points as vertex of a polygon
Dear R-users, Suppose I have the following x-y coordinates which give the boundaries of a polygon: > x <- c(5,4,5,9,6,6,4,7,10,7,10,4,10) > y <- c(6,3,2,6,3,7,5,4,4,7, 5,4, 6) I would like to plot the following graph: > plot(x,y) > ord <- c(7,12,2,3,5,8,9,11,13,4,10,6,1) > polygon(x[ord],y[ord]) How I can obtain the above ordering (in the example an anti-clockwise
2013 Sep 19
3
How do I ensure that the polygon in spatstat::owin(poly=<polygon>) does not have “negative area”
I am a new user of the R spatstat package and am having problems creating a polygonal observation window with owin(). Code follows: library("maps") library ("sp")` library("spatstat") mass.map <- map("state", "massachusetts:main", fill=T) # This returns a data frame includding x and y components that form a polygon of massachusetts mainland`
2012 Aug 06
2
Identify points that lie within polygon
I have a complex 2D polygon with thousands of vertices, and I'd like to be able to identify points from a large set contained within the polygon, and was wondering if there might be an efficient way of doing this? Any advice would be useful! Here is a small example of what I mean: # make polygon v1<-c(0,1,1,2,1,3,6,7) v2<-c(1,3,3,5,6,7,8,9) plot(v1, v2, type = "n" )
2007 May 26
2
polygon error?
Hi.. I'm not sure why polygon returns an area above the standard normal curve. z <- pretty(c(-3,3), 100) ht <- dnorm(z) data <- data.frame(z=z, ht=ht) zc <- 1.645 plot(data, type="l") lines(data) t <- subset(data, z>zc) polygon(t, col="red") Thanks, Lance [[alternative HTML version deleted]]
2012 Sep 13
2
Shading in prediction intervals
I have the following code for the minimum and maximum of my prediction interval > y.down=lines(x[x.order], set1.pred[,2][x.order], col=109) > y.up=lines(x[x.order], set1.pred[,3][x.order], col=109) domain=min(x):max(x) polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109) It doesnt seem to shade the right region, it gives me a trapezoid. Any help? Thanks!
2012 Jan 12
2
Points inside a polygon
I have a list of bounds for a series of polygons. I do understand the formula to determine whether point i is within polygon X (X[x1] < i[x] & X[x2] > i[x] & X[y1] < i[y] & X[y2] > i[y]), and I can apply this throughout the dataset. However, this naive algorithm doesn't scale very well. The data set contains 10,000 points consisting of (n,e) pairs where I'm
2009 Nov 10
1
polygon kills X-server
Hi all, when I make a polygon with 100,000 vertices my X-server is being killed. This occurs in R-2.9.0 and a freshly installed R-2.10.0 I'm running Ubuntu with a locally compiled R: uname -a Linux onyx 2.6.24-24-generic #1 SMP Tue Aug 18 16:22:17 UTC 2009 x86_64 GNU/Linux xlower = -2e6:2e6 xupper = rev(xlower) ylower = runif(length(xlower)) yupper = ylower+.1
2009 Feb 05
3
maptools: Test if point is in polygon
In R's maptools package, is there a built-in function to test if a given point is "inside" a given polygon on the map? The map was loaded from an ESRI Shapefile. The point's latitude and longitude are known. Thank you! Aleks -- ------------------------ Aleksandr Andreev Fulbright Fellow Graduate School of Management St Petersburg State University
2003 Feb 19
2
plotmath
There's something (probably a lot) missing in my understanding of plotmath. The LaTeX code for what I'm trying to produce is \log(-\log(\hat R)) My (probably hopeless) attempt at it uses nested group()s: expression(plain(log) * group("(", -plain(log)*group("(", \hat(R), ")"), ")")) Can anyone do it right for me, please? Thanks, Ted. Dr E.A.
2012 Nov 05
1
Problem with polygon vertices
I am building a mask with area.urb.sp.W <- as(area.urb.sp, "owin") and got the message Erro em owin(poly = opls) : Polygon data contain duplicated vertices, self-intersection and overlaps between polygons how can I solve this problem in R? many thanks IVAN [[alternative HTML version deleted]]
2006 Apr 26
1
Polygon-like interactive selection of plotted points
[Please CC me for all replies, since I am not currently subscribed to the list.] Hi all, I have the following problem/question: Imagine you have a two- dimensional plot, and you want to select a number of points, around which you could draw a polygon. The points of the polygon are defined by clicking in the graphics window (locator()/identify()), all points inside the polygon are
2008 Aug 15
6
continuous coloring of a polygon
R2.7.1, WinXP Hi, I have a polygon inside a circle as follows: radius <- 3 x <- seq(-radius,radius,length=2000) y <- sqrt(radius^2-x^2) xx <- c(x,-x) yy <- c(y,-y) plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type="l", ylab="", xlab="", axes=F) radius <- 2.7 x1 <- seq(-radius,radius,length=2000) y1 <- sqrt(radius^2-x1^2)
2009 Oct 22
5
How to calculate the area under the curve
Hi all, I would like to calculate the area under the ROC curve for my predictive model. I have managed to plot points giving me the ROC curve. However, I do not know how to get the value of the area under. Does anybody know of a function that would give the result I want using an array of specificity and an array of sensitivity as input? Thanks, Olivier -- View this message in context:
2007 Sep 26
1
Area of overlap between polygon and circle
R-listers, Given a polygon and a circle defined by its center coordinates and a radius, I would like to calculate the area of overlap. I know that I can create a polygon from the circle and then use available packages to get the area of the intersection. However, because the polygon is of a fixed size and I will be doing this for circles of varying sizes, I'm concerned about
2010 May 09
1
Plot polygon in 3D with rgl
Dear R-helpers, an rgl-ers in particular, what is the easiest way to plot a section of a plane in 3D, that is given by the xyz coordinates of the outline? Suppose I have a polygon - which I know for sure is a set of coordinates on the same plane. One method I found is to use surf.tri from the geometry package, and then plot the triangles with rgl.triangles. This method is not perfect though,
2009 Dec 04
1
multidimensional point.in.polygon??
Hi, I seek to identify those points in/outside a multidimensional convex hull (geometry::convhulln). Any suggestions? Background just in case I'm going down a really wrong road: Given an observed data set with one dependent/observed variable (Y) and multiple (3 to 10) independent/design variables (X1, X2, ...) I want to increase the number of points by interpolating. I'm using