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)
To change line width, just add argument size=2 to geom_line().
If we want to change the thickness of the bars then size argument under geom_bar function of ggplot2 package can be used and it can be set according to our need starting from 1.
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:
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:
geom_col
does not have a stroke
argument. Try this:
library(tidyverse)
ggplot(mpg, aes(cty, hwy)) +
geom_col(color = "blue", size = 2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With