Как я могу сохранить разрывы легенды от наложения при создании карты в R? - PullRequest
0 голосов
/ 02 июля 2019

Я новичок в картографии в R и у меня проблемы с удержанием разрывов в моей легенде от перекрывающихся категорий.Например: я хочу создать легенду с такими перерывами: (0) (1.0-4.5) (4.6-9.0) (9.1-14.6) (14.7-20.3)

However, this is what I keep getting in R:
(0-1.0)
(1.0-4.5)
(4.5-9.0)
(9.0-14.6)
(14.6-20.3)


I've tried playing with the different styles of classIntervals and I feel like "fixed" with the fixedBreaks is getting me closer to what I want but I'm still having the same problem.

## Link colors to variable ranges
    class <- classIntervals(plotvar1, nclr, style="fixed", 
    fixedBreaks=c(0, 1.0, 4.5, 9.0, 14.6, 20.3))
    colcode <- findColours(class, plotclr)

## Plotting Filled Colors
    plot(GeorgiaMap,col=colcode)
    title(main = "Rates")
    legend("bottomleft", legend=names(attr(colcode,"table")),
       fill=attr(colcode,"palette"))

## Add Scale Bar
    map.scale(x=c(-81.5),y=c(30.6),relwidth=0.2,
    ratio=FALSE,metric=TRUE,cex=1)  
...