我的收藏夹:第十一期

我的收藏夹:第十一期

每周分享即将变成每两周分享了。。。

好玩的东西

  • 冰与火之歌即将更新了,最近发现了这个炫酷的图表,展示了每个角色的上镜时间变化:
  • 刚刚发现一个非常漂亮的 Hexo 博客主题:Mr.Metro

R 语言

只需要几行代码就能绘制这幅炫酷的图:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
nx = 100
ny = 80
kk <- 110
x = sample(x = 1:nx, size = kk, replace = TRUE)
y = seq(-1, -ny, length = kk)
codes <- matrix(0:127, 8, 16, byrow = TRUE, dimnames = list(0:7, c(0:9, letters[1:6])))
library(magrittr)
ascii <- c(apply(codes, c(1, 2), intToUtf8), letters, 1:10)
ascii <- sort(ascii)
ascii <- ascii[-c(1:37)]
# plot
op = par(bg = "black", mar = c(0, 0, 0, 0) )
plot(1:nx, seq(-1, -nx), type = "n", xlim = c(1, nx), ylim = c(-ny+10, 1), bty= "n", xaxt= "n", yaxt= "n")
for (i in seq_along(x) ) {
aux = sample(1:ny, 1)
points( rep(x[i], aux), y[1:aux],
pch = sample(ascii, aux, replace = TRUE),
col = hsv(0.35, 1, 1, runif(aux, 0.1)), cex = runif(aux, 0.3) )
}

这幅图能够根据太阳的影子判断当前的日期!

Python

jupyter-themes: Custom Jupyter Notebook Themes

Stata

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×