0
基本上,accessibility_round
的值可以從>0 to Inf
開始,因此我想根據以下規則對點進行着色。根據自定義時間間隔使用顏色創建點符號地圖
>0 to 20 - Color1
>20 to 100 - Color2
>100 to 1000 - Color3
>1000 to 10000 - Color4 (assume no value larger than 10000 except Inf)
Inf - Color5
我對R新使用tmap有點新,我不確定如何去設置自定義間隔。但這是我迄今爲止所嘗試的。
tm_shape(schools)+
tm_symbols(title.col = "Accessibility", style = "fixed",breaks = c(0,20,100,1000,10000,Inf), col="accessibility_round",size = 0.3,
palette = "Accent", auto.palette.mapping = FALSE,interval.closure = "right") +
tm_layout(legend.outside = TRUE, legend.outside.position = "bottom", legend.stack = "horizontal")