{"id":6235,"library":"scikit-plot","title":"Scikit-Plot","description":"Scikit-plot is an intuitive Python library (v0.3.7) that extends scikit-learn objects with easy-to-use plotting functionality. It aims to simplify the visualization of machine learning models and metrics, such as confusion matrices, ROC curves, and learning curves, with minimal boilerplate code. The library has had infrequent releases, with the latest stable version published in August 2018.","status":"maintenance","version":"0.3.7","language":"en","source_language":"en","source_url":"https://github.com/reiinakano/scikit-plot","tags":["scikit-learn","plotting","visualization","machine-learning","metrics","estimators","clustering","decomposition","data-science"],"install":[{"cmd":"pip install scikit-plot","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core functionality, it extends scikit-learn estimators and objects for plotting.","package":"scikit-learn","optional":false},{"reason":"Used for all plotting and visualization functionalities.","package":"matplotlib","optional":false}],"imports":[{"note":"The `scikitplot.plotters` module was deprecated in v0.3.0; functions were moved to specific submodules like `metrics`, `estimators`, etc.","wrong":"from scikitplot.plotters import plot_confusion_matrix","symbol":"skplt.metrics.plot_confusion_matrix","correct":"import scikitplot as skplt\nskplt.metrics.plot_confusion_matrix(y_true, y_pred)"},{"note":"`plot_roc_curve` was deprecated in v0.3.5 in favor of `plot_roc`.","wrong":"skplt.metrics.plot_roc_curve(y_true, y_probas)","symbol":"skplt.metrics.plot_roc","correct":"import scikitplot as skplt\nskplt.metrics.plot_roc(y_true, y_probas)"},{"note":"`plot_precision_recall_curve` was deprecated in v0.3.5 in favor of `plot_precision_recall`.","wrong":"skplt.metrics.plot_precision_recall_curve(y_true, y_probas)","symbol":"skplt.metrics.plot_precision_recall","correct":"import scikitplot as skplt\nskplt.metrics.plot_precision_recall(y_true, y_probas)"}],"quickstart":{"code":"import matplotlib.pyplot as plt\nimport scikitplot as skplt\nfrom sklearn.datasets import load_digits\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.model_selection import train_test_split, cross_val_predict\n\n# Load dataset\nX, y = load_digits(return_X_y=True)\n\n# Split data (though cross_val_predict handles internal splits)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)\n\n# Train a classifier\nclf = RandomForestClassifier(n_estimators=100, random_state=42)\nclf.fit(X_train, y_train)\n\n# Get predictions\ny_pred = clf.predict(X_test)\n\n# Plot confusion matrix\nskplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True)\nplt.title('Normalized Confusion Matrix')\nplt.show()","lang":"python","description":"This quickstart demonstrates how to train a RandomForestClassifier on the digits dataset and then use scikit-plot to visualize its normalized confusion matrix with a single function call. It shows the typical import pattern and the use of a common metric plotting function."},"warnings":[{"fix":"Migrate to the Functions API, importing plotting functions directly from `skplt.metrics`, `skplt.estimators`, `skplt.clusterer`, or `skplt.decomposition`.","message":"The Factory API, a previous way to instantiate plots, was deprecated in v0.3.0 and announced for removal in v0.4.0. Direct function calls from specific modules should be used instead.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Replace `skplt.metrics.plot_precision_recall_curve` with `skplt.metrics.plot_precision_recall` and `skplt.metrics.plot_roc_curve` with `skplt.metrics.plot_roc`.","message":"Functions `plot_precision_recall_curve` and `plot_roc_curve` were deprecated in v0.3.5. They have been replaced by `plot_precision_recall` and `plot_roc`, respectively, which offer more control over plotted curves.","severity":"deprecated","affected_versions":">=0.3.5"},{"fix":"Update import statements to directly reference the new module paths, e.g., `from scikitplot.metrics import plot_confusion_matrix` (or `import scikitplot as skplt; skplt.metrics.plot_confusion_matrix`).","message":"The `scikitplot.plotters` module was deprecated in v0.3.0, and its functions were distributed to more specialized modules (e.g., `skplt.metrics`, `skplt.estimators`).","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"Upgrade to scikit-plot v0.3.2 or later, or manually specify a different colormap where applicable if using older versions.","message":"The `spectral` colormap used internally was deprecated and changed to `nipy_spectral` in v0.3.2 to avoid Matplotlib warnings/errors.","severity":"gotcha","affected_versions":"<0.3.2"},{"fix":"Consider running `scikit-plot` within an environment that matches its original dependencies, typically Python 3.5-3.8 and a compatible `scikit-learn` version (e.g., <1.0). Alternatively, evaluate `scikit-plots` (note the plural), a potentially distinct and more recently maintained library with similar goals, if targeting newer Python environments.","message":"As of its latest release (v0.3.7, August 2018), `scikit-plot` was built for Python versions and `scikit-learn` versions prevalent at that time (e.g., Python 3.5-3.7). Using it with very recent Python or `scikit-learn` versions (e.g., Python 3.9+ or scikit-learn 1.0+) may lead to compatibility issues or require specific dependency pinning.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}