R可视乎|2021年日历大派送

前言

一眨眼2020即将过去,2020年是杂乱的一年,感谢我们还活着。让我们放下这年,展望2021年吧。要不用R给2021年做个私人定制版日历吧?

翻了翻张杰老师的可视化书,咦,确实有这么一小节讲述用ggplot2做的日历图。在此就不做过多的描述,文章链接为:R-ggTimeSeries | ggplot2: 热力日历图。但是对于R小白的我而言,私人定制2021年日历,不简单啊。

找了下必应,找到了calendR这个包,强烈给R小白们安利,简单几行代码就可以实现私人化日历定制了,还可以打印出来,挂在书桌旁。

今天先给大家送上几个我做好的2021年日历和月历demo。创建私人定制日历图的详细教程预计会在两天后推出,敬请期待。

2021年日历图

请添加图片描述
请添加图片描述

img <- "C:/Users/ZLL/Desktop/4.jpg"

calendR(year = 2021,
        start = "M", 
        title.col = "white",
        # Weeks start on Monday
        mbg.col = 3,               # Background color of the month names
        months.col = "white",      # Color of the text of the month names
        weeknames.col = "white",
        
        special.days = "weekend",  # Color the weekends
        special.col = "lightblue", # Color of the special.days
        lty = 0,                   # Line type (no line)
        weeknames = c("Mo", "Tu",  # Week names
                      "We", "Th",
                      "Fr", "Sa",
                      "Su"),
        title.size = 40,   # Title size
        orientation = "p",
        bg.img = img,
        pdf = TRUE,
        doc_name = "My_calendar1"
)  

2021年月历图

在这里插入图片描述

img <- "C:/Users/ZLL/Desktop/4.jpg"
invisible(sapply(1:12 , function(i) calendR(year = 2021,month = i, pdf = TRUE,
                                            title.col = "white",
                                            mbg.col = 3,  
                                            months.col = "white",   
                                            weeknames.col = "white",
                                            special.days = "weekend", 
                                            special.col = "lightblue", 
                                            lty = 0,               
                                            bg.img = img,
                                            doc_name = file.path("C:\\Users\\ZLL\\Documents\\calendar", paste0("Calendar(blue)_2021_", i))))
)

获取方式

今天先给大家送上两个我做好的2021年日历和月历demo案例

获取方式:公众号命令日历

小编的直男审美,喜欢可以直接打印使用,不喜欢的等两天的手把手教程吧!

2020年最后一个月只剩10多天了

❤祝大家科研顺利,年底努力冲业绩❤

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值