Displaying 20 results from an estimated 8000 matches similar to: "polygon() draws non-transparent border, erase.screen draws non-transparent border (PR#1881)"
2004 Feb 23
1
border of a polygon in contour.kriging - geoR
Dear all,
When a conventional kriging and then a contour plot is limited with a polygon (as possible with krige.conv and contour.kriging), the
polygon border is displayed in black by default.
> kc<-krige.conv(CZdata,loc=pred.grid,borders=czpoly,krige=krige.control(obj.m=ls))
> plot(CZcoord,xlab="x",ylab="y",type="n",asp=1)
>
2012 Sep 27
1
erasing a polygon
I'm updating some (very) old code, and one particular option of its plot method depends on
a once-was-true trick
polygon(x, y, border=TRUE, col=0)
polygon(x, y, border=TRUE, density=0)
would draw the polygon AND erase whatever was underneath it back to background color.
Is there a reliable way to do this with the current R (standard graphics)?
Terry Therneau
PS For the
2007 Apr 27
4
Unwanted white borders on semi-transparent polygons?
Hey all,
I'm trying to create a plot of two semi-transparent regions. The reason they need to be partially transparent is so that I can see if there's any overlap. Here's some example code:
# BEGIN
pdf(file="test.pdf",version="1.4")
plot(0,0,type="l",ylim=range(-3,3),xlim=range(-1,5))
polygon(c(0,1,2,3,4,3,2,1,0), c(0,1,2,1,0,-1,-2,-1,0),
2008 May 19
2
Draw Polygon with a Circular Side
Hello Friends!!!
I would want draw a circular histogram, and I would like draw a polygon with
a circular side. This is easy if I use the functions polygon and arc, but I
want that the polygon with a circular side have background colour. The
polygon created with function polygon can have background colour, but the
surface created with function arc can?t have background colour.
How I could create a
2003 Oct 09
1
polygon border
Hello,
Does anyone know how a function to find automaticly the border (polygon) of
a cloud of points?
It is for a PCA kind of analysis, where I wanted to present as the limits
for each group, instead of all points...
thank you in advance
Marta
2007 Oct 30
1
Polygon shading line colors
Hi there,
I'm having trouble working out how to change the colors of polygon
shading lines. If I plot a polygon with
polygon(poly,density=30,borders=gray(0.5))
I get gray borders but black shading lines; I have tried adding
col=gray(0.5), bg=gray(0.5) and fg=gray(0.5), but no luck.
How can I change the colors of the shading? The help file doesn't
seem to detail this, so any
2010 Oct 19
2
superpose.polygon, panel.polygon and their colors
Dear R-helpers,
the problem I'm facing today is to convince lattice to paint some areas
in gray.
The areas I would like to have in gray, are confidence bands
I've googled around in the mailing list archives and eventually find
some clues.
This link is my starting point
http://tolstoy.newcastle.edu.au/R/e2/help/07/04/15595.html
I'm reproducing here the code for your convenience
est
2011 Apr 13
3
latex, eps graphics and transparent colors
I have a diagram to be included in latex, where all my figures are .eps
graphics (so pdflatex is not an
option) and I want to achieve something
like the following: three concentric filled circles varying in lightness
or saturation. It is easiest to do this using
transparency, but in my test using the postscript driver, the
transparent color fills do not appear. Is it
correct that postscript()
2010 Oct 12
1
graphics layout
Folks,
I'm battling the layout() functionality in graphics, and getting a bit mixed up. I'd like to create subscreens like so:
_________ _________
| | |
| 1 | 2 |
|_________|________ |
| | |
| 3 | 4 |
|_________|_________|
| |____6____|
| 5 |____7____|
|_________|____8____|
Note that subscreens 1:5 are the same
2016 Apr 27
1
Determine if a set of x and y-latitude points are inside of a polygon using R
Objective: Determine if a set of x and y-latitude points are inside of
a polygon using R.
Lets say I have 9 polygons. Where I have labeled the polygons to be
checked from 1-9. The problem I?m running into is running the
point.in.polygon to check if those points are in one of several
polygons, as my code overwrites the result.
To accomplish this I am using the R-built in function called
2007 Oct 08
1
do not plot polygon boundaries with spplot {sp}
Hi,
Is there a simple way to suppress the plotting of polygon boundaries with
spplot() ?
# simple list of 12 colors
cols <- brewer.pal(12, "Paired")
# plot pile of polygons, with 12 classes:
spplot(x, zcol='class2', col.regions=cols, scales=list(draw=T), xlab="Easting
(m)", ylab="Northing (m)")
... seems to work well. However the polygon boundaries
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
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`
2010 May 14
1
point.in.polygon() in sp package: accuracy problems?
Dear list:
I encountered some problems using the function point.in.polygon() of the sp package, when trying to determine whether some points lye inside, outside, on the border or on a vertice of a polygon.
I have a list of point I know should lye right on the border of a polygon, but some of them are not classified as such by point.in.polygon() (see the example code below).
To make a long story
2007 Aug 28
1
attempt at making a polygon class failed
I was reading a presentation of Professor Peng's and typed the
presentation code into R but I changed it to make plot.polygon a
separate function instread of defining the function in SetMethod itself
as he did. Is that the problem with the code below because
plot(p) just gives me zero. Thanks.
setClass("polygon", representation(x = "numeric",
y =
2016 Apr 28
0
polygon angle option perpendicular to axis
Tena koe Simon
plot(1:10, 1:10, type='n')
polygon(c(2,3,6,8), c(2,5,5,3), density=20, angle=90)
polygon(c(2,3,6,8), 5+c(2,5,5,3), density=20, angle=0)
I don't understand your problem. Perhaps if you "provide[d] commented, minimal, self-contained, reproducible code" it would help.
HTH ....
Peter Alspach
-----Original Message-----
From: R-help [mailto:r-help-bounces at
2016 Apr 28
1
polygon angle option perpendicular to axis
The angle is not based on the polygon edges, but it can seem that way if you do not use the asp=1 argument in your plot. Try this example,
> plot(1:10, 1:10, type='n')
> x <- c(1, 3, 5, 3)
> y <- c(3, 5, 3, 1)
> polygon(x, y, angle=0, density=10)
> polygon(x, y + 4.5, angle=45, density=10)
> polygon(x + 4.5, y + 4.5, angle=90, density=10)
> polygon(x + 4.5, y,
2016 Apr 28
1
polygon angle option perpendicular to axis
Thanks for the question. Here is a sample of the code for my plot:
Top = c(34, 39, 42, 45, 46, 41, 41, 40, 43, 38, 33, 33)
Bottom = c(24, 29, 32, 36, 32, 34, 32,41, 40, 39, 29, 24)
plot(1,1, col = "white", xlim = c(1.3,11.7), ylim = c(0,80), axis = FALSE, xaxt = "n")
axis(1, at = c(1:12))
polygon(c(c(1:12),c(12:1)), c(top, bottom), col =
2011 Feb 18
1
How to calculate the perimeter and common border of polygons?
Dear R-users,
Is there any way of calculating the perimeter of a polygon in a shapefile
object? Furthermore, how to calculate the length of the common border of two
polygons?
I've searched the code of spded, but could not find a hint on how to do it.
Thank you very much,
Leo.
[[alternative HTML version deleted]]
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" )