Skip to content

Commit

Permalink
Added matplotlib RegressionPlot test
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 26, 2017
1 parent 0747482 commit 38d68d7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testplotinstantiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
except:
mpl_renderer = None


try:
import seaborn as sns
from holoviews.interface.seaborn import Regression
except:
sns = None

try:
import holoviews.plotting.bokeh
bokeh_renderer = Store.renderers['bokeh']
Expand Down Expand Up @@ -97,6 +104,14 @@ def test_interleaved_overlay(self):
o = Overlay([Curve(np.array([[0, 1]])) , Scatter([[1,1]]) , Curve(np.array([[0, 1]]))])
OverlayPlot(o)

def test_regression_plot_initializes(self):
if sns is None:
raise SkipTest("Seaborn required to test Regression plot")
reg = Regression(np.random.rand(20,2))
plot = mpl_renderer.get_plot(reg)
axis = plot.handles['axis']
plot.initialize_plot()

def test_dynamic_nonoverlap(self):
kdims = [Dimension('File', range=(0.01, 1)),
Dimension('SliceDimension', range=(0.01, 1)),
Expand Down

0 comments on commit 38d68d7

Please sign in to comment.