Hello, and thank you for maintaining mlxtend.
Question
Would you be open to making matplotlib an optional dependency, installable via an extras group (e.g. pip install mlxtend[plotting]) rather than a hard requirement?
I'm happy to open a PR if you're receptive to the idea. Thanks for considering it.
Why this matters
matplotlib is used only for visualization but is currently a hard dependency, so it is always installed regardless of whether plotting is ever used.
- It pulls in a its chain of transitive dependencies.
- Users who only need the algorithmic modules (
frequent_patterns, preprocessing, feature_selection, etc.) currently have no way to avoid this overhead.
- It can create version conflicts in constrained environments.
Precedent
scikit-learn takes this approach — matplotlib is not listed as a runtime dependency at all. It is only imported inside the individual functions that need it, so users who never call plotting functions are never affected. mlxtend's plotting modules are already similarly separated, so the runtime already works without matplotlib for algorithm-only use cases.
Hello, and thank you for maintaining mlxtend.
Question
Would you be open to making
matplotliban optional dependency, installable via an extras group (e.g.pip install mlxtend[plotting]) rather than a hard requirement?I'm happy to open a PR if you're receptive to the idea. Thanks for considering it.
Why this matters
matplotlibis used only for visualization but is currently a hard dependency, so it is always installed regardless of whether plotting is ever used.frequent_patterns,preprocessing,feature_selection, etc.) currently have no way to avoid this overhead.Precedent
scikit-learntakes this approach —matplotlibis not listed as a runtime dependency at all. It is only imported inside the individual functions that need it, so users who never call plotting functions are never affected.mlxtend's plotting modules are already similarly separated, so the runtime already works withoutmatplotlibfor algorithm-only use cases.