-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legend Background #28
Comments
Could you add a screenshot of what you get and a modified one showing what you'd like to get instead? |
library(calendR)
library(ggplot2)
imp.dates <- rep(NA, 366)
imp.dates[c(1, 50, 12, 125, 80, 99, 102, 205, 266, 360)] <- "special"
calendR(year = 2020, # Year
mbg.col = 2, # Background color for the month names
months.col = "white", # Text color of the month names
special.days = imp.dates,
special.col = "pink", # Color of the special.days
months.pos = 0.5,
bg.col = "#dbd4cc",
legend.pos = "left"
) + theme(legend.background = element_blank()) or imp.dates <- rep(NA, 366)
imp.dates[c(1, 50, 12, 125, 80, 99, 102, 205, 266, 360)] <- "special"
calendR::calendR(year = 2020, # Year
mbg.col = 2, # Background color for the month names
months.col = "white", # Text color of the month names
special.days = imp.dates,
special.col = "pink", # Color of the special.days
months.pos = 0.5,
bg.col = "#dbd4cc",
legend.pos = "left"
) + ggplot2::theme(legend.background = ggplot2::element_blank()) edit: The above examples remove the background entirely. If you want to change the color, replace library(calendR)
library(ggplot2)
imp.dates <- rep(NA, 366)
imp.dates[c(1, 50, 12, 125, 80, 99, 102, 205, 266, 360)] <- "special"
calendR(year = 2020, # Year
mbg.col = 2, # Background color for the month names
months.col = "white", # Text color of the month names
special.days = imp.dates,
special.col = "pink", # Color of the special.days
months.pos = 0.5,
bg.col = "#dbd4cc",
legend.pos = "left"
) + theme(legend.background = element_rect(fill = "lavender")) or imp.dates <- rep(NA, 366)
imp.dates[c(1, 50, 12, 125, 80, 99, 102, 205, 266, 360)] <- "special"
calendR::calendR(year = 2020, # Year
mbg.col = 2, # Background color for the month names
months.col = "white", # Text color of the month names
special.days = imp.dates,
special.col = "pink", # Color of the special.days
months.pos = 0.5,
bg.col = "#dbd4cc",
legend.pos = "left"
) + ggplot2::theme(legend.background = ggplot2::element_rect(fill = "lavender")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
imp.dates <- rep(NA, 366)
imp.dates[c(1, 50, 12, 125, 80, 99, 102, 205, 266, 360)] <- "special"
calendR(year = 2020, # Year
mbg.col = 2, # Background color for the month names
months.col = "white", # Text color of the month names
special.days = imp.dates,
special.col = "pink", # Color of the special.days
months.pos = 0.5,
bg.col = "#dbd4cc",
legend.pos = "left"
)
I am wondering how to color the bg color of legend!
The text was updated successfully, but these errors were encountered: