mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-20 15:38:08 +02:00
[plotting] got the old way in again
This commit is contained in:
parent
327ed46c6e
commit
b236896fbd
4 changed files with 10 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ def change_plotting_library(lib):
|
|||
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
|
||||
|
|
@ -22,10 +23,11 @@ def change_plotting_library(lib):
|
|||
current_lib[0] = None
|
||||
#===========================================================================
|
||||
except (ImportError, NameError):
|
||||
raise
|
||||
config.set('plotting', 'library', 'none')
|
||||
import warnings
|
||||
warnings.warn(ImportWarning("{} not available, install newest version of {} for plotting".format(lib, lib)))
|
||||
|
||||
|
||||
from ..util.config import config
|
||||
lib = config.get('plotting', 'library')
|
||||
change_plotting_library(lib)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue