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() +