Remove the dependency on matplotlib

This commit is contained in:
Zhenwen Dai 2014-09-12 11:51:51 +01:00
parent d7eee6aa00
commit 049b58c729
22 changed files with 80 additions and 48 deletions

View file

@ -1,4 +1,7 @@
# Copyright (c) 2014, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import matplot_dep
try:
import matplot_dep
except (ImportError, NameError):
print 'Fail to load GPy.plotting.matplot_dep.'

View file

@ -2,8 +2,11 @@
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import Tango
import pylab as pb
try:
import Tango
import pylab as pb
except:
pass
import numpy as np
def ax_default(fignum, ax):

View file

@ -1,12 +1,16 @@
import pylab as pb
import numpy as np
from latent_space_visualizations.controllers.imshow_controller import ImshowController,ImAnnotateController
from ...util.misc import param_to_array
from ...core.parameterization.variational import VariationalPosterior
from .base_plots import x_frame2D
import itertools
import Tango
from matplotlib.cm import get_cmap
try:
import Tango
from matplotlib.cm import get_cmap
import pylab as pb
except:
pass
def most_significant_input_dimensions(model, which_indices):
"""

View file

@ -1,8 +1,10 @@
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import pylab as pb
import sys
try:
import pylab as pb
except:
pass
#import numpy as np
#import Tango
#from base_plots import gpplot, x_frame1D, x_frame2D

View file

@ -1,9 +1,12 @@
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import pylab as pb
import numpy as np
import Tango
try:
import Tango
import pylab as pb
except:
pass
from base_plots import x_frame1D, x_frame2D

View file

@ -1,13 +1,14 @@
import numpy as np
import pylab as pb
import matplotlib.patches as patches
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
#from matplotlib import cm
try:
import pylab as pb
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
#from matplotlib import cm
pb.ion()
except:
pass
import re
pb.ion()
def plot(shape_records,facecolor='w',edgecolor='k',linewidths=.5, ax=None,xlims=None,ylims=None):
"""
Plot the geometry of a shapefile

View file

@ -1,9 +1,12 @@
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import pylab as pb
try:
import Tango
import pylab as pb
except:
pass
import numpy as np
import Tango
from base_plots import gpplot, x_frame1D, x_frame2D
from ...util.misc import param_to_array
from ...models.gp_coregionalized_regression import GPCoregionalizedRegression

View file

@ -3,7 +3,10 @@
import numpy as np
import pylab as pb
try:
import pylab as pb
except:
pass
def univariate_plot(prior):

View file

@ -6,7 +6,6 @@ import pylab
from ...models import SSGPLVM
from img_plots import plot_2D_images
from ...util.misc import param_to_array
class SSGPLVM_plot(object):
def __init__(self,model, imgsize):