You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having consistent plot styles throughout your documents is, at least in my field, very important. My usual approach is to load a pre-defined rcParams style sheet at the beginning of each relevant python script. This results in consistent styles for most plotting tools, such as matplotlib, seaborn, pandas.plotting, plotly, etc.
But in shap, the style of the plots, most specifically font sizes, tick params and spines are incoherent with underlying default parameters, such as matplotlib rcParams. Plot styles are set explicitly in each plot. This makes it really hard to set your own consistent plot style to all plots. The, in my opinion, only viable way to do so, is to fork shap and comment out the explicit plot style definitions.
I'd propose introducing an additional argument, such as style, which can either take style='shap' (default) resulting in the current style, style='matplotlib' using the rcParams or any style sheet as in the matplotlib doc. The styles could be applied easily using a context manager.
Besides having flexibility to easily switch styles, this has the advantage that there can be a single shap style sheet, which can be loaded from within all plotting functions.
If you are interested, I could open a PR.
The text was updated successfully, but these errors were encountered:
Having consistent plot styles throughout your documents is, at least in my field, very important. My usual approach is to load a pre-defined rcParams style sheet at the beginning of each relevant python script. This results in consistent styles for most plotting tools, such as matplotlib, seaborn, pandas.plotting, plotly, etc.
But in shap, the style of the plots, most specifically font sizes, tick params and spines are incoherent with underlying default parameters, such as matplotlib rcParams. Plot styles are set explicitly in each plot. This makes it really hard to set your own consistent plot style to all plots. The, in my opinion, only viable way to do so, is to fork shap and comment out the explicit plot style definitions.
I'd propose introducing an additional argument, such as
style
, which can either takestyle='shap'
(default) resulting in the current style,style='matplotlib'
using the rcParams or any style sheet as in the matplotlib doc. The styles could be applied easily using a context manager.Besides having flexibility to easily switch styles, this has the advantage that there can be a single shap style sheet, which can be loaded from within all plotting functions.
If you are interested, I could open a PR.
The text was updated successfully, but these errors were encountered: