@@ -700,7 +700,6 @@ def plot_variable_importance( # noqa: PLR0915
700
700
labels : Optional [List [str ]] = None ,
701
701
method : str = "VI" ,
702
702
figsize : Optional [Tuple [float , float ]] = None ,
703
- xlabel_angle : float = 0 ,
704
703
samples : int = 50 ,
705
704
random_seed : Optional [int ] = None ,
706
705
plot_kwargs : Optional [Dict [str , Any ]] = None ,
@@ -728,9 +727,6 @@ def plot_variable_importance( # noqa: PLR0915
728
727
VI requieres less computation time.
729
728
figsize : tuple
730
729
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.
734
730
samples : int
735
731
Number of predictions used to compute correlation for subsets of variables. Defaults to 100
736
732
random_seed : Optional[int]
@@ -898,7 +894,11 @@ def plot_variable_importance( # noqa: PLR0915
898
894
alpha = 0.1 ,
899
895
color = plot_kwargs .get ("color_ref" , "grey" ),
900
896
)
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
+ )
902
902
ax .set_ylabel ("R²" , rotation = 0 , labelpad = 12 )
903
903
ax .set_ylim (0 , 1 )
904
904
ax .set_xlim (- 0.5 , n_vars - 0.5 )
0 commit comments