如何获取spplot(晶格)以免在多边形周围绘制边框

编程入门 行业动态 更新时间:2024-10-26 04:23:24
本文介绍了如何获取spplot(晶格)以免在多边形周围绘制边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个按邮政编码统计的表格,其中要绘制很多多边形(准确地说是30,357个).因此,当我pdf时spplot我所看到的只是边界,而不是内部的弧度.

I have a tally by zip code which is a lot of polygons to plot (30,357 to be precise). Consequently when I pdf the spplot all I see are the borders not the choropleth interiors.

因此,我想关闭绘制边框的功能,或者至少能够使边框更薄.但是,在?spplot中挖掘及其各种分支(面板功能,水平图等)时,显示为空.

Therefore, I'd like to turn off plotting the borders, or at least be able to make them much, much thinner. However, digging around in ?spplot and its various offshoots (the panel function, levelplot, etc.) have come up empty.

下面是一个可以使用的示例(这里的边界不是很突出,但是会给它们一个十亿个多边形):

Here's an example to work with (the borders aren't that prominent here but they would be given a bajillion polygons):

library(sp) Srs1 = Polygons(list(Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2)))), "s1") Srs2 = Polygons(list(Polygon(cbind(c(5,4,2,5),c(2,3,2,2)))), "s2") SpDF <- SpatialPolygonsDataFrame( SpatialPolygons(list(Srs1,Srs2)), data.frame( z=1:2, row.names=c("s1","s2") ) ) spplot(SpDF, zcol="z")

推荐答案

看起来您只需要设置col="transparent",就像这样:

It looks like you just need to set col="transparent", like so:

spplot(SpDF, zcol="z", col="transparent")

更多推荐

如何获取spplot(晶格)以免在多边形周围绘制边框

本文发布于:2023-08-02 00:05:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1272907.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:晶格   多边形   边框   spplot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!