[plotting] testing only pngs because macosx cant convert pdf to png....

This commit is contained in:
mzwiessele 2015-10-05 00:37:39 +01:00
parent 05a58bfe87
commit dcbc8d413a
3 changed files with 11 additions and 14 deletions

View file

@ -22,8 +22,8 @@ class ImshowController(BufferedAxisChangedController):
"""
super(ImshowController, self).__init__(ax, plot_function, plot_limits, resolution, update_lim, **kwargs)
def _init_view(self, ax, X, xmin, xmax, ymin, ymax, **kwargs):
return ax.imshow(X, extent=(xmin, xmax,
def _init_view(self, canvas, X, xmin, xmax, ymin, ymax, **kwargs):
return pl.imshow(canvas, X, extent=(xmin, xmax,
ymin, ymax),
vmin=X.min(),
vmax=X.max(),

View file

@ -161,13 +161,19 @@ class MatplotlibPlots(AbstractPlottingLibrary):
where = kwargs.pop('where') if 'where' in kwargs else None
# pop interpolate, which we actually do not do here!
if 'interpolate' in kwargs: kwargs.pop('interpolate')
from itertools import tee
try:
from itertools import izip as zip
except ImportError:
# python 3 already is izip
pass
from itertools import tee, izip
def pairwise(iterable):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
a, b = tee(iterable)
next(b, None)
return izip(a, b)
return zip(a, b)
polycol = []
for y1, y2 in pairwise(percentiles):

View file

@ -28,9 +28,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#===============================================================================
import numpy as np
import GPy, os, sys
import GPy, os
from nose import SkipTest
import unittest
from matplotlib.testing.compare import compare_images
try:
@ -48,20 +47,12 @@ def _image_directories(func):
Create the result directory if it doesn't exist.
"""
module_name = func.__module__
path = module_name
mods = module_name.split('.')
subdir = os.path.join(*mods)
basedir = os.path.join(*mods)
result_dir = os.path.join(basedir, 'testresult')
baseline_dir = os.path.join(basedir, 'baseline')
if not os.path.exists(result_dir):
cbook.mkdirs(result_dir)
return baseline_dir, result_dir