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:
parent
02130af47d
commit
32de54fdee
@ -22,7 +22,7 @@ xgb.ggplot.importance <- function(importance_matrix = NULL, top_n = NULL, measur
|
|||||||
|
|
||||||
plot <-
|
plot <-
|
||||||
ggplot2::ggplot(importance_matrix,
|
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()) +
|
environment = environment()) +
|
||||||
ggplot2::geom_bar(ggplot2::aes(fill = Cluster), stat = "identity", position = "identity") +
|
ggplot2::geom_bar(ggplot2::aes(fill = Cluster), stat = "identity", position = "identity") +
|
||||||
ggplot2::coord_flip() +
|
ggplot2::coord_flip() +
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user