plot.model_performance {DALEX} gives a warning related to the size of element_line() related to ggplot2
When trying to plot a model performance I get the following warning and the line is not displayed:
Warning: The size argument of element_line() is deprecated as of
ggplot2 3.4.0.
ℹ Please use the linewidth argument instead.
ℹ The deprecated feature was likely used in the DALEX
package.
Please report the issue at
https://github.com/ModelOriented/DALEX/issues.
This warning is displayed once every 8 hours.
Call lifecycle::last_lifecycle_warnings() to see where this
warning was generated.
Can you please provide a minimal reproducible example?
library("ranger") titanic_ranger_model <- ranger(survived~., data = titanic_imputed, num.trees = 50, probability = TRUE) explainer_ranger <- explain(titanic_ranger_model, data = titanic_imputed[,-8], y = titanic_imputed$survived) mp_ranger <- model_performance(explainer_ranger) plot(mp_ranger)
Running this code with the current CRAN version 2.5.2 does not seem to give a warning.
That’s strange — I’m running DALEX version 2.5.2 in R 4.5.1 on macOS (Tahoe 26.0.1, arm64).
However, the warning itself is not my main concern. The actual issue is that: • The line in the plot(model_performance_object) output is not displayed. • In addition, the whiskers of the boxplot in the feature importance plot (plot(feature_importance)) are not visible.
And I am using ggplot2 4.0.0
With ggplot2 4, I can reproduce the issue.
Thanks for confirming — it does look like this is a ggplot2 v4 compatibility issue.