R mapview: Point border color by group

827 views Asked by At

I am having trouble controlling the color of the border of a point.

I've got a data frame of addresses that I would like to color according to a categorical variable, Group. These are single points, not polygons. I would like to plot just the outlines of the points, not the inner regions itself. I thought that I could handle this using the color argument and setting alpha.regions = 0, alpha = 1. Replication code listed below

library(tidyverse)
library(mapview)
library(Rcolorbrewer)
mapview(breweries %>% filter(!is.na(number.seasonal.beers)), 
    color = c("firebrick1", "darkolivegreen", "magenta4", "darkgoldenrod4", "red", "blue"),                
    col.regions = c("firebrick1", "darkolivegreen", "magenta4", "darkgoldenrod4", "red", "blue"),        
    alpha = 1,
    alpha.regions = 0,
    zcol = "number.seasonal.beers",
    legend = T,
    layer.name = "Breweries")

While this successfully displays the outlines of the circle, omitting the filling of the region, there is no apparent relationship between the color of the circle outline and Group. Is there a "color.outline" type argument that can connect the Group indicator and the Group? Is there a better means by which to assign color to the to plotted addresses? Any guidance would be much appreciated

0

There are 0 answers