- ggplot(b) +
- geom_tile(aes(x = Name, y = Year, fill = Val)) + # main body -- tiles
- geom_segment(data = horizonSegment, aes(x = x, y = y, xend = xend, yend = yend)) + # horizongrid
- geom_segment(data = verticalSegment, aes(x = x, y = y, xend = xend, yend = yend)) + # verticalgrid
- geom_segment(data = classSegment , aes(x = x, y = y, xend = xend, yend = yend)) + # segment of classes
- geom_segment(data = classTail, aes(x = x, y = y, xend = xend, yend = yend)) + # short segment tails
- annotate("text", x = c(3, 11, 27, 40), y = 2014, label = LETTERS[1:4]) + # annotate the classes
- annotate("text", x = " ", y = 2004:2013, label = as.character(2004:2013)) + # annotate the year
- ylim(c(2000, 2016)) + # start from 2000 to make a white circle in the middle
- labs(x = NULL, y = NULL) + # remove axis titles
- scale_fill_gradient(high = "#F77400", low = "yellow", na.value = "white") + # adjust the colors
- theme_classic() + theme(axis.line = element_blank(), axis.text.y = element_blank(), axis.ticks = element_blank(), legend.position = c(0,1)) +
- coord_polar(theta = "x", start = pi/360*9.5)
晕他自动给我换了个逗号,你换成英文的逗号,或者运行上面这个。


雷达卡





京公网安备 11010802022788号







