Skip to content

Commit

Permalink
feat: grey weekend square
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Mar 30, 2024
1 parent c44a0fe commit c661118
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/plot_calendar.R
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,19 @@ plot_calendar <- function(year = format(Sys.Date(), "%Y"),
lwd = 0.75,
xpd = TRUE)

## Add weekend ----

if (calendar[i, "weekday"] %in% c("Saturday", "Sunday")) {

rect(xleft = calendar[i, "x"] - 1,
xright = calendar[i, "x"],
ybottom = calendar[i, "y"] - 1,
ytop = calendar[i, "y"],
col = "#efefef",
lwd = 0.75,
xpd = TRUE)
}


## Add holidays ----

Expand Down

0 comments on commit c661118

Please sign in to comment.