In [1]:
%load_ext autoreload
%autoreload 2

%matplotlib inline

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
In [2]:
plt.rcParams['figure.figsize'] = [14, 9]
In [4]:
from sklearn_plot_api import plot_learning_curve

from sklearn.datasets import load_digits
from sklearn.naive_bayes import GaussianNB
from sklearn.model_selection import ShuffleSplit

cv = ShuffleSplit(n_splits=100, test_size=0.2, random_state=0)
estimator = GaussianNB()
digits = load_digits()
X, y = digits.data, digits.target

First plot

In [5]:
viz = plot_learning_curve(estimator, X, y, n_jobs=4, cv=cv)

Adjust plot directly

In [6]:
viz.train_fill_between_.set_color('red')
viz.train_line_.set_color('red')
viz.ax_.legend()
viz.figure_
Out[6]:

Plot another

In [7]:
viz.plot()
Out[7]:
<sklearn_plot_api.learning_curve.LearningCurveViz at 0x11269da20>