我想在阿基米德螺旋上创建一个条形图,就像这里讨论的那样.
最终目标是这样的,但不那么压倒性.
这是一个示例数据帧:
test <- structure(list(month = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12),
year = c(2015, 2015, 2015, 2015, 2015, 2015, 2015,
2015, 2015, 2015, 2015, 2015, 2016, 2016,
2016, 2016, 2016, 2016, 2016, 2016, 2016,
2016, 2016, 2016),
value = c(49, 34, 35, 34, 50, 35, 48, 50, 44, 38, 42,
43, 33,30, 42, 43, 58, 55, …Run Code Online (Sandbox Code Playgroud) 我想创建一个数字(与附件类似),ggplot2其中圆形代表一年中的月份,因此圆周上有十二个刻度线,并且某个颜色的内圆弧对应于其中pa= 1的月份(其他选项)是pa= 0)和对应于sampled= 1的另一个内弧(在第一弧的外部)(其他选项是sampled= 0)。数据如下所示:
m
season pa month sampled occupancy
1 spring 1 3 1 present
2 spring 1 4 1 present
3 spring 1 5 1 present
4 summer 1 6 1 present
5 summer 1 7 1 present
6 summer 1 8 1 present
7 winter 0 12 1 absent
8 winter 0 1 0 absent
9 winter 0 2 0 absent
10 fall 1 9 1 …Run Code Online (Sandbox Code Playgroud)