ggplot increase border line thickness

Viewed 10183

How do I increase the blue border line thickness? The stroke parameter is ignored in my example below.

library(tidyverse)
ggplot(mpg, aes(cty, hwy)) + 
  geom_col(color = "blue", stroke = 2)
2 Answers

Hopefully this works for you:

ggplot(mpg, aes(cty, hwy,fill="snow")) + 
  geom_bar(color = "navy",size=0.05,stat="identity",alpha=0.3)

The result: enter image description here

Then changing the size aesthetic:

ggplot(mpg, aes(cty, hwy,fill="snow")) + 
  geom_bar(color = "navy",size=2,stat="identity",alpha=0.3)

Yields this: enter image description here

geom_col does not have a stroke argument. Try this:

   library(tidyverse)
   ggplot(mpg, aes(cty, hwy)) + 
   geom_col(color = "blue", size = 2)
Related