improved kernel plotting

This commit is contained in:
James Hensman 2014-11-03 14:03:37 +00:00
parent 4905348dbe
commit 304db40f5b
2 changed files with 40 additions and 14 deletions

View file

@ -132,13 +132,20 @@ class Kern(Parameterized):
"""
raise NotImplementedError
def plot(self, *args, **kwargs):
def plot(self, x=None, fignum=None, ax=None, title=None, plot_limits=None, resolution=None, **mpl_kwargs):
"""
See GPy.plotting.matplot_dep.plot
plot this kernel.
:param x: the value to use for the other kernel argument (kernels are a function of two variables!)
:param fignum: figure number of the plot
:param ax: matplotlib axis to plot on
:param title: the matplotlib title
:param plot_limits: the range over which to plot the kernel
:resolution: the resolution of the lines used in plotting
:mpl_kwargs avalid keyword arguments to pass through to matplotlib (e.g. lw=7)
"""
assert "matplotlib" in sys.modules, "matplotlib package has not been imported."
from ...plotting.matplot_dep import kernel_plots
kernel_plots.plot(self,*args)
kernel_plots.plot(self, x, fignum, ax, title, plot_limits, resolution, **mpl_kwargs)
def plot_ARD(self, *args, **kw):
"""