[英]Change month order using R and ggplot2
So I'm having a pretty big problem. 所以我有一个很大的问题。 I'm trying to plot animal density (using two methods) against months. 我正在尝试绘制几个月的动物密度(使用两种方法)。
When I plot one of the two methods, the months go out of order and I can't seem to get them to work. 当我绘制两种方法中的一种时,几个月的时间变得混乱了,我似乎无法使它们正常工作。
In the end I want to have each of the two methods (camera.estimations and scat.estimations) on the same plot, with SD of each included and months in the right order. 最后,我想在同一个情节上同时使用两种方法(camera.estimations和scat.estimations),其中包括每种方法的SD和正确顺序的月份。 Any pointers from you lovely R folk would be awesome! 您可爱的R员工提供的任何指导都很棒!
Here's my data: https://docs.google.com/spreadsheet/ccc?key=0AjSTnjcF57_IdEhUXzFyQmtZaG5NXzdzTXZkbFdweXc&usp=sharing 这是我的数据: https : //docs.google.com/spreadsheet/ccc?key=0AjSTnjcF57_IdEhUXzFyQmtZaG5NXzdzTXZkbFdweXc&usp=sharing
I have used this post to help structure my ggplots before 我以前曾用过这篇文章来帮助构建我的ggplots
How do you specifically order ggplot2 x axis instead of alphabetical order? 您如何特别指定ggplot2 x轴的顺序而不是字母顺序?
Manually setting the order of factors works but can be annoying, but is the best answer I have for you :) without more information hope it helps! 手动设置因子的顺序是可行的,但是可能很烦人,但这是我为您提供的最佳答案:)如果没有更多信息,希望它会有所帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.