我用ggplot在地图上作了一个图。但是即使有指定的说明,我也没有传说。
我需要在图例中显示大小点的对应关系,如下图:
我尝试在图例中使用:点(size ='graph')及其值。 这是唯一的图形类型,我遇到了这个问题。
这是我的数据:
join
代码:
data.frame(
graph = c(2.5, 1.5, 1.5, 1.5, 1.5, 3, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5,
1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.5),
x = c(690407.686028692, 668622.75462895, 696803.566124092,
673062.214891085, 656077.411408432, 683634.893828692,
708826.685978697, 666676.936826137, 680202.347931864,
685075.304813531, 702433.968175714, 698431.441510561,
676293.390383419, 695645.844602817, 687566.815694649, 663013.779537116,
646481.359172896, 638110.223907023, 640715.699972469,
642273.74623275),
y = c(6334609.90229255, 6335374.93429776, 6335888.95948295,
6336900.98154074, 6337072.93894301, 6338323.39600256,
6341716.94405495, 6345012.80734466, 6345548.51942826,
6346087.10440564, 6348894.7081605, 6350228.42781669, 6350778.18047204,
6353033.14045844, 6353109.41298154, 6354640.69154103,
6360042.46765469, 6360058.68711873, 6360425.02344172,
6363722.52659089),
lat = c(49.3508825326633, 49.3553591808786, 49.3583668130435,
49.364287756, 49.3652937402597, 49.3726085383319,
49.3924542903226, 49.4117211016949, 49.4148520294118,
49.4179995462185, 49.434404050505, 49.4421948987342, 49.4454058876811,
49.4585744317618, 49.4590197871622, 49.4679600691824,
49.499485003012, 49.4995796297469, 49.5017168409091,
49.520950318328),
long = c(6.20203776633165, 6.00634039793282, 6.25949293478261,
6.046220748, 5.89364366233766, 6.1411967388374,
6.36749845806452, 5.98886081920904, 6.11036165441177,
6.15413617086835, 6.3100716969697, 6.27411638818565, 6.07524689130435,
6.24909294540943, 6.17651779391892, 5.95595411740042,
5.80744085843373, 5.73224167088608, 5.75564706060606,
5.76964322829582)
) -> tmp