Commit 5b42232b authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

bump mpl version

parent b6cb7dd4
......@@ -32,7 +32,7 @@ Building Kwant requires
C++.
The following software is highly recommended though not strictly required:
* `matplotlib <http://matplotlib.sourceforge.net/>`_ 1.1 or newer, for Kwant's
* `matplotlib <http://matplotlib.sourceforge.net/>`_ 1.5 or newer, for Kwant's
plotting module and the tutorial,
* `MUMPS <http://graal.ens-lyon.fr/MUMPS/>`_, a sparse linear algebra library
that will in many cases speed up Kwant several times and reduce the memory
......
......@@ -48,24 +48,6 @@ __all__ = ['plot', 'map', 'bands', 'sys_leads_sites', 'sys_leads_hoppings',
'sys_leads_pos', 'sys_leads_hopping_pos', 'mask_interpolate']
# TODO: Remove the following once we depend on matplotlib >= 1.4.1.
def matplotlib_chores():
global pre_1_4_matplotlib
ver = matplotlib.__version__
if ver == "1.4.0":
warnings.warn("Matplotlib 1.4.0 has a bug that makes 3D plotting "
"unusable (2D plotting is not affected). Please "
"consider using a different version of matplotlib.",
RuntimeWarning)
pre_1_4_matplotlib = [int(x) for x in ver.split('.')[:2]] < [1, 4]
if mpl_enabled:
matplotlib_chores()
# Collections that allow for symbols and linewiths to be given in data space
# (not for general use, only implement what's needed for plotter)
def isarray(var):
......@@ -109,10 +91,6 @@ if mpl_enabled:
self.reflen = reflen
self.linewidths_orig = nparray_if_array(self.get_linewidths())
if pre_1_4_matplotlib:
self.transforms = [matplotlib.transforms.Affine2D().scale(x)
for x in sizes]
else:
self.transforms = np.array(
[matplotlib.transforms.Affine2D().scale(x).get_matrix()
for x in sizes])
......@@ -236,10 +214,6 @@ if mpl_enabled:
self.edgecolors_orig = nparray_if_array(self.get_edgecolors())
Affine2D = matplotlib.transforms.Affine2D
if pre_1_4_matplotlib:
self.orig_transforms = np.array(
[Affine2D().scale(x) for x in sizes], dtype='object')
else:
self.orig_transforms = np.array(
[Affine2D().scale(x).get_matrix() for x in sizes])
self.transforms = self.orig_transforms
......
......@@ -489,7 +489,7 @@ def main():
include_dirs=include_dirs,
setup_requires=['numpy > 1.6.1', 'nose >= 1.0'],
install_requires=['numpy > 1.6.1', 'scipy >= 0.9', 'tinyarray'],
extras_require={'plotting': 'matplotlib >= 1.2'},
extras_require={'plotting': 'matplotlib >= 1.5'},
classifiers=[c.strip() for c in CLASSIFIERS.split('\n')])
if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment