USGS-R / gsplot

plotting foundation for timeseries reporting
Other
6 stars 14 forks source link

legend doesn't capture the right color for borders when defaults are used #463

Open jordansread opened 7 years ago

jordansread commented 7 years ago
gs <- gsplot() %>% 
     rect(1.15,2,1.25,2.5, col = "blue", density = 15, angle = 45, legend.name = "box") %>% 
     legend()
gs$legend$legend.auto$border
[1] "black"

But the rect renders as having a blue border (black in the legend). Per docs:

border color for rectangle border(s). The default means par("fg"). Use border = NA to omit borders. If there are shading lines, border = TRUE means use the same color for the border as for the shading lines.

Looks like our legend does the right thing, but our rect does the wrong thing? Either way, these two should match.