Open KrissiHub opened 9 months ago
In this section, different functions, either matplotlib functions or functions of the styled plot module, are called on the plt variable, which is a matplotlib object. (render() is a styled plot function, ylabel() belongs to matplotlib i.e.) https://github.com/automl/DeepCAVE/blob/1851126c064a3120299250fb39b2c00d00abbc2e/deepcave/plugins/hyperparameter/importances.py#L348-L363 Calling functions of the styled plot module on the matplotlib object causes an error. The inheritance process here, is that plt is a matplotlib object in the styled plot module, and then gets passed further to the importance module https://github.com/automl/DeepCAVE/blob/1851126c064a3120299250fb39b2c00d00abbc2e/deepcave/utils/styled_plot.py#L9 https://github.com/automl/DeepCAVE/blob/1851126c064a3120299250fb39b2c00d00abbc2e/deepcave/plugins/hyperparameter/importances.py#L13 It is still a matplotlib object though, so we can't call styled plot functions (like render() i.e.) on plt.
This is also a problem in the modules Pareto front and footprint
We should probably rename everything that is not matplotlib.pyplot to something else rather than plt/ try to disambiguate these two cases.
matplotlib.pyplot
plt
In this section, different functions, either matplotlib functions or functions of the styled plot module, are called on the plt variable, which is a matplotlib object. (render() is a styled plot function, ylabel() belongs to matplotlib i.e.) https://github.com/automl/DeepCAVE/blob/1851126c064a3120299250fb39b2c00d00abbc2e/deepcave/plugins/hyperparameter/importances.py#L348-L363
Calling functions of the styled plot module on the matplotlib object causes an error. The inheritance process here, is that plt is a matplotlib object in the styled plot module, and then gets passed further to the importance module https://github.com/automl/DeepCAVE/blob/1851126c064a3120299250fb39b2c00d00abbc2e/deepcave/utils/styled_plot.py#L9 https://github.com/automl/DeepCAVE/blob/1851126c064a3120299250fb39b2c00d00abbc2e/deepcave/plugins/hyperparameter/importances.py#L13 It is still a matplotlib object though, so we can't call styled plot functions (like render() i.e.) on plt.