Live USB версия работает, но не установлена ​​версия

@Giuseppe, вы можете рассмотреть это для гибкой спецификации компоновки графиков (измененных здесь здесь ):

library(ggplot2)
library(gridExtra)
library(grid)

grid_arrange_shared_legend <- function(..., nrow = 1, ncol = length(list(...)), position = c("bottom", "right")) {

  plots <- list(...)
  position <- match.arg(position)
  g <- ggplotGrob(plots[[1]] + theme(legend.position = position))$grobs
  legend <- g[[which(sapply(g, function(x) x$name) == "guide-box")]]
  lheight <- sum(legend$height)
  lwidth <- sum(legend$width)
  gl <- lapply(plots, function(x) x + theme(legend.position = "none"))
  gl <- c(gl, nrow = nrow, ncol = ncol)

  combined <- switch(position,
                     "bottom" = arrangeGrob(do.call(arrangeGrob, gl),
                                            legend,
                                            ncol = 1,
                                            heights = unit.c(unit(1, "npc") - lheight, lheight)),
                     "right" = arrangeGrob(do.call(arrangeGrob, gl),
                                           legend,
                                           ncol = 2,
                                           widths = unit.c(unit(1, "npc") - lwidth, lwidth)))
  grid.newpage()
  grid.draw(combined)

}

Дополнительные аргументы nrow и ncol управляет компоновкой расположенных графиков:

dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
p1 <- qplot(carat, price, data = dsamp, colour = clarity)
p2 <- qplot(cut, price, data = dsamp, colour = clarity)
p3 <- qplot(color, price, data = dsamp, colour = clarity)
p4 <- qplot(depth, price, data = dsamp, colour = clarity)
grid_arrange_shared_legend(p1, p2, p3, p4, nrow = 1, ncol = 4)
grid_arrange_shared_legend(p1, p2, p3, p4, nrow = 2, ncol = 2)

0
задан Mark Jacobs 10 May 2012 в 14:51
поделиться

1 ответ

Вы попробовали другим беспроводным адаптером и мышью? У меня была та же проблема с беспроводным адаптером, и это работало на меня. Вы протестировали, если это работает с нормальным CD? Я думаю, что необходимо сообщить об этом как об ошибке с или без дальнейших тестов. И не забывайте добавлять, какие спецификации и какую мышь и беспроводной адаптер Вы имеете!

0
ответ дан Leo 22 October 2019 в 14:37
поделиться
Другие вопросы по тегам:

Похожие вопросы: