【问题标题】:Display all values in the legend of a shapefile显示 shapefile 图例中的所有值
【发布时间】:2019-01-15 10:52:26
【问题描述】:

样本数据:

library(raster)
fra <- getData("GADM", country = 'FRA', level = 1)
spplot(fra, "ID_1")

由于ID_1 是整数,我想显示图例中的所有值并用ID_1 标记多边形。

【问题讨论】:

    标签: r shapefile sp


    【解决方案1】:
    spplot(fra, "ID_1", 
           colorkey = list(labels = list(at = fra@data$ID_1, labels = fra@data$NAME_1)))
    

    【讨论】:

    • 嗨。我不想要这些名字。我需要图例中显示的D_1 值,但我现在知道该怎么做。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-06-14
    • 2020-12-12
    • 1970-01-01
    • 2021-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多