There are now a few elegant ways to generate a Gantt chart in R. Using Candela library(candela) data <- list( list(name='Do this', level=1, start=0, end=5), list(name='This part 1', level=2, start=0, end=3), list(name='This part 2', level=2, start=3, end=5), list(name='Then that', level=1, start=5, end=15), list(name='That part 1', level=2, start=5, end=10), list(name='That part 2', level=2, start
I'd like to show data values on stacked bar chart in ggplot2. Here is my attempted code library(ggplot2) Data <- data.frame( Year = c(rep(c("2006-07", "2007-08", "2008-09", "2009-10"), each = 4)), Category = c(rep(c("A", "B", "C", "D"), times = 4)), Frequency = c(168, 259, 226, 340, 216, 431, 319, 368, 423, 645, 234, 685, 166, 467, 274, 251) ) ggplot(Data, aes(Year, Frequency, fill = Category)) +
If I try to manually compose some elements of a ggplot2 plot, it works just fine: > p <- ggplot(aes(x = mpg, y = hp), data = mtcars) > p + geom_vline(xintercept = 20) + geom_point(data = mtcars) But if I try to bundle some of the composition into a function, I get an error: > myFunction <- function() { + return( + geom_vline(xintercept = 20) + geom_point(data = mtcars) + ) + } > p <- ggplot(aes(x
Below is the default_aes for each geom, colour size linetype alpha fill weight shape width height angle hjust vjust family fontface lineheight abline black 0.5 1 yes -- -- -- -- -- -- -- -- -- -- -- area yes 0.5 1 yes grey20 -- -- -- -- -- -- -- -- -- -- bar yes 0.5 1 yes grey20 1 -- -- -- -- -- -- -- -- -- bin2d yes 0.5 1 yes grey60 1 -- -- -- -- -- -- -- -- -- boxplot grey20 0.5 solid yes white
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く