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.
This commit is contained in:
Bruno Tremblay 2018-10-23 23:52:33 -04:00 committed by Philip Hyunsu Cho
parent 02130af47d
commit 32de54fdee

View File

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