def change_plotting_library(lib):
    try:
        #===========================================================================
        # Load in your plotting library here and
        # save it under the name plotting_library!
        # This is hooking the library in
        # for the usage in GPy:
        if lib not in supported_libraries:
            raise ValueError("Warning: Plotting library {} not recognized, currently supported libraries are: \n {}".format(lib, ", ".join(supported_libraries)))
        if lib == 'matplotlib':
            import matplotlib
            from .matplot_dep.plot_definitions import MatplotlibPlots
            from .matplot_dep import visualize, mapping_plots, priors_plots, ssgplvm, svig_plots, variational_plots, img_plots
            current_lib[0] = MatplotlibPlots()
        if lib == 'plotly':
            import plotly
            from .plotly_dep.plot_definitions import PlotlyPlots
            current_lib[0] = PlotlyPlots()
        if lib == 'none':
            current_lib[0] = None
        inject_plotting()
        #===========================================================================
    except (ImportError, NameError):
        config.set('plotting', 'library', 'none')
        raise
        import warnings
        warnings.warn(ImportWarning("You spevified {} in your configuration, but is not available. Install newest version of {} for plotting".format(lib, lib)))
dataset/ETHPy150Open SheffieldML/GPy/GPy/plotting/__init__.py/change_plotting_library/original