From 32de54fdeecef1e912663a3a4382b6e11671dcc1 Mon Sep 17 00:00:00 2001 From: Bruno Tremblay <31039074+meztez@users.noreply.github.com> Date: Tue, 23 Oct 2018 23:52:33 -0400 Subject: [PATCH] Update R-package/R/xgb.ggplot.R (#3820) Changed width parameter of var important ggplot from 0.05 to 0.5 to make it more visible when displaying more variables. --- R-package/R/xgb.ggplot.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R-package/R/xgb.ggplot.R b/R-package/R/xgb.ggplot.R index 073e56777..eceb5c4fb 100644 --- a/R-package/R/xgb.ggplot.R +++ b/R-package/R/xgb.ggplot.R @@ -22,7 +22,7 @@ xgb.ggplot.importance <- function(importance_matrix = NULL, top_n = NULL, measur plot <- ggplot2::ggplot(importance_matrix, - ggplot2::aes(x = factor(Feature, levels = rev(Feature)), y = Importance, width = 0.05), + ggplot2::aes(x = factor(Feature, levels = rev(Feature)), y = Importance, width = 0.5), environment = environment()) + ggplot2::geom_bar(ggplot2::aes(fill = Cluster), stat = "identity", position = "identity") + ggplot2::coord_flip() +