sample_JamPolygon | R Documentation |
Sample points within JamPolygon
sample_JamPolygon(
jp,
n = 100,
xyratio = 1.1,
spread = TRUE,
n_ratio = 1,
pattern = c("offset", "rectangle"),
buffer = 0,
byCols = c("-y", "x"),
do_plot = FALSE,
verbose = FALSE,
...
)
jp |
|
n |
|
xyratio |
|
spread |
|
n_ratio |
|
pattern |
|
buffer |
|
byCols |
|
do_plot |
|
verbose |
|
... |
additional arguments are ignored. |
This function arrays points across solid portions of polygons
provided in jp
.
Enable polygon buffer to guarantee minimum spacing from borders.
Allow different spatial patterns, currently square or rectangular. In future, consider hexagonal, diamond, or diagonal.
Other JamPolygon:
JamPolygon-class
,
Venndir-class
,
[,JamPolygon,ANY,ANY,ANY-method
,
add_orientation_JamPolygon()
,
area_JamPolygon()
,
bbox_JamPolygon()
,
buffer_JamPolygon()
,
check_JamPolygon()
,
check_Venndir()
,
eulerr_to_JamPolygon()
,
farthest_point_JamPolygon()
,
find_venn_overlaps_JamPolygon()
,
has_point_in_JamPolygon()
,
intersect_JamPolygon()
,
label_fill_JamPolygon()
,
label_outside_JamPolygon()
,
label_segment_JamPolygon()
,
labelr_JamPolygon()
,
minus_JamPolygon()
,
nearest_point_JamPolygon()
,
nudge_JamPolygon()
,
plot.JamPolygon()
,
point_in_JamPolygon()
,
polyclip_to_JamPolygon()
,
polygon_circles()
,
polygon_ellipses()
,
split_JamPolygon()
,
union_JamPolygon()
,
update_JamPolygon()
df3 <- data.frame(name=c("polygon1", "polygon2"),
label=c("polygon1", "polygon2"),
x=I(list(
list(c(1, 6, 6, 1),
c(2, 5, 5, 2),
c(3, 4, 4, 3)),
list(#c(11, 16, 16, 11),
c(12, 15, 15, 12),
c(13, 14, 14, 13))
)),
y=I(list(
list(c(1, 1, 6, 6),
c(2, 2, 5, 5),
c(3, 3, 4, 4)),
list(#c(1, 1, 6, 6),
c(2, 2, 5, 5),
c(3, 3, 4, 4))
)),
fill=c("gold", "firebrick"))
jp3 <- new("JamPolygon", polygons=df3);
sample_JamPolygon(jp3[1,], n=40, do_plot=TRUE)
sample_JamPolygon(jp3[1,], n=80, do_plot=TRUE)
sample_JamPolygon(jp3[1,], n=40, xyratio=1.5, do_plot=TRUE)
sample_JamPolygon(jp3[1,], n=40, xyratio=1/1.5, do_plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.