2015-05-19 132 views
1

我要寻找以下问题的解决方案windroses剧情地区: 目前,我生产的玫瑰风图与GGPLOT2继安迪·克利夫顿在here提供的脚本。展开使用ggplot 2和极坐标

这工作完美,我非常感谢提供的脚本。但是我有一个问题。 X轴的标签会被图的边缘截断,特别是在绘图时。 有没有办法扩大剧情,让文字完整显示?

回答

0

要与WINDROSE练,使用该数据帧在所述端部(例如图像可以在上面的链接可以找到),我创建了以下情节,它没有被X轴标签的问题截断。无可否认,它不涉及风速或24小时框架,因为它旨在支付给两种供应商的金额,但情节和数据可能会帮助其他人更容易地做出回应。

enter image description here

> dput(lfvendrose) 
structure(list(Time = 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), Payee = structure(c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Firm", "Vendor"), class = "factor"), 
    Data1 = structure(c(12L, 10L, 8L, 13L, 7L, 9L, 14L, 3L, 5L, 
    17L, 6L, 11L, 2L, 15L, 18L, 2L, 4L, 19L, 1L, 16L, 18L, 2L, 
    15L, 18L), .Label = c("0, 1", "0, 13", "0, 15", "0, 2", "0, 20", 
    "0, 34", "0, 39", "0, 40", "0, 41", "0, 45", "0, 48", "0, 50", 
    "0, 64", "0, 68", "0, 9", "0, 90", "0, 94", "0,11", "0,16" 
    ), class = "factor"), Month = structure(c(5L, 4L, 8L, 1L, 
    9L, 7L, 6L, 2L, 12L, 11L, 10L, 3L, 5L, 4L, 8L, 1L, 9L, 7L, 
    6L, 2L, 12L, 11L, 10L, 3L), .Label = c("Apr", "Aug", "Dec", 
    "Feb", "Jan", "Jul", "Jun", "Mar", "May", "Nov", "Oct", "Sep" 
    ), class = "factor"), Month.1 = structure(c(5L, 4L, 8L, 1L, 
    9L, 7L, 6L, 2L, 12L, 11L, 10L, 3L, 5L, 4L, 8L, 1L, 9L, 7L, 
    6L, 2L, 12L, 11L, 10L, 3L), .Label = c("Apr", "Aug", "Dec", 
    "Feb", "Jan", "Jul", "Jun", "Mar", "May", "Nov", "Oct", "Sep" 
    ), class = "factor"), Data2 = structure(c(11L, 10L, 6L, 12L, 
    8L, 4L, 13L, 3L, 7L, 15L, 9L, 5L, 2L, 14L, 16L, 1L, 11L, 
    10L, 6L, 12L, 8L, 4L, 13L, 3L), .Label = c("0, 13,1", "0, 13,50", 
    "0, 15, 30", "0, 40, 100", "0, 40,1", "0, 40,3", "0, 40,5", 
    "0, 45, 5", "0, 45,15", "0, 45,2", "0, 50,1", "0, 64, 4", 
    "0, 64,200", "0, 9,150", "0, 94,10", "0,11, 400"), class = "factor")), .Names = c("Time", 
"Payee", "Data1", "Month", "Month.1", "Data2"), class = "data.frame", row.names = c(NA, 
-24L))