When the number of bars is large (when days/weeks are on x axis), the spaces between the bars are not visible.
But when the number of bars are small (when months are on x axis), the spaces between the bars are vsiible.
What i want is irrespective of number of bars, the spaces between the bars should be visible. Any idea to code in R please?
You could add colour = "white"
for the border around the bars:
library(tidyverse)
df <- tibble(x = rep(1:100, 5))
df |>
ggplot(aes(x)) +
geom_histogram()
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
df |>
ggplot(aes(x)) +
geom_histogram(colour = "white")
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Created on 2022-05-17 by the reprex package (v2.0.1)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.