我正在使用 R 中的 ggplot 为 DC 创建 GIS 地图。我正在尝试自定义我的图例栏和标签。我可以使用 gtable_filter 移动图例键,但不能移动标签。我想像其他标签一样将最后一个标签“1”移动到其图例栏附近。任何帮助表示赞赏。 地图图像
我正在使用下面的 R 代码:
Data set looks like below
head(d1930)
R Output:
Simple feature collection with 6 features and 355 fields
geometry type: MULTIPOLYGON
dimension: XY
bbox: xmin: -77.0823 ymin: 38.89061 xmax: -77.0446 ymax: 38.94211
epsg (SRID): 4326
proj4string: +proj=longlat +datum=WGS84 +no_defs
fipsstate fipscounty tract NHGISST NHGISCTY GISJOIN GISJOIN2 SHAPE_AREA SHAPE_LEN X GISJOIN.x.1 year cenv1_1 cenv8_1
1 11 001 000001 110 0010 G11000100001 11000100001 1953567 8965.853 1 G11001000001 1930 …Run Code Online (Sandbox Code Playgroud)