@@ -700,7 +700,6 @@ def plot_variable_importance( # noqa: PLR0915
700700 labels : Optional [List [str ]] = None ,
701701 method : str = "VI" ,
702702 figsize : Optional [Tuple [float , float ]] = None ,
703- xlabel_angle : float = 0 ,
704703 samples : int = 50 ,
705704 random_seed : Optional [int ] = None ,
706705 plot_kwargs : Optional [Dict [str , Any ]] = None ,
@@ -728,9 +727,6 @@ def plot_variable_importance( # noqa: PLR0915
728727 VI requieres less computation time.
729728 figsize : tuple
730729 Figure size. If None it will be defined automatically.
731- xlabel_angle : float
732- rotation angle of the x-axis labels. Defaults to 0. Use values like 45 for
733- long labels and/or many variables.
734730 samples : int
735731 Number of predictions used to compute correlation for subsets of variables. Defaults to 100
736732 random_seed : Optional[int]
@@ -898,7 +894,11 @@ def plot_variable_importance( # noqa: PLR0915
898894 alpha = 0.1 ,
899895 color = plot_kwargs .get ("color_ref" , "grey" ),
900896 )
901- ax .set_xticks (ticks , new_labels , rotation = xlabel_angle )
897+ ax .set_xticks (
898+ ticks ,
899+ new_labels ,
900+ rotation = plot_kwargs .get ("rotation" , 0 ),
901+ )
902902 ax .set_ylabel ("R²" , rotation = 0 , labelpad = 12 )
903903 ax .set_ylim (0 , 1 )
904904 ax .set_xlim (- 0.5 , n_vars - 0.5 )
0 commit comments