class_docstr: Test ResidualPlot visualizer
class_docstr_tok: ["Test","ResidualPlot","visualizer"]
docstr: ValueError is raised when matplotlib version is incorrect and hist=True
docstr_tok: ["ValueError","is","raised","when","matplotlib","version","is","incorrect","and","hist=True"]
code: def test_hist_matplotlib_version(self, mock_toolkit):
      """
      ValueError is raised when matplotlib version is incorrect and hist=True
      """
      with pytest.raises(ImportError):
          from mpl_toolkits.axes_grid1 import make_axes_locatable
  
          assert not make_axes_locatable
  
      with pytest.raises(
          YellowbrickValueError, match="requires matplotlib 2.0.2"
      ):
          ResidualsPlot(LinearRegression(), hist=True)
  
imports: import sys
  import pytest
  import matplotlib
  import matplotlib.pyplot
  from yellowbrick.datasets import load_energy
  from yellowbrick.exceptions import YellowbrickValueError
  from yellowbrick.regressor.residuals import ResidualsPlot, residuals_plot
  from unittest import mock
  from tests.fixtures import Dataset, Split
  from tests.base import IS_WINDOWS_OR_CONDA, VisualTestCase
  from sklearn.datasets import make_regression
  from sklearn.linear_model import Ridge, Lasso
  from sklearn.neural_network import MLPRegressor
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler
label_desc: Use image node_id 5 for calling the TestResidualsPlot obj's underlying member method code with example usage: obj.test_hist_matplotlib_version(mock_toolkit) without return types