小编use*_*481的帖子

ggplot2:将多个箱图​​排列为时间序列

我想用ggplot2创建一个多变量箱图时间序列,我需要有一个x轴,根据相关日期定位箱图.

我发现了两个关于这个问题的帖子:一个是使用ggplot2的时间序列图,但是x轴不是scale_x_axis,所以图表在我的情况下有偏差.另一个是ggplot2:R中有scale_x_date轴的多个因子boxplot,但是这个人使用了我在我的情况下不使用的交互功能.

这是一个示例文件和我的代码:

dtm <- read.table(text="date ruche mortes trmt      
03.10.2013     1      8   P+        
04.10.2013     1      7   P+        
07.10.2013     1     34   P+       
03.10.2013     7     16   P+       
04.10.2013     7     68   P+       
07.10.2013     7    170   P+
03.10.2013     2      7   P-        
04.10.2013     2      7   P-       
07.10.2013     2     21   P-      
03.10.2013     5      8   P-       
04.10.2013     5     27   P-      
07.10.2013     5     24   P- 
03.10.2013     3     15    T       
04.10.2013     3      6    T    
07.10.2013     3     13    T    
03.10.2013     4      6    T    
04.10.2013     4     18 …
Run Code Online (Sandbox Code Playgroud)

r time-series ggplot2 boxplot

5
推荐指数
1
解决办法
1801
查看次数

标签 统计

boxplot ×1

ggplot2 ×1

r ×1

time-series ×1