diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.mailmap matplotlib-1.2.0/.mailmap --- matplotlib-1.2.0~1+6455+16~quantal1/.mailmap 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/.mailmap 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -John Hunter jdh2358 -Michael Droettboom Michael Droettboom -Jouni K. Seppänen Jouni K. Seppänen -Ben Root Benjamin Root -Michiel de Hoon Michiel de Hoon -Kevin Davies Kevin Davies -Christoph Gohlke cgohlke diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.pc/.version matplotlib-1.2.0/.pc/.version --- matplotlib-1.2.0~1+6455+16~quantal1/.pc/.version 2013-01-24 01:34:18.000000000 +0000 +++ matplotlib-1.2.0/.pc/.version 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -2 diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.pc/10_build_fix.patch/setupext.py matplotlib-1.2.0/.pc/10_build_fix.patch/setupext.py --- matplotlib-1.2.0~1+6455+16~quantal1/.pc/10_build_fix.patch/setupext.py 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/.pc/10_build_fix.patch/setupext.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,1396 +0,0 @@ -""" -Some helper functions for building the C extensions - -You may need to use the "basedirlist" option in setup.cfg to point -to the location of your required libs, eg, png, z, freetype, -overriding the settings hard-coded in the "basedir" directory -below. - -DARWIN - - I have installed all of the backends on OSX. - - Tk: If you want to install TkAgg, I recommend the "batteries included" - binary build of Tcl/Tk at - http://www.apple.com/downloads/macosx/unix_open_source/tcltkaqua.html - - GTK: I installed GTK from src as described at - http://www.macgimp.org/index.php?topic=gtk. There are several - packages, but all configure/make/make install w/o problem. In - addition to the packages listed there, You will also need libpng, - libjpeg, and libtiff if you want output to these formats from GTK. - -WIN32 - MINGW - - If you are sufficiently masochistic that you want to build this - yourself, download the win32_static dir from - http://matplotlib.sourceforge.net/win32_static.tar.gz and - see the README file in that dir - - > python setup.py build --compiler=mingw32 bdist_wininst > build23.out - - NOTE, if you are building on python24 on win32, see - http://mail.python.org/pipermail/python-list/2004-December/254826.html - -WIN32 - VISUAL STUDIO 7.1 (2003) - - This build is similar to the mingw. Download the visual studio static - dependencies from - http://matplotlib.sourceforge.net/win32_static_vs.tar.gz and - see the README in that dir - - > python setup.py build --compiler=msvc bdist_wininst - -""" - -import os -import re -import subprocess -from distutils import sysconfig, version -from collections import defaultdict - -# basedir is a dictionary keyed by sys.platform, and on most platforms it is -# set to ['/usr/local', '/usr']. Giving this defaultdict a factory that -# returns this default removes the need to update this code every time a new -# version of freebsd comes out, for example, provided that the default basedir -# remains sufficient on that platform -basedir = defaultdict(lambda: ['/usr/local', '/usr'], { - # execptions to the ['/usr/local', '/usr'] defaults - 'win32' : ['win32_static',], - 'darwin' : ['/usr/local/', '/usr', '/usr/X11', '/opt/local'], - 'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',], - 'gnu0' : ['/usr'], - 'aix5' : ['/usr/local'], - }) - -import sys - -from textwrap import fill -from distutils.core import Extension -import glob - -if sys.version_info[0] < 3: - import ConfigParser as configparser - from cStringIO import StringIO - if sys.platform != 'win32': - from commands import getstatusoutput -else: - import configparser - from io import StringIO - if sys.platform != 'win32': - from subprocess import getstatusoutput - -BUILT_PNG = False -BUILT_AGG = False -BUILT_FT2FONT = False -BUILT_TTCONV = False -BUILT_GTKAGG = False -BUILT_IMAGE = False -BUILT_MACOSX = False -BUILT_TKAGG = False -BUILT_WINDOWING = False -BUILT_CONTOUR = False -BUILT_DELAUNAY = False -BUILT_CONTOUR = False -BUILT_GDK = False -BUILT_PATH = False -BUILT_TRI = False - -AGG_VERSION = 'agg24' -TCL_TK_CACHE = None - -# for nonstandard installation/build with --prefix variable -numpy_inc_dirs = [] - -# matplotlib build options, which can be altered using setup.cfg -options = {'display_status': True, - 'verbose': False, - 'provide_pytz': 'auto', - 'provide_dateutil': 'auto', - 'provide_six': 'auto', - 'build_agg': True, - 'build_gtk': 'auto', - 'build_gtkagg': 'auto', - 'build_tkagg': 'auto', - 'build_macosx': 'auto', - 'build_image': True, - 'build_windowing': True, - 'backend': None, - 'basedirlist': None} - -defines = [ - ('PY_ARRAY_UNIQUE_SYMBOL', 'MPL_ARRAY_API'), - ('PYCXX_ISO_CPP_LIB', '1')] - -if sys.version_info[0] >= 3: - defines.append(('PYCXX_PYTHON_2TO3', '1')) - -setup_cfg = os.environ.get('MPLSETUPCFG', 'setup.cfg') -# Based on the contents of setup.cfg, determine the build options -if os.path.exists(setup_cfg): - config = configparser.SafeConfigParser() - config.read(setup_cfg) - - try: options['display_status'] = not config.getboolean("status", "suppress") - except: pass - - try: options['verbose'] = not config.getboolean("status", "verbose") - except: pass - - try: options['provide_pytz'] = config.getboolean("provide_packages", "pytz") - except: options['provide_pytz'] = 'auto' - - try: options['provide_dateutil'] = config.getboolean("provide_packages", - "dateutil") - except: options['provide_dateutil'] = 'auto' - - try: options['provide_six'] = config.getboolean("provide_packages", - "six") - except: options['provide_six'] = 'auto' - - try: options['build_gtk'] = config.getboolean("gui_support", "gtk") - except: options['build_gtk'] = 'auto' - - try: options['build_gtkagg'] = config.getboolean("gui_support", "gtkagg") - except: options['build_gtkagg'] = 'auto' - - try: options['build_tkagg'] = config.getboolean("gui_support", "tkagg") - except: options['build_tkagg'] = 'auto' - - try: options['build_macosx'] = config.getboolean("gui_support", "macosx") - except: options['build_macosx'] = 'auto' - - try: options['backend'] = config.get("rc_options", "backend") - except: pass - - try: options['basedirlist'] = config.get("directories", "basedirlist") - except: pass - -# For get_base_flags: -if options['basedirlist']: - basedirlist = options['basedirlist'].split() -else: - basedirlist = basedir[sys.platform] -print("basedirlist is: %s" % basedirlist) - -def make_extension(*args, **kwargs): - ext = Extension(*args, **kwargs) - for dir in basedirlist: - ext.include_dirs.append(os.path.join(dir, 'include')) - return ext - -if options['display_status']: - def print_line(char='='): - print(char * 76) - - def print_status(package, status): - initial_indent = "%22s: " % package - indent = ' ' * 24 - print(fill(str(status), width=76, - initial_indent=initial_indent, - subsequent_indent=indent)) - - def print_message(message): - indent = ' ' * 24 + "* " - print(fill(str(message), width=76, - initial_indent=indent, - subsequent_indent=indent)) - - def print_raw(section): - print(section) -else: - def print_line(*args, **kwargs): - pass - print_status = print_message = print_raw = print_line - -# Remove the -Wstrict-prototypesoption, is it's not valid for C++ -customize_compiler = sysconfig.customize_compiler -def my_customize_compiler(compiler): - retval = customize_compiler(compiler) - try: - compiler.compiler_so.remove('-Wstrict-prototypes') - except (ValueError, AttributeError): - pass - return retval - -sysconfig.customize_compiler = my_customize_compiler - - - -def run_child_process(cmd): - p = subprocess.Popen(cmd, shell=True, - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - close_fds=(sys.platform != 'win32')) - return p.stdin, p.stdout - -class CleanUpFile: - """CleanUpFile deletes the specified filename when self is destroyed.""" - def __init__(self, name): - self.name = name - def __del__(self): - os.remove(self.name) - -def temp_copy(_from, _to): - """temp_copy copies a named file into a named temporary file. - The temporary will be deleted when the setupext module is destructed. - """ - # Copy the file data from _from to _to - s = open(_from).read() - open(_to,"w+").write(s) - # Suppress object rebuild by preserving time stamps. - stats = os.stat(_from) - os.utime(_to, (stats.st_atime, stats.st_mtime)) - # Make an object to eliminate the temporary file at exit time. - globals()["_cleanup_"+_to] = CleanUpFile(_to) - -def get_win32_compiler(): - # Used to determine mingw32 or msvc - # This is pretty bad logic, someone know a better way? - for v in sys.argv: - if 'mingw32' in v: - return 'mingw32' - return 'msvc' -win32_compiler = get_win32_compiler() -if sys.platform == 'win32' and win32_compiler == 'msvc': - std_libs = [] -else: - std_libs = ['stdc++', 'm'] - -def set_pkgconfig_path(): - pkgconfig_path = sysconfig.get_config_var('LIBDIR') - if pkgconfig_path is None: - return - - pkgconfig_path = os.path.join(pkgconfig_path, 'pkgconfig') - if not os.path.isdir(pkgconfig_path): - return - - try: - os.environ['PKG_CONFIG_PATH'] += ':' + pkgconfig_path - except KeyError: - os.environ['PKG_CONFIG_PATH'] = pkgconfig_path - -def has_pkgconfig(): - if has_pkgconfig.cache is not None: - return has_pkgconfig.cache - if sys.platform == 'win32': - has_pkgconfig.cache = False - else: - #print 'environ', os.environ['PKG_CONFIG_PATH'] - status, output = getstatusoutput("pkg-config --help") - has_pkgconfig.cache = (status == 0) - - # Set the PKG_CONFIG_PATH environment variable - if has_pkgconfig.cache: - set_pkgconfig_path() - return has_pkgconfig.cache -has_pkgconfig.cache = None - -def get_pkgconfig(module, - packages, - flags="--libs --cflags", - pkg_config_exec='pkg-config', - report_error=False): - """Loosely based on an article in the Python Cookbook: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/502261""" - if not has_pkgconfig(): - return False - - _flags = {'-I': 'include_dirs', - '-L': 'library_dirs', - '-l': 'libraries', - '-D': 'define_macros', - '-U': 'undef_macros'} - - cmd = "%s %s %s" % (pkg_config_exec, flags, packages) - status, output = getstatusoutput(cmd) - if status == 0: - for token in output.split(): - attr = _flags.get(token[:2], None) - if attr is not None: - if token[:2] == '-D': - value = tuple(token[2:].split('=')) - if len(value) == 1: - value = (value[0], None) - else: - value = token[2:] - set = getattr(module, attr) - if value not in set: - set.append(value) - else: - if token not in module.extra_link_args: - module.extra_link_args.append(token) - return True - if report_error: - print_status("pkg-config", "looking for %s" % packages) - print_message(output) - return False - -def get_pkgconfig_version(package): - default = "found, but unknown version (no pkg-config)" - if not has_pkgconfig(): - return default - - status, output = getstatusoutput( - "pkg-config %s --modversion" % (package)) - if status == 0: - return output - return default - -def try_pkgconfig(module, package, fallback): - if not get_pkgconfig(module, package): - module.libraries.append(fallback) - -def find_include_file(include_dirs, filename): - for d in include_dirs: - if os.path.exists(os.path.join(d, filename)): - return True - return False - -def check_for_freetype(): - module = make_extension('test', []) - add_base_flags(module) - if not get_pkgconfig(module, 'freetype2'): - basedirs = module.include_dirs[:] # copy the list to avoid inf loop! - for d in basedirs: - module.include_dirs.append(os.path.join(d, 'freetype2')) - - print_status("freetype2", get_pkgconfig_version('freetype2')) - if not find_include_file(module.include_dirs, 'ft2build.h'): - print_message( - "WARNING: Could not find 'freetype2' headers in any of %s." % - ", ".join(["'%s'" % x for x in module.include_dirs])) - - return True - -def check_for_libpng(): - module = make_extension("test", []) - get_pkgconfig(module, 'libpng') - add_base_flags(module) - - print_status("libpng", get_pkgconfig_version('libpng')) - if not find_include_file(module.include_dirs, 'png.h'): - print_message( - "Could not find 'libpng' headers in any of %s" % - ", ".join(["'%s'" % x for x in module.include_dirs])) - - return True - -def add_base_flags(module): - incdirs = filter(os.path.exists, - [os.path.join(p, 'include') for p in basedirlist ]) - libdirs = filter(os.path.exists, - [os.path.join(p, 'lib') for p in basedirlist ]+ - [os.path.join(p, 'lib64') for p in basedirlist ] ) - - module.include_dirs.extend(incdirs) - module.include_dirs.append('.') - module.library_dirs.extend(libdirs) - -def getoutput(s): - 'get the output of a system command' - - ret = os.popen(s).read().strip() - return ret - -def convert_qt_version(version): - version = '%x'%version - temp = [] - while len(version) > 0: - version, chunk = version[:-2], version[-2:] - temp.insert(0, str(int(chunk, 16))) - return '.'.join(temp) - -def check_for_qt(): - try: - import pyqtconfig - except ImportError: - print_status("Qt", "no") - return False - else: - try: - qt_version = pyqtconfig.Configuration().qt_version - qt_version = convert_qt_version(qt_version) - except AttributeError: - qt_version = "" - print_status("Qt", "Qt: %s, PyQt: %s" % - (qt_version, - pyqtconfig.Configuration().pyqt_version_str)) - return True - -def check_for_qt4(): - try: - from PyQt4 import pyqtconfig - except ImportError: - print_status("Qt4", "no") - return False - else: - print_status("Qt4", "Qt: %s, PyQt4: %s" % - (convert_qt_version(pyqtconfig.Configuration().qt_version), - pyqtconfig.Configuration().pyqt_version_str)) - return True - -def check_for_pyside(): - try: - from PySide import __version__ - from PySide import QtCore - except ImportError: - print_status("PySide", "no") - return False - else: - print_status("PySide", "Qt: %s, PySide: %s" % - (QtCore.__version__, __version__)) - return True - -def check_for_cairo(): - try: - import cairo - except ImportError: - print_status("Cairo", "no") - return False - else: - print_status("Cairo", cairo.version) - return True - -def check_for_tornado(): - try: - import tornado - except ImportError: - print_status("Tornado (webagg)", "no") - return False - else: - print_status("Tornado (webagg)", tornado.version) - return True - -def check_provide_pytz(): - if options['provide_pytz'] is True: - print_status("pytz", "matplotlib will provide") - return True - try: - import pytz - except ImportError: - if options['provide_pytz']: - print_status("pytz", "matplotlib will provide") - return True - else: - print_status("pytz", "no") - return False - else: - if pytz.__version__.endswith('mpl'): - print_status("pytz", "matplotlib will provide") - return True - else: - print_status("pytz", pytz.__version__) - return False - -def check_provide_dateutil(): - if options['provide_dateutil'] is True: - print_status("dateutil", "matplotlib will provide") - return True - try: - import dateutil - except ImportError: - if options['provide_dateutil']: - print_status("dateutil", "matplotlib will provide") - return True - else: - print_status("dateutil", "no") - return False - else: - try: - if dateutil.__version__.endswith('mpl'): - print_status("dateutil", "matplotlib will provide") - return True - else: - print_status("dateutil", dateutil.__version__) - return False - except AttributeError: - print_status("dateutil", "present, version unknown") - return False - -def check_provide_six(): - # We don't need six on Python 2.x - if sys.version_info[0] < 3: - return - - if options['provide_six'] is True: - print_status("six", "matplotlib will provide") - return True - try: - import six - except ImportError: - if options['provide_six']: - print_status("six", "matplotlib will provide") - return True - else: - print_status("six", "no") - return False - else: - try: - if six.__version__.endswith('mpl'): - print_status("six", "matplotlib will provide") - return True - else: - print_status("six", six.__version__) - return False - except AttributeError: - print_status("six", "present, version unknown") - return False - - -def check_for_dvipng(): - try: - stdin, stdout = run_child_process('dvipng -version') - print_status("dvipng", stdout.readlines()[1].decode().split()[-1]) - return True - except (IndexError, ValueError): - print_status("dvipng", "no") - return False - -def check_for_ghostscript(): - try: - if sys.platform == 'win32': - command = 'gswin32c --version' - else: - command = 'gs --version' - stdin, stdout = run_child_process(command) - print_status("ghostscript", stdout.read().decode()[:-1]) - return True - except (IndexError, ValueError): - print_status("ghostscript", "no") - return False - -def check_for_latex(): - try: - stdin, stdout = run_child_process('latex -version') - line = stdout.readlines()[0].decode() - pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)' - match = re.search(pattern, line) - print_status("latex", match.group(0)) - return True - except (IndexError, ValueError, AttributeError): - print_status("latex", "no") - return False - -def check_for_pdftops(): - try: - stdin, stdout = run_child_process('pdftops -v') - for line in stdout.readlines(): - line = line.decode() - if 'version' in line: - print_status("pdftops", line.split()[-1]) - return True - except (IndexError, ValueError): - print_status("pdftops", "no") - return False - -def check_for_numpy(min_version): - try: - import numpy - except ImportError: - print_status("numpy", "no") - print_message("You must install numpy %s or later to build matplotlib." % - min_version) - return False - - expected_version = version.LooseVersion(min_version) - found_version = version.LooseVersion(numpy.__version__) - if not found_version >= expected_version: - print_message( - 'numpy %s or later is required; you have %s' % - (min_version, numpy.__version__)) - return False - module = Extension('test', []) - add_numpy_flags(module) - add_base_flags(module) - - print_status("numpy", numpy.__version__) - if not find_include_file(module.include_dirs, os.path.join("numpy", "arrayobject.h")): - print_message("Could not find the headers for numpy. You may need to install the development package.") - return False - return True - -def add_numpy_flags(module): - "Add the modules flags to build extensions which use numpy" - import numpy - module.include_dirs.append(numpy.get_include()) - -def add_png_flags(module): - try_pkgconfig(module, 'libpng', 'png') - add_base_flags(module) - add_numpy_flags(module) - module.libraries.append('z') - module.include_dirs.extend(['.']) - module.libraries.extend(std_libs) - -def add_agg_flags(module): - 'Add the module flags to build extensions which use agg' - - # before adding the freetype flags since -z comes later - add_base_flags(module) - add_numpy_flags(module) - module.include_dirs.extend(['src', '%s/include'%AGG_VERSION, '.']) - - # put these later for correct link order - module.libraries.extend(std_libs) - -def add_ft2font_flags(module): - 'Add the module flags to ft2font extension' - add_numpy_flags(module) - if not get_pkgconfig(module, 'freetype2'): - module.libraries.extend(['freetype', 'z']) - add_base_flags(module) - - basedirs = module.include_dirs[:] # copy the list to avoid inf loop! - for d in basedirs: - module.include_dirs.append(os.path.join(d, 'freetype2')) - p = os.path.join(d, 'lib/freetype2/include') - if os.path.exists(p): module.include_dirs.append(p) - p = os.path.join(d, 'lib/freetype2/include/freetype2') - if os.path.exists(p): module.include_dirs.append(p) - - basedirs = module.library_dirs[:] # copy the list to avoid inf loop! - for d in basedirs: - p = os.path.join(d, 'freetype2/lib') - if os.path.exists(p): module.library_dirs.append(p) - else: - add_base_flags(module) - module.libraries.append('z') - - # put this last for library link order - module.libraries.extend(std_libs) - -def check_for_gtk(): - 'check for the presence of pygtk' - gotit = False - explanation = None - try: - import gtk - except ImportError: - explanation = 'Building for Gtk+ requires pygtk; you must be able to "import gtk" in your build/install environment' - except RuntimeError: - explanation = 'pygtk present but import failed' - else: - version = (2,2,0) - if gtk.pygtk_version < version: - explanation = "Error: GTK backend requires PyGTK %d.%d.%d (or later), " \ - "%d.%d.%d was detected." % ( - version + gtk.pygtk_version) - else: - gotit = True - - if gotit: - module = make_extension('test', []) - add_pygtk_flags(module) - if not find_include_file(module.include_dirs, os.path.join("gtk", "gtk.h")): - explanation = ( - "Could not find Gtk+ headers in any of %s" % - ", ".join(["'%s'" % x for x in module.include_dirs])) - gotit = False - - def ver2str(tup): - return ".".join([str(x) for x in tup]) - - if gotit: - import gobject - if hasattr(gobject, 'pygobject_version'): - pygobject_version = ver2str(gobject.pygobject_version) - else: - pygobject_version = '[pre-pygobject]' - print_status("Gtk+", "gtk+: %s, glib: %s, pygtk: %s, pygobject: %s" % - (ver2str(gtk.gtk_version), ver2str(gobject.glib_version), - ver2str(gtk.pygtk_version), pygobject_version)) - else: - print_status("Gtk+", "no") - - if explanation is not None: - print_message(explanation) - - # Switch off the event loop for PyGTK >= 2.15.0 - if gotit: - try: - gtk.set_interactive(False) - except AttributeError: # PyGTK < 2.15.0 - pass - - return gotit - -def add_pygtk_flags(module): - 'Add the module flags to build extensions which use gtk' - - if sys.platform=='win32': - # popen broken on my win32 plaform so I can't use pkgconfig - module.library_dirs.extend( - ['C:/GTK/bin', 'C:/GTK/lib']) - - module.include_dirs.extend( - ['win32_static/include/pygtk-2.0', - 'C:/GTK/include', - 'C:/GTK/include/gobject', - 'C:/GTK/include/gmodule', - 'C:/GTK/include/glib', - 'C:/GTK/include/pango', - 'C:/GTK/include/atk', - 'C:/GTK/include/X11', - 'C:/GTK/include/cairo', - 'C:/GTK/include/gdk', - 'C:/GTK/include/gdk-pixbuf', - 'C:/GTK/include/gtk', - ]) - - add_base_flags(module) - - if 'PKG_CONFIG_PATH' not in os.environ: - # If Gtk+ is installed, pkg-config is required to be installed - os.environ['PKG_CONFIG_PATH'] = 'C:\GTK\lib\pkgconfig' - - pygtkIncludes = getoutput('pkg-config --cflags-only-I pygtk-2.0').split() - gtkIncludes = getoutput('pkg-config --cflags-only-I gtk+-2.0').split() - includes = pygtkIncludes + gtkIncludes - module.include_dirs.extend([include[2:] for include in includes]) - - pygtkLinker = getoutput('pkg-config --libs pygtk-2.0').split() - gtkLinker = getoutput('pkg-config --libs gtk+-2.0').split() - linkerFlags = pygtkLinker + gtkLinker - - module.libraries.extend( - [flag[2:] for flag in linkerFlags if flag.startswith('-l')]) - - module.library_dirs.extend( - [flag[2:] for flag in linkerFlags if flag.startswith('-L')]) - - module.extra_link_args.extend( - [flag for flag in linkerFlags if not - (flag.startswith('-l') or flag.startswith('-L'))]) - - # visual studio doesn't need the math library - if sys.platform == 'win32' and win32_compiler == 'msvc' and 'm' in module.libraries: - module.libraries.remove('m') - - if sys.platform != 'win32': - # If Gtk+ is installed, pkg-config is required to be installed - add_base_flags(module) - ok = get_pkgconfig(module, 'pygtk-2.0 gtk+-2.0', report_error=True) - if not ok: - print_message( - "You may need to install 'dev' package(s) to provide header files.") - # visual studio doesn't need the math library - if sys.platform == 'win32' and win32_compiler == 'msvc' and 'm' in module.libraries: - module.libraries.remove('m') - -# Make sure you use the Tk version given by Tkinter.TkVersion -# or else you'll build for a wrong version of the Tcl -# interpreter (leading to nasty segfaults). -def check_for_tk(): - gotit = False - explanation = None - try: - if sys.version_info[0] < 3: - import Tkinter - else: - import tkinter as Tkinter - except ImportError: - explanation = 'TKAgg requires Tkinter' - except RuntimeError: - explanation = 'Tkinter present but import failed' - else: - if Tkinter.TkVersion < 8.3: - explanation = "Tcl/Tk v8.3 or later required" - else: - gotit = True - - if gotit: - module = make_extension('test', []) - try: - explanation = add_tk_flags(module) - # except RuntimeError: - # # This deals with the change in exception handling syntax in - # # python 3. If we only need to support >= 2.6, we can just use the - # # commented out lines below. - # exc_type,exc,tb = sys.exc_info() - # explanation = str(exc) - # gotit = False - except RuntimeError as e: - explanation = str(e) - else: - if not find_include_file(module.include_dirs, "tk.h"): - message = 'Tkinter present, but header files are not found. ' + \ - 'You may need to install development packages.' - if explanation is not None: - explanation += '\n' + message - else: - explanation = message - gotit = False - - if gotit: - try: - tk_v = Tkinter.__version__.split()[-2] - except (AttributeError, IndexError): - # Tkinter.__version__ has been removed in python 3 - tk_v = 'version not identified' - print_status("Tkinter", "Tkinter: %s, Tk: %s, Tcl: %s" % - (tk_v, Tkinter.TkVersion, Tkinter.TclVersion)) - else: - print_status("Tkinter", "no") - if explanation is not None: - print_message(explanation) - return gotit - -def check_for_macosx(): - gotit = False - import sys - if sys.platform=='darwin': - gotit = True - if gotit: - print_status("Mac OS X native", "yes") - else: - print_status("Mac OS X native", "no") - return gotit - -def query_tcltk(): - """Tries to open a Tk window in order to query the Tk object about its library paths. - This should never be called more than once by the same process, as Tk intricacies - may cause the Python interpreter to hang. The function also has a workaround if - no X server is running (useful for autobuild systems).""" - global TCL_TK_CACHE - # Use cached values if they exist, which ensures this function only executes once - if TCL_TK_CACHE is not None: - return TCL_TK_CACHE - - # By this point, we already know that Tkinter imports correctly - if sys.version_info[0] < 3: - import Tkinter - else: - import tkinter as Tkinter - tcl_lib_dir = '' - tk_lib_dir = '' - # First try to open a Tk window (requires a running X server) - try: - tk = Tkinter.Tk() - except Tkinter.TclError: - # Next, start Tcl interpreter without opening a Tk window (no need for X server) - # This feature is available in python version 2.4 and up - try: - tcl = Tkinter.Tcl() - except AttributeError: # Python version not high enough - pass - except Tkinter.TclError: # Something went wrong while opening Tcl - pass - else: - tcl_lib_dir = str(tcl.getvar('tcl_library')) - # Guess Tk location based on Tcl location - (head, tail) = os.path.split(tcl_lib_dir) - tail = tail.replace('Tcl', 'Tk').replace('tcl', 'tk') - tk_lib_dir = os.path.join(head, tail) - if not os.path.exists(tk_lib_dir): - tk_lib_dir = tcl_lib_dir.replace('Tcl', 'Tk').replace('tcl', 'tk') - else: - # Obtain Tcl and Tk locations from Tk widget - tk.withdraw() - tcl_lib_dir = str(tk.getvar('tcl_library')) - tk_lib_dir = str(tk.getvar('tk_library')) - tk.destroy() - - # Save directories and version string to cache - TCL_TK_CACHE = tcl_lib_dir, tk_lib_dir, str(Tkinter.TkVersion)[:3] - return TCL_TK_CACHE - -def parse_tcl_config(tcl_lib_dir, tk_lib_dir): - try: - if sys.version_info[0] < 3: - import Tkinter - else: - import tkinter as Tkinter - except ImportError: - return None - - tcl_poss = [tcl_lib_dir, - os.path.normpath(os.path.join(tcl_lib_dir, '..')), - "/usr/lib/tcl"+str(Tkinter.TclVersion), - "/usr/lib"] - tk_poss = [tk_lib_dir, - os.path.normpath(os.path.join(tk_lib_dir, '..')), - "/usr/lib/tk"+str(Tkinter.TkVersion), - "/usr/lib"] - for ptcl, ptk in zip(tcl_poss, tk_poss): - tcl_config = os.path.join(ptcl, "tclConfig.sh") - tk_config = os.path.join(ptk, "tkConfig.sh") - if (os.path.exists(tcl_config) and os.path.exists(tk_config)): - break - if not (os.path.exists(tcl_config) and os.path.exists(tk_config)): - return None - - def get_var(file, varname): - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, - executable="/bin/sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') - - tcl_lib_dir = get_var(tcl_config, 'TCL_LIB_SPEC').split()[0][2:].strip() - tcl_inc_dir = get_var(tcl_config, 'TCL_INCLUDE_SPEC')[2:].strip() - tcl_lib = get_var(tcl_config, 'TCL_LIB_FLAG')[2:].strip() - - tk_lib_dir = get_var(tk_config, 'TK_LIB_SPEC').split()[0][2:].strip() - tk_inc_dir = get_var(tk_config, 'TK_INCLUDE_SPEC').strip() - if tk_inc_dir == '': - tk_inc_dir = tcl_inc_dir - else: - tk_inc_dir = tk_inc_dir[2:] - tk_lib = get_var(tk_config, 'TK_LIB_FLAG')[2:].strip() - - if not os.path.exists(os.path.join(tk_inc_dir, 'tk.h')): - return None - - return tcl_lib_dir, tcl_inc_dir, tcl_lib, tk_lib_dir, tk_inc_dir, tk_lib - -def guess_tcl_config(tcl_lib_dir, tk_lib_dir, tk_ver): - if not (os.path.exists(tcl_lib_dir) and os.path.exists(tk_lib_dir)): - return None - - tcl_lib = os.path.normpath(os.path.join(tcl_lib_dir, '../')) - tk_lib = os.path.normpath(os.path.join(tk_lib_dir, '../')) - - tcl_inc = os.path.normpath(os.path.join(tcl_lib_dir, - '../../include/tcl' + tk_ver)) - if not os.path.exists(tcl_inc): - tcl_inc = os.path.normpath(os.path.join(tcl_lib_dir, - '../../include')) - - tk_inc = os.path.normpath(os.path.join(tk_lib_dir, - '../../include/tk' + tk_ver)) - if not os.path.exists(tk_inc): - tk_inc = os.path.normpath(os.path.join(tk_lib_dir, - '../../include')) - - if not os.path.exists(os.path.join(tk_inc, 'tk.h')): - tk_inc = tcl_inc - - if not os.path.exists(tcl_inc): - # this is a hack for suse linux, which is broken - if (sys.platform.startswith('linux') and - os.path.exists('/usr/include/tcl.h') and - os.path.exists('/usr/include/tk.h')): - tcl_inc = '/usr/include' - tk_inc = '/usr/include' - - if not os.path.exists(os.path.join(tk_inc, 'tk.h')): - return None - - return tcl_lib, tcl_inc, 'tcl' + tk_ver, tk_lib, tk_inc, 'tk' + tk_ver - -def hardcoded_tcl_config(): - tcl_inc = "/usr/local/include" - tk_inc = "/usr/local/include" - tcl_lib = "/usr/local/lib" - tk_lib = "/usr/local/lib" - return tcl_lib, tcl_inc, 'tcl', tk_lib, tk_inc, 'tk' - -def add_tk_flags(module): - 'Add the module flags to build extensions which use tk' - message = None - if sys.platform == 'win32': - major, minor1, minor2, s, tmp = sys.version_info - if (2, 6) <= (major, minor1) <= (3, 3): - module.include_dirs.extend(['win32_static/include/tcl85']) - module.libraries.extend(['tk85', 'tcl85']) - elif major == 2 and minor1 in [3, 4, 5]: - module.include_dirs.extend(['win32_static/include/tcl84']) - module.libraries.extend(['tk84', 'tcl84']) - elif major == 2 and minor1 == 2: - module.include_dirs.extend(['win32_static/include/tcl83']) - module.libraries.extend(['tk83', 'tcl83']) - else: - raise RuntimeError('No tk/win32 support for this python version yet') - module.library_dirs.extend([os.path.join(sys.prefix, 'dlls')]) - - elif sys.platform == 'darwin': - # this config section lifted directly from Imaging - thanks to - # the effbot! - - # First test for a MacOSX/darwin framework install - from os.path import join, exists - framework_dirs = [ - join(os.getenv('HOME'), '/Library/Frameworks'), - '/Library/Frameworks', - '/System/Library/Frameworks/', - ] - - # Find the directory that contains the Tcl.framework and Tk.framework - # bundles. - # XXX distutils should support -F! - tk_framework_found = 0 - for F in framework_dirs: - # both Tcl.framework and Tk.framework should be present - for fw in 'Tcl', 'Tk': - if not exists(join(F, fw + '.framework')): - break - else: - # ok, F is now directory with both frameworks. Continure - # building - tk_framework_found = 1 - break - if tk_framework_found: - # For 8.4a2, we must add -I options that point inside the Tcl and Tk - # frameworks. In later release we should hopefully be able to pass - # the -F option to gcc, which specifies a framework lookup path. - # - tk_include_dirs = [ - join(F, fw + '.framework', H) - for fw in ('Tcl', 'Tk') - for H in ('Headers', 'Versions/Current/PrivateHeaders') - ] - - # For 8.4a2, the X11 headers are not included. Rather than include a - # complicated search, this is a hard-coded path. It could bail out - # if X11 libs are not found... - # tk_include_dirs.append('/usr/X11R6/include') - frameworks = ['-framework', 'Tcl', '-framework', 'Tk'] - module.include_dirs.extend(tk_include_dirs) - module.extra_link_args.extend(frameworks) - module.extra_compile_args.extend(frameworks) - - # you're still here? ok we'll try it this way... - else: - success = False - # There are 3 methods to try, in decreasing order of "smartness" - # - # 1. Parse the tclConfig.sh and tkConfig.sh files that have - # all the information we need - # - # 2. Guess the include and lib dirs based on the location of - # Tkinter's 'tcl_library' and 'tk_library' variables. - # - # 3. Use some hardcoded locations that seem to work on a lot - # of distros. - - # Query Tcl/Tk system for library paths and version string - try: - tcl_lib_dir, tk_lib_dir, tk_ver = query_tcltk() - except: - tk_ver = '' - result = hardcoded_tcl_config() - else: - result = parse_tcl_config(tcl_lib_dir, tk_lib_dir) - if result is None: - message = """\ -Guessing the library and include directories for Tcl and Tk because the -tclConfig.sh and tkConfig.sh could not be found and/or parsed.""" - result = guess_tcl_config(tcl_lib_dir, tk_lib_dir, tk_ver) - if result is None: - message = """\ -Using default library and include directories for Tcl and Tk because a -Tk window failed to open. You may need to define DISPLAY for Tk to work -so that setup can determine where your libraries are located.""" - result = hardcoded_tcl_config() - - # Add final versions of directories and libraries to module lists - tcl_lib_dir, tcl_inc_dir, tcl_lib, tk_lib_dir, tk_inc_dir, tk_lib = result - module.include_dirs.extend([tcl_inc_dir, tk_inc_dir]) - module.library_dirs.extend([tcl_lib_dir, tk_lib_dir]) - module.libraries.extend([tcl_lib, tk_lib]) - - return message - -def add_windowing_flags(module): - 'Add the module flags to build extensions using windowing api' - module.include_dirs.extend(['C:/include']) - module.libraries.extend(['user32']) - module.library_dirs.extend(['C:/lib']) - module.extra_link_args.append("-mwindows") - -def build_windowing(ext_modules, packages): - """windowing is optional and provides functions for managing - windows better, .e.g. maintaining focus on win32""" - global BUILT_WINDOWING - if BUILT_WINDOWING: return # only build it if you you haven't already - module = make_extension('matplotlib._windowing', - ['src/_windowing.cpp'], - ) - add_windowing_flags(module) - ext_modules.append(module) - BUILT_WINDOWING = True - -def build_ft2font(ext_modules, packages): - global BUILT_FT2FONT - if BUILT_FT2FONT: return # only build it if you you haven't already - deps = ['src/ft2font.cpp', 'src/mplutils.cpp'] - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - module = make_extension('matplotlib.ft2font', deps, - define_macros=defines) - add_ft2font_flags(module) - ext_modules.append(module) - BUILT_FT2FONT = True - -def build_ttconv(ext_modules, packages): - global BUILT_TTCONV - if BUILT_TTCONV: return # only build it if you you haven't already - deps = ['src/_ttconv.cpp', - 'ttconv/pprdrv_tt.cpp', - 'ttconv/pprdrv_tt2.cpp', - 'ttconv/ttutil.cpp'] - - module = make_extension('matplotlib.ttconv', deps, - define_macros=defines) - add_base_flags(module) - ext_modules.append(module) - BUILT_TTCONV = True - -def build_gtkagg(ext_modules, packages): - global BUILT_GTKAGG - if BUILT_GTKAGG: return # only build it if you you haven't already - deps = ['src/agg_py_transforms.cpp', 'src/_gtkagg.cpp', 'src/mplutils.cpp'] - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - module = make_extension('matplotlib.backends._gtkagg', - deps, - define_macros=defines - ) - - # add agg flags before pygtk because agg only supports freetype1 - # and pygtk includes freetype2. This is a bit fragile. - - add_agg_flags(module) - add_ft2font_flags(module) - add_pygtk_flags(module) - add_numpy_flags(module) - - ext_modules.append(module) - BUILT_GTKAGG = True - -def build_tkagg(ext_modules, packages): - global BUILT_TKAGG - if BUILT_TKAGG: return # only build it if you you haven't already - deps = ['src/agg_py_transforms.cpp', 'src/_tkagg.cpp'] - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - module = make_extension('matplotlib.backends._tkagg', - deps, - define_macros=defines - ) - - add_tk_flags(module) # do this first - add_agg_flags(module) - add_ft2font_flags(module) - - ext_modules.append(module) - BUILT_TKAGG = True - - -def build_macosx(ext_modules, packages): - global BUILT_MACOSX - if BUILT_MACOSX: return # only build it if you you haven't already - deps = ['src/_macosx.m', - 'CXX/cxx_extensions.cxx', - 'CXX/cxxextensions.c', - 'CXX/cxxsupport.cxx', - 'CXX/IndirectPythonInterface.cxx', - 'src/agg_py_transforms.cpp', - 'src/path_cleanup.cpp'] - module = make_extension('matplotlib.backends._macosx', - deps, - extra_link_args = ['-framework','Cocoa'], - define_macros=defines - ) - add_numpy_flags(module) - add_agg_flags(module) - ext_modules.append(module) - BUILT_MACOSX = True - -def build_png(ext_modules, packages): - global BUILT_PNG - if BUILT_PNG: return # only build it if you you haven't already - - deps = ['src/_png.cpp', 'src/mplutils.cpp'] - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - module = make_extension( - 'matplotlib._png', - deps, - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - - add_png_flags(module) - ext_modules.append(module) - - BUILT_PNG = True - - -def build_agg(ext_modules, packages): - global BUILT_AGG - if BUILT_AGG: return # only build it if you you haven't already - - agg = ( - 'agg_trans_affine.cpp', - 'agg_bezier_arc.cpp', - 'agg_curves.cpp', - 'agg_vcgen_dash.cpp', - 'agg_vcgen_stroke.cpp', - 'agg_image_filters.cpp', - ) - - deps = ['%s/src/%s'%(AGG_VERSION, name) for name in agg] - deps.extend(['src/mplutils.cpp', 'src/agg_py_transforms.cpp']) - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - temp_copy('src/_backend_agg.cpp', 'src/backend_agg.cpp') - deps.append('src/backend_agg.cpp') - module = make_extension( - 'matplotlib.backends._backend_agg', - deps, - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - - add_numpy_flags(module) - add_agg_flags(module) - add_ft2font_flags(module) - ext_modules.append(module) - - BUILT_AGG = True - -def build_path(ext_modules, packages): - global BUILT_PATH - if BUILT_PATH: return # only build it if you you haven't already - - agg = ( - 'agg_vcgen_contour.cpp', - 'agg_curves.cpp', - 'agg_bezier_arc.cpp', - 'agg_trans_affine.cpp', - 'agg_vcgen_stroke.cpp', - ) - - deps = ['%s/src/%s'%(AGG_VERSION, name) for name in agg] - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - temp_copy('src/_path.cpp', 'src/path.cpp') - deps.extend(['src/agg_py_transforms.cpp', - 'src/path_cleanup.cpp', - 'src/path.cpp']) - module = make_extension( - 'matplotlib._path', - deps, - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - - add_numpy_flags(module) - - add_agg_flags(module) - ext_modules.append(module) - - BUILT_PATH = True - -def build_image(ext_modules, packages): - global BUILT_IMAGE - if BUILT_IMAGE: return # only build it if you you haven't already - - agg = ('agg_trans_affine.cpp', - 'agg_image_filters.cpp', - 'agg_bezier_arc.cpp', - ) - - temp_copy('src/_image.cpp', 'src/image.cpp') - deps = ['src/image.cpp', 'src/mplutils.cpp'] - deps.extend(['%s/src/%s'%(AGG_VERSION,name) for name in agg]) - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - module = make_extension( - 'matplotlib._image', - deps, - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - - add_numpy_flags(module) - add_agg_flags(module) - ext_modules.append(module) - - BUILT_IMAGE = True - - - -def build_delaunay(ext_modules, packages): - global BUILT_DELAUNAY - if BUILT_DELAUNAY: - return # only build it if you you haven't already - - sourcefiles=["_delaunay.cpp", "VoronoiDiagramGenerator.cpp", - "delaunay_utils.cpp", "natneighbors.cpp"] - sourcefiles = [os.path.join('lib/matplotlib/delaunay',s) for s in sourcefiles] - delaunay = make_extension('matplotlib._delaunay',sourcefiles, - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - add_numpy_flags(delaunay) - add_base_flags(delaunay) - ext_modules.append(delaunay) - packages.extend(['matplotlib.delaunay']) - BUILT_DELAUNAY = True - - -def build_contour(ext_modules, packages): - global BUILT_CONTOUR - if BUILT_CONTOUR: return # only build it if you you haven't already - - module = make_extension( - 'matplotlib._cntr', - [ 'src/cntr.c'], - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - add_numpy_flags(module) - add_base_flags(module) - ext_modules.append(module) - - BUILT_CONTOUR = True - - -def build_gdk(ext_modules, packages): - global BUILT_GDK - if BUILT_GDK: return # only build it if you you haven't already - - temp_copy('src/_backend_gdk.c', 'src/backend_gdk.c') - module = make_extension( - 'matplotlib.backends._backend_gdk', - ['src/backend_gdk.c'], - libraries = [], - include_dirs=numpy_inc_dirs, - define_macros=defines - ) - - add_numpy_flags(module) - add_base_flags(module) - add_pygtk_flags(module) - ext_modules.append(module) - - BUILT_GDK = True - - -def build_tri(ext_modules, packages): - global BUILT_TRI - if BUILT_TRI: return # only build it if you you haven't already - - deps = ['lib/matplotlib/tri/_tri.cpp', 'src/mplutils.cpp'] - deps.extend(glob.glob('CXX/*.cxx')) - deps.extend(glob.glob('CXX/*.c')) - - module = make_extension('matplotlib._tri', deps, - define_macros=defines) - add_numpy_flags(module) - add_base_flags(module) - ext_modules.append(module) - BUILT_TRI = True diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.pc/20_matplotlibrc_path_search_fix.patch/lib/matplotlib/__init__.py matplotlib-1.2.0/.pc/20_matplotlibrc_path_search_fix.patch/lib/matplotlib/__init__.py --- matplotlib-1.2.0~1+6455+16~quantal1/.pc/20_matplotlibrc_path_search_fix.patch/lib/matplotlib/__init__.py 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/.pc/20_matplotlibrc_path_search_fix.patch/lib/matplotlib/__init__.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,1167 +0,0 @@ -""" -This is an object-oriented plotting library. - -A procedural interface is provided by the companion pyplot module, -which may be imported directly, e.g:: - - from matplotlib.pyplot import * - -To include numpy functions too, use:: - - from pylab import * - -or using ipython:: - - ipython -pylab - -For the most part, direct use of the object-oriented library is -encouraged when programming; pyplot is primarily for working -interactively. The -exceptions are the pyplot commands :func:`~matplotlib.pyplot.figure`, -:func:`~matplotlib.pyplot.subplot`, -:func:`~matplotlib.pyplot.subplots`, -:func:`~matplotlib.backends.backend_qt4agg.show`, and -:func:`~pyplot.savefig`, which can greatly simplify scripting. - -Modules include: - - :mod:`matplotlib.axes` - defines the :class:`~matplotlib.axes.Axes` class. Most pylab - commands are wrappers for :class:`~matplotlib.axes.Axes` - methods. The axes module is the highest level of OO access to - the library. - - :mod:`matplotlib.figure` - defines the :class:`~matplotlib.figure.Figure` class. - - :mod:`matplotlib.artist` - defines the :class:`~matplotlib.artist.Artist` base class for - all classes that draw things. - - :mod:`matplotlib.lines` - defines the :class:`~matplotlib.lines.Line2D` class for - drawing lines and markers - - :mod:`matplotlib.patches` - defines classes for drawing polygons - - :mod:`matplotlib.text` - defines the :class:`~matplotlib.text.Text`, - :class:`~matplotlib.text.TextWithDash`, and - :class:`~matplotlib.text.Annotate` classes - - :mod:`matplotlib.image` - defines the :class:`~matplotlib.image.AxesImage` and - :class:`~matplotlib.image.FigureImage` classes - - :mod:`matplotlib.collections` - classes for efficient drawing of groups of lines or polygons - - :mod:`matplotlib.colors` - classes for interpreting color specifications and for making - colormaps - - :mod:`matplotlib.cm` - colormaps and the :class:`~matplotlib.image.ScalarMappable` - mixin class for providing color mapping functionality to other - classes - - :mod:`matplotlib.ticker` - classes for calculating tick mark locations and for formatting - tick labels - - :mod:`matplotlib.backends` - a subpackage with modules for various gui libraries and output - formats - -The base matplotlib namespace includes: - - :data:`~matplotlib.rcParams` - a global dictionary of default configuration settings. It is - initialized by code which may be overridded by a matplotlibrc - file. - - :func:`~matplotlib.rc` - a function for setting groups of rcParams values - - :func:`~matplotlib.use` - a function for setting the matplotlib backend. If used, this - function must be called immediately after importing matplotlib - for the first time. In particular, it must be called - **before** importing pylab (if pylab is imported). - -matplotlib was initially written by John D. Hunter (1968-2012) and is now -developed and maintained by a host of others. - -Occasionally the internal documentation (python docstrings) will refer -to MATLAB®, a registered trademark of The MathWorks, Inc. - -""" -from __future__ import print_function - -__version__ = '1.3.x' -__version__numpy__ = '1.4' # minimum required numpy version - -import os, re, shutil, subprocess, sys, warnings -import distutils.sysconfig -import distutils.version - -try: - reload -except NameError: - # Python 3 - from imp import reload - -# Needed for toolkit setuptools support -if 0: - try: - __import__('pkg_resources').declare_namespace(__name__) - except ImportError: - pass # must not have setuptools - -if not hasattr(sys, 'argv'): # for modpython - sys.argv = ['modpython'] - - -class MatplotlibDeprecationWarning(UserWarning): - """ - A class for issuing deprecation warnings for Matplotlib users. - - In light of the fact that Python builtin DeprecationWarnings are ignored - by default as of Python 2.7 (see link below), this class was put in to - allow for the signaling of deprecation, but via UserWarnings which are not - ignored by default. - - http://docs.python.org/dev/whatsnew/2.7.html#the-future-for-python-2-x - """ - pass - -""" -Manage user customizations through a rc file. - -The default file location is given in the following order - - - environment variable MATPLOTLIBRC - - - HOME/.matplotlib/matplotlibrc if HOME is defined - - - PATH/matplotlibrc where PATH is the return value of - get_data_path() -""" - -import sys, os, tempfile - -if sys.version_info[0] >= 3: - def ascii(s): return bytes(s, 'ascii') - - def byte2str(b): return b.decode('ascii') - -else: - ascii = str - - def byte2str(b): return b - - -from matplotlib.rcsetup import (defaultParams, - validate_backend, - validate_toolbar) - -major, minor1, minor2, s, tmp = sys.version_info -_python24 = (major == 2 and minor1 >= 4) or major >= 3 - -# the havedate check was a legacy from old matplotlib which preceeded -# datetime support -_havedate = True - -#try: -# import pkg_resources # pkg_resources is part of setuptools -#except ImportError: _have_pkg_resources = False -#else: _have_pkg_resources = True - -if not _python24: - raise ImportError('matplotlib requires Python 2.4 or later') - - -import numpy -from distutils import version -expected_version = version.LooseVersion(__version__numpy__) -found_version = version.LooseVersion(numpy.__version__) -if not found_version >= expected_version: - raise ImportError( - 'numpy %s or later is required; you have %s' % ( - __version__numpy__, numpy.__version__)) -del version - -def is_string_like(obj): - if hasattr(obj, 'shape'): return 0 - try: obj + '' - except (TypeError, ValueError): return 0 - return 1 - - -def _is_writable_dir(p): - """ - p is a string pointing to a putative writable dir -- return True p - is such a string, else False - """ - try: p + '' # test is string like - except TypeError: return False - try: - t = tempfile.TemporaryFile(dir=p) - try: - t.write(ascii('1')) - finally: - t.close() - except OSError: return False - else: return True - -class Verbose: - """ - A class to handle reporting. Set the fileo attribute to any file - instance to handle the output. Default is sys.stdout - """ - levels = ('silent', 'helpful', 'debug', 'debug-annoying') - vald = dict( [(level, i) for i,level in enumerate(levels)]) - - # parse the verbosity from the command line; flags look like - # --verbose-silent or --verbose-helpful - _commandLineVerbose = None - - for arg in sys.argv[1:]: - if not arg.startswith('--verbose-'): - continue - level_str = arg[10:] - # If it doesn't match one of ours, then don't even - # bother noting it, we are just a 3rd-party library - # to somebody else's script. - if level_str in levels: - _commandLineVerbose = level_str - - def __init__(self): - self.set_level('silent') - self.fileo = sys.stdout - - def set_level(self, level): - 'set the verbosity to one of the Verbose.levels strings' - - if self._commandLineVerbose is not None: - level = self._commandLineVerbose - if level not in self.levels: - warnings.warn('matplotlib: unrecognized --verbose-* string "%s".' - ' Legal values are %s' % (level, self.levels)) - else: - self.level = level - - def set_fileo(self, fname): - std = { - 'sys.stdout': sys.stdout, - 'sys.stderr': sys.stderr, - } - if fname in std: - self.fileo = std[fname] - else: - try: - fileo = open(fname, 'w') - except IOError: - raise ValueError('Verbose object could not open log file "%s" for writing.\nCheck your matplotlibrc verbose.fileo setting'%fname) - else: - self.fileo = fileo - - def report(self, s, level='helpful'): - """ - print message s to self.fileo if self.level>=level. Return - value indicates whether a message was issued - - """ - if self.ge(level): - print(s, file=self.fileo) - return True - return False - - def wrap(self, fmt, func, level='helpful', always=True): - """ - return a callable function that wraps func and reports it - output through the verbose handler if current verbosity level - is higher than level - - if always is True, the report will occur on every function - call; otherwise only on the first time the function is called - """ - assert callable(func) - def wrapper(*args, **kwargs): - ret = func(*args, **kwargs) - - if (always or not wrapper._spoke): - spoke = self.report(fmt%ret, level) - if not wrapper._spoke: wrapper._spoke = spoke - return ret - wrapper._spoke = False - wrapper.__doc__ = func.__doc__ - return wrapper - - def ge(self, level): - 'return true if self.level is >= level' - return self.vald[self.level]>=self.vald[level] - - -verbose=Verbose() - - - -def checkdep_dvipng(): - try: - s = subprocess.Popen(['dvipng','-version'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - line = s.stdout.readlines()[1] - v = byte2str(line.split()[-1]) - return v - except (IndexError, ValueError, OSError): - return None - -def checkdep_ghostscript(): - try: - if sys.platform == 'win32': - command_args = ['gswin32c', '--version'] - else: - command_args = ['gs', '--version'] - s = subprocess.Popen(command_args, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - v = byte2str(s.stdout.read()[:-1]) - return v - except (IndexError, ValueError, OSError): - return None - -def checkdep_tex(): - try: - s = subprocess.Popen(['tex','-version'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - line = byte2str(s.stdout.readlines()[0]) - pattern = '3\.1\d+' - match = re.search(pattern, line) - v = match.group(0) - return v - except (IndexError, ValueError, AttributeError, OSError): - return None - -def checkdep_pdftops(): - try: - s = subprocess.Popen(['pdftops','-v'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - for line in s.stderr: - if b'version' in line: - v = byte2str(line.split()[-1]) - return v - except (IndexError, ValueError, UnboundLocalError, OSError): - return None - -def checkdep_inkscape(): - try: - s = subprocess.Popen(['inkscape','-V'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - for line in s.stdout: - if b'Inkscape' in line: - v = byte2str(line.split()[1]) - break - return v - except (IndexError, ValueError, UnboundLocalError, OSError): - return None - -def checkdep_xmllint(): - try: - s = subprocess.Popen(['xmllint','--version'], stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - for line in s.stderr: - if b'version' in line: - v = byte2str(line.split()[-1]) - break - return v - except (IndexError, ValueError, UnboundLocalError, OSError): - return None - -def compare_versions(a, b): - "return True if a is greater than or equal to b" - if a: - a = distutils.version.LooseVersion(a) - b = distutils.version.LooseVersion(b) - if a>=b: return True - else: return False - else: return False - -def checkdep_ps_distiller(s): - if not s: - return False - - flag = True - gs_req = '7.07' - gs_sugg = '7.07' - gs_v = checkdep_ghostscript() - if compare_versions(gs_v, gs_sugg): pass - elif compare_versions(gs_v, gs_req): - verbose.report(('ghostscript-%s found. ghostscript-%s or later ' - 'is recommended to use the ps.usedistiller option.') % (gs_v, gs_sugg)) - else: - flag = False - warnings.warn(('matplotlibrc ps.usedistiller option can not be used ' - 'unless ghostscript-%s or later is installed on your system') % gs_req) - - if s == 'xpdf': - pdftops_req = '3.0' - pdftops_req_alt = '0.9' # poppler version numbers, ugh - pdftops_v = checkdep_pdftops() - if compare_versions(pdftops_v, pdftops_req): - pass - elif compare_versions(pdftops_v, pdftops_req_alt) and not \ - compare_versions(pdftops_v, '1.0'): - pass - else: - flag = False - warnings.warn(('matplotlibrc ps.usedistiller can not be set to ' - 'xpdf unless xpdf-%s or later is installed on your system') % pdftops_req) - - if flag: - return s - else: - return False - -def checkdep_usetex(s): - if not s: - return False - - tex_req = '3.1415' - gs_req = '7.07' - gs_sugg = '7.07' - dvipng_req = '1.5' - flag = True - - tex_v = checkdep_tex() - if compare_versions(tex_v, tex_req): pass - else: - flag = False - warnings.warn(('matplotlibrc text.usetex option can not be used ' - 'unless TeX-%s or later is ' - 'installed on your system') % tex_req) - - dvipng_v = checkdep_dvipng() - if compare_versions(dvipng_v, dvipng_req): pass - else: - flag = False - warnings.warn( 'matplotlibrc text.usetex can not be used with *Agg ' - 'backend unless dvipng-1.5 or later is ' - 'installed on your system') - - gs_v = checkdep_ghostscript() - if compare_versions(gs_v, gs_sugg): pass - elif compare_versions(gs_v, gs_req): - verbose.report(('ghostscript-%s found. ghostscript-%s or later is ' - 'recommended for use with the text.usetex ' - 'option.') % (gs_v, gs_sugg)) - else: - flag = False - warnings.warn(('matplotlibrc text.usetex can not be used ' - 'unless ghostscript-%s or later is ' - 'installed on your system') % gs_req) - - return flag - - -def _get_home(): - """Find user's home directory if possible. - Otherwise raise error. - - :see: http://mail.python.org/pipermail/python-list/2005-February/263921.html - """ - path='' - try: - path=os.path.expanduser("~") - except: - pass - if not os.path.isdir(path): - for evar in ('HOME', 'USERPROFILE', 'TMP'): - try: - path = os.environ[evar] - if os.path.isdir(path): - break - except: pass - if path: - return path - else: - raise RuntimeError('please define environment variable $HOME') - - -def _create_tmp_config_dir(): - """ - If the config directory can not be created, create a temporary - directory. - """ - import getpass - import tempfile - - tempdir = os.path.join( - tempfile.gettempdir(), 'matplotlib-%s' % getpass.getuser()) - os.environ['MPLCONFIGDIR'] = tempdir - - return tempdir - - -get_home = verbose.wrap('$HOME=%s', _get_home, always=False) - -def _get_configdir(): - """ - Return the string representing the configuration directory. - - Default is HOME/.matplotlib. You can override this with the - MPLCONFIGDIR environment variable. If the default is not - writable, and MPLCONFIGDIR is not set, then - tempfile.gettempdir() is used to provide a directory in - which a matplotlib subdirectory is created as the configuration - directory. - """ - - configdir = os.environ.get('MPLCONFIGDIR') - if configdir is not None: - if not os.path.exists(configdir): - os.makedirs(configdir) - if not _is_writable_dir(configdir): - return _create_tmp_config_dir() - return configdir - - h = get_home() - p = os.path.join(get_home(), '.matplotlib') - - if os.path.exists(p): - if not _is_writable_dir(p): - return _create_tmp_config_dir() - else: - if not _is_writable_dir(h): - return _create_tmp_config_dir() - from matplotlib.cbook import mkdirs - mkdirs(p) - - return p -get_configdir = verbose.wrap('CONFIGDIR=%s', _get_configdir, always=False) - - -def _get_data_path(): - 'get the path to matplotlib data' - - if 'MATPLOTLIBDATA' in os.environ: - path = os.environ['MATPLOTLIBDATA'] - if not os.path.isdir(path): - raise RuntimeError('Path in environment MATPLOTLIBDATA not a directory') - return path - - path = os.sep.join([os.path.dirname(__file__), 'mpl-data']) - if os.path.isdir(path): - return path - - # setuptools' namespace_packages may highjack this init file - # so need to try something known to be in matplotlib, not basemap - import matplotlib.afm - path = os.sep.join([os.path.dirname(matplotlib.afm.__file__), 'mpl-data']) - if os.path.isdir(path): - return path - - # py2exe zips pure python, so still need special check - if getattr(sys,'frozen',None): - exe_path = os.path.dirname(sys.executable) - path = os.path.join(exe_path, 'mpl-data') - if os.path.isdir(path): - return path - - # Try again assuming we need to step up one more directory - path = os.path.join(os.path.split(exe_path)[0], 'mpl-data') - if os.path.isdir(path): - return path - - # Try again assuming sys.path[0] is a dir not a exe - path = os.path.join(sys.path[0], 'mpl-data') - if os.path.isdir(path): - return path - - raise RuntimeError('Could not find the matplotlib data files') - -def _get_data_path_cached(): - if defaultParams['datapath'][0] is None: - defaultParams['datapath'][0] = _get_data_path() - return defaultParams['datapath'][0] - -get_data_path = verbose.wrap('matplotlib data path %s', _get_data_path_cached, - always=False) - - - -def get_example_data(fname): - """ - get_example_data is deprecated -- use matplotlib.cbook.get_sample_data instead - """ - raise NotImplementedError('get_example_data is deprecated -- use matplotlib.cbook.get_sample_data instead') - - -def get_py2exe_datafiles(): - datapath = get_data_path() - head, tail = os.path.split(datapath) - d = {} - for root, dirs, files in os.walk(datapath): - # Need to explicitly remove cocoa_agg files or py2exe complains - # NOTE I dont know why, but do as previous version - if 'Matplotlib.nib' in files: - files.remove('Matplotlib.nib') - files = [os.path.join(root, filename) for filename in files] - root = root.replace(tail, 'mpl-data') - root = root[root.index('mpl-data'):] - d[root] = files - return list(d.items()) - - -def matplotlib_fname(): - """ - Return the path to the rc file - - Search order: - - * current working dir - * environ var MATPLOTLIBRC - * HOME/.matplotlib/matplotlibrc - * MATPLOTLIBDATA/matplotlibrc - - - """ - - oldname = os.path.join( os.getcwd(), '.matplotlibrc') - if os.path.exists(oldname): - print("""\ -WARNING: Old rc filename ".matplotlibrc" found in working dir - and and renamed to new default rc file name "matplotlibrc" - (no leading"dot"). """, file=sys.stderr) - shutil.move('.matplotlibrc', 'matplotlibrc') - - home = get_home() - oldname = os.path.join( home, '.matplotlibrc') - if os.path.exists(oldname): - configdir = get_configdir() - newname = os.path.join(configdir, 'matplotlibrc') - print("""\ -WARNING: Old rc filename "%s" found and renamed to - new default rc file name "%s"."""%(oldname, newname), file=sys.stderr) - - shutil.move(oldname, newname) - - - fname = os.path.join( os.getcwd(), 'matplotlibrc') - if os.path.exists(fname): return fname - - if 'MATPLOTLIBRC' in os.environ: - path = os.environ['MATPLOTLIBRC'] - if os.path.exists(path): - fname = os.path.join(path, 'matplotlibrc') - if os.path.exists(fname): - return fname - - fname = os.path.join(get_configdir(), 'matplotlibrc') - if os.path.exists(fname): return fname - - - path = get_data_path() # guaranteed to exist or raise - fname = os.path.join(path, 'matplotlibrc') - if not os.path.exists(fname): - warnings.warn('Could not find matplotlibrc; using defaults') - return fname - - -_deprecated_map = { - 'text.fontstyle': 'font.style', - 'text.fontangle': 'font.style', - 'text.fontvariant': 'font.variant', - 'text.fontweight': 'font.weight', - 'text.fontsize': 'font.size', - 'tick.size' : 'tick.major.size', - 'svg.embed_char_paths' : 'svg.fonttype', - 'savefig.extension' : 'savefig.format' - } - -_deprecated_ignore_map = { - 'legend.pad' : 'legend.borderpad', - 'legend.labelsep' : 'legend.labelspacing', - 'legend.handlelen' : 'legend.handlelength', - 'legend.handletextsep' : 'legend.handletextpad', - 'legend.axespad' : 'legend.borderaxespad', - } - - -class RcParams(dict): - - """ - A dictionary object including validation - - validating functions are defined and associated with rc parameters in - :mod:`matplotlib.rcsetup` - """ - - validate = dict([ (key, converter) for key, (default, converter) in \ - defaultParams.iteritems() ]) - msg_depr = "%s is deprecated and replaced with %s; please use the latter." - msg_depr_ignore = "%s is deprecated and ignored. Use %s" - - def __setitem__(self, key, val): - try: - if key in _deprecated_map: - alt = _deprecated_map[key] - warnings.warn(self.msg_depr % (key, alt)) - key = alt - elif key in _deprecated_ignore_map: - alt = _deprecated_ignore_map[key] - warnings.warn(self.msg_depr_ignore % (key, alt)) - return - cval = self.validate[key](val) - dict.__setitem__(self, key, cval) - except KeyError: - raise KeyError('%s is not a valid rc parameter.\ -See rcParams.keys() for a list of valid parameters.' % (key,)) - - def __getitem__(self, key): - if key in _deprecated_map: - alt = _deprecated_map[key] - warnings.warn(self.msg_depr % (key, alt)) - key = alt - elif key in _deprecated_ignore_map: - alt = _deprecated_ignore_map[key] - warnings.warn(self.msg_depr_ignore % (key, alt)) - key = alt - return dict.__getitem__(self, key) - - def keys(self): - """ - Return sorted list of keys. - """ - k = dict.keys(self) - k.sort() - return k - - def values(self): - """ - Return values in order of sorted keys. - """ - return [self[k] for k in self.iterkeys()] - -def rc_params(fail_on_error=False): - 'Return the default params updated from the values in the rc file' - - fname = matplotlib_fname() - if not os.path.exists(fname): - # this should never happen, default in mpl-data should always be found - message = 'could not find rc file; returning defaults' - ret = RcParams([ (key, default) for key, (default, converter) in \ - defaultParams.iteritems() ]) - warnings.warn(message) - return ret - - return rc_params_from_file(fname, fail_on_error) - - -def rc_params_from_file(fname, fail_on_error=False): - """Load and return params from fname.""" - - cnt = 0 - rc_temp = {} - with open(fname) as fd: - for line in fd: - cnt += 1 - strippedline = line.split('#',1)[0].strip() - if not strippedline: continue - tup = strippedline.split(':',1) - if len(tup) !=2: - warnings.warn('Illegal line #%d\n\t%s\n\tin file "%s"'%\ - (cnt, line, fname)) - continue - key, val = tup - key = key.strip() - val = val.strip() - if key in rc_temp: - warnings.warn('Duplicate key in file "%s", line #%d'%(fname,cnt)) - rc_temp[key] = (val, line, cnt) - - ret = RcParams([ (key, default) for key, (default, converter) in \ - defaultParams.iteritems() ]) - - for key in ('verbose.level', 'verbose.fileo'): - if key in rc_temp: - val, line, cnt = rc_temp.pop(key) - if fail_on_error: - ret[key] = val # try to convert to proper type or raise - else: - try: ret[key] = val # try to convert to proper type or skip - except Exception as msg: - warnings.warn('Bad val "%s" on line #%d\n\t"%s"\n\tin file \ -"%s"\n\t%s' % (val, cnt, line, fname, msg)) - - verbose.set_level(ret['verbose.level']) - verbose.set_fileo(ret['verbose.fileo']) - - for key, (val, line, cnt) in rc_temp.iteritems(): - if key in defaultParams: - if fail_on_error: - ret[key] = val # try to convert to proper type or raise - else: - try: ret[key] = val # try to convert to proper type or skip - except Exception as msg: - warnings.warn('Bad val "%s" on line #%d\n\t"%s"\n\tin file \ -"%s"\n\t%s' % (val, cnt, line, fname, msg)) - elif key in _deprecated_ignore_map: - warnings.warn('%s is deprecated. Update your matplotlibrc to use %s instead.'% (key, _deprecated_ignore_map[key])) - - else: - print(""" -Bad key "%s" on line %d in -%s. -You probably need to get an updated matplotlibrc file from -http://matplotlib.sf.net/_static/matplotlibrc or from the matplotlib source -distribution""" % (key, cnt, fname), file=sys.stderr) - - if ret['datapath'] is None: - ret['datapath'] = get_data_path() - - if not ret['text.latex.preamble'] == ['']: - verbose.report(""" -***************************************************************** -You have the following UNSUPPORTED LaTeX preamble customizations: -%s -Please do not ask for support with these customizations active. -***************************************************************** -"""% '\n'.join(ret['text.latex.preamble']), 'helpful') - - verbose.report('loaded rc file %s'%fname) - - return ret - - -# this is the instance used by the matplotlib classes -rcParams = rc_params() - -if rcParams['examples.directory']: - # paths that are intended to be relative to matplotlib_fname() - # are allowed for the examples.directory parameter. - # However, we will need to fully qualify the path because - # Sphinx requires absolute paths. - if not os.path.isabs(rcParams['examples.directory']): - _basedir, _fname = os.path.split(matplotlib_fname()) - # Sometimes matplotlib_fname() can return relative paths, - # Also, using realpath() guarentees that Sphinx will use - # the same path that matplotlib sees (in case of weird symlinks). - _basedir = os.path.realpath(_basedir) - _fullpath = os.path.join(_basedir, rcParams['examples.directory']) - rcParams['examples.directory'] = _fullpath - -rcParamsOrig = rcParams.copy() - -rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \ - defaultParams.iteritems() ]) - -rcParams['ps.usedistiller'] = checkdep_ps_distiller(rcParams['ps.usedistiller']) -rcParams['text.usetex'] = checkdep_usetex(rcParams['text.usetex']) - -if rcParams['axes.formatter.use_locale']: - import locale - locale.setlocale(locale.LC_ALL, '') - -def rc(group, **kwargs): - """ - Set the current rc params. Group is the grouping for the rc, eg. - for ``lines.linewidth`` the group is ``lines``, for - ``axes.facecolor``, the group is ``axes``, and so on. Group may - also be a list or tuple of group names, eg. (*xtick*, *ytick*). - *kwargs* is a dictionary attribute name/value pairs, eg:: - - rc('lines', linewidth=2, color='r') - - sets the current rc params and is equivalent to:: - - rcParams['lines.linewidth'] = 2 - rcParams['lines.color'] = 'r' - - The following aliases are available to save typing for interactive - users: - - ===== ================= - Alias Property - ===== ================= - 'lw' 'linewidth' - 'ls' 'linestyle' - 'c' 'color' - 'fc' 'facecolor' - 'ec' 'edgecolor' - 'mew' 'markeredgewidth' - 'aa' 'antialiased' - ===== ================= - - Thus you could abbreviate the above rc command as:: - - rc('lines', lw=2, c='r') - - - Note you can use python's kwargs dictionary facility to store - dictionaries of default parameters. Eg, you can customize the - font rc as follows:: - - font = {'family' : 'monospace', - 'weight' : 'bold', - 'size' : 'larger'} - - rc('font', **font) # pass in the font dict as kwargs - - This enables you to easily switch between several configurations. - Use :func:`~matplotlib.pyplot.rcdefaults` to restore the default - rc params after changes. - """ - - aliases = { - 'lw' : 'linewidth', - 'ls' : 'linestyle', - 'c' : 'color', - 'fc' : 'facecolor', - 'ec' : 'edgecolor', - 'mew' : 'markeredgewidth', - 'aa' : 'antialiased', - } - - if is_string_like(group): - group = (group,) - for g in group: - for k,v in kwargs.iteritems(): - name = aliases.get(k) or k - key = '%s.%s' % (g, name) - try: - rcParams[key] = v - except KeyError: - raise KeyError('Unrecognized key "%s" for group "%s" and name "%s"' % - (key, g, name)) - -def rcdefaults(): - """ - Restore the default rc params. These are not the params loaded by - the rc file, but mpl's internal params. See rc_file_defaults for - reloading the default params from the rc file - """ - rcParams.update(rcParamsDefault) - - -def rc_file(fname): - """ - Update rc params from file. - """ - rcParams.update(rc_params_from_file(fname)) - - -class rc_context(object): - """ - Return a context manager for managing rc settings. - - This allows one to do:: - - >>> with mpl.rc_context(fname='screen.rc'): - >>> plt.plot(x, a) - >>> with mpl.rc_context(fname='print.rc'): - >>> plt.plot(x, b) - >>> plt.plot(x, c) - - The 'a' vs 'x' and 'c' vs 'x' plots would have settings from - 'screen.rc', while the 'b' vs 'x' plot would have settings from - 'print.rc'. - - A dictionary can also be passed to the context manager:: - - >>> with mpl.rc_context(rc={'text.usetex': True}, fname='screen.rc'): - >>> plt.plot(x, a) - - The 'rc' dictionary takes precedence over the settings loaded from - 'fname'. Passing a dictionary only is also valid. - """ - - def __init__(self, rc=None, fname=None): - self.rcdict = rc - self.fname = fname - def __enter__(self): - self._rcparams = rcParams.copy() - if self.fname: - rc_file(self.fname) - if self.rcdict: - rcParams.update(self.rcdict) - def __exit__(self, type, value, tb): - rcParams.update(self._rcparams) - - -def rc_file_defaults(): - """ - Restore the default rc params from the original matplotlib rc that - was loaded - """ - rcParams.update(rcParamsOrig) - -_use_error_msg = """ This call to matplotlib.use() has no effect -because the the backend has already been chosen; -matplotlib.use() must be called *before* pylab, matplotlib.pyplot, -or matplotlib.backends is imported for the first time. -""" - -def use(arg, warn=True, force=False): - """ - Set the matplotlib backend to one of the known backends. - - The argument is case-insensitive. *warn* specifies whether a - warning should be issued if a backend has already been set up. - *force* is an **experimental** flag that tells matplotlib to - attempt to initialize a new backend by reloading the backend - module. - - .. note:: - - This function must be called *before* importing pyplot for - the first time; or, if you are not using pyplot, it must be called - before importing matplotlib.backends. If warn is True, a warning - is issued if you try and call this after pylab or pyplot have been - loaded. In certain black magic use cases, e.g. - :func:`pyplot.switch_backend`, we are doing the reloading necessary to - make the backend switch work (in some cases, e.g. pure image - backends) so one can set warn=False to suppress the warnings. - - To find out which backend is currently set, see - :func:`matplotlib.get_backend`. - - """ - # Lets determine the proper backend name first - if arg.startswith('module://'): - name = arg - else: - # Lowercase only non-module backend names (modules are case-sensitive) - arg = arg.lower() - name = validate_backend(arg) - - # Check if we've already set up a backend - if 'matplotlib.backends' in sys.modules: - # Warn only if called with a different name - if (rcParams['backend'] != name) and warn: - warnings.warn(_use_error_msg) - - # Unless we've been told to force it, just return - if not force: - return - need_reload = True - else: - need_reload = False - - # Store the backend name - rcParams['backend'] = name - - # If needed we reload here because a lot of setup code is triggered on - # module import. See backends/__init__.py for more detail. - if need_reload: - reload(sys.modules['matplotlib.backends']) - -def get_backend(): - "Returns the current backend." - return rcParams['backend'] - -def interactive(b): - """ - Set interactive mode to boolean b. - - If b is True, then draw after every plotting command, eg, after xlabel - """ - rcParams['interactive'] = b - -def is_interactive(): - 'Return true if plot mode is interactive' - b = rcParams['interactive'] - return b - -def tk_window_focus(): - """Return true if focus maintenance under TkAgg on win32 is on. - This currently works only for python.exe and IPython.exe. - Both IDLE and Pythonwin.exe fail badly when tk_window_focus is on.""" - if rcParams['backend'] != 'TkAgg': - return False - return rcParams['tk.window_focus'] - -# Now allow command line to override - -# Allow command line access to the backend with -d (MATLAB compatible -# flag) - -for s in sys.argv[1:]: - if s.startswith('-d') and len(s) > 2: # look for a -d flag - try: - use(s[2:]) - except (KeyError, ValueError): - pass - # we don't want to assume all -d flags are backends, eg -debug - -default_test_modules = [ - 'matplotlib.tests.test_agg', - 'matplotlib.tests.test_artist', - 'matplotlib.tests.test_axes', - 'matplotlib.tests.test_backend_svg', - 'matplotlib.tests.test_backend_pgf', - 'matplotlib.tests.test_basic', - 'matplotlib.tests.test_bbox_tight', - 'matplotlib.tests.test_cbook', - 'matplotlib.tests.test_colorbar', - 'matplotlib.tests.test_colors', - 'matplotlib.tests.test_contour', - 'matplotlib.tests.test_dates', - 'matplotlib.tests.test_delaunay', - 'matplotlib.tests.test_figure', - 'matplotlib.tests.test_image', - 'matplotlib.tests.test_legend', - 'matplotlib.tests.test_lines', - 'matplotlib.tests.test_mathtext', - 'matplotlib.tests.test_mlab', - 'matplotlib.tests.test_patches', - 'matplotlib.tests.test_pickle', - 'matplotlib.tests.test_rcparams', - 'matplotlib.tests.test_scale', - 'matplotlib.tests.test_simplification', - 'matplotlib.tests.test_spines', - 'matplotlib.tests.test_streamplot', - 'matplotlib.tests.test_subplots', - 'matplotlib.tests.test_text', - 'matplotlib.tests.test_ticker', - 'matplotlib.tests.test_tightlayout', - 'matplotlib.tests.test_triangulation', - 'matplotlib.tests.test_transforms', - 'matplotlib.tests.test_arrow_patches', - ] - - -def test(verbosity=1): - """run the matplotlib test suite""" - old_backend = rcParams['backend'] - try: - use('agg') - import nose - import nose.plugins.builtin - from .testing.noseclasses import KnownFailure - from nose.plugins.manager import PluginManager - - # store the old values before overriding - plugins = [] - plugins.append( KnownFailure() ) - plugins.extend( [plugin() for plugin in nose.plugins.builtin.plugins] ) - - manager = PluginManager(plugins=plugins) - config = nose.config.Config(verbosity=verbosity, plugins=manager) - - success = nose.run( defaultTest=default_test_modules, - config=config, - ) - finally: - if old_backend.lower() != 'agg': - use(old_backend) - - return success - -test.__test__ = False # nose: this function is not a test - -verbose.report('matplotlib version %s'%__version__) -verbose.report('verbose.level %s'%verbose.level) -verbose.report('interactive is %s'%rcParams['interactive']) -verbose.report('platform is %s'%sys.platform) -verbose.report('loaded modules: %s'%sys.modules.iterkeys(), 'debug') diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.pc/40_bts608939_draw_markers_description.patch/doc/api/api_changes.rst matplotlib-1.2.0/.pc/40_bts608939_draw_markers_description.patch/doc/api/api_changes.rst --- matplotlib-1.2.0~1+6455+16~quantal1/.pc/40_bts608939_draw_markers_description.patch/doc/api/api_changes.rst 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/.pc/40_bts608939_draw_markers_description.patch/doc/api/api_changes.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,1895 +0,0 @@ - -=========== -API Changes -=========== - -This chapter is a log of changes to matplotlib that affect the -outward-facing API. If updating matplotlib breaks your scripts, this -list may help describe what changes may be necessary in your code or -help figure out possible sources of the changes you are experiencing. - -For new features that were added to matplotlib, please see -:ref:`whats-new`. - - -Changes in 1.3.x -================ - -* Removed call of :meth:`~matplotlib.axes.Axes.grid` in - :meth:`~matplotlib.pyplot.plotfile`. To draw the axes grid, set to *True* - matplotlib.rcParams['axes.grid'] or ``axes.grid`` in ``.matplotlibrc`` or - explicitly call :meth:`~matplotlib.axes.Axes.grid` - -* A new keyword *extendrect* in :meth:`~matplotlib.pyplot.colorbar` and - :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape - of colorbar extensions. - -* The `~matplotlib.mpl` module is now deprecated. Those who relied on this - module should transition to simply using `import matplotlib as mpl`. - -Changes in 1.2.x -================ - -* The ``classic`` option of the rc parameter ``toolbar`` is deprecated - and will be removed in the next release. - -* The :meth:`~matplotlib.cbook.isvector` method has been removed since it - is no longer functional. - -* The `rasterization_zorder` property on `~matplotlib.axes.Axes` a - zorder below which artists are rasterized. This has defaulted to - -30000.0, but it now defaults to `None`, meaning no artists will be - rasterized. In order to rasterize artists below a given zorder - value, `set_rasterization_zorder` must be explicitly called. - -* In :meth:`~matplotlib.axes.Axes.scatter`, and `~pyplot.scatter`, - when specifying a marker using a tuple, the angle is now specified - in degrees, not radians. - -* Using :meth:`~matplotlib.axes.Axes.twinx` or - :meth:`~matplotlib.axes.Axes.twiny` no longer overrides the current locaters - and formatters on the axes. - -* In :meth:`~matplotlib.axes.Axes.contourf`, the handling of the *extend* - kwarg has changed. Formerly, the extended ranges were mapped - after to 0, 1 after being normed, so that they always corresponded - to the extreme values of the colormap. Now they are mapped - outside this range so that they correspond to the special - colormap values determined by the - :meth:`~matplotlib.colors.Colormap.set_under` and - :meth:`~matplotlib.colors.Colormap.set_over` methods, which - default to the colormap end points. - -* The new rc parameter ``savefig.format`` replaces ``cairo.format`` and - ``savefig.extension``, and sets the default file format used by - :meth:`matplotlib.figure.Figure.savefig`. - -* In :meth:`~matplotlib.pyplot.pie` and :meth:`~matplotlib.Axes.pie`, one can - now set the radius of the pie; setting the *radius* to 'None' (the default - value), will result in a pie with a radius of 1 as before. - -* Use of :func:`~matplotlib.projections.projection_factory` is now deprecated - in favour of axes class identification using - :func:`~matplotlib.projections.process_projection_requirements` followed by - direct axes class invocation (at the time of writing, functions which do this - are: :meth:`~matplotlib.figure.Figure.add_axes`, - :meth:`~matplotlib.figure.Figure.add_subplot` and - :meth:`~matplotlib.figure.Figure.gca`). Therefore:: - - - key = figure._make_key(*args, **kwargs) - ispolar = kwargs.pop('polar', False) - projection = kwargs.pop('projection', None) - if ispolar: - if projection is not None and projection != 'polar': - raise ValueError('polar and projection args are inconsistent') - projection = 'polar' - ax = projection_factory(projection, self, rect, **kwargs) - key = self._make_key(*args, **kwargs) - - # is now - - projection_class, kwargs, key = \ - process_projection_requirements(self, *args, **kwargs) - ax = projection_class(self, rect, **kwargs) - - This change means that third party objects can expose themselves as - matplotlib axes by providing a ``_as_mpl_axes`` method. See - :ref:`adding-new-scales` for more detail. - -* A new keyword *extendfrac* in :meth:`~matplotlib.pyplot.colorbar` and - :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the size of - the triangular minimum and maximum extensions on colorbars. - -* A new keyword *capthick* in :meth:`~matplotlib.pyplot.errorbar` has been - added as an intuitive alias to the *markeredgewidth* and *mew* keyword - arguments, which indirectly controlled the thickness of the caps on - the errorbars. For backwards compatibility, specifying either of the - original keyword arguments will override any value provided by - *capthick*. - -* Transform subclassing behaviour is now subtly changed. If your transform - implements a non-affine transformation, then it should override the - ``transform_non_affine`` method, rather than the generic ``transform`` method. - Previously transforms would define ``transform`` and then copy the - method into ``transform_non_affine``:: - - class MyTransform(mtrans.Transform): - def transform(self, xy): - ... - transform_non_affine = transform - - - This approach will no longer function correctly and should be changed to:: - - class MyTransform(mtrans.Transform): - def transform_non_affine(self, xy): - ... - - -* Artists no longer have ``x_isdata`` or ``y_isdata`` attributes; instead - any artist's transform can be interrogated with - ``artist_instance.get_transform().contains_branch(ax.transData)`` - -* Lines added to an axes now take into account their transform when updating the - data and view limits. This means transforms can now be used as a pre-transform. - For instance:: - - >>> import matplotlib.pyplot as plt - >>> import matplotlib.transforms as mtrans - >>> ax = plt.axes() - >>> ax.plot(range(10), transform=mtrans.Affine2D().scale(10) + ax.transData) - >>> print(ax.viewLim) - Bbox('array([[ 0., 0.],\n [ 90., 90.]])') - -* One can now easily get a transform which goes from one transform's coordinate - system to another, in an optimized way, using the new subtract method on a - transform. For instance, to go from data coordinates to axes coordinates:: - - >>> import matplotlib.pyplot as plt - >>> ax = plt.axes() - >>> data2ax = ax.transData - ax.transAxes - >>> print(ax.transData.depth, ax.transAxes.depth) - 3, 1 - >>> print(data2ax.depth) - 2 - - for versions before 1.2 this could only be achieved in a sub-optimal way, - using ``ax.transData + ax.transAxes.inverted()`` (depth is a new concept, - but had it existed it would return 4 for this example). - -* ``twinx`` and ``twiny`` now returns an instance of SubplotBase if - parent axes is an instance of SubplotBase. - -* All Qt3-based backends are now deprecated due to the lack of py3k bindings. - Qt and QtAgg backends will continue to work in v1.2.x for py2.6 - and py2.7. It is anticipated that the Qt3 support will be completely - removed for the next release. - -* :class:`~matplotlib.colors.ColorConverter`, - :class:`~matplotlib.colors.Colormap` and - :class:`~matplotlib.colors.Normalize` now subclasses ``object`` - -* ContourSet instances no longer have a ``transform`` attribute. Instead, - access the transform with the ``get_transform`` method. - -Changes in 1.1.x -================ - -* Added new :class:`matplotlib.sankey.Sankey` for generating Sankey diagrams. - -* In :meth:`~matplotlib.pyplot.imshow`, setting *interpolation* to 'nearest' - will now always mean that the nearest-neighbor interpolation is performed. - If you want the no-op interpolation to be performed, choose 'none'. - -* There were errors in how the tri-functions were handling input parameters - that had to be fixed. If your tri-plots are not working correctly anymore, - or you were working around apparent mistakes, please see issue #203 in the - github tracker. When in doubt, use kwargs. - -* The 'symlog' scale had some bad behavior in previous versions. This has now - been fixed and users should now be able to use it without frustrations. - The fixes did result in some minor changes in appearance for some users who - may have been depending on the bad behavior. - -* There is now a common set of markers for all plotting functions. Previously, - some markers existed only for :meth:`~matplotlib.pyplot.scatter` or just for - :meth:`~matplotlib.pyplot.plot`. This is now no longer the case. This merge - did result in a conflict. The string 'd' now means "thin diamond" while - 'D' will mean "regular diamond". - -Changes beyond 0.99.x -===================== - -* The default behavior of :meth:`matplotlib.axes.Axes.set_xlim`, - :meth:`matplotlib.axes.Axes.set_ylim`, and - :meth:`matplotlib.axes.Axes.axis`, and their corresponding - pyplot functions, has been changed: when view limits are - set explicitly with one of these methods, autoscaling is turned - off for the matching axis. A new *auto* kwarg is available to - control this behavior. The limit kwargs have been renamed to - *left* and *right* instead of *xmin* and *xmax*, and *bottom* - and *top* instead of *ymin* and *ymax*. The old names may still - be used, however. - -* There are five new Axes methods with corresponding pyplot - functions to facilitate autoscaling, tick location, and tick - label formatting, and the general appearance of ticks and - tick labels: - - + :meth:`matplotlib.axes.Axes.autoscale` turns autoscaling - on or off, and applies it. - - + :meth:`matplotlib.axes.Axes.margins` sets margins used to - autoscale the :attr:`matplotlib.axes.Axes.viewLim` based on - the :attr:`matplotlib.axes.Axes.dataLim`. - - + :meth:`matplotlib.axes.Axes.locator_params` allows one to - adjust axes locator parameters such as *nbins*. - - + :meth:`matplotlib.axes.Axes.ticklabel_format` is a convenience - method for controlling the :class:`matplotlib.ticker.ScalarFormatter` - that is used by default with linear axes. - - + :meth:`matplotlib.axes.Axes.tick_params` controls direction, size, - visibility, and color of ticks and their labels. - -* The :meth:`matplotlib.axes.Axes.bar` method accepts a *error_kw* - kwarg; it is a dictionary of kwargs to be passed to the - errorbar function. - -* The :meth:`matplotlib.axes.Axes.hist` *color* kwarg now accepts - a sequence of color specs to match a sequence of datasets. - -* The :class:`~matplotlib.collections.EllipseCollection` has been - changed in two ways: - - + There is a new *units* option, 'xy', that scales the ellipse with - the data units. This matches the :class:'~matplotlib.patches.Ellipse` - scaling. - - + The *height* and *width* kwargs have been changed to specify - the height and width, again for consistency with - :class:`~matplotlib.patches.Ellipse`, and to better match - their names; previously they specified the half-height and - half-width. - -* There is a new rc parameter ``axes.color_cycle``, and the color - cycle is now independent of the rc parameter ``lines.color``. - :func:`matplotlib.Axes.set_default_color_cycle` is deprecated. - -* You can now print several figures to one pdf file and modify the - document information dictionary of a pdf file. See the docstrings - of the class :class:`matplotlib.backends.backend_pdf.PdfPages` for - more information. - -* Removed configobj_ and `enthought.traits`_ packages, which are only - required by the experimental traited config and are somewhat out of - date. If needed, install them independently. - -.. _configobj: http://www.voidspace.org.uk/python/configobj.html -.. _`enthought.traits`: http://code.enthought.com/projects/traits - -* The new rc parameter ``savefig.extension`` sets the filename extension - that is used by :meth:`matplotlib.figure.Figure.savefig` if its *fname* - argument lacks an extension. - -* In an effort to simplify the backend API, all clipping rectangles - and paths are now passed in using GraphicsContext objects, even - on collections and images. Therefore:: - - draw_path_collection(self, master_transform, cliprect, clippath, - clippath_trans, paths, all_transforms, offsets, - offsetTrans, facecolors, edgecolors, linewidths, - linestyles, antialiaseds, urls) - - # is now - - draw_path_collection(self, gc, master_transform, paths, all_transforms, - offsets, offsetTrans, facecolors, edgecolors, - linewidths, linestyles, antialiaseds, urls) - - - draw_quad_mesh(self, master_transform, cliprect, clippath, - clippath_trans, meshWidth, meshHeight, coordinates, - offsets, offsetTrans, facecolors, antialiased, - showedges) - - # is now - - draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, - coordinates, offsets, offsetTrans, facecolors, - antialiased, showedges) - - - draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) - - # is now - - draw_image(self, gc, x, y, im) - -* There are four new Axes methods with corresponding pyplot - functions that deal with unstructured triangular grids: - - + :meth:`matplotlib.axes.Axes.tricontour` draws contour lines - on a triangular grid. - - + :meth:`matplotlib.axes.Axes.tricontourf` draws filled contours - on a triangular grid. - - + :meth:`matplotlib.axes.Axes.tripcolor` draws a pseudocolor - plot on a triangular grid. - - + :meth:`matplotlib.axes.Axes.triplot` draws a triangular grid - as lines and/or markers. - -Changes in 0.99 -====================== - -* pylab no longer provides a load and save function. These are - available in matplotlib.mlab, or you can use numpy.loadtxt and - numpy.savetxt for text files, or np.save and np.load for binary - numpy arrays. - -* User-generated colormaps can now be added to the set recognized - by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the - default and applied to the current image using - :func:`matplotlib.pyplot.set_cmap`. - -* changed use_mrecords default to False in mlab.csv2rec since this is - partially broken - -* Axes instances no longer have a "frame" attribute. Instead, use the - new "spines" attribute. Spines is a dictionary where the keys are - the names of the spines (e.g. 'left','right' and so on) and the - values are the artists that draw the spines. For normal - (rectilinear) axes, these artists are Line2D instances. For other - axes (such as polar axes), these artists may be Patch instances. - -* Polar plots no longer accept a resolution kwarg. Instead, each Path - must specify its own number of interpolation steps. This is - unlikely to be a user-visible change -- if interpolation of data is - required, that should be done before passing it to matplotlib. - -Changes for 0.98.x -================== -* psd(), csd(), and cohere() will now automatically wrap negative - frequency components to the beginning of the returned arrays. - This is much more sensible behavior and makes them consistent - with specgram(). The previous behavior was more of an oversight - than a design decision. - -* Added new keyword parameters *nonposx*, *nonposy* to - :class:`matplotlib.axes.Axes` methods that set log scale - parameters. The default is still to mask out non-positive - values, but the kwargs accept 'clip', which causes non-positive - values to be replaced with a very small positive value. - -* Added new :func:`matplotlib.pyplot.fignum_exists` and - :func:`matplotlib.pyplot.get_fignums`; they merely expose - information that had been hidden in :mod:`matplotlib._pylab_helpers`. - -* Deprecated numerix package. - -* Added new :func:`matplotlib.image.imsave` and exposed it to the - :mod:`matplotlib.pyplot` interface. - -* Remove support for pyExcelerator in exceltools -- use xlwt - instead - -* Changed the defaults of acorr and xcorr to use usevlines=True, - maxlags=10 and normed=True since these are the best defaults - -* Following keyword parameters for :class:`matplotlib.label.Label` are now - deprecated and new set of parameters are introduced. The new parameters - are given as a fraction of the font-size. Also, *scatteryoffsets*, - *fancybox* and *columnspacing* are added as keyword parameters. - - ================ ================ - Deprecated New - ================ ================ - pad borderpad - labelsep labelspacing - handlelen handlelength - handlestextsep handletextpad - axespad borderaxespad - ================ ================ - - -* Removed the configobj and experimental traits rc support - -* Modified :func:`matplotlib.mlab.psd`, :func:`matplotlib.mlab.csd`, - :func:`matplotlib.mlab.cohere`, and :func:`matplotlib.mlab.specgram` - to scale one-sided densities by a factor of 2. Also, optionally - scale the densities by the sampling frequency, which gives true values - of densities that can be integrated by the returned frequency values. - This also gives better MATLAB compatibility. The corresponding - :class:`matplotlib.axes.Axes` methods and :mod:`matplotlib.pyplot` - functions were updated as well. - -* Font lookup now uses a nearest-neighbor approach rather than an - exact match. Some fonts may be different in plots, but should be - closer to what was requested. - -* :meth:`matplotlib.axes.Axes.set_xlim`, - :meth:`matplotlib.axes.Axes.set_ylim` now return a copy of the - :attr:`viewlim` array to avoid modify-in-place surprises. - -* :meth:`matplotlib.afm.AFM.get_fullname` and - :meth:`matplotlib.afm.AFM.get_familyname` no longer raise an - exception if the AFM file does not specify these optional - attributes, but returns a guess based on the required FontName - attribute. - -* Changed precision kwarg in :func:`matplotlib.pyplot.spy`; default is - 0, and the string value 'present' is used for sparse arrays only to - show filled locations. - -* :class:`matplotlib.collections.EllipseCollection` added. - -* Added ``angles`` kwarg to :func:`matplotlib.pyplot.quiver` for more - flexible specification of the arrow angles. - -* Deprecated (raise NotImplementedError) all the mlab2 functions from - :mod:`matplotlib.mlab` out of concern that some of them were not - clean room implementations. - -* Methods :meth:`matplotlib.collections.Collection.get_offsets` and - :meth:`matplotlib.collections.Collection.set_offsets` added to - :class:`~matplotlib.collections.Collection` base class. - -* :attr:`matplotlib.figure.Figure.figurePatch` renamed - :attr:`matplotlib.figure.Figure.patch`; - :attr:`matplotlib.axes.Axes.axesPatch` renamed - :attr:`matplotlib.axes.Axes.patch`; - :attr:`matplotlib.axes.Axes.axesFrame` renamed - :attr:`matplotlib.axes.Axes.frame`. - :meth:`matplotlib.axes.Axes.get_frame`, which returns - :attr:`matplotlib.axes.Axes.patch`, is deprecated. - -* Changes in the :class:`matplotlib.contour.ContourLabeler` attributes - (:func:`matplotlib.pyplot.clabel` function) so that they all have a - form like ``.labelAttribute``. The three attributes that are most - likely to be used by end users, ``.cl``, ``.cl_xy`` and - ``.cl_cvalues`` have been maintained for the moment (in addition to - their renamed versions), but they are deprecated and will eventually - be removed. - -* Moved several functions in :mod:`matplotlib.mlab` and - :mod:`matplotlib.cbook` into a separate module - :mod:`matplotlib.numerical_methods` because they were unrelated to - the initial purpose of mlab or cbook and appeared more coherent - elsewhere. - -Changes for 0.98.1 -================== - -* Removed broken :mod:`matplotlib.axes3d` support and replaced it with - a non-implemented error pointing to 0.91.x - -Changes for 0.98.0 -================== - -* :func:`matplotlib.image.imread` now no longer always returns RGBA data---if - the image is luminance or RGB, it will return a MxN or MxNx3 array - if possible. Also uint8 is no longer always forced to float. - -* Rewrote the :class:`matplotlib.cm.ScalarMappable` callback - infrastructure to use :class:`matplotlib.cbook.CallbackRegistry` - rather than custom callback handling. Any users of - :meth:`matplotlib.cm.ScalarMappable.add_observer` of the - :class:`~matplotlib.cm.ScalarMappable` should use the - :attr:`matplotlib.cm.ScalarMappable.callbacks` - :class:`~matplotlib.cbook.CallbackRegistry` instead. - -* New axes function and Axes method provide control over the plot - color cycle: :func:`matplotlib.axes.set_default_color_cycle` and - :meth:`matplotlib.axes.Axes.set_color_cycle`. - -* matplotlib now requires Python 2.4, so :mod:`matplotlib.cbook` will - no longer provide :class:`set`, :func:`enumerate`, :func:`reversed` - or :func:`izip` compatibility functions. - -* In Numpy 1.0, bins are specified by the left edges only. The axes - method :meth:`matplotlib.axes.Axes.hist` now uses future Numpy 1.3 - semantics for histograms. Providing ``binedges``, the last value gives - the upper-right edge now, which was implicitly set to +infinity in - Numpy 1.0. This also means that the last bin doesn't contain upper - outliers any more by default. - -* New axes method and pyplot function, - :func:`~matplotlib.pyplot.hexbin`, is an alternative to - :func:`~matplotlib.pyplot.scatter` for large datasets. It makes - something like a :func:`~matplotlib.pyplot.pcolor` of a 2-D - histogram, but uses hexagonal bins. - -* New kwarg, ``symmetric``, in :class:`matplotlib.ticker.MaxNLocator` - allows one require an axis to be centered around zero. - -* Toolkits must now be imported from ``mpl_toolkits`` (not ``matplotlib.toolkits``) - -Notes about the transforms refactoring --------------------------------------- - -A major new feature of the 0.98 series is a more flexible and -extensible transformation infrastructure, written in Python/Numpy -rather than a custom C extension. - -The primary goal of this refactoring was to make it easier to -extend matplotlib to support new kinds of projections. This is -mostly an internal improvement, and the possible user-visible -changes it allows are yet to come. - -See :mod:`matplotlib.transforms` for a description of the design of -the new transformation framework. - -For efficiency, many of these functions return views into Numpy -arrays. This means that if you hold on to a reference to them, -their contents may change. If you want to store a snapshot of -their current values, use the Numpy array method copy(). - -The view intervals are now stored only in one place -- in the -:class:`matplotlib.axes.Axes` instance, not in the locator instances -as well. This means locators must get their limits from their -:class:`matplotlib.axis.Axis`, which in turn looks up its limits from -the :class:`~matplotlib.axes.Axes`. If a locator is used temporarily -and not assigned to an Axis or Axes, (e.g. in -:mod:`matplotlib.contour`), a dummy axis must be created to store its -bounds. Call :meth:`matplotlib.ticker.Locator.create_dummy_axis` to -do so. - -The functionality of :class:`Pbox` has been merged with -:class:`~matplotlib.transforms.Bbox`. Its methods now all return -copies rather than modifying in place. - -The following lists many of the simple changes necessary to update -code from the old transformation framework to the new one. In -particular, methods that return a copy are named with a verb in the -past tense, whereas methods that alter an object in place are named -with a verb in the present tense. - -:mod:`matplotlib.transforms` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -:meth:`Bbox.get_bounds` :attr:`transforms.Bbox.bounds` ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.width` :attr:`transforms.Bbox.width` ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.height` :attr:`transforms.Bbox.height` ------------------------------------------------------------- ------------------------------------------------------------ -`Bbox.intervalx().get_bounds()` :attr:`transforms.Bbox.intervalx` -`Bbox.intervalx().set_bounds()` [:attr:`Bbox.intervalx` is now a property.] ------------------------------------------------------------- ------------------------------------------------------------ -`Bbox.intervaly().get_bounds()` :attr:`transforms.Bbox.intervaly` -`Bbox.intervaly().set_bounds()` [:attr:`Bbox.intervaly` is now a property.] ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.xmin` :attr:`transforms.Bbox.x0` or - :attr:`transforms.Bbox.xmin` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.ymin` :attr:`transforms.Bbox.y0` or - :attr:`transforms.Bbox.ymin` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.xmax` :attr:`transforms.Bbox.x1` or - :attr:`transforms.Bbox.xmax` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.ymax` :attr:`transforms.Bbox.y1` or - :attr:`transforms.Bbox.ymax` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Bbox.overlaps(bboxes)` `Bbox.count_overlaps(bboxes)` ------------------------------------------------------------- ------------------------------------------------------------ -`bbox_all(bboxes)` `Bbox.union(bboxes)` - [:meth:`transforms.Bbox.union` is a staticmethod.] ------------------------------------------------------------- ------------------------------------------------------------ -`lbwh_to_bbox(l, b, w, h)` `Bbox.from_bounds(x0, y0, w, h)` - [:meth:`transforms.Bbox.from_bounds` is a staticmethod.] ------------------------------------------------------------- ------------------------------------------------------------ -`inverse_transform_bbox(trans, bbox)` `Bbox.inverse_transformed(trans)` ------------------------------------------------------------- ------------------------------------------------------------ -`Interval.contains_open(v)` `interval_contains_open(tuple, v)` ------------------------------------------------------------- ------------------------------------------------------------ -`Interval.contains(v)` `interval_contains(tuple, v)` ------------------------------------------------------------- ------------------------------------------------------------ -`identity_transform()` :class:`matplotlib.transforms.IdentityTransform` ------------------------------------------------------------- ------------------------------------------------------------ -`blend_xy_sep_transform(xtrans, ytrans)` `blended_transform_factory(xtrans, ytrans)` ------------------------------------------------------------- ------------------------------------------------------------ -`scale_transform(xs, ys)` `Affine2D().scale(xs[, ys])` ------------------------------------------------------------- ------------------------------------------------------------ -`get_bbox_transform(boxin, boxout)` `BboxTransform(boxin, boxout)` or - `BboxTransformFrom(boxin)` or - `BboxTransformTo(boxout)` ------------------------------------------------------------- ------------------------------------------------------------ -`Transform.seq_xy_tup(points)` `Transform.transform(points)` ------------------------------------------------------------- ------------------------------------------------------------ -`Transform.inverse_xy_tup(points)` `Transform.inverted().transform(points)` -============================================================ ============================================================ - -.. [1] The :class:`~matplotlib.transforms.Bbox` is bound by the points - (x0, y0) to (x1, y1) and there is no defined order to these points, - that is, x0 is not necessarily the left edge of the box. To get - the left edge of the :class:`Bbox`, use the read-only property - :attr:`~matplotlib.transforms.Bbox.xmin`. - -:mod:`matplotlib.axes` -~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Axes.get_position()` :meth:`matplotlib.axes.Axes.get_position` [2]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Axes.set_position()` :meth:`matplotlib.axes.Axes.set_position` [3]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Axes.toggle_log_lineary()` :meth:`matplotlib.axes.Axes.set_yscale` [4]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Subplot` class removed. -============================================================ ============================================================ - -The :class:`Polar` class has moved to :mod:`matplotlib.projections.polar`. - -.. [2] :meth:`matplotlib.axes.Axes.get_position` used to return a list - of points, now it returns a :class:`matplotlib.transforms.Bbox` - instance. - -.. [3] :meth:`matplotlib.axes.Axes.set_position` now accepts either - four scalars or a :class:`matplotlib.transforms.Bbox` instance. - -.. [4] Since the recfactoring allows for more than two scale types - ('log' or 'linear'), it no longer makes sense to have a toggle. - `Axes.toggle_log_lineary()` has been removed. - -:mod:`matplotlib.artist` -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Artist.set_clip_path(path)` `Artist.set_clip_path(path, transform)` [5]_ -============================================================ ============================================================ - -.. [5] :meth:`matplotlib.artist.Artist.set_clip_path` now accepts a - :class:`matplotlib.path.Path` instance and a - :class:`matplotlib.transforms.Transform` that will be applied to - the path immediately before clipping. - -:mod:`matplotlib.collections` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`linestyle` `linestyles` [6]_ -============================================================ ============================================================ - -.. [6] Linestyles are now treated like all other collection - attributes, i.e. a single value or multiple values may be - provided. - -:mod:`matplotlib.colors` -~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`ColorConvertor.to_rgba_list(c)` `ColorConvertor.to_rgba_array(c)` - [:meth:`matplotlib.colors.ColorConvertor.to_rgba_array` - returns an Nx4 Numpy array of RGBA color quadruples.] -============================================================ ============================================================ - -:mod:`matplotlib.contour` -~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Contour._segments` :meth:`matplotlib.contour.Contour.get_paths`` [Returns a - list of :class:`matplotlib.path.Path` instances.] -============================================================ ============================================================ - -:mod:`matplotlib.figure` -~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Figure.dpi.get()` / `Figure.dpi.set()` :attr:`matplotlib.figure.Figure.dpi` *(a property)* -============================================================ ============================================================ - -:mod:`matplotlib.patches` -~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Patch.get_verts()` :meth:`matplotlib.patches.Patch.get_path` [Returns a - :class:`matplotlib.path.Path` instance] -============================================================ ============================================================ - -:mod:`matplotlib.backend_bases` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`GraphicsContext.set_clip_rectangle(tuple)` `GraphicsContext.set_clip_rectangle(bbox)` ------------------------------------------------------------- ------------------------------------------------------------ -`GraphicsContext.get_clip_path()` `GraphicsContext.get_clip_path()` [7]_ ------------------------------------------------------------- ------------------------------------------------------------ -`GraphicsContext.set_clip_path()` `GraphicsContext.set_clip_path()` [8]_ -============================================================ ============================================================ - -:class:`~matplotlib.backend_bases.RendererBase` -``````````````````````````````````````````````` - -New methods: - - * :meth:`draw_path(self, gc, path, transform, rgbFace) - ` - - * :meth:`draw_markers(self, gc, marker_path, marker_trans, path, - trans, rgbFace) - ` - *[optional]* - -Changed methods: - - * `draw_image(self, x, y, im, bbox)` is now - :meth:`draw_image(self, x, y, im, bbox, clippath, clippath_trans) - ` - -Removed methods: - - * `draw_arc` - - * `draw_line_collection` - - * `draw_line` - - * `draw_lines` - - * `draw_point` - - * `draw_quad_mesh` - - * `draw_poly_collection` - - * `draw_polygon` - - * `draw_rectangle` - - * `draw_regpoly_collection` - -.. [7] :meth:`matplotlib.backend_bases.GraphicsContext.get_clip_path` - returns a tuple of the form (*path*, *affine_transform*), where - *path* is a :class:`matplotlib.path.Path` instance and - *affine_transform* is a :class:`matplotlib.transforms.Affine2D` - instance. - -.. [8] :meth:`matplotlib.backend_bases.GraphicsContext.set_clip_path` - now only accepts a :class:`matplotlib.transforms.TransformedPath` - instance. - -Changes for 0.91.2 -================== - -* For :func:`csv2rec`, checkrows=0 is the new default indicating all rows - will be checked for type inference - -* A warning is issued when an image is drawn on log-scaled axes, since - it will not log-scale the image data. - -* Moved :func:`rec2gtk` to :mod:`matplotlib.toolkits.gtktools` - -* Moved :func:`rec2excel` to :mod:`matplotlib.toolkits.exceltools` - -* Removed, dead/experimental ExampleInfo, Namespace and Importer - code from :mod:`matplotlib.__init__` - -Changes for 0.91.1 -================== - -Changes for 0.91.0 -================== - -* Changed :func:`cbook.is_file_like` to - :func:`cbook.is_writable_file_like` and corrected behavior. - -* Added ax kwarg to :func:`pyplot.colorbar` and - :meth:`Figure.colorbar` so that one can specify the axes object from - which space for the colorbar is to be taken, if one does not want to - make the colorbar axes manually. - -* Changed :func:`cbook.reversed` so it yields a tuple rather than a - (index, tuple). This agrees with the python reversed builtin, - and cbook only defines reversed if python doesn't provide the - builtin. - -* Made skiprows=1 the default on :func:`csv2rec` - -* The gd and paint backends have been deleted. - -* The errorbar method and function now accept additional kwargs - so that upper and lower limits can be indicated by capping the - bar with a caret instead of a straight line segment. - -* The :mod:`matplotlib.dviread` file now has a parser for files like - psfonts.map and pdftex.map, to map TeX font names to external files. - -* The file :mod:`matplotlib.type1font` contains a new class for Type 1 - fonts. Currently it simply reads pfa and pfb format files and - stores the data in a way that is suitable for embedding in pdf - files. In the future the class might actually parse the font to - allow e.g. subsetting. - -* :mod:`matplotlib.FT2Font` now supports :meth:`FT_Attach_File`. In - practice this can be used to read an afm file in addition to a - pfa/pfb file, to get metrics and kerning information for a Type 1 - font. - -* The :class:`AFM` class now supports querying CapHeight and stem - widths. The get_name_char method now has an isord kwarg like - get_width_char. - -* Changed :func:`pcolor` default to shading='flat'; but as noted now in the - docstring, it is preferable to simply use the edgecolor kwarg. - -* The mathtext font commands (``\cal``, ``\rm``, ``\it``, ``\tt``) now - behave as TeX does: they are in effect until the next font change - command or the end of the grouping. Therefore uses of ``$\cal{R}$`` - should be changed to ``${\cal R}$``. Alternatively, you may use the - new LaTeX-style font commands (``\mathcal``, ``\mathrm``, - ``\mathit``, ``\mathtt``) which do affect the following group, - eg. ``$\mathcal{R}$``. - -* Text creation commands have a new default linespacing and a new - ``linespacing`` kwarg, which is a multiple of the maximum vertical - extent of a line of ordinary text. The default is 1.2; - ``linespacing=2`` would be like ordinary double spacing, for example. - -* Changed default kwarg in - :meth:`matplotlib.colors.Normalize.__init__`` to ``clip=False``; - clipping silently defeats the purpose of the special over, under, - and bad values in the colormap, thereby leading to unexpected - behavior. The new default should reduce such surprises. - -* Made the emit property of :meth:`~matplotlib.axes.Axes.set_xlim` and - :meth:`~matplotlib.axes.Axes.set_ylim` ``True`` by default; removed - the Axes custom callback handling into a 'callbacks' attribute which - is a :class:`~matplotlib.cbook.CallbackRegistry` instance. This now - supports the 'xlim_changed' and 'ylim_changed' Axes events. - -Changes for 0.90.1 -================== - -:: - - The file dviread.py has a (very limited and fragile) dvi reader - for usetex support. The API might change in the future so don't - depend on it yet. - - Removed deprecated support for a float value as a gray-scale; - now it must be a string, like '0.5'. Added alpha kwarg to - ColorConverter.to_rgba_list. - - New method set_bounds(vmin, vmax) for formatters, locators sets - the viewInterval and dataInterval from floats. - - Removed deprecated colorbar_classic. - - Line2D.get_xdata and get_ydata valid_only=False kwarg is replaced - by orig=True. When True, it returns the original data, otherwise - the processed data (masked, converted) - - Some modifications to the units interface. - units.ConversionInterface.tickers renamed to - units.ConversionInterface.axisinfo and it now returns a - units.AxisInfo object rather than a tuple. This will make it - easier to add axis info functionality (eg I added a default label - on this iteration) w/o having to change the tuple length and hence - the API of the client code every time new functionality is added. - Also, units.ConversionInterface.convert_to_value is now simply - named units.ConversionInterface.convert. - - Axes.errorbar uses Axes.vlines and Axes.hlines to draw its error - limits int he vertical and horizontal direction. As you'll see - in the changes below, these functions now return a LineCollection - rather than a list of lines. The new return signature for - errorbar is ylins, caplines, errorcollections where - errorcollections is a xerrcollection, yerrcollection - - Axes.vlines and Axes.hlines now create and returns a LineCollection, not a list - of lines. This is much faster. The kwarg signature has changed, - so consult the docs - - MaxNLocator accepts a new Boolean kwarg ('integer') to force - ticks to integer locations. - - Commands that pass an argument to the Text constructor or to - Text.set_text() now accept any object that can be converted - with '%s'. This affects xlabel(), title(), etc. - - Barh now takes a **kwargs dict instead of most of the old - arguments. This helps ensure that bar and barh are kept in sync, - but as a side effect you can no longer pass e.g. color as a - positional argument. - - ft2font.get_charmap() now returns a dict that maps character codes - to glyph indices (until now it was reversed) - - Moved data files into lib/matplotlib so that setuptools' develop - mode works. Re-organized the mpl-data layout so that this source - structure is maintained in the installation. (I.e. the 'fonts' and - 'images' sub-directories are maintained in site-packages.). - Suggest removing site-packages/matplotlib/mpl-data and - ~/.matplotlib/ttffont.cache before installing - -Changes for 0.90.0 -================== - -:: - - All artists now implement a "pick" method which users should not - call. Rather, set the "picker" property of any artist you want to - pick on (the epsilon distance in points for a hit test) and - register with the "pick_event" callback. See - examples/pick_event_demo.py for details - - Bar, barh, and hist have "log" binary kwarg: log=True - sets the ordinate to a log scale. - - Boxplot can handle a list of vectors instead of just - an array, so vectors can have different lengths. - - Plot can handle 2-D x and/or y; it plots the columns. - - Added linewidth kwarg to bar and barh. - - Made the default Artist._transform None (rather than invoking - identity_transform for each artist only to have it overridden - later). Use artist.get_transform() rather than artist._transform, - even in derived classes, so that the default transform will be - created lazily as needed - - New LogNorm subclass of Normalize added to colors.py. - All Normalize subclasses have new inverse() method, and - the __call__() method has a new clip kwarg. - - Changed class names in colors.py to match convention: - normalize -> Normalize, no_norm -> NoNorm. Old names - are still available for now. - - Removed obsolete pcolor_classic command and method. - - Removed lineprops and markerprops from the Annotation code and - replaced them with an arrow configurable with kwarg arrowprops. - See examples/annotation_demo.py - JDH - -Changes for 0.87.7 -================== - -:: - - Completely reworked the annotations API because I found the old - API cumbersome. The new design is much more legible and easy to - read. See matplotlib.text.Annotation and - examples/annotation_demo.py - - markeredgecolor and markerfacecolor cannot be configured in - matplotlibrc any more. Instead, markers are generally colored - automatically based on the color of the line, unless marker colors - are explicitly set as kwargs - NN - - Changed default comment character for load to '#' - JDH - - math_parse_s_ft2font_svg from mathtext.py & mathtext2.py now returns - width, height, svg_elements. svg_elements is an instance of Bunch ( - cmbook.py) and has the attributes svg_glyphs and svg_lines, which are both - lists. - - Renderer.draw_arc now takes an additional parameter, rotation. - It specifies to draw the artist rotated in degrees anti- - clockwise. It was added for rotated ellipses. - - Renamed Figure.set_figsize_inches to Figure.set_size_inches to - better match the get method, Figure.get_size_inches. - - Removed the copy_bbox_transform from transforms.py; added - shallowcopy methods to all transforms. All transforms already - had deepcopy methods. - - FigureManager.resize(width, height): resize the window - specified in pixels - - barh: x and y args have been renamed to width and bottom - respectively, and their order has been swapped to maintain - a (position, value) order. - - bar and barh: now accept kwarg 'edgecolor'. - - bar and barh: The left, height, width and bottom args can - now all be scalars or sequences; see docstring. - - barh: now defaults to edge aligned instead of center - aligned bars - - bar, barh and hist: Added a keyword arg 'align' that - controls between edge or center bar alignment. - - Collections: PolyCollection and LineCollection now accept - vertices or segments either in the original form [(x,y), - (x,y), ...] or as a 2D numerix array, with X as the first column - and Y as the second. Contour and quiver output the numerix - form. The transforms methods Bbox.update() and - Transformation.seq_xy_tups() now accept either form. - - Collections: LineCollection is now a ScalarMappable like - PolyCollection, etc. - - Specifying a grayscale color as a float is deprecated; use - a string instead, e.g., 0.75 -> '0.75'. - - Collections: initializers now accept any mpl color arg, or - sequence of such args; previously only a sequence of rgba - tuples was accepted. - - Colorbar: completely new version and api; see docstring. The - original version is still accessible as colorbar_classic, but - is deprecated. - - Contourf: "extend" kwarg replaces "clip_ends"; see docstring. - Masked array support added to pcolormesh. - - Modified aspect-ratio handling: - Removed aspect kwarg from imshow - Axes methods: - set_aspect(self, aspect, adjustable=None, anchor=None) - set_adjustable(self, adjustable) - set_anchor(self, anchor) - Pylab interface: - axis('image') - - Backend developers: ft2font's load_char now takes a flags - argument, which you can OR together from the LOAD_XXX - constants. - -Changes for 0.86 -================ - -:: - - Matplotlib data is installed into the matplotlib module. - This is similar to package_data. This should get rid of - having to check for many possibilities in _get_data_path(). - The MATPLOTLIBDATA env key is still checked first to allow - for flexibility. - - 1) Separated the color table data from cm.py out into - a new file, _cm.py, to make it easier to find the actual - code in cm.py and to add new colormaps. Everything - from _cm.py is imported by cm.py, so the split should be - transparent. - 2) Enabled automatic generation of a colormap from - a list of colors in contour; see modified - examples/contour_demo.py. - 3) Support for imshow of a masked array, with the - ability to specify colors (or no color at all) for - masked regions, and for regions that are above or - below the normally mapped region. See - examples/image_masked.py. - 4) In support of the above, added two new classes, - ListedColormap, and no_norm, to colors.py, and modified - the Colormap class to include common functionality. Added - a clip kwarg to the normalize class. - -Changes for 0.85 -================ - -:: - - Made xtick and ytick separate props in rc - - made pos=None the default for tick formatters rather than 0 to - indicate "not supplied" - - Removed "feature" of minor ticks which prevents them from - overlapping major ticks. Often you want major and minor ticks at - the same place, and can offset the major ticks with the pad. This - could be made configurable - - Changed the internal structure of contour.py to a more OO style. - Calls to contour or contourf in axes.py or pylab.py now return - a ContourSet object which contains references to the - LineCollections or PolyCollections created by the call, - as well as the configuration variables that were used. - The ContourSet object is a "mappable" if a colormap was used. - - Added a clip_ends kwarg to contourf. From the docstring: - * clip_ends = True - If False, the limits for color scaling are set to the - minimum and maximum contour levels. - True (default) clips the scaling limits. Example: - if the contour boundaries are V = [-100, 2, 1, 0, 1, 2, 100], - then the scaling limits will be [-100, 100] if clip_ends - is False, and [-3, 3] if clip_ends is True. - Added kwargs linewidths, antialiased, and nchunk to contourf. These - are experimental; see the docstring. - - Changed Figure.colorbar(): - kw argument order changed; - if mappable arg is a non-filled ContourSet, colorbar() shows - lines instead hof polygons. - if mappable arg is a filled ContourSet with clip_ends=True, - the endpoints are not labelled, so as to give the - correct impression of open-endedness. - - Changed LineCollection.get_linewidths to get_linewidth, for - consistency. - - -Changes for 0.84 -================ - -:: - - Unified argument handling between hlines and vlines. Both now - take optionally a fmt argument (as in plot) and a keyword args - that can be passed onto Line2D. - - Removed all references to "data clipping" in rc and lines.py since - these were not used and not optimized. I'm sure they'll be - resurrected later with a better implementation when needed. - - 'set' removed - no more deprecation warnings. Use 'setp' instead. - - Backend developers: Added flipud method to image and removed it - from to_str. Removed origin kwarg from backend.draw_image. - origin is handled entirely by the frontend now. - -Changes for 0.83 -================ - -:: - - - Made HOME/.matplotlib the new config dir where the matplotlibrc - file, the ttf.cache, and the tex.cache live. The new default - filenames in .matplotlib have no leading dot and are not hidden. - Eg, the new names are matplotlibrc, tex.cache, and ttffont.cache. - This is how ipython does it so it must be right. - - If old files are found, a warning is issued and they are moved to - the new location. - - - backends/__init__.py no longer imports new_figure_manager, - draw_if_interactive and show from the default backend, but puts - these imports into a call to pylab_setup. Also, the Toolbar is no - longer imported from WX/WXAgg. New usage: - - from backends import pylab_setup - new_figure_manager, draw_if_interactive, show = pylab_setup() - - - Moved Figure.get_width_height() to FigureCanvasBase. It now - returns int instead of float. - -Changes for 0.82 -================ - -:: - - - toolbar import change in GTKAgg, GTKCairo and WXAgg - - - Added subplot config tool to GTK* backends -- note you must now - import the NavigationToolbar2 from your backend of choice rather - than from backend_gtk because it needs to know about the backend - specific canvas -- see examples/embedding_in_gtk2.py. Ditto for - wx backend -- see examples/embedding_in_wxagg.py - - - - hist bin change - - Sean Richards notes there was a problem in the way we created - the binning for histogram, which made the last bin - underrepresented. From his post: - - I see that hist uses the linspace function to create the bins - and then uses searchsorted to put the values in their correct - bin. That's all good but I am confused over the use of linspace - for the bin creation. I wouldn't have thought that it does - what is needed, to quote the docstring it creates a "Linear - spaced array from min to max". For it to work correctly - shouldn't the values in the bins array be the same bound for - each bin? (i.e. each value should be the lower bound of a - bin). To provide the correct bins for hist would it not be - something like - - def bins(xmin, xmax, N): - if N==1: return xmax - dx = (xmax-xmin)/N # instead of N-1 - return xmin + dx*arange(N) - - - This suggestion is implemented in 0.81. My test script with these - changes does not reveal any bias in the binning - - from matplotlib.numerix.mlab import randn, rand, zeros, Float - from matplotlib.mlab import hist, mean - - Nbins = 50 - Ntests = 200 - results = zeros((Ntests,Nbins), typecode=Float) - for i in range(Ntests): - print 'computing', i - x = rand(10000) - n, bins = hist(x, Nbins) - results[i] = n - print mean(results) - - -Changes for 0.81 -================ - -:: - - - pylab and artist "set" functions renamed to setp to avoid clash - with python2.4 built-in set. Current version will issue a - deprecation warning which will be removed in future versions - - - imshow interpolation arguments changes for advanced interpolation - schemes. See help imshow, particularly the interpolation, - filternorm and filterrad kwargs - - - Support for masked arrays has been added to the plot command and - to the Line2D object. Only the valid points are plotted. A - "valid_only" kwarg was added to the get_xdata() and get_ydata() - methods of Line2D; by default it is False, so that the original - data arrays are returned. Setting it to True returns the plottable - points. - - - contour changes: - - Masked arrays: contour and contourf now accept masked arrays as - the variable to be contoured. Masking works correctly for - contour, but a bug remains to be fixed before it will work for - contourf. The "badmask" kwarg has been removed from both - functions. - - Level argument changes: - - Old version: a list of levels as one of the positional - arguments specified the lower bound of each filled region; the - upper bound of the last region was taken as a very large - number. Hence, it was not possible to specify that z values - between 0 and 1, for example, be filled, and that values - outside that range remain unfilled. - - New version: a list of N levels is taken as specifying the - boundaries of N-1 z ranges. Now the user has more control over - what is colored and what is not. Repeated calls to contourf - (with different colormaps or color specifications, for example) - can be used to color different ranges of z. Values of z - outside an expected range are left uncolored. - - Example: - Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0-1, 1-2, and >2. - New: it would yield 2 regions: 0-1, 1-2. If the same 3 regions were - desired, the equivalent list of levels would be [0, 1, 2, - 1e38]. - -Changes for 0.80 -================ - -:: - - - xlim/ylim/axis always return the new limits regardless of - arguments. They now take kwargs which allow you to selectively - change the upper or lower limits while leaving unnamed limits - unchanged. See help(xlim) for example - -Changes for 0.73 -================ - -:: - - - Removed deprecated ColormapJet and friends - - - Removed all error handling from the verbose object - - - figure num of zero is now allowed - -Changes for 0.72 -================ - -:: - - - Line2D, Text, and Patch copy_properties renamed update_from and - moved into artist base class - - - LineCollecitons.color renamed to LineCollections.set_color for - consistency with set/get introspection mechanism, - - - pylab figure now defaults to num=None, which creates a new figure - with a guaranteed unique number - - - contour method syntax changed - now it is MATLAB compatible - - unchanged: contour(Z) - old: contour(Z, x=Y, y=Y) - new: contour(X, Y, Z) - - see http://matplotlib.sf.net/matplotlib.pylab.html#-contour - - - - Increased the default resolution for save command. - - - Renamed the base attribute of the ticker classes to _base to avoid conflict - with the base method. Sitt for subs - - - subs=none now does autosubbing in the tick locator. - - - New subplots that overlap old will delete the old axes. If you - do not want this behavior, use fig.add_subplot or the axes - command - -Changes for 0.71 -================ - -:: - - Significant numerix namespace changes, introduced to resolve - namespace clashes between python built-ins and mlab names. - Refactored numerix to maintain separate modules, rather than - folding all these names into a single namespace. See the following - mailing list threads for more information and background - - http://sourceforge.net/mailarchive/forum.php?thread_id=6398890&forum_id=36187 - http://sourceforge.net/mailarchive/forum.php?thread_id=6323208&forum_id=36187 - - - OLD usage - - from matplotlib.numerix import array, mean, fft - - NEW usage - - from matplotlib.numerix import array - from matplotlib.numerix.mlab import mean - from matplotlib.numerix.fft import fft - - numerix dir structure mirrors numarray (though it is an incomplete - implementation) - - numerix - numerix/mlab - numerix/linear_algebra - numerix/fft - numerix/random_array - - but of course you can use 'numerix : Numeric' and still get the - symbols. - - pylab still imports most of the symbols from Numerix, MLab, fft, - etc, but is more cautious. For names that clash with python names - (min, max, sum), pylab keeps the builtins and provides the numeric - versions with an a* prefix, eg (amin, amax, asum) - -Changes for 0.70 -================ - -:: - - MplEvent factored into a base class Event and derived classes - MouseEvent and KeyEvent - - Removed definct set_measurement in wx toolbar - -Changes for 0.65.1 -================== - -:: - - removed add_axes and add_subplot from backend_bases. Use - figure.add_axes and add_subplot instead. The figure now manages the - current axes with gca and sca for get and set current axes. If you - have code you are porting which called, eg, figmanager.add_axes, you - can now simply do figmanager.canvas.figure.add_axes. - -Changes for 0.65 -================ - -:: - - - mpl_connect and mpl_disconnect in the MATLAB interface renamed to - connect and disconnect - - Did away with the text methods for angle since they were ambiguous. - fontangle could mean fontstyle (obligue, etc) or the rotation of the - text. Use style and rotation instead. - -Changes for 0.63 -================ - -:: - - Dates are now represented internally as float days since 0001-01-01, - UTC. - - All date tickers and formatters are now in matplotlib.dates, rather - than matplotlib.tickers - - converters have been abolished from all functions and classes. - num2date and date2num are now the converter functions for all date - plots - - Most of the date tick locators have a different meaning in their - constructors. In the prior implementation, the first argument was a - base and multiples of the base were ticked. Eg - - HourLocator(5) # old: tick every 5 minutes - - In the new implementation, the explicit points you want to tick are - provided as a number or sequence - - HourLocator(range(0,5,61)) # new: tick every 5 minutes - - This gives much greater flexibility. I have tried to make the - default constructors (no args) behave similarly, where possible. - - Note that YearLocator still works under the base/multiple scheme. - The difference between the YearLocator and the other locators is - that years are not recurrent. - - - Financial functions: - - matplotlib.finance.quotes_historical_yahoo(ticker, date1, date2) - - date1, date2 are now datetime instances. Return value is a list - of quotes where the quote time is a float - days since gregorian - start, as returned by date2num - - See examples/finance_demo.py for example usage of new API - -Changes for 0.61 -================ - -:: - - canvas.connect is now deprecated for event handling. use - mpl_connect and mpl_disconnect instead. The callback signature is - func(event) rather than func(widget, event) - -Changes for 0.60 -================ - -:: - - ColormapJet and Grayscale are deprecated. For backwards - compatibility, they can be obtained either by doing - - from matplotlib.cm import ColormapJet - - or - - from matplotlib.matlab import * - - They are replaced by cm.jet and cm.grey - -Changes for 0.54.3 -================== - -:: - - removed the set_default_font / get_default_font scheme from the - font_manager to unify customization of font defaults with the rest of - the rc scheme. See examples/font_properties_demo.py and help(rc) in - matplotlib.matlab. - -Changes for 0.54 -================ - -MATLAB interface ----------------- - -dpi -~~~ - -Several of the backends used a PIXELS_PER_INCH hack that I added to -try and make images render consistently across backends. This just -complicated matters. So you may find that some font sizes and line -widths appear different than before. Apologies for the -inconvenience. You should set the dpi to an accurate value for your -screen to get true sizes. - - -pcolor and scatter -~~~~~~~~~~~~~~~~~~ - -There are two changes to the MATLAB interface API, both involving the -patch drawing commands. For efficiency, pcolor and scatter have been -rewritten to use polygon collections, which are a new set of objects -from matplotlib.collections designed to enable efficient handling of -large collections of objects. These new collections make it possible -to build large scatter plots or pcolor plots with no loops at the -python level, and are significantly faster than their predecessors. -The original pcolor and scatter functions are retained as -pcolor_classic and scatter_classic. - -The return value from pcolor is a PolyCollection. Most of the -propertes that are available on rectangles or other patches are also -available on PolyCollections, eg you can say:: - - c = scatter(blah, blah) - c.set_linewidth(1.0) - c.set_facecolor('r') - c.set_alpha(0.5) - -or:: - - c = scatter(blah, blah) - set(c, 'linewidth', 1.0, 'facecolor', 'r', 'alpha', 0.5) - - -Because the collection is a single object, you no longer need to loop -over the return value of scatter or pcolor to set properties for the -entire list. - -If you want the different elements of a collection to vary on a -property, eg to have different line widths, see matplotlib.collections -for a discussion on how to set the properties as a sequence. - -For scatter, the size argument is now in points^2 (the area of the -symbol in points) as in MATLAB and is not in data coords as before. -Using sizes in data coords caused several problems. So you will need -to adjust your size arguments accordingly or use scatter_classic. - -mathtext spacing -~~~~~~~~~~~~~~~~ - -For reasons not clear to me (and which I'll eventually fix) spacing no -longer works in font groups. However, I added three new spacing -commands which compensate for this '\ ' (regular space), '\/' (small -space) and '\hspace{frac}' where frac is a fraction of fontsize in -points. You will need to quote spaces in font strings, is:: - - title(r'$\rm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$') - - - -Object interface - Application programmers ------------------------------------------- - -Autoscaling -~~~~~~~~~~~ - - The x and y axis instances no longer have autoscale view. These are - handled by axes.autoscale_view - -Axes creation -~~~~~~~~~~~~~ - - You should not instantiate your own Axes any more using the OO API. - Rather, create a Figure as before and in place of:: - - f = Figure(figsize=(5,4), dpi=100) - a = Subplot(f, 111) - f.add_axis(a) - - use:: - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(111) - - That is, add_axis no longer exists and is replaced by:: - - add_axes(rect, axisbg=defaultcolor, frameon=True) - add_subplot(num, axisbg=defaultcolor, frameon=True) - -Artist methods -~~~~~~~~~~~~~~ - - If you define your own Artists, you need to rename the _draw method - to draw - -Bounding boxes -~~~~~~~~~~~~~~ - - matplotlib.transforms.Bound2D is replaced by - matplotlib.transforms.Bbox. If you want to construct a bbox from - left, bottom, width, height (the signature for Bound2D), use - matplotlib.transforms.lbwh_to_bbox, as in - - bbox = clickBBox = lbwh_to_bbox(left, bottom, width, height) - - The Bbox has a different API than the Bound2D. Eg, if you want to - get the width and height of the bbox - - OLD:: - width = fig.bbox.x.interval() - height = fig.bbox.y.interval() - - New:: - width = fig.bbox.width() - height = fig.bbox.height() - - - - -Object constructors -~~~~~~~~~~~~~~~~~~~ - - You no longer pass the bbox, dpi, or transforms to the various - Artist constructors. The old way or creating lines and rectangles - was cumbersome because you had to pass so many attributes to the - Line2D and Rectangle classes not related directly to the geometry - and properties of the object. Now default values are added to the - object when you call axes.add_line or axes.add_patch, so they are - hidden from the user. - - If you want to define a custom transformation on these objects, call - o.set_transform(trans) where trans is a Transformation instance. - - In prior versions of you wanted to add a custom line in data coords, - you would have to do - - l = Line2D(dpi, bbox, x, y, - color = color, - transx = transx, - transy = transy, - ) - - now all you need is - - l = Line2D(x, y, color=color) - - and the axes will set the transformation for you (unless you have - set your own already, in which case it will eave it unchanged) - -Transformations -~~~~~~~~~~~~~~~ - - The entire transformation architecture has been rewritten. - Previously the x and y transformations where stored in the xaxis and - yaxis instances. The problem with this approach is it only allows - for separable transforms (where the x and y transformations don't - depend on one another). But for cases like polar, they do. Now - transformations operate on x,y together. There is a new base class - matplotlib.transforms.Transformation and two concrete - implementations, matplotlib.transforms.SeparableTransformation and - matplotlib.transforms.Affine. The SeparableTransformation is - constructed with the bounding box of the input (this determines the - rectangular coordinate system of the input, ie the x and y view - limits), the bounding box of the display, and possibly nonlinear - transformations of x and y. The 2 most frequently used - transformations, data coordinates -> display and axes coordinates -> - display are available as ax.transData and ax.transAxes. See - alignment_demo.py which uses axes coords. - - Also, the transformations should be much faster now, for two reasons - - * they are written entirely in extension code - - * because they operate on x and y together, they can do the entire - transformation in one loop. Earlier I did something along the - lines of:: - - xt = sx*func(x) + tx - yt = sy*func(y) + ty - - Although this was done in numerix, it still involves 6 length(x) - for-loops (the multiply, add, and function evaluation each for x - and y). Now all of that is done in a single pass. - - - If you are using transformations and bounding boxes to get the - cursor position in data coordinates, the method calls are a little - different now. See the updated examples/coords_demo.py which shows - you how to do this. - - Likewise, if you are using the artist bounding boxes to pick items - on the canvas with the GUI, the bbox methods are somewhat - different. You will need to see the updated - examples/object_picker.py. - - See unit/transforms_unit.py for many examples using the new - transformations. - - -Changes for 0.50 -================ - -:: - - * refactored Figure class so it is no longer backend dependent. - FigureCanvasBackend takes over the backend specific duties of the - Figure. matplotlib.backend_bases.FigureBase moved to - matplotlib.figure.Figure. - - * backends must implement FigureCanvasBackend (the thing that - controls the figure and handles the events if any) and - FigureManagerBackend (wraps the canvas and the window for MATLAB - interface). FigureCanvasBase implements a backend switching - mechanism - - * Figure is now an Artist (like everything else in the figure) and - is totally backend independent - - * GDFONTPATH renamed to TTFPATH - - * backend faceColor argument changed to rgbFace - - * colormap stuff moved to colors.py - - * arg_to_rgb in backend_bases moved to class ColorConverter in - colors.py - - * GD users must upgrade to gd-2.0.22 and gdmodule-0.52 since new gd - features (clipping, antialiased lines) are now used. - - * Renderer must implement points_to_pixels - - Migrating code: - - MATLAB interface: - - The only API change for those using the MATLAB interface is in how - you call figure redraws for dynamically updating figures. In the - old API, you did - - fig.draw() - - In the new API, you do - - manager = get_current_fig_manager() - manager.canvas.draw() - - See the examples system_monitor.py, dynamic_demo.py, and anim.py - - API - - There is one important API change for application developers. - Figure instances used subclass GUI widgets that enabled them to be - placed directly into figures. Eg, FigureGTK subclassed - gtk.DrawingArea. Now the Figure class is independent of the - backend, and FigureCanvas takes over the functionality formerly - handled by Figure. In order to include figures into your apps, - you now need to do, for example - - # gtk example - fig = Figure(figsize=(5,4), dpi=100) - canvas = FigureCanvasGTK(fig) # a gtk.DrawingArea - canvas.show() - vbox.pack_start(canvas) - - If you use the NavigationToolbar, this in now intialized with a - FigureCanvas, not a Figure. The examples embedding_in_gtk.py, - embedding_in_gtk2.py, and mpl_with_glade.py all reflect the new - API so use these as a guide. - - All prior calls to - - figure.draw() and - figure.print_figure(args) - - should now be - - canvas.draw() and - canvas.print_figure(args) - - Apologies for the inconvenience. This refactorization brings - significant more freedom in developing matplotlib and should bring - better plotting capabilities, so I hope the inconvenience is worth - it. - -Changes for 0.42 -================ - -:: - - * Refactoring AxisText to be backend independent. Text drawing and - get_window_extent functionality will be moved to the Renderer. - - * backend_bases.AxisTextBase is now text.Text module - - * All the erase and reset functionality removed from AxisText - not - needed with double buffered drawing. Ditto with state change. - Text instances have a get_prop_tup method that returns a hashable - tuple of text properties which you can use to see if text props - have changed, eg by caching a font or layout instance in a dict - with the prop tup as a key -- see RendererGTK.get_pango_layout in - backend_gtk for an example. - - * Text._get_xy_display renamed Text.get_xy_display - - * Artist set_renderer and wash_brushes methods removed - - * Moved Legend class from matplotlib.axes into matplotlib.legend - - * Moved Tick, XTick, YTick, Axis, XAxis, YAxis from matplotlib.axes - to matplotlib.axis - - * moved process_text_args to matplotlib.text - - * After getting Text handled in a backend independent fashion, the - import process is much cleaner since there are no longer cyclic - dependencies - - * matplotlib.matlab._get_current_fig_manager renamed to - matplotlib.matlab.get_current_fig_manager to allow user access to - the GUI window attribute, eg figManager.window for GTK and - figManager.frame for wx - -Changes for 0.40 -================ - -:: - - - Artist - * __init__ takes a DPI instance and a Bound2D instance which is - the bounding box of the artist in display coords - * get_window_extent returns a Bound2D instance - * set_size is removed; replaced by bbox and dpi - * the clip_gc method is removed. Artists now clip themselves with - their box - * added _clipOn boolean attribute. If True, gc clip to bbox. - - - AxisTextBase - * Initialized with a transx, transy which are Transform instances - * set_drawing_area removed - * get_left_right and get_top_bottom are replaced by get_window_extent - - - Line2D Patches now take transx, transy - * Initialized with a transx, transy which are Transform instances - - - Patches - * Initialized with a transx, transy which are Transform instances - - - FigureBase attributes dpi is a DPI intance rather than scalar and - new attribute bbox is a Bound2D in display coords, and I got rid - of the left, width, height, etc... attributes. These are now - accessible as, for example, bbox.x.min is left, bbox.x.interval() - is width, bbox.y.max is top, etc... - - - GcfBase attribute pagesize renamed to figsize - - - Axes - * removed figbg attribute - * added fig instance to __init__ - * resizing is handled by figure call to resize. - - - Subplot - * added fig instance to __init__ - - - Renderer methods for patches now take gcEdge and gcFace instances. - gcFace=None takes the place of filled=False - - - True and False symbols provided by cbook in a python2.3 compatible - way - - - new module transforms supplies Bound1D, Bound2D and Transform - instances and more - - - Changes to the MATLAB helpers API - - * _matlab_helpers.GcfBase is renamed by Gcf. Backends no longer - need to derive from this class. Instead, they provide a factory - function new_figure_manager(num, figsize, dpi). The destroy - method of the GcfDerived from the backends is moved to the derived - FigureManager. - - * FigureManagerBase moved to backend_bases - - * Gcf.get_all_figwins renamed to Gcf.get_all_fig_managers - - Jeremy: - - Make sure to self._reset = False in AxisTextWX._set_font. This was - something missing in my backend code. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.pc/50_bts608942_spaces_in_param_args.patch/lib/mpl_toolkits/axes_grid1/axes_divider.py matplotlib-1.2.0/.pc/50_bts608942_spaces_in_param_args.patch/lib/mpl_toolkits/axes_grid1/axes_divider.py --- matplotlib-1.2.0~1+6455+16~quantal1/.pc/50_bts608942_spaces_in_param_args.patch/lib/mpl_toolkits/axes_grid1/axes_divider.py 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/.pc/50_bts608942_spaces_in_param_args.patch/lib/mpl_toolkits/axes_grid1/axes_divider.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,938 +0,0 @@ -""" -The axes_divider module provide helper classes to adjust the positions of -multiple axes at the drawing time. - - Divider: this is the class that is used calculates the axes - position. It divides the given rectangular area into several sub - rectangles. You initialize the divider by setting the horizontal - and vertical list of sizes that the division will be based on. You - then use the new_locator method, whose return value is a callable - object that can be used to set the axes_locator of the axes. - -""" - -import matplotlib.transforms as mtransforms - -from matplotlib.axes import SubplotBase - -import axes_size as Size - - -class Divider(object): - """ - This is the class that is used calculates the axes position. It - divides the given rectangular area into several - sub-rectangles. You initialize the divider by setting the - horizontal and vertical lists of sizes - (:mod:`mpl_toolkits.axes_grid.axes_size`) that the division will - be based on. You then use the new_locator method to create a - callable object that can be used to as the axes_locator of the - axes. - """ - - - def __init__(self, fig, pos, horizontal, vertical, aspect=None, anchor="C"): - """ - :param fig: matplotlib figure - :param pos: position (tuple of 4 floats) of the rectangle that - will be divided. - :param horizontal: list of sizes - (:mod:`~mpl_toolkits.axes_grid.axes_size`) - for horizontal division - :param vertical: list of sizes - (:mod:`~mpl_toolkits.axes_grid.axes_size`) - for vertical division - :param aspect: if True, the overall rectangular area is reduced - so that the relative part of the horizontal and - vertical scales have same scale. - :param anchor: Determine how the reduced rectangle is placed - when aspect is True. - """ - - self._fig = fig - self._pos = pos - self._horizontal = horizontal - self._vertical = vertical - self._anchor = anchor - self._aspect = aspect - self._xrefindex = 0 - self._yrefindex = 0 - self._locator = None - - def get_horizontal_sizes(self, renderer): - return [s.get_size(renderer) for s in self.get_horizontal()] - - def get_vertical_sizes(self, renderer): - return [s.get_size(renderer) for s in self.get_vertical()] - - def get_vsize_hsize(self): - - from axes_size import AddList - - vsize = AddList(self.get_vertical()) - hsize = AddList(self.get_horizontal()) - - return vsize, hsize - - - @staticmethod - def _calc_k(l, total_size): - - rs_sum, as_sum = 0., 0. - - for _rs, _as in l: - rs_sum += _rs - as_sum += _as - - if rs_sum != 0.: - k = (total_size - as_sum) / rs_sum - return k - else: - return 0. - - - @staticmethod - def _calc_offsets(l, k): - - offsets = [0.] - - #for s in l: - for _rs, _as in l: - #_rs, _as = s.get_size(renderer) - offsets.append(offsets[-1] + _rs*k + _as) - - return offsets - - - def set_position(self, pos): - """ - set the position of the rectangle. - - :param pos: position (tuple of 4 floats) of the rectangle that - will be divided. - """ - self._pos = pos - - def get_position(self): - "return the position of the rectangle." - return self._pos - - def set_anchor(self, anchor): - """ - :param anchor: anchor position - - ===== ============ - value description - ===== ============ - 'C' Center - 'SW' bottom left - 'S' bottom - 'SE' bottom right - 'E' right - 'NE' top right - 'N' top - 'NW' top left - 'W' left - ===== ============ - - """ - if anchor in mtransforms.Bbox.coefs.keys() or len(anchor) == 2: - self._anchor = anchor - else: - raise ValueError('argument must be among %s' % - ', '.join(mtransforms.BBox.coefs.keys())) - - def get_anchor(self): - "return the anchor" - return self._anchor - - def set_horizontal(self, h): - """ - :param horizontal: list of sizes - (:mod:`~mpl_toolkits.axes_grid.axes_size`) - for horizontal division - - . - """ - self._horizontal = h - - - def get_horizontal(self): - "return horizontal sizes" - return self._horizontal - - def set_vertical(self, v): - """ - :param horizontal: list of sizes - (:mod:`~mpl_toolkits.axes_grid.axes_size`) - for horizontal division - - . - """ - self._vertical = v - - def get_vertical(self): - "return vertical sizes" - return self._vertical - - - def set_aspect(self, aspect=False): - """ - :param anchor: True or False - """ - self._aspect = aspect - - def get_aspect(self): - "return aspect" - return self._aspect - - def set_locator(self, _locator): - self._locator = _locator - - def get_locator(self): - return self._locator - - def get_position_runtime(self, ax, renderer): - if self._locator is None: - return self.get_position() - else: - return self._locator(ax, renderer).bounds - - def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None): - """ - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - - - figW,figH = self._fig.get_size_inches() - x, y, w, h = self.get_position_runtime(axes, renderer) - - hsizes = self.get_horizontal_sizes(renderer) - vsizes = self.get_vertical_sizes(renderer) - k_h = self._calc_k(hsizes, figW*w) - k_v = self._calc_k(vsizes, figH*h) - - if self.get_aspect(): - k = min(k_h, k_v) - ox = self._calc_offsets(hsizes, k) - oy = self._calc_offsets(vsizes, k) - - ww = (ox[-1] - ox[0])/figW - hh = (oy[-1] - oy[0])/figH - pb = mtransforms.Bbox.from_bounds(x, y, w, h) - pb1 = mtransforms.Bbox.from_bounds(x, y, ww, hh) - pb1_anchored = pb1.anchored(self.get_anchor(), pb) - x0, y0 = pb1_anchored.x0, pb1_anchored.y0 - - else: - ox = self._calc_offsets(hsizes, k_h) - oy = self._calc_offsets(vsizes, k_v) - x0, y0 = x, y - - - if nx1 is None: - nx1=nx+1 - if ny1 is None: - ny1=ny+1 - - x1, w1 = x0 + ox[nx]/figW, (ox[nx1] - ox[nx])/figW - y1, h1 = y0 + oy[ny]/figH, (oy[ny1] - oy[ny])/figH - - return mtransforms.Bbox.from_bounds(x1, y1, w1, h1) - - - def new_locator(self, nx, ny, nx1=None, ny1=None): - """ - returns a new locator - (:class:`mpl_toolkits.axes_grid.axes_divider.AxesLocator`) for - specified cell. - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - return AxesLocator(self, nx, ny, nx1, ny1) - - def append_size(self, position, size): - - if position == "left": - self._horizontal.insert(0, size) - self._xrefindex += 1 - elif position == "right": - self._horizontal.append(size) - elif position == "bottom": - self._vertical.insert(0, size) - self._yrefindex += 1 - elif position == "top": - self._vertical.append(size) - else: - raise ValueError("the position must be one of left, right, bottom, or top") - - - def add_auto_adjustable_area(self, - use_axes, pad=0.1, - adjust_dirs=["left", "right", "bottom", "top"], - ): - from axes_size import Padded, SizeFromFunc, GetExtentHelper - for d in adjust_dirs: - helper = GetExtentHelper(use_axes, d) - size = SizeFromFunc(helper) - padded_size = Padded(size, pad) # pad in inch - self.append_size(d, padded_size) - - -class AxesLocator(object): - """ - A simple callable object, initialized with AxesDivider class, - returns the position and size of the given cell. - """ - def __init__(self, axes_divider, nx, ny, nx1=None, ny1=None): - """ - :param axes_divider: An instance of AxesDivider class. - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - self._axes_divider = axes_divider - - _xrefindex = axes_divider._xrefindex - _yrefindex = axes_divider._yrefindex - - self._nx, self._ny = nx - _xrefindex, ny - _yrefindex - - if nx1 is None: - nx1 = nx+1 - if ny1 is None: - ny1 = ny+1 - - self._nx1 = nx1 - _xrefindex - self._ny1 = ny1 - _yrefindex - - - def __call__(self, axes, renderer): - - _xrefindex = self._axes_divider._xrefindex - _yrefindex = self._axes_divider._yrefindex - - return self._axes_divider.locate(self._nx + _xrefindex, - self._ny + _yrefindex, - self._nx1 + _xrefindex, - self._ny1 + _yrefindex, - axes, - renderer) - - def get_subplotspec(self): - if hasattr(self._axes_divider, "get_subplotspec"): - return self._axes_divider.get_subplotspec() - else: - return None - - -from matplotlib.gridspec import SubplotSpec, GridSpec - -class SubplotDivider(Divider): - """ - The Divider class whose rectangle area is specified as a subplot geometry. - """ - - - def __init__(self, fig, *args, **kwargs): - """ - *fig* is a :class:`matplotlib.figure.Figure` instance. - - *args* is the tuple (*numRows*, *numCols*, *plotNum*), where - the array of subplots in the figure has dimensions *numRows*, - *numCols*, and where *plotNum* is the number of the subplot - being created. *plotNum* starts at 1 in the upper left - corner and increases to the right. - - If *numRows* <= *numCols* <= *plotNum* < 10, *args* can be the - decimal integer *numRows* * 100 + *numCols* * 10 + *plotNum*. - """ - - self.figure = fig - - if len(args)==1: - if isinstance(args[0], SubplotSpec): - self._subplotspec = args[0] - else: - try: - s = str(int(args[0])) - rows, cols, num = map(int, s) - except ValueError: - raise ValueError( - 'Single argument to subplot must be a 3-digit integer') - self._subplotspec = GridSpec(rows, cols)[num-1] - # num - 1 for converting from MATLAB to python indexing - elif len(args)==3: - rows, cols, num = args - rows = int(rows) - cols = int(cols) - if isinstance(num, tuple) and len(num) == 2: - num = [int(n) for n in num] - self._subplotspec = GridSpec(rows, cols)[num[0]-1:num[1]] - else: - self._subplotspec = GridSpec(rows, cols)[int(num)-1] - # num - 1 for converting from MATLAB to python indexing - else: - raise ValueError('Illegal argument(s) to subplot: %s' % (args,)) - - - # total = rows*cols - # num -= 1 # convert from matlab to python indexing - # # ie num in range(0,total) - # if num >= total: - # raise ValueError( 'Subplot number exceeds total subplots') - # self._rows = rows - # self._cols = cols - # self._num = num - - # self.update_params() - - - # sets self.fixbox - self.update_params() - - pos = self.figbox.bounds - - horizontal = kwargs.pop("horizontal", []) - vertical = kwargs.pop("vertical", []) - aspect = kwargs.pop("aspect", None) - anchor = kwargs.pop("anchor", "C") - - if kwargs: - raise Exception("") - - Divider.__init__(self, fig, pos, horizontal, vertical, - aspect=aspect, anchor=anchor) - - - def get_position(self): - "return the bounds of the subplot box" - - self.update_params() # update self.figbox - return self.figbox.bounds - - - # def update_params(self): - # 'update the subplot position from fig.subplotpars' - - # rows = self._rows - # cols = self._cols - # num = self._num - - # pars = self.figure.subplotpars - # left = pars.left - # right = pars.right - # bottom = pars.bottom - # top = pars.top - # wspace = pars.wspace - # hspace = pars.hspace - # totWidth = right-left - # totHeight = top-bottom - - # figH = totHeight/(rows + hspace*(rows-1)) - # sepH = hspace*figH - - # figW = totWidth/(cols + wspace*(cols-1)) - # sepW = wspace*figW - - # rowNum, colNum = divmod(num, cols) - - # figBottom = top - (rowNum+1)*figH - rowNum*sepH - # figLeft = left + colNum*(figW + sepW) - - # self.figbox = mtransforms.Bbox.from_bounds(figLeft, figBottom, - # figW, figH) - - def update_params(self): - 'update the subplot position from fig.subplotpars' - - self.figbox = self.get_subplotspec().get_position(self.figure) - - def get_geometry(self): - 'get the subplot geometry, eg 2,2,3' - rows, cols, num1, num2 = self.get_subplotspec().get_geometry() - return rows, cols, num1+1 # for compatibility - - # COVERAGE NOTE: Never used internally or from examples - def change_geometry(self, numrows, numcols, num): - 'change subplot geometry, eg. from 1,1,1 to 2,2,3' - self._subplotspec = GridSpec(numrows, numcols)[num-1] - self.update_params() - self.set_position(self.figbox) - - def get_subplotspec(self): - 'get the SubplotSpec instance' - return self._subplotspec - - def set_subplotspec(self, subplotspec): - 'set the SubplotSpec instance' - self._subplotspec = subplotspec - - - -class AxesDivider(Divider): - """ - Divider based on the pre-existing axes. - """ - - def __init__(self, axes, xref=None, yref=None): - """ - :param axes: axes - """ - self._axes = axes - if xref==None: - self._xref = Size.AxesX(axes) - else: - self._xref = xref - if yref==None: - self._yref = Size.AxesY(axes) - else: - self._yref = yref - - Divider.__init__(self, fig=axes.get_figure(), pos=None, - horizontal=[self._xref], vertical=[self._yref], - aspect=None, anchor="C") - - def _get_new_axes(self, **kwargs): - axes = self._axes - - axes_class = kwargs.pop("axes_class", None) - - if axes_class is None: - if isinstance(axes, SubplotBase): - axes_class = axes._axes_class - else: - axes_class = type(axes) - - ax = axes_class(axes.get_figure(), - axes.get_position(original=True), **kwargs) - - return ax - - - def new_horizontal(self, size, pad=None, pack_start=False, **kwargs): - """ - Add a new axes on the right (or left) side of the main axes. - - :param size: A width of the axes. A :mod:`~mpl_toolkits.axes_grid.axes_size` - instance or if float or string is given, *from_any* - function is used to create one, with *ref_size* set to AxesX instance - of the current axes. - :param pad: pad between the axes. It takes same argument as *size*. - :param pack_start: If False, the new axes is appended at the end - of the list, i.e., it became the right-most axes. If True, it is - inserted at the start of the list, and becomes the left-most axes. - - All extra keywords arguments are passed to the created axes. - If *axes_class* is given, the new axes will be created as an - instance of the given class. Otherwise, the same class of the - main axes will be used. - """ - - if pad: - if not isinstance(pad, Size._Base): - pad = Size.from_any(pad, - fraction_ref=self._xref) - if pack_start: - self._horizontal.insert(0, pad) - self._xrefindex += 1 - else: - self._horizontal.append(pad) - - if not isinstance(size, Size._Base): - size = Size.from_any(size, - fraction_ref=self._xref) - - if pack_start: - self._horizontal.insert(0, size) - self._xrefindex += 1 - locator = self.new_locator(nx=0, ny=0) - else: - self._horizontal.append(size) - locator = self.new_locator(nx=len(self._horizontal)-1, ny=0) - - ax = self._get_new_axes(**kwargs) - ax.set_axes_locator(locator) - - return ax - - def new_vertical(self, size, pad=None, pack_start=False, **kwargs): - """ - Add a new axes on the top (or bottom) side of the main axes. - - :param size: A height of the axes. A :mod:`~mpl_toolkits.axes_grid.axes_size` - instance or if float or string is given, *from_any* - function is used to create one, with *ref_size* set to AxesX instance - of the current axes. - :param pad: pad between the axes. It takes same argument as *size*. - :param pack_start: If False, the new axes is appended at the end - of the list, i.e., it became the top-most axes. If True, it is - inserted at the start of the list, and becomes the bottom-most axes. - - All extra keywords arguments are passed to the created axes. - If *axes_class* is given, the new axes will be created as an - instance of the given class. Otherwise, the same class of the - main axes will be used. - """ - - if pad: - if not isinstance(pad, Size._Base): - pad = Size.from_any(pad, - fraction_ref=self._yref) - if pack_start: - self._vertical.insert(0, pad) - self._yrefindex += 1 - else: - self._vertical.append(pad) - - if not isinstance(size, Size._Base): - size = Size.from_any(size, - fraction_ref=self._yref) - - if pack_start: - self._vertical.insert(0, size) - self._yrefindex += 1 - locator = self.new_locator(nx=0, ny=0) - else: - self._vertical.append(size) - locator = self.new_locator(nx=0, ny=len(self._vertical)-1) - - ax = self._get_new_axes(**kwargs) - ax.set_axes_locator(locator) - - return ax - - - def append_axes(self, position, size, pad=None, add_to_figure=True, - **kwargs): - """ - create an axes at the given *position* with the same height - (or width) of the main axes. - - *position* - ["left"|"right"|"bottom"|"top"] - - *size* and *pad* should be axes_grid.axes_size compatible. - """ - - if position == "left": - ax = self.new_horizontal(size, pad, pack_start=True, **kwargs) - elif position == "right": - ax = self.new_horizontal(size, pad, pack_start=False, **kwargs) - elif position == "bottom": - ax = self.new_vertical(size, pad, pack_start=True, **kwargs) - elif position == "top": - ax = self.new_vertical(size, pad, pack_start=False, **kwargs) - else: - raise ValueError("the position must be one of left, right, bottom, or top") - - if add_to_figure: - self._fig.add_axes(ax) - return ax - - def get_aspect(self): - if self._aspect is None: - aspect = self._axes.get_aspect() - if aspect == "auto": - return False - else: - return True - else: - return self._aspect - - def get_position(self): - if self._pos is None: - bbox = self._axes.get_position(original=True) - return bbox.bounds - else: - return self._pos - - def get_anchor(self): - if self._anchor is None: - return self._axes.get_anchor() - else: - return self._anchor - - - def get_subplotspec(self): - if hasattr(self._axes, "get_subplotspec"): - return self._axes.get_subplotspec() - else: - return None - - - -class HBoxDivider(SubplotDivider): - - - def __init__(self, fig, *args, **kwargs): - SubplotDivider.__init__(self, fig, *args, **kwargs) - - - @staticmethod - def _determine_karray(equivalent_sizes, appended_sizes, - max_equivalent_size, - total_appended_size): - - - n = len(equivalent_sizes) - import numpy as np - A = np.mat(np.zeros((n+1, n+1), dtype="d")) - B = np.zeros((n+1), dtype="d") - # AxK = B - - # populated A - for i, (r, a) in enumerate(equivalent_sizes): - A[i,i] = r - A[i,-1] = -1 - B[i] = -a - A[-1,:-1] = [r for r, a in appended_sizes] - B[-1] = total_appended_size - sum([a for rs, a in appended_sizes]) - - karray_H = (A.I*np.mat(B).T).A1 - karray = karray_H[:-1] - H = karray_H[-1] - - if H > max_equivalent_size: - karray = (max_equivalent_size - \ - np.array([a for r, a in equivalent_sizes])) \ - / np.array([r for r, a in equivalent_sizes]) - return karray - - - @staticmethod - def _calc_offsets(appended_sizes, karray): - offsets = [0.] - - #for s in l: - for (r, a), k in zip(appended_sizes, karray): - offsets.append(offsets[-1] + r*k + a) - - return offsets - - - def new_locator(self, nx, nx1=None): - """ - returns a new locator - (:class:`mpl_toolkits.axes_grid.axes_divider.AxesLocator`) for - specified cell. - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - return AxesLocator(self, nx, 0, nx1, None) - - - def _locate(self, x, y, w, h, - y_equivalent_sizes, x_appended_sizes, - figW, figH): - """ - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - - - equivalent_sizes = y_equivalent_sizes - appended_sizes = x_appended_sizes - - max_equivalent_size = figH*h - total_appended_size = figW*w - karray = self._determine_karray(equivalent_sizes, appended_sizes, - max_equivalent_size, - total_appended_size) - - ox = self._calc_offsets(appended_sizes, karray) - - ww = (ox[-1] - ox[0])/figW - ref_h = equivalent_sizes[0] - hh = (karray[0]*ref_h[0] + ref_h[1])/figH - pb = mtransforms.Bbox.from_bounds(x, y, w, h) - pb1 = mtransforms.Bbox.from_bounds(x, y, ww, hh) - pb1_anchored = pb1.anchored(self.get_anchor(), pb) - x0, y0 = pb1_anchored.x0, pb1_anchored.y0 - - return x0, y0, ox, hh - - def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None): - """ - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - - - figW,figH = self._fig.get_size_inches() - x, y, w, h = self.get_position_runtime(axes, renderer) - - y_equivalent_sizes = self.get_vertical_sizes(renderer) - x_appended_sizes = self.get_horizontal_sizes(renderer) - x0, y0, ox, hh = self._locate(x, y, w, h, - y_equivalent_sizes, x_appended_sizes, - figW, figH) - if nx1 is None: - nx1=nx+1 - - x1, w1 = x0 + ox[nx]/figW, (ox[nx1] - ox[nx])/figW - y1, h1 = y0, hh - - return mtransforms.Bbox.from_bounds(x1, y1, w1, h1) - - - -class VBoxDivider(HBoxDivider): - """ - The Divider class whose rectangle area is specified as a subplot geometry. - """ - - - def new_locator(self, ny, ny1=None): - """ - returns a new locator - (:class:`mpl_toolkits.axes_grid.axes_divider.AxesLocator`) for - specified cell. - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - return AxesLocator(self, 0, ny, None, ny1) - - - def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None): - """ - - :param nx, nx1: Integers specifying the column-position of the - cell. When nx1 is None, a single nx-th column is - specified. Otherwise location of columns spanning between nx - to nx1 (but excluding nx1-th column) is specified. - - :param ny, ny1: same as nx and nx1, but for row positions. - """ - - - figW,figH = self._fig.get_size_inches() - x, y, w, h = self.get_position_runtime(axes, renderer) - - x_equivalent_sizes = self.get_horizontal_sizes(renderer) - y_appended_sizes = self.get_vertical_sizes(renderer) - - y0, x0, oy, ww = self._locate(y, x, h, w, - x_equivalent_sizes, y_appended_sizes, - figH, figW) - if ny1 is None: - ny1=ny+1 - - x1, w1 = x0, ww - y1, h1 = y0 + oy[ny]/figH, (oy[ny1] - oy[ny])/figH - - return mtransforms.Bbox.from_bounds(x1, y1, w1, h1) - - - - - -class LocatableAxesBase: - def __init__(self, *kl, **kw): - - self._axes_class.__init__(self, *kl, **kw) - - self._locator = None - self._locator_renderer = None - - def set_axes_locator(self, locator): - self._locator = locator - - def get_axes_locator(self): - return self._locator - - def apply_aspect(self, position=None): - - if self.get_axes_locator() is None: - self._axes_class.apply_aspect(self, position) - else: - pos = self.get_axes_locator()(self, self._locator_renderer) - self._axes_class.apply_aspect(self, position=pos) - - - def draw(self, renderer=None, inframe=False): - - self._locator_renderer = renderer - - self._axes_class.draw(self, renderer, inframe) - - - -_locatableaxes_classes = {} -def locatable_axes_factory(axes_class): - - new_class = _locatableaxes_classes.get(axes_class) - if new_class is None: - new_class = type("Locatable%s" % (axes_class.__name__), - (LocatableAxesBase, axes_class), - {'_axes_class': axes_class}) - - _locatableaxes_classes[axes_class] = new_class - - return new_class - -#if hasattr(maxes.Axes, "get_axes_locator"): -# LocatableAxes = maxes.Axes -#else: - -def make_axes_locatable(axes): - if not hasattr(axes, "set_axes_locator"): - new_class = locatable_axes_factory(type(axes)) - axes.__class__ = new_class - - divider = AxesDivider(axes) - locator = divider.new_locator(nx=0, ny=0) - axes.set_axes_locator(locator) - - return divider - -def make_axes_area_auto_adjustable(ax, - use_axes=None, pad=0.1, - adjust_dirs=["left", "right", "bottom", "top"]): - - divider = make_axes_locatable(ax) - - if use_axes is None: - use_axes = ax - - divider.add_auto_adjustable_area(use_axes=use_axes, pad=pad, - adjust_dirs=adjust_dirs) - -#from matplotlib.axes import Axes -from mpl_axes import Axes -LocatableAxes = locatable_axes_factory(Axes) diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.pc/applied-patches matplotlib-1.2.0/.pc/applied-patches --- matplotlib-1.2.0~1+6455+16~quantal1/.pc/applied-patches 2013-01-24 01:34:18.000000000 +0000 +++ matplotlib-1.2.0/.pc/applied-patches 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -10_build_fix.patch -20_matplotlibrc_path_search_fix.patch -40_bts608939_draw_markers_description.patch -50_bts608942_spaces_in_param_args.patch diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/.travis.yml matplotlib-1.2.0/.travis.yml --- matplotlib-1.2.0~1+6455+16~quantal1/.travis.yml 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -language: python - -python: - - 2.6 - - 2.7 - - 3.2 - -install: - - pip install --use-mirrors nose - # This is a workaround to install numpy with the version of - # virtualenv in Travis. If that is updated in the future, this can - # be simplified to 'pip install numpy' - - 'if [ $TRAVIS_PYTHON_VERSION == "3.2" ]; then pip install https://github.com/y-p/numpy/archive/1.6.2_with_travis_fix.tar.gz; fi' - - 'if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then pip install numpy; fi' # should be nop if pre-installed - - if [[ $TRAVIS_PYTHON_VERSION == '2.'* ]]; then pip install --use-mirrors PIL; fi - - python setup.py install - -script: - - mkdir ../foo - - cd ../foo - - python ../matplotlib/tests.py diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/CHANGELOG matplotlib-1.2.0/CHANGELOG --- matplotlib-1.2.0~1+6455+16~quantal1/CHANGELOG 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/CHANGELOG 2012-11-08 13:38:03.000000000 +0000 @@ -1,51 +1,3 @@ -2013-01-07 Add framealpha keyword argument to legend - PO - -2012-12-22 Added classes for interpolation within triangular grids - (LinearTriInterpolator) and to find the triangles in which points - lie (TrapezoidMapTriFinder) to matplotlib.tri module. - IMT - -2012-12-05 Added MatplotlibDeprecationWarning class for signaling deprecation. - Matplotlib developers can use this class as follows: - - from matplotlib import MatplotlibDeprecationWarning as mplDeprecation - - In light of the fact that Python builtin DeprecationWarnings are - ignored by default as of Python 2.7, this class was put in to allow - for the signaling of deprecation, but via UserWarnings which are - not ignored by default. - PI - -2012-11-27 Added the *mtext* parameter for supplying matplotlib.text.Text - instances to RendererBase.draw_tex and RendererBase.draw_text. - This allows backends to utilize additional text attributes, like - the alignment of text elements. - pwuertz - -2012-11-26 deprecate matplotlib/mpl.py, which was used only in pylab.py and is - now replaced by the more suitable `import matplotlib as mpl`. - PI - -2012-11-25 Make rc_context available via pyplot interface - PI - -2012-11-16 plt.set_cmap no longer throws errors if there is not already - an active colorable artist, such as an image, and just sets - up the colormap to use from that point forward. - PI - -2012-11-16 Added the funcction _get_rbga_face, which is identical to - _get_rbg_face except it return a (r,g,b,a) tuble, to line2D. - Modified Line2D.draw to use _get_rbga_face to get the markerface - color so that any alpha set by markerfacecolor will respected. - - Thomas Caswell - -2012-11-13 Add a symmetric log normalization class to colors.py. - Also added some tests for the normalization class. - Till Stensitzki - -2012-11-12 Make axes.stem take at least one argument. - Uses a default range(n) when the first arg not provided. - Damon McDougall - -2012-11-09 Make plt.subplot() without arguments act as subplot(111) - PI - -2012-10-05 Add support for saving animations as animated GIFs. - JVDP - 2012-08-11 Fix path-closing bug in patches.Polygon, so that regardless of whether the path is the initial one or was subsequently set by set_xy(), get_xy() will return a closed path if and diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/CONTRIBUTING.md matplotlib-1.2.0/CONTRIBUTING.md --- matplotlib-1.2.0~1+6455+16~quantal1/CONTRIBUTING.md 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/CONTRIBUTING.md 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -Please refer to the [Coding -Guidelines](http://matplotlib.org/devel/coding_guide.html). diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/DATEUTIL_LICENSE.txt matplotlib-1.2.0/LICENSE/DATEUTIL_LICENSE.txt --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/DATEUTIL_LICENSE.txt 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/DATEUTIL_LICENSE.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,259 +0,0 @@ -A. HISTORY OF THE SOFTWARE -========================== - -Python was created in the early 1990s by Guido van Rossum at Stichting -Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands -as a successor of a language called ABC. Guido remains Python's -principal author, although it includes many contributions from others. - -In 1995, Guido continued his work on Python at the Corporation for -National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) -in Reston, Virginia where he released several versions of the -software. - -In May 2000, Guido and the Python core development team moved to -BeOpen.com to form the BeOpen PythonLabs team. In October of the same -year, the PythonLabs team moved to Digital Creations (now Zope -Corporation, see http://www.zope.com). In 2001, the Python Software -Foundation (PSF, see http://www.python.org/psf/) was formed, a -non-profit organization created specifically to own Python-related -Intellectual Property. Zope Corporation is a sponsoring member of -the PSF. - -All Python releases are Open Source (see http://www.opensource.org for -the Open Source Definition). Historically, most, but not all, Python -releases have also been GPL-compatible; the table below summarizes -the various releases. - - Release Derived Year Owner GPL- - from compatible? (1) - - 0.9.0 thru 1.2 1991-1995 CWI yes - 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes - 1.6 1.5.2 2000 CNRI no - 2.0 1.6 2000 BeOpen.com no - 1.6.1 1.6 2001 CNRI yes (2) - 2.1 2.0+1.6.1 2001 PSF no - 2.0.1 2.0+1.6.1 2001 PSF yes - 2.1.1 2.1+2.0.1 2001 PSF yes - 2.2 2.1.1 2001 PSF yes - 2.1.2 2.1.1 2002 PSF yes - 2.1.3 2.1.2 2002 PSF yes - 2.2.1 2.2 2002 PSF yes - 2.2.2 2.2.1 2002 PSF yes - 2.2.3 2.2.2 2003 PSF yes - 2.3 2.2.2 2002-2003 PSF yes - -Footnotes: - -(1) GPL-compatible doesn't mean that we're distributing Python under - the GPL. All Python licenses, unlike the GPL, let you distribute - a modified version without making your changes open source. The - GPL-compatible licenses make it possible to combine Python with - other software that is released under the GPL; the others don't. - -(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, - because its license has a choice of law clause. According to - CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 - is "not incompatible" with the GPL. - -Thanks to the many outside volunteers who have worked under Guido's -direction to make these releases possible. - - -B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON -=============================================================== - -PSF LICENSE AGREEMENT FOR PYTHON 2.3 ------------------------------------- - -1. This LICENSE AGREEMENT is between the Python Software Foundation -("PSF"), and the Individual or Organization ("Licensee") accessing and -otherwise using Python 2.3 software in source or binary form and its -associated documentation. - -2. Subject to the terms and conditions of this License Agreement, PSF -hereby grants Licensee a nonexclusive, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, -prepare derivative works, distribute, and otherwise use Python 2.3 -alone or in any derivative version, provided, however, that PSF's -License Agreement and PSF's notice of copyright, i.e., "Copyright (c) -2001, 2002, 2003 Python Software Foundation; All Rights Reserved" are -retained in Python 2.3 alone or in any derivative version prepared by -Licensee. - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python 2.3 or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python 2.3. - -4. PSF is making Python 2.3 available to Licensee on an "AS IS" -basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.3 WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.3, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between PSF and -Licensee. This License Agreement does not grant permission to use PSF -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using Python 2.3, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - -BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 -------------------------------------------- - -BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 - -1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an -office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the -Individual or Organization ("Licensee") accessing and otherwise using -this software in source or binary form and its associated -documentation ("the Software"). - -2. Subject to the terms and conditions of this BeOpen Python License -Agreement, BeOpen hereby grants Licensee a non-exclusive, -royalty-free, world-wide license to reproduce, analyze, test, perform -and/or display publicly, prepare derivative works, distribute, and -otherwise use the Software alone or in any derivative version, -provided, however, that the BeOpen Python License is retained in the -Software, alone or in any derivative version prepared by Licensee. - -3. BeOpen is making the Software available to Licensee on an "AS IS" -basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE -SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS -AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY -DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -5. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -6. This License Agreement shall be governed by and interpreted in all -respects by the law of the State of California, excluding conflict of -law provisions. Nothing in this License Agreement shall be deemed to -create any relationship of agency, partnership, or joint venture -between BeOpen and Licensee. This License Agreement does not grant -permission to use BeOpen trademarks or trade names in a trademark -sense to endorse or promote products or services of Licensee, or any -third party. As an exception, the "BeOpen Python" logos available at -http://www.pythonlabs.com/logos.html may be used according to the -permissions granted on that web page. - -7. By copying, installing or otherwise using the software, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - -CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 ---------------------------------------- - -1. This LICENSE AGREEMENT is between the Corporation for National -Research Initiatives, having an office at 1895 Preston White Drive, -Reston, VA 20191 ("CNRI"), and the Individual or Organization -("Licensee") accessing and otherwise using Python 1.6.1 software in -source or binary form and its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, CNRI -hereby grants Licensee a nonexclusive, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, -prepare derivative works, distribute, and otherwise use Python 1.6.1 -alone or in any derivative version, provided, however, that CNRI's -License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) -1995-2001 Corporation for National Research Initiatives; All Rights -Reserved" are retained in Python 1.6.1 alone or in any derivative -version prepared by Licensee. Alternately, in lieu of CNRI's License -Agreement, Licensee may substitute the following text (omitting the -quotes): "Python 1.6.1 is made available subject to the terms and -conditions in CNRI's License Agreement. This Agreement together with -Python 1.6.1 may be located on the Internet using the following -unique, persistent identifier (known as a handle): 1895.22/1013. This -Agreement may also be obtained from a proxy server on the Internet -using the following URL: http://hdl.handle.net/1895.22/1013". - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python 1.6.1 or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python 1.6.1. - -4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" -basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. This License Agreement shall be governed by the federal -intellectual property law of the United States, including without -limitation the federal copyright law, and, to the extent such -U.S. federal law does not apply, by the law of the Commonwealth of -Virginia, excluding Virginia's conflict of law provisions. -Notwithstanding the foregoing, with regard to derivative works based -on Python 1.6.1 that incorporate non-separable material that was -previously distributed under the GNU General Public License (GPL), the -law of the Commonwealth of Virginia shall govern this License -Agreement only as to issues arising under or with respect to -Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this -License Agreement shall be deemed to create any relationship of -agency, partnership, or joint venture between CNRI and Licensee. This -License Agreement does not grant permission to use CNRI trademarks or -trade name in a trademark sense to endorse or promote products or -services of Licensee, or any third party. - -8. By clicking on the "ACCEPT" button where indicated, or by copying, -installing or otherwise using Python 1.6.1, Licensee agrees to be -bound by the terms and conditions of this License Agreement. - - ACCEPT - - -CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 --------------------------------------------------- - -Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, -The Netherlands. All rights reserved. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Stichting Mathematisch -Centrum or CWI not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO -THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE -FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE matplotlib-1.2.0/LICENSE/LICENSE --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -LICENSE AGREEMENT FOR MATPLOTLIB 1.2.0 --------------------------------------- - -1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the -Individual or Organization ("Licensee") accessing and otherwise using -matplotlib software in source or binary form and its associated -documentation. - -2. Subject to the terms and conditions of this License Agreement, JDH -hereby grants Licensee a nonexclusive, royalty-free, world-wide license -to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use matplotlib 1.2.0 -alone or in any derivative version, provided, however, that JDH's -License Agreement and JDH's notice of copyright, i.e., "Copyright (c) -2002-2011 John D. Hunter; All Rights Reserved" are retained in -matplotlib 1.2.0 alone or in any derivative version prepared by -Licensee. - -3. In the event Licensee prepares a derivative work that is based on or -incorporates matplotlib 1.2.0 or any part thereof, and wants to -make the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to matplotlib 1.2.0. - -4. JDH is making matplotlib 1.2.0 available to Licensee on an "AS -IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 1.2.0 -WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - -5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB -1.2.0 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR -LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING -MATPLOTLIB 1.2.0, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF -THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between JDH and -Licensee. This License Agreement does not grant permission to use JDH -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using matplotlib 1.2.0, -Licensee agrees to be bound by the terms and conditions of this License -Agreement. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_BAKOMA matplotlib-1.2.0/LICENSE/LICENSE_BAKOMA --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_BAKOMA 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE_BAKOMA 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ - - BaKoMa Fonts Licence - -------------------- - - This licence covers two font packs (known as BaKoMa Fonts Colelction, - which is available at `CTAN:fonts/cm/ps-type1/bakoma/'): - - 1) BaKoMa-CM (1.1/12-Nov-94) - Computer Modern Fonts in PostScript Type 1 and TrueType font formats. - - 2) BaKoMa-AMS (1.2/19-Jan-95) - AMS TeX fonts in PostScript Type 1 and TrueType font formats. - - Copyright (C) 1994, 1995, Basil K. Malyshev. All Rights Reserved. - - Permission to copy and distribute these fonts for any purpose is - hereby granted without fee, provided that the above copyright notice, - author statement and this permission notice appear in all copies of - these fonts and related documentation. - - Permission to modify and distribute modified fonts for any purpose is - hereby granted without fee, provided that the copyright notice, - author statement, this permission notice and location of original - fonts (http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma) - appear in all copies of modified fonts and related documentation. - - Permission to use these fonts (embedding into PostScript, PDF, SVG - and printing by using any software) is hereby granted without fee. - It is not required to provide any notices about using these fonts. - - Basil K. Malyshev - INSTITUTE FOR HIGH ENERGY PHYSICS - IHEP, OMVT - Moscow Region - 142281 PROTVINO - RUSSIA - - E-Mail: bakoma@mail.ru - or malyshev@mail.ihep.ru - diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_COLORBREWER matplotlib-1.2.0/LICENSE/LICENSE_COLORBREWER --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_COLORBREWER 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE_COLORBREWER 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -Apache-Style Software License for ColorBrewer Color Schemes - -Version 1.1 - -Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania -State University. All rights reserved. Redistribution and use in source -and binary forms, with or without modification, are permitted provided -that the following conditions are met: - -1. Redistributions as source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. The end-user documentation included with the redistribution, if any, -must include the following acknowledgment: "This product includes color -specifications and designs developed by Cynthia Brewer -(http://colorbrewer.org/)." Alternately, this acknowledgment may appear in -the software itself, if and wherever such third-party acknowledgments -normally appear. - -3. The name "ColorBrewer" must not be used to endorse or promote products -derived from this software without prior written permission. For written -permission, please contact Cynthia Brewer at cbrewer@psu.edu. - -4. Products derived from this software may not be called "ColorBrewer", -nor may "ColorBrewer" appear in their name, without prior written -permission of Cynthia Brewer. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -CYNTHIA BREWER, MARK HARROWER, OR THE PENNSYLVANIA STATE UNIVERSITY BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_QT4_EDITOR matplotlib-1.2.0/LICENSE/LICENSE_QT4_EDITOR --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_QT4_EDITOR 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE_QT4_EDITOR 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - -Module creating PyQt4 form dialogs/layouts to edit various type of parameters - - -formlayout License Agreement (MIT License) ------------------------------------------- - -Copyright (c) 2009 Pierre Raybaut - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -""" diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_STIX matplotlib-1.2.0/LICENSE/LICENSE_STIX --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_STIX 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE_STIX 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -TERMS AND CONDITIONS - - 1. Permission is hereby granted, free of charge, to any person -obtaining a copy of the STIX Fonts-TM set accompanying this license -(collectively, the "Fonts") and the associated documentation files -(collectively with the Fonts, the "Font Software"), to reproduce and -distribute the Font Software, including the rights to use, copy, merge -and publish copies of the Font Software, and to permit persons to whom -the Font Software is furnished to do so same, subject to the following -terms and conditions (the "License"). - - 2. The following copyright and trademark notice and these Terms and -Conditions shall be included in all copies of one or more of the Font -typefaces and any derivative work created as permitted under this -License: - - Copyright (c) 2001-2005 by the STI Pub Companies, consisting of -the American Institute of Physics, the American Chemical Society, the -American Mathematical Society, the American Physical Society, Elsevier, -Inc., and The Institute of Electrical and Electronic Engineers, Inc. -Portions copyright (c) 1998-2003 by MicroPress, Inc. Portions copyright -(c) 1990 by Elsevier, Inc. All rights reserved. STIX Fonts-TM is a -trademark of The Institute of Electrical and Electronics Engineers, Inc. - - 3. You may (a) convert the Fonts from one format to another (e.g., -from TrueType to PostScript), in which case the normal and reasonable -distortion that occurs during such conversion shall be permitted and (b) -embed or include a subset of the Fonts in a document for the purposes of -allowing users to read text in the document that utilizes the Fonts. In -each case, you may use the STIX Fonts-TM mark to designate the resulting -Fonts or subset of the Fonts. - - 4. You may also (a) add glyphs or characters to the Fonts, or modify -the shape of existing glyphs, so long as the base set of glyphs is not -removed and (b) delete glyphs or characters from the Fonts, provided -that the resulting font set is distributed with the following -disclaimer: "This [name] font does not include all the Unicode points -covered in the STIX Fonts-TM set but may include others." In each case, -the name used to denote the resulting font set shall not include the -term "STIX" or any similar term. - - 5. You may charge a fee in connection with the distribution of the -Font Software, provided that no copy of one or more of the individual -Font typefaces that form the STIX Fonts-TM set may be sold by itself. - - 6. THE FONT SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK OR OTHER RIGHT. IN NO EVENT SHALL -MICROPRESS OR ANY OF THE STI PUB COMPANIES BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, INCLUDING, BUT NOT LIMITED TO, ANY GENERAL, -SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM OR OUT OF THE USE OR -INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT -SOFTWARE. - - 7. Except as contained in the notice set forth in Section 2, the -names MicroPress Inc. and STI Pub Companies, as well as the names of the -companies/organizations that compose the STI Pub Companies, shall not be -used in advertising or otherwise to promote the sale, use or other -dealings in the Font Software without the prior written consent of the -respective company or organization. - - 8. This License shall become null and void in the event of any -material breach of the Terms and Conditions herein by licensee. - - 9. A substantial portion of the STIX Fonts set was developed by -MicroPress Inc. for the STI Pub Companies. To obtain additional -mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow -Street, Forest Hills, NY 11375, USA - Phone: (718) 575-1816. - diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_YORICK matplotlib-1.2.0/LICENSE/LICENSE_YORICK --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_YORICK 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE_YORICK 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -BSD-style license for gist/yorick colormaps. - -Copyright: - - Copyright (c) 1996. The Regents of the University of California. - All rights reserved. - -Permission to use, copy, modify, and distribute this software for any -purpose without fee is hereby granted, provided that this entire -notice is included in all copies of any software which is or includes -a copy or modification of this software and in all copies of the -supporting documentation for such software. - -This work was produced at the University of California, Lawrence -Livermore National Laboratory under contract no. W-7405-ENG-48 between -the U.S. Department of Energy and The Regents of the University of -California for the operation of UC LLNL. - - - DISCLAIMER - -This software was prepared as an account of work sponsored by an -agency of the United States Government. Neither the United States -Government nor the University of California nor any of their -employees, makes any warranty, express or implied, or assumes any -liability or responsibility for the accuracy, completeness, or -usefulness of any information, apparatus, product, or process -disclosed, or represents that its use would not infringe -privately-owned rights. Reference herein to any specific commercial -products, process, or service by trade name, trademark, manufacturer, -or otherwise, does not necessarily constitute or imply its -endorsement, recommendation, or favoring by the United States -Government or the University of California. The views and opinions of -authors expressed herein do not necessarily state or reflect those of -the United States Government or the University of California, and -shall not be used for advertising or product endorsement purposes. - - - AUTHOR - -David H. Munro wrote Yorick and Gist. Berkeley Yacc (byacc) generated -the Yorick parser. The routines in Math are from LAPACK and FFTPACK; -MathC contains C translations by David H. Munro. The algorithms for -Yorick's random number generator and several special functions in -Yorick/include were taken from Numerical Recipes by Press, et. al., -although the Yorick implementations are unrelated to those in -Numerical Recipes. A small amount of code in Gist was adapted from -the X11R4 release, copyright M.I.T. -- the complete copyright notice -may be found in the (unused) file Gist/host.c. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_enthought.txt matplotlib-1.2.0/LICENSE/LICENSE_enthought.txt --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/LICENSE_enthought.txt 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/LICENSE_enthought.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -Copyright (c) 2001, 2002 Enthought, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - a. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - b. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - c. Neither the name of the Enthought nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/PYTZ_LICENSE.txt matplotlib-1.2.0/LICENSE/PYTZ_LICENSE.txt --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/PYTZ_LICENSE.txt 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/PYTZ_LICENSE.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -Copyright (c) 2003-2004 Stuart Bishop -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. - - The name of Stuart Bishop may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/pnpoly.license matplotlib-1.2.0/LICENSE/pnpoly.license --- matplotlib-1.2.0~1+6455+16~quantal1/LICENSE/pnpoly.license 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/LICENSE/pnpoly.license 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -Copyright (c) 1970-2003, Wm. Randolph Franklin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimers. - 2. Redistributions in binary form must reproduce the above - copyright notice in the documentation and/or other materials - provided with the distribution. - 3. The name of W. Randolph Franklin may not be used to endorse or - promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/MANIFEST.in matplotlib-1.2.0/MANIFEST.in --- matplotlib-1.2.0~1+6455+16~quantal1/MANIFEST.in 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/MANIFEST.in 2012-11-06 22:31:09.000000000 +0000 @@ -1,5 +1,5 @@ include CHANGELOG KNOWN_BUGS INSTALL -include INTERACTIVE TODO CONTRIBUTING.md +include INTERACTIVE TODO include Makefile make.osx MANIFEST.in MANIFEST include matplotlibrc.template setup.cfg.template include __init__.py setupext.py setup.py setupegg.py diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/Makefile matplotlib-1.2.0/Makefile --- matplotlib-1.2.0~1+6455+16~quantal1/Makefile 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/Makefile 2012-08-28 16:32:45.000000000 +0000 @@ -44,11 +44,6 @@ python make.py html latex sf sfpdf; -test: - ${PYTHON} tests.py -test-coverage: - ${PYTHON} tests.py --with-coverage --cover-package=matplotlib - diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/PKG-INFO matplotlib-1.2.0/PKG-INFO --- matplotlib-1.2.0~1+6455+16~quantal1/PKG-INFO 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/PKG-INFO 2012-11-08 16:39:22.000000000 +0000 @@ -0,0 +1,23 @@ +Metadata-Version: 1.1 +Name: matplotlib +Version: 1.2.0 +Summary: Python plotting package +Home-page: http://matplotlib.org +Author: John D. Hunter, Michael Droettboom +Author-email: mdroe@stsci.edu +License: UNKNOWN +Description: + matplotlib strives to produce publication quality 2D graphics + for interactive graphing, scientific publishing, user interface + development and web application servers targeting multiple user + interfaces and hardcopy output formats. There is a 'pylab' mode + which emulates matlab graphics + +Platform: any +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Science/Research +Classifier: License :: OSI Approved :: Python Software Foundation License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 3 +Classifier: Topic :: Scientific/Engineering :: Visualization diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/README.osx matplotlib-1.2.0/README.osx --- matplotlib-1.2.0~1+6455+16~quantal1/README.osx 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/README.osx 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -Building mpl on OSX has proven to be a nightmare because of all the -different types of zlib, png and freetype that may be on your system. -The recommended and supported way to build is to use a third-party -package manager to install the required dependencies, and then -install matplotlib from source using the setup.py script. Two widely -used package managers are homebrew and MacPorts. The following -example illustrates how to install libpng and freetype using -homebrew. - -Example usage:: - - brew install libpng freetype - -If you are using MacPorts, execute the following instead: - -Example usage:: - - port install libpng freetype - -To install matplotlib from source, execute: - -Example usage:: - - python setup.py install diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/README.rst matplotlib-1.2.0/README.rst --- matplotlib-1.2.0~1+6455+16~quantal1/README.rst 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/README.rst 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -########## -matplotlib -########## - -matplotlib is a python 2D plotting library which produces publication -quality figures in a variety of hardcopy formats and interactive -environments across platforms. matplotlib can be used in python -scripts, the python and ipython shell (ala matlab or mathematica), web -application servers, and various graphical user interface toolkits. - -`Home page `_ - -Installation -============= - -For installation instructions and requirements, see the INSTALL file. - -Testing -======= - -After installation, you can launch the test suite:: - - python tests.py - -Consider reading http://matplotlib.org/devel/coding_guide.html#testing for -more information. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/README.txt matplotlib-1.2.0/README.txt --- matplotlib-1.2.0~1+6455+16~quantal1/README.txt 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/README.txt 2012-10-31 00:11:13.000000000 +0000 @@ -0,0 +1,9 @@ +matplotlib is a python 2D plotting library which produces publication +quality figures in a variety of hardcopy formats and interactive +environments across platforms. matplotlib can be used in python +scripts, the python and ipython shell (ala matlab or mathematica), web +application servers, and various graphical user interface toolkits. + +Home page: + +For installation instructions and requirements, see the INSTALL file. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/TODO_TESTS matplotlib-1.2.0/TODO_TESTS --- matplotlib-1.2.0~1+6455+16~quantal1/TODO_TESTS 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/TODO_TESTS 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -Here are a collection of notes about things we want to accomplish with -the testing infrastructure. - -matplotlib.testing.image_comparison decorator -============================================= - -Collect all the failures in the image_comparison() decorator and raise -one failure that describes all the failed images. Right now the loop -that iterates over the images raises an exception on the first -failure, which clearly breaks out of the loop. - -Put image comparison results into more hierarchical view to facilitate -knowing which test module creates which image. (Also, revive John's -move_good.py script to deal with new image locations.) - -Misc testing stuff -================== - -Make ImageComparisonFailure cause nose to report "fail" (rather than -"error"). - -Recreate John's move_good.py script once the better hierarchy of test -result images is established. - -Buildbot infrastructure -======================= - -Put "actual" images online from buildbots, even without failure. - -Get a Windows XP 32-bit build slave. - -Build nightly binaries for win32 and Mac OS X. - -Build nightly source tarballs. - -Build nightly docs and put online somewhere. - -A note about the hack that is the failed image gathering mechanism -================================================================== - -The trouble with the current actual/baseline/diff result gathering -mechanism is that it uses the filesystem as a means for communication -withing the nose test running process in addition to communication -with the buildbot process through hard-coded assumptions about paths -and filenames. If the only concern was within nose, we could -presumably re-work some the old MplNoseTester plugin to handle the new -case, but given the buildbot consideration it gets more difficult to -get these frameworks talking through supported API calls. Thus, -although the hardcoded path and filename stuff is a hack, it will -require some serious nose and buildbot learning to figure out how to -do it the "right" way. So I'm all for sticking with the hack right -now, and making a bit nicer by doing things like having a better -directory hierarchy layout for the actual result images. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/boilerplate.py matplotlib-1.2.0/boilerplate.py --- matplotlib-1.2.0~1+6455+16~quantal1/boilerplate.py 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/boilerplate.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,313 +0,0 @@ -""" -Script to autogenerate pyplot wrappers. - -When this script is run, the current contents of pyplot are -split into generatable and non-generatable content (via the magic header -:attr:`PYPLOT_MAGIC_HEADER`) and the generatable content is overwritten. -Hence, the non-generatable content should be edited in the pyplot.py file -itself, whereas the generatable content must be edited via templates in -this file. - -""" -# We did try to do the wrapping the smart way, -# with callable functions and new.function, but could never get the -# docstrings right for python2.2. See -# http://groups.google.com/group/comp.lang.python/browse_frm/thread/dcd63ec13096a0f6/1b14640f3a4ad3dc?#1b14640f3a4ad3dc -# For some later history, see -# http://thread.gmane.org/gmane.comp.python.matplotlib.devel/7068 - -import os -import inspect -import random -import types - -import textwrap - -# import the local copy of matplotlib, not the installed one -#sys.path.insert(0, './lib') -from matplotlib.axes import Axes - - -# this is the magic line that must exist in pyplot, after which the boilerplate content will be -# appended -PYPLOT_MAGIC_HEADER = '################# REMAINING CONTENT GENERATED BY boilerplate.py ##############\n' - -PYPLOT_PATH = os.path.join(os.path.dirname(__file__), 'lib', - 'matplotlib', 'pyplot.py') - - -AUTOGEN_MSG = """ -# This function was autogenerated by boilerplate.py. Do not edit as -# changes will be lost""" - - -PLOT_TEMPLATE = AUTOGEN_MSG + """ -@_autogen_docstring(Axes.%(func)s) -def %(func)s(%(argspec)s): - %(ax)s = gca() - # allow callers to override the hold state by passing hold=True|False - %(washold)s = %(ax)s.ishold() - %(sethold)s - if hold is not None: - %(ax)s.hold(hold) - try: - %(ret)s = %(ax)s.%(func)s(%(call)s) - draw_if_interactive() - finally: - %(ax)s.hold(%(washold)s) - %(mappable)s - return %(ret)s -""" - - -# Used for misc functions such as cla/legend etc. -MISC_FN_TEMPLATE = AUTOGEN_MSG + """ -@docstring.copy_dedent(Axes.%(func)s) -def %(func)s(%(argspec)s): - %(ret)s = gca().%(func)s(%(call)s) - draw_if_interactive() - return %(ret)s -""" - -# Used for colormap functions -CMAP_TEMPLATE = AUTOGEN_MSG + """ -def {name}(): - ''' - set the default colormap to {name} and apply to current image if any. - See help(colormaps) for more information - ''' - rc('image', cmap='{name}') - im = gci() - - if im is not None: - im.set_cmap(cm.{name}) - draw_if_interactive() - -""" - - -def boilerplate_gen(): - """Generator of lines for the automated part of pyplot.""" - - # these methods are all simple wrappers of Axes methods by the same - # name. - _plotcommands = ( - 'acorr', - 'arrow', - 'axhline', - 'axhspan', - 'axvline', - 'axvspan', - 'bar', - 'barh', - 'broken_barh', - 'boxplot', - 'cohere', - 'clabel', - 'contour', - 'contourf', - 'csd', - 'errorbar', - 'fill', - 'fill_between', - 'fill_betweenx', - 'hexbin', - 'hist', - 'hist2d', - 'hlines', - 'imshow', - 'loglog', - 'pcolor', - 'pcolormesh', - 'pie', - 'plot', - 'plot_date', - 'psd', - 'quiver', - 'quiverkey', - 'scatter', - 'semilogx', - 'semilogy', - 'specgram', - #'spy', - 'stackplot', - 'stem', - 'step', - 'streamplot', - 'tricontour', - 'tricontourf', - 'tripcolor', - 'triplot', - 'vlines', - 'xcorr', - 'barbs', - ) - - _misccommands = ( - 'cla', - 'grid', - 'legend', - 'table', - 'text', - 'annotate', - 'ticklabel_format', - 'locator_params', - 'tick_params', - 'margins', - 'autoscale', - ) - - cmappable = { - 'contour' : 'if %(ret)s._A is not None: sci(%(ret)s)', - 'contourf': 'if %(ret)s._A is not None: sci(%(ret)s)', - 'hexbin' : 'sci(%(ret)s)', - 'scatter' : 'sci(%(ret)s)', - 'pcolor' : 'sci(%(ret)s)', - 'pcolormesh': 'sci(%(ret)s)', - 'hist2d' : 'sci(%(ret)s[-1])', - 'imshow' : 'sci(%(ret)s)', - #'spy' : 'sci(%(ret)s)', ### may return image or Line2D - 'quiver' : 'sci(%(ret)s)', - 'specgram' : 'sci(%(ret)s[-1])', - 'streamplot' : 'sci(%(ret)s)', - 'tricontour' : 'if %(ret)s._A is not None: sci(%(ret)s)', - 'tricontourf': 'if %(ret)s._A is not None: sci(%(ret)s)', - 'tripcolor' : 'sci(%(ret)s)', - - } - - def format_value(value): - """ - Format function default values as needed for inspect.formatargspec. - The interesting part is a hard-coded list of functions used - as defaults in pyplot methods. - """ - if isinstance(value, types.FunctionType): - if value.__name__ in ('detrend_none', 'window_hanning'): - return '=mlab.' + value.__name__ - if value.__name__ == 'mean': - return '=np.' + value.__name__ - raise ValueError(('default value %s unknown to boilerplate.' + \ - 'formatvalue') % value) - return '='+repr(value) - - text_wrapper = textwrap.TextWrapper(break_long_words=False) - - for fmt, cmdlist in [(PLOT_TEMPLATE, _plotcommands), - (MISC_FN_TEMPLATE, _misccommands)]: - for func in cmdlist: - # For some commands, an additional line is needed to set the - # color map - if func in cmappable: - mappable = cmappable[func] % locals() - else: - mappable = '' - - # Get argspec of wrapped function - args, varargs, varkw, defaults = inspect.getargspec(getattr(Axes, func)) - args.pop(0) # remove 'self' argument - if defaults is None: - defaults = () - - # How to call the wrapped function - call = [] - for i, arg in enumerate(args): - if len(defaults) < len(args) - i: - call.append('%s' % arg) - else: - call.append('%s=%s' % (arg, arg)) - - if varargs is not None: - call.append('*'+varargs) - if varkw is not None: - call.append('**'+varkw) - call = ', '.join(call) - - text_wrapper.width = 80 - 19 - len(func) - join_with = '\n' + ' ' * (18 + len(func)) - call = join_with.join(text_wrapper.wrap(call)) - - # Add a hold keyword argument if needed (fmt is PLOT_TEMPLATE) and - # possible (if *args is used, we can't just add a hold - # argument in front of it since it would gobble one of the - # arguments the user means to pass via *args) - if varargs: - sethold = "hold = %(varkw)s.pop('hold', None)" % locals() - elif fmt is PLOT_TEMPLATE: - args.append('hold') - defaults = defaults + (None,) - sethold = '' - - # Now we can build the argspec for defining the wrapper - argspec = inspect.formatargspec(args, varargs, varkw, defaults, - formatvalue=format_value) - argspec = argspec[1:-1] # remove parens - - text_wrapper.width = 80 - 5 - len(func) - join_with = '\n' + ' ' * (5 + len(func)) - argspec = join_with.join(text_wrapper.wrap(argspec)) - - # A gensym-like facility in case some function takes an - # argument named washold, ax, or ret - washold, ret, ax = 'washold', 'ret', 'ax' - bad = set(args) | set((varargs, varkw)) - while washold in bad or ret in bad or ax in bad: - washold = 'washold' + str(random.randrange(10**12)) - ret = 'ret' + str(random.randrange(10**12)) - ax = 'ax' + str(random.randrange(10**12)) - - # Since we can't avoid using some function names, - # bail out if they are used as argument names - for reserved in ('gca', 'gci', 'draw_if_interactive'): - if reserved in bad: - msg = 'Axes method %s has kwarg named %s' % (func, reserved) - raise ValueError(msg) - - yield fmt % locals() - - cmaps = ( - 'autumn', - 'bone', - 'cool', - 'copper', - 'flag', - 'gray' , - 'hot', - 'hsv', - 'jet' , - 'pink', - 'prism', - 'spring', - 'summer', - 'winter', - 'spectral' - ) - # add all the colormaps (autumn, hsv, ....) - for name in cmaps: - yield CMAP_TEMPLATE.format(name=name) - - yield '' - yield '_setup_pyplot_info_docstrings()' - -def build_pyplot(): - pyplot_path = os.path.join(os.path.dirname(__file__), 'lib', - 'matplotlib', 'pyplot.py') - - pyplot_orig = open(pyplot_path, 'r').readlines() - - - try: - pyplot_orig = pyplot_orig[:pyplot_orig.index(PYPLOT_MAGIC_HEADER)+1] - except IndexError: - raise ValueError('The pyplot.py file *must* have the exact line: %s' % PYPLOT_MAGIC_HEADER) - - pyplot = open(pyplot_path, 'w') - pyplot.writelines(pyplot_orig) - pyplot.write('\n') - - pyplot.writelines(boilerplate_gen()) - - -if __name__ == '__main__': - # Write the matplotlib.pyplot file - build_pyplot() diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/README.debian matplotlib-1.2.0/debian/README.debian --- matplotlib-1.2.0~1+6455+16~quantal1/debian/README.debian 2013-01-24 01:34:16.000000000 +0000 +++ matplotlib-1.2.0/debian/README.debian 2012-11-09 18:48:38.000000000 +0000 @@ -28,10 +28,8 @@ backend : -where can be chosen from this list: - - # Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, - # GTKCairo, FltkAgg, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg. + # Default backend, one of: GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo CocoaAgg + # FltkAgg MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template # # The Agg, Ps, Pdf and SVG backends do not require external # dependencies. Do not choose GTK, GTKAgg, GTKCairo, TkAgg or WXAgg if @@ -41,5 +39,7 @@ GTK+ -> python-gtk2 Tk -> python-tk - QT -> python-qt3 or python-qt4 + QT -> python-qt4, python-sip WX -> python-wxgtk2.6 or python-wxgtk2.8 + GTK3 -> gir1.2-gtk-3.0, python-gi, python-gobject + FLTK -> python-fltk diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/bzr-builder.manifest matplotlib-1.2.0/debian/bzr-builder.manifest --- matplotlib-1.2.0~1+6455+16~quantal1/debian/bzr-builder.manifest 2013-01-24 01:34:17.000000000 +0000 +++ matplotlib-1.2.0/debian/bzr-builder.manifest 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -# bzr-builder format 0.3 deb-version {debupstream}+6455+16 -lp:~takluyver/matplotlib/trunk revid:git-v1:6776fb37f7b1ff9cbf4d6e65bfe40d95d74444a2 -nest sampledata lp:~takluyver/matplotlib/sampledata sampledata revid:git-v1:dd37870f1a50e9cd243ccc54c70e9749593aeb1d -nest-part packaging lp:~takluyver/matplotlib/debian-daily debian debian revid:takowl@gmail.com-20121122165207-xi2a65jeml3e3ig0 diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/changelog matplotlib-1.2.0/debian/changelog --- matplotlib-1.2.0~1+6455+16~quantal1/debian/changelog 2013-01-24 01:34:17.000000000 +0000 +++ matplotlib-1.2.0/debian/changelog 2013-01-25 10:59:07.000000000 +0000 @@ -1,15 +1,114 @@ -matplotlib (1.2.0~1+6455+16~quantal1) quantal; urgency=low +matplotlib (1.2.0-1~ubuntu12.10.1~ppa1) quantal; urgency=low - * Auto build. + * No-change backport to quantal - -- Thomas Kluyver Thu, 24 Jan 2013 01:34:17 +0000 + -- Thomas Kluyver Fri, 25 Jan 2013 10:59:07 +0000 -matplotlib (1.2.0~1) unstable; urgency=low +matplotlib (1.2.0-1) experimental; urgency=low - * Bump version number to above 1.1 series releases. - * Remove patch 30_disable_sample_downloads.patch (no longer required) + * New upstream release + * debian/{control, rules} + - run tests for python3 module + * debian/{control, README.debian} + - add several missing dependencies (and b-d) for Matplotlib backends + * debian/rules + - no longer set examples.* options in matplotlibrc when building doc (they + are not needed with 1.2.0) + * debian/patches/60_bts691960_reintroduce_examples.directory_rcparam.patch + - reintroduce (removed in 1.2.x series) 'examples.directory' rc parameter, + in order to specify the Debian custom sample_data path; thanks to Julian + Taylor for the report; Closes: #691960 + + -- Sandro Tosi Sun, 11 Nov 2012 12:17:37 +0100 + +matplotlib (1.2.0~rc2-2) experimental; urgency=low + + * debian/{control, rules} + - provide Python 3 packages, based on the work of Thomas Kluyver (thanks!); + thanks to Yaroslav Halchenko for the report; Closes: #669272 + + -- Sandro Tosi Tue, 23 Oct 2012 22:55:15 +0200 + +matplotlib (1.2.0~rc2-1) experimental; urgency=low + + * New upstream release candidate + * debian/control + - updated Homepage field to new upstream website location + * debian/copyright + - converted to DEP-5 format + - updated to new upstream code + - extended packaging copyright years + * debian/patches/60_new_syntax_to_load_searchindex.patch + - removed, merged upstream + * debian/watch + - updated to point to github + * debian/patches/30_disable_sample_downloads.patch + - removed, no longer needed + * debian/patches/10_build_fix.patch + - disabled, but not removed in case we'll have to restore it + * debian/python-matplotlib-data.install + - install sampledata from new location (now it's in upstream tarball) + - use matplotlibrc.template to install base matplotlib.conf file + * debian/rules + - set backend and not datapath in matplotlibrc when running tests + - fix broken symlinks to TrueType fonts; thanks to Ian Zimmerman for the + report; Closes: #687674 + * debian/{control, rules} + - run tests under 'xvfb-run', needed to run inkscape (which is required to + compare SVG images); adding relevant b-d (xvfb and xauth) + + -- Sandro Tosi Tue, 25 Sep 2012 19:44:06 +0200 + +matplotlib (1.1.1-1) experimental; urgency=low - -- Thomas Kluyver Wed, 05 Sep 2012 12:01:52 +0100 + * New upstream release + - Closes: #680883; thanks to Yannick Roehlly for the report + * debian/control + - add ghostscript and inkscape to b-d, needed to run tests + + -- Sandro Tosi Sat, 11 Aug 2012 20:15:53 +0200 + +matplotlib (1.1.1~rc2-1) unstable; urgency=low + + * New upstream release candidate + * debian/control + - remove some unnecessary build-depends; thanks to Michael Droettboom from + upstream for the review of the b-d packages list + - remove Qt3 dependencies, not required since a long time, easying Qt3 + removal from Debian; thanks to Ana Guerrero for report; Closes: #673399 + - add python-nose to b-d, needed to run tests + * debian/rules + - enable tests at build time + + -- Sandro Tosi Sun, 10 Jun 2012 16:21:11 +0200 + +matplotlib (1.1.1~rc1-2) unstable; urgency=low + + * debian/patches/60_new_syntax_to_load_searchindex.patch + - use new Sphinx syntax to load searchindex.js so dh_sphinxdoc is able to + recognize search.html as a valid Sphinx search page + * debian/{control, rules} + - use dh_sphinxdoc + * debian/rules + - set MPLCONFIGDIR to a writable directory; thanks to Lucas Nussbaum for the + report; Closes: #669549 + + -- Sandro Tosi Sat, 12 May 2012 18:05:15 +0200 + +matplotlib (1.1.1~rc1-1) unstable; urgency=low + + * New upstream (release candidate) release + - provide ipython 0.11 compatibility; thanks to Julian Taylor for the + report; Closes: #636464 + * debian/control + - replace ttf-lyx with fonts-lyx (package rename); thanks to Ryo IGARASHI + for the report; Closes: #664048 + - bump required numpy version to 1.4 at least + - bump Standards-Version to 3.9.3 (no changes needed) + * debian/{control, rules} + - use dh_numpy + + -- Sandro Tosi Sun, 25 Mar 2012 14:45:00 +0200 matplotlib (1.1.0-1) unstable; urgency=low @@ -614,7 +713,7 @@ * Depend on python-tz, remove the pytz files. Closes: #376715. -- Matthias Klose Fri, 7 Jul 2006 18:38:43 +0000 - + matplotlib (0.86.2-6) unstable; urgency=low * Added a note about numeric/numarray deps in README.debian. Closes: #376198 @@ -749,7 +848,7 @@ * Added support for different python versions - -- Vittorio Palmisano Sat, 26 Feb 2005 22:05:40 +0100 + -- Vittorio Palmisano Sat, 26 Feb 2005 22:05:40 +0100 python-matplotlib (0.72-3) unstable; urgency=low diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/control matplotlib-1.2.0/debian/control --- matplotlib-1.2.0~1+6455+16~quantal1/debian/control 2013-01-24 01:34:16.000000000 +0000 +++ matplotlib-1.2.0/debian/control 2012-11-09 18:48:38.000000000 +0000 @@ -5,8 +5,9 @@ Uploaders: Sandro Tosi Build-Depends: debhelper (>= 7), dvipng, + ghostscript, graphviz, - ipython, + inkscape,, libfreetype6-dev, libgtk2.0-dev, libpng-dev, @@ -14,54 +15,54 @@ python-all-dev (>= 2.3.5-7), python3-all-dbg, python3-all-dev, - python-configobj, python-dateutil, + python-cairo, + python3-cairo, python3-dateutil, - python-epydoc, + python-gi, + python3-gi, python-gtk2-dev, python-imaging, - python-numpy (>= 1:1.3.0), - python-numpy-dbg (>= 1:1.3.0), + python-nose, + python3-nose, + python-numpy (>= 1:1.5.1-4), + python-numpy-dbg (>= 1:1.5.1-4), python3-numpy, python3-numpy-dbg, python-pkg-resources, python3-pkg-resources, python-qt4, python3-pyqt4, - python-qt4-dev, python-setuptools, python3-setuptools, python3-six, - python-sphinx (>= 0.5.1), + python-sphinx (>= 1.0.7+dfsg), python-support (>= 1.0.0), python-tk (>= 2.5.2-1.1), python3-tk, - python-traits (>= 2.0), python-tz, python3-tz, python-wxgtk2.8, - python-wxgtk2.8-dbg, python-xlwt, tcl8.5-dev, texlive-fonts-recommended, texlive-latex-extra, texlive-latex-recommended, tk8.5-dev, + xauth, + xvfb, zlib1g-dev XS-Python-Version: all X-Python3-Version: >= 3.2 Standards-Version: 3.9.3 -Homepage: http://matplotlib.sf.net/ +Homepage: http://matplotlib.org/ Vcs-Svn: svn://svn.debian.org/svn/python-modules/packages/matplotlib/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/matplotlib/trunk/ Package: python-matplotlib Architecture: any -Depends: python-cairo, - python-dateutil, - python-gobject, +Depends: python-dateutil, python-matplotlib-data (>= ${source:Version}), - python-numpy (>= 1:1.3.0), python-pyparsing, python-tz, ${misc:Depends}, @@ -70,14 +71,19 @@ Recommends: python-glade2, python-tk (>= 2.5.2-1.1) Enhances: ipython Suggests: dvipng, + gir1.2-gtk-3.0, ipython (>= 0.6.3), librsvg2-common, + python-cairo, python-configobj, python-excelerator, + python-fltk, + python-gobject, python-gtk2, python-matplotlib-doc, python-qt4, python-scipy, + python-sip, python-traits (>= 2.0), python-wxgtk2.8, texlive-extra-utils, @@ -91,37 +97,41 @@ Package: python3-matplotlib Architecture: any -Depends: python3-cairo, - python3-dateutil, - python3-gobject, +Depends: python3-dateutil, python-matplotlib-data (>= ${source:Version}), - python3-numpy, + python3-pyparsing, python3-six, python3-tz, ${misc:Depends}, - ${python:Depends}, + ${python3:Depends}, ${shlibs:Depends} Recommends: python3-tk Enhances: ipython3 Suggests: dvipng, + gir1.2-gtk-3.0, ipython3, librsvg2-common, python-matplotlib-doc, - python3-qt4, + python3-cairo, + python3-gi, + python3-gobject, + python3-pyqt4, + python3-scipy, + python3-sip, texlive-extra-utils, texlive-latex-extra -Description: Python 3 based plotting system in a style similar to Matlab +Description: Python based plotting system in a style similar to Matlab (Python 3) Matplotlib is a pure Python plotting library designed to bring publication quality plotting to Python with a syntax familiar to Matlab users. All of the plotting commands in the pylab interface can be accessed either via a functional interface familiar to Matlab users or an object oriented interface familiar to Python users. . - This package contains matplotlib for Python 3. + This package contains the Python 3 version of matplotlib. Package: python-matplotlib-data Architecture: all -Depends: ttf-lyx, ${misc:Depends} +Depends: fonts-lyx, ${misc:Depends} Description: Python based plotting system (data package) Matplotlib is a pure Python plotting library designed to bring publication quality plotting to Python with a syntax familiar to @@ -169,7 +179,7 @@ python3-matplotlib (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} -Description: Python 3 based plotting system (debug extension) +Description: Python based plotting system (debug extension, Python 3) Matplotlib is a pure Python plotting library designed to bring publication quality plotting to Python with a syntax familiar to Matlab users. All of the plotting commands in the pylab interface can diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/copyright matplotlib-1.2.0/debian/copyright --- matplotlib-1.2.0~1+6455+16~quantal1/debian/copyright 2013-01-24 01:34:16.000000000 +0000 +++ matplotlib-1.2.0/debian/copyright 2012-09-23 20:27:39.000000000 +0000 @@ -1,458 +1,460 @@ -This package was debianized by Vittorio Palmisano on -Sun, 24 Sep 2006 12:12:29 +0200 +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: matplotlib +Upstream-Contact: John D. Hunter, Michael Droettboom +Source: http://matplotlib.org -It is now maintainer under the Debian Python Modules Team. -It was downloaded from http://matplotlib.sourceforge.net/ +Files: * +Copyright: Copyright (c) 2002-2008 John D. Hunter +License: + Matplotlib only uses BSD compatible code, and its license is based + on the PSF license. See the Open Source Initiative licenses page + for details on individual licenses. Non-BSD compatible licenses + (eg LGPL) are acceptable in matplotlib Toolkits. For a discussion + of the motivations behind the licencing choice, see Licenses. + License agreement for matplotlib. + . + 1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and + the Individual or Organization ("Licensee") accessing and + otherwise using matplotlib software in source or binary form and + its associated documentation. + . + 2. Subject to the terms and conditions of this License Agreement, + JDH hereby grants Licensee a nonexclusive, royalty-free, + world-wide license to reproduce, analyze, test, perform and/or + display publicly, prepare derivative works, distribute, and + otherwise use matplotlib alone or in any derivative version, + provided, however, that JDH’s License Agreement and JDH’s notice + of copyright, i.e., "Copyright (c) 2002-2008 John D. Hunter; All + Rights Reserved" are retained in matplotlib alone or in any + derivative version prepared by Licensee. + . + 3. In the event Licensee prepares a derivative work that is based + on or incorporates matplotlib or any part thereof, and wants to + make the derivative work available to others as provided herein, + then Licensee hereby agrees to include in any such work a brief + summary of the changes made to matplotlib. + . + 4. JDH is making matplotlib available to Licensee on an ΄AS IS‘ + basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR + IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND + DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR + FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB + WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + . + 5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF + MATPLOTLIB FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES + OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING + MATPLOTLIB, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE + POSSIBILITY THEREOF. + . + 6. This License Agreement will automatically terminate upon a + material breach of its terms and conditions. + . + 7. Nothing in this License Agreement shall be deemed to create any + relationship of agency, partnership, or joint venture between JDH + and Licensee. This License Agreement does not grant permission to + use JDH trademarks or trade name in a trademark sense to endorse + or promote products or services of Licensee, or any third party. + . + 8. By copying, installing or otherwise using matplotlib, Licensee + agrees to be bound by the terms and conditions of this License + Agreement. + +Files: debian/* +Copyright: Copyright (C) 2008-2012 Sandro Tosi +License: same as upstream + +Files: lib/matplotlib/fontconfig_pattern.py +Author: Michael Droettboom + +Files: lib/matplotlib/backends/backend_fltkagg.py +Copyright: Gregory Lielens, Free Field Technologies SA and + John D. Hunter 2004 + +Files: lib/matplotlib/backends/backend_wxagg.py +Copyright: Copyright (C) 2003-5 Jeremy O'Donoghue, John Hunter, Illinois Institute of Technology + +Files: lib/matplotlib/backends/backend_wx.py +Copyright: Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4 +License: This work is licensed under a PSF compatible license. + +Files: lib/matplotlib/pyparsing_py2.py +Copyright: Copyright (c) 2003-2010 Paul T. McGuire +License: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Files: lib/matplotlib/pyparsing_py3.py +Copyright: Copyright (c) 2003-2010 Paul T. McGuire +License: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Files: lib/matplotlib/sankey.py +Author: Kevin L. Davies +License: BSD + +Files: lib/matplotlib/table.py +Author: John Gill +Copyright: 2004 John Gill and John Hunter + +Files: lib/matplotlib/delaunay/VoronoiDiagramGenerator.{cpp, h} +Author: The author of this software is Steven Fortune. +Copyright: Copyright (c) 1994 by AT&T Bell Laboratories. +License: + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. +Comment: + This code was originally written by Stephan Fortune in C code. I, Shane O'Sullivan, + have since modified it, encapsulating it in a C++ class and, fixing memory leaks and + adding accessors to the Voronoi Edges. + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire notice + is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + +Files: lib/matplotlib/delaunay/./__init__.py +Author: Robert Kern +Copyright: Copyright 2005 Robert Kern. +License: BSD-style license. See LICENSE.txt in the scipy source directory. + +Files: lib/matplotlib/testing/image_util.py +Copyright: Copyright (c) 1997-2009 by Secret Labs AB + Copyright (c) 1995-2009 by Fredrik Lundh +License: + Permission to use, copy, modify, and distribute this software and its + associated documentation for any purpose and without fee is hereby + granted, provided that the above copyright notice appears in all + copies, and that both that copyright notice and this permission notice + appear in supporting documentation, and that the name of Secret Labs + AB or the author not be used in advertising or publicity pertaining to + distribution of the software without specific, written prior + permission. + . + SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO + THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR + ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT + OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Files: lib/matplotlib/mpl-data/fonts/ttf/(non STIX)*.ttf +Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights + Reserved. Bitstream Vera is a trademark of Bitstream, Inc. +License: + Permission is hereby granted, free of charge, to any person + obtaining a copy of the fonts accompanying this license ("Fonts") + and associated documentation files (the "Font Software"), to + reproduce and distribute the Font Software, including without + limitation the rights to use, copy, merge, publish, distribute, + and/or sell copies of the Font Software, and to permit persons to + whom the Font Software is furnished to do so, subject to the + following conditions: + . + The above copyright and trademark notices and this permission + notice shall be included in all copies of one or more of the Font + Software typefaces. + . + The Font Software may be modified, altered, or added to, and in + particular the designs of glyphs or characters in the Fonts may be + modified and additional glyphs or characters may be added to the + Fonts, only if the fonts are renamed to names not containing + either the words "Bitstream" or the word "Vera". + . + This License becomes null and void to the extent applicable to + Fonts or Font Software that has been modified and is distributed + under the "Bitstream Vera" names. + . + The Font Software may be sold as part of a larger software package + but no copy of one or more of the Font Software typefaces may be + sold by itself. + . + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE + AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER + RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY + GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER + DEALINGS IN THE FONT SOFTWARE. + . + Except as contained in this notice, the names of Gnome, the Gnome + Foundation, and Bitstream Inc., shall not be used in advertising + or otherwise to promote the sale, use or other dealings in this + Font Software without prior written authorization from the Gnome + Foundation or Bitstream Inc., respectively. For further + information, contact: fonts at gnome dot org. -Upstream Author: +Files: lib/matplotlib/mpl-data/fonts/ttf/STIX*.ttf +License: + 1. Permission is hereby granted, free of charge, to any person + obtaining a copy of the STIX Fonts-TM set accompanying this + license (collectively, the "Fonts") and the associated + documentation files (collectively with the Fonts, the "Font + Software"), to reproduce and distribute the Font Software, + including the rights to use, copy, merge and publish copies of the + Font Software, and to permit persons to whom the Font Software is + furnished to do so same, subject to the following terms and + conditions (the "License"). + . + 2. The following copyright and trademark notice and these Terms + and Conditions shall be included in all copies of one or more of + the Font typefaces and any derivative work created as permitted + under this License: + . + Copyright (c) 2001-2005 by the STI Pub Companies, consisting + of the American Institute of Physics, the American Chemical + Society, the American Mathematical Society, the American Physical + Society, Elsevier, Inc., and The Institute of Electrical and + Electronic Engineers, Inc. Portions copyright (c) 1998-2003 by + MicroPress, Inc. Portions copyright (c) 1990 by Elsevier, Inc. All + rights reserved. STIX Fonts-TM is a trademark of The Institute of + Electrical and Electronics Engineers, Inc. + . + 3. You may (a) convert the Fonts from one format to another + (e.g., from TrueType to PostScript), in which case the normal and + reasonable distortion that occurs during such conversion shall be + permitted and (b) embed or include a subset of the Fonts in a + document for the purposes of allowing users to read text in the + document that utilizes the Fonts. In each case, you may use the + STIX Fonts-TM mark to designate the resulting Fonts or subset of + the Fonts. + . + 4. You may also (a) add glyphs or characters to the Fonts, or + modify the shape of existing glyphs, so long as the base set of + glyphs is not removed and (b) delete glyphs or characters from the + Fonts, provided that the resulting font set is distributed with + the following disclaimer: "This [name] font does not include all + the Unicode points covered in the STIX Fonts-TM set but may + include others." In each case, the name used to denote the + resulting font set shall not include the term "STIX" or any + similar term. + . + 5. You may charge a fee in connection with the distribution of + the Font Software, provided that no copy of one or more of the + individual Font typefaces that form the STIX Fonts-TM set may be + sold by itself. + . + 6. THE FONT SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF + ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE + AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK OR OTHER + RIGHT. IN NO EVENT SHALL MICROPRESS OR ANY OF THE STI PUB + COMPANIES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + INCLUDING, BUT NOT LIMITED TO, ANY GENERAL, SPECIAL, INDIRECT, + INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM OR OUT OF THE USE OR + INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE + FONT SOFTWARE. + . + 7. Except as contained in the notice set forth in Section 2, + the names MicroPress Inc. and STI Pub Companies, as well as the + names of the companies/organizations that compose the STI Pub + Companies, shall not be used in advertising or otherwise to + promote the sale, use or other dealings in the Font Software + without the prior written consent of the respective company or + organization. + . + 8. This License shall become null and void in the event of any + material breach of the Terms and Conditions herein by licensee. + . + 9. A substantial portion of the STIX Fonts set was developed by + MicroPress Inc. for the STI Pub Companies. To obtain additional + mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow + Street, Forest Hills, NY 11375, USA - Phone: (718) 575-1816. + +Files: lib/matplotlib/mpl-data/fonts/pdfcorefonts/* +Copyright: Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. + +Files: lib/matplotlib/mpl-data/fonts/afm/pcrro8a.afm +Copyright: Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992 Adobe Systems Incorporated. All Rights Reserved. + +Files: lib/six.py +Author: Benjamin Peterson + +Files: src/nxutils.c +Copyright: Copyright (c) 1970-2003, Wm. Randolph Franklin +License: pnpoly license + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + 1. Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimers. 2. Redistributions in binary form must + reproduce the above copyright notice in the documentation + and/or other materials provided with the distribution. + 3. The name of W. Randolph Franklin may not be used to + endorse or promote products derived from this Software + without specific prior written permission. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + +FileS: src/_subprocess.c +Copyright: Copyright (c) 2004 by Fredrik Lundh + Copyright (c) 2004 by Secret Labs AB, http://www.pythonware.com + Copyright (c) 2004 by Peter Astrand +License: + Permission to use, copy, modify, and distribute this software and + its associated documentation for any purpose and without fee is + hereby granted, provided that the above copyright notice appears in + all copies, and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of the + authors not be used in advertising or publicity pertaining to + distribution of the software without specific, written prior + permission. + . + THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. + IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + . + Licensed to PSF under a Contributor Agreement. + See http://www.python.org/2.4/license for licensing details. + +Files: src/_wxagg.cpp +Author: Ken McIvor +Copyright: Copyright 2005 Illinois Institute of Technology +Comment: Derived from `_gtkagg.cpp', Copyright 2004-2005 John Hunter + +Files: lib/dateutil_py2/* +Copyright: Copyright (c) 2003-2010 Gustavo Niemeyer +License: PSF License + +Files: lib/dateutil_py3/* +Copyright: Copyright (c) 2003-2011 Gustavo Niemeyer + Copyright (c) 2012 - Tomi Pieviläinen +License: Simplified BSD + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - John D. Hunter - -Copyright Holder: - - Copyright (c) 2002-2008 John D. Hunter - -License: - - Matplotlib only uses BSD compatible code, and its license is based - on the PSF license. See the Open Source Initiative licenses page - for details on individual licenses. Non-BSD compatible licenses - (eg LGPL) are acceptable in matplotlib Toolkits. For a discussion - of the motivations behind the licencing choice, see Licenses. - License agreement for matplotlib. - - 1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and - the Individual or Organization ("Licensee") accessing and - otherwise using matplotlib software in source or binary form and - its associated documentation. - - 2. Subject to the terms and conditions of this License Agreement, - JDH hereby grants Licensee a nonexclusive, royalty-free, - world-wide license to reproduce, analyze, test, perform and/or - display publicly, prepare derivative works, distribute, and - otherwise use matplotlib alone or in any derivative version, - provided, however, that JDH’s License Agreement and JDH’s notice - of copyright, i.e., "Copyright (c) 2002-2008 John D. Hunter; All - Rights Reserved" are retained in matplotlib alone or in any - derivative version prepared by Licensee. - - 3. In the event Licensee prepares a derivative work that is based - on or incorporates matplotlib or any part thereof, and wants to - make the derivative work available to others as provided herein, - then Licensee hereby agrees to include in any such work a brief - summary of the changes made to matplotlib. - - 4. JDH is making matplotlib available to Licensee on an ΄AS IS‘ - basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR - IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND - DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR - FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB - WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - - 5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF - MATPLOTLIB FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES - OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING - MATPLOTLIB, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE - POSSIBILITY THEREOF. - - 6. This License Agreement will automatically terminate upon a - material breach of its terms and conditions. - - 7. Nothing in this License Agreement shall be deemed to create any - relationship of agency, partnership, or joint venture between JDH - and Licensee. This License Agreement does not grant permission to - use JDH trademarks or trade name in a trademark sense to endorse - or promote products or services of Licensee, or any third party. - - 8. By copying, installing or otherwise using matplotlib, Licensee - agrees to be bound by the terms and conditions of this License - Agreement. - -The Debian packaging is: - - Copyright (C) 2008-2011 Sandro Tosi - -and is licensed under the same terms as upstream code. - - -These files have different copyright/license notices: - -lib/matplotlib/fontconfig_pattern.py - Author : Michael Droettboom - -lib/matplotlib/backends/backend_fltkagg.py - Copyright: Gregory Lielens, Free Field Technologies SA and - John D. Hunter 2004 - -lib/matplotlib/backends/backend_wxagg.py - Copyright (C) 2003-5 Jeremy O'Donoghue, John Hunter, Illinois Institute of - Technology - -lib/matplotlib/backends/backend_wx.py - Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4 - License: This work is licensed under a PSF compatible license. - -lib/matplotlib/pyparsing.py - # Copyright (c) 2003-2008 Paul T. McGuire - # - # Permission is hereby granted, free of charge, to any person obtaining - # a copy of this software and associated documentation files (the - # "Software"), to deal in the Software without restriction, including - # without limitation the rights to use, copy, modify, merge, publish, - # distribute, sublicense, and/or sell copies of the Software, and to - # permit persons to whom the Software is furnished to do so, subject to - # the following conditions: - # - # The above copyright notice and this permission notice shall be - # included in all copies or substantial portions of the Software. - # - # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -lib/matplotlib/sankey.py - Author: Kevin L. Davies - License: BSD - -lib/matplotlib/table.py - Author : John Gill - Copyright : 2004 John Gill and John Hunter - -lib/matplotlib/delaunay/VoronoiDiagramGenerator.{cpp, h} - /* - * The author of this software is Steven Fortune. Copyright (c) 1994 by AT&T - * Bell Laboratories. - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - */ - - /* - * This code was originally written by Stephan Fortune in C code. I, Shane O'Sullivan, - * have since modified it, encapsulating it in a C++ class and, fixing memory leaks and - * adding accessors to the Voronoi Edges. - * Permission to use, copy, modify, and distribute this software for any - * purpose without fee is hereby granted, provided that this entire notice - * is included in all copies of any software which is or includes a copy - * or modification of this software and in all copies of the supporting - * documentation for such software. - * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY - * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - */ - -lib/matplotlib/delaunay/./__init__.py - Author: Robert Kern - - Copyright: Copyright 2005 Robert Kern. - License: BSD-style license. See LICENSE.txt in the scipy source directory. - -lib/matplotlib/mpl-data/fonts/ttf/(non STIX)*.ttf - Copyright - ========= - - Copyright (c) 2003 by Bitstream, Inc. All Rights - Reserved. Bitstream Vera is a trademark of Bitstream, Inc. - - Permission is hereby granted, free of charge, to any person - obtaining a copy of the fonts accompanying this license ("Fonts") - and associated documentation files (the "Font Software"), to - reproduce and distribute the Font Software, including without - limitation the rights to use, copy, merge, publish, distribute, - and/or sell copies of the Font Software, and to permit persons to - whom the Font Software is furnished to do so, subject to the - following conditions: - - The above copyright and trademark notices and this permission - notice shall be included in all copies of one or more of the Font - Software typefaces. - - The Font Software may be modified, altered, or added to, and in - particular the designs of glyphs or characters in the Fonts may be - modified and additional glyphs or characters may be added to the - Fonts, only if the fonts are renamed to names not containing - either the words "Bitstream" or the word "Vera". - - This License becomes null and void to the extent applicable to - Fonts or Font Software that has been modified and is distributed - under the "Bitstream Vera" names. - - The Font Software may be sold as part of a larger software package - but no copy of one or more of the Font Software typefaces may be - sold by itself. - - THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY - KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY - WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER - RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY - GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER - DEALINGS IN THE FONT SOFTWARE. - - Except as contained in this notice, the names of Gnome, the Gnome - Foundation, and Bitstream Inc., shall not be used in advertising - or otherwise to promote the sale, use or other dealings in this - Font Software without prior written authorization from the Gnome - Foundation or Bitstream Inc., respectively. For further - information, contact: fonts at gnome dot org. - -lib/matplotlib/mpl-data/fonts/ttf/STIX*.ttf - License: - - 1. Permission is hereby granted, free of charge, to any person - obtaining a copy of the STIX Fonts-TM set accompanying this - license (collectively, the "Fonts") and the associated - documentation files (collectively with the Fonts, the "Font - Software"), to reproduce and distribute the Font Software, - including the rights to use, copy, merge and publish copies of the - Font Software, and to permit persons to whom the Font Software is - furnished to do so same, subject to the following terms and - conditions (the "License"). - - 2. The following copyright and trademark notice and these Terms - and Conditions shall be included in all copies of one or more of - the Font typefaces and any derivative work created as permitted - under this License: - - Copyright (c) 2001-2005 by the STI Pub Companies, consisting - of the American Institute of Physics, the American Chemical - Society, the American Mathematical Society, the American Physical - Society, Elsevier, Inc., and The Institute of Electrical and - Electronic Engineers, Inc. Portions copyright (c) 1998-2003 by - MicroPress, Inc. Portions copyright (c) 1990 by Elsevier, Inc. All - rights reserved. STIX Fonts-TM is a trademark of The Institute of - Electrical and Electronics Engineers, Inc. - - 3. You may (a) convert the Fonts from one format to another - (e.g., from TrueType to PostScript), in which case the normal and - reasonable distortion that occurs during such conversion shall be - permitted and (b) embed or include a subset of the Fonts in a - document for the purposes of allowing users to read text in the - document that utilizes the Fonts. In each case, you may use the - STIX Fonts-TM mark to designate the resulting Fonts or subset of - the Fonts. - - 4. You may also (a) add glyphs or characters to the Fonts, or - modify the shape of existing glyphs, so long as the base set of - glyphs is not removed and (b) delete glyphs or characters from the - Fonts, provided that the resulting font set is distributed with - the following disclaimer: "This [name] font does not include all - the Unicode points covered in the STIX Fonts-TM set but may - include others." In each case, the name used to denote the - resulting font set shall not include the term "STIX" or any - similar term. - - 5. You may charge a fee in connection with the distribution of - the Font Software, provided that no copy of one or more of the - individual Font typefaces that form the STIX Fonts-TM set may be - sold by itself. - - 6. THE FONT SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY - WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE - AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK OR OTHER - RIGHT. IN NO EVENT SHALL MICROPRESS OR ANY OF THE STI PUB - COMPANIES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - INCLUDING, BUT NOT LIMITED TO, ANY GENERAL, SPECIAL, INDIRECT, - INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF - CONTRACT, TORT OR OTHERWISE, ARISING FROM OR OUT OF THE USE OR - INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE - FONT SOFTWARE. - - 7. Except as contained in the notice set forth in Section 2, - the names MicroPress Inc. and STI Pub Companies, as well as the - names of the companies/organizations that compose the STI Pub - Companies, shall not be used in advertising or otherwise to - promote the sale, use or other dealings in the Font Software - without the prior written consent of the respective company or - organization. - - 8. This License shall become null and void in the event of any - material breach of the Terms and Conditions herein by licensee. - - 9. A substantial portion of the STIX Fonts set was developed by - MicroPress Inc. for the STI Pub Companies. To obtain additional - mathematical fonts, please contact MicroPress, Inc., 68-30 Harrow - Street, Forest Hills, NY 11375, USA - Phone: (718) 575-1816. - -lib/matplotlib/mpl-data/fonts/pdfcorefonts/* - Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. - -lib/matplotlib/mpl-data/fonts/afm/pcrro8a.afm - Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992 Adobe Systems Incorporated. All Rights Reserved. - -src/nxutils.c - pnpoly license - Copyright (c) 1970-2003, Wm. Randolph Franklin - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - 1. Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimers. 2. Redistributions in binary form must - reproduce the above copyright notice in the documentation - and/or other materials provided with the distribution. - 3. The name of W. Randolph Franklin may not be used to - endorse or promote products derived from this Software - without specific prior written permission. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. */ - -src/_subprocess.c - /* - * support routines for subprocess module - * - * Currently, this extension module is only required when using the - * subprocess module on Windows, but in the future, stubs for other - * platforms might be added here as well. - * - * Copyright (c) 2004 by Fredrik Lundh - * Copyright (c) 2004 by Secret Labs AB, http://www.pythonware.com - * Copyright (c) 2004 by Peter Astrand - * - * By obtaining, using, and/or copying this software and/or its - * associated documentation, you agree that you have read, understood, - * and will comply with the following terms and conditions: - * - * Permission to use, copy, modify, and distribute this software and - * its associated documentation for any purpose and without fee is - * hereby granted, provided that the above copyright notice appears in - * all copies, and that both that copyright notice and this permission - * notice appear in supporting documentation, and that the name of the - * authors not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior - * permission. - * - * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION - * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - - /* Licensed to PSF under a Contributor Agreement. */ - /* See http://www.python.org/2.4/license for licensing details. */ - -src/_wxagg.cpp - // Purpose: Accelerate WXAgg by doing the agg->wxWidgets conversions in C++. - // Author: Ken McIvor - // - // Copyright 2005 Illinois Institute of Technology - // Derived from `_gtkagg.cpp', Copyright 2004-2005 John Hunter - // - // See the file "LICENSE" for information on usage and redistribution - // of this file, and for a DISCLAIMER OF ALL WARRANTIES. - -lib/dateutil/* - Copyright (c) 2003-2005 Gustavo Niemeyer - __author__ = "Gustavo Niemeyer " - __license__ = "PSF License" - -ttconv/* - /* - * Modified for use within matplotlib - * 5 July 2007 - * Michael Droettboom - */ - - /* - ** ~ppr/src/include/global_defines.h - ** Copyright 1995, Trinity College Computing Center. - ** Written by David Chappell. - ** - ** Permission to use, copy, modify, and distribute this software and its - ** documentation for any purpose and without fee is hereby granted, provided - ** that the above copyright notice appear in all copies and that both that - ** copyright notice and this permission notice appear in supporting - ** documentation. This software and documentation are provided "as is" without - ** express or implied warranty. - ** - ** The PPR project was begun 28 December 1992. - ** - ** There are many things in this file you may want to change. This file - ** should be the first include file. It is the header file for the whole - ** project. - ** - ** This file was last modified 22 December 1995. - */ - -CXX/* - // Copyright (c) 1998 - 2007, The Regents of the University of California - // Produced at the Lawrence Livermore National Laboratory - // All rights reserved. - // - // This file is part of PyCXX. For details,see http://cxx.sourceforge.net/. The - // full copyright notice is contained in the file COPYRIGHT located at the root - // of the PyCXX distribution. - // - // Redistribution and use in source and binary forms, with or without - // modification, are permitted provided that the following conditions are met: - // - // - Redistributions of source code must retain the above copyright notice, - // this list of conditions and the disclaimer below. - // - Redistributions in binary form must reproduce the above copyright notice, - // this list of conditions and the disclaimer (as noted below) in the - // documentation and/or materials provided with the distribution. - // - Neither the name of the UC/LLNL nor the names of its contributors may be - // used to endorse or promote products derived from this software without - // specific prior written permission. - // - // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF - // CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR - // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - // DAMAGE. - -agg24/* - //---------------------------------------------------------------------------- - // Anti-Grain Geometry - Version 2.4 - // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) - // - // Permission to copy, use, modify, sell and distribute this software - // is granted provided this copyright notice appears in all copies. - // This software is provided "as is" without express or implied - // warranty, and with no claim as to its suitability for any purpose. - // - //---------------------------------------------------------------------------- - // Contact: mcseem@antigrain.com - // mcseemagg@yahoo.com - // http://www.antigrain.com - //---------------------------------------------------------------------------- +Files: ttconv/* +Copyright: Copyright 1995, Trinity College Computing Center. Written by David Chappell. +License: + Permission to use, copy, modify, and distribute this software and its + documentation for any purpose and without fee is hereby granted, provided + that the above copyright notice appear in all copies and that both that + copyright notice and this permission notice appear in supporting + documentation. This software and documentation are provided "as is" without + express or implied warranty. + +Files: CXX/* +Copyright: Copyright (c) 1998 - 2007, The Regents of the University of California + Produced at the Lawrence Livermore National Laboratory + All rights reserved. +License: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the disclaimer below. + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the disclaimer (as noted below) in the + documentation and/or materials provided with the distribution. + - Neither the name of the UC/LLNL nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF + CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + +Files: agg24/* +Copyright: Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) +License: + Permission to copy, use, modify, sell and distribute this software + is granted provided this copyright notice appears in all copies. + This software is provided "as is" without express or implied + warranty, and with no claim as to its suitability for any purpose. diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/10_build_fix.patch matplotlib-1.2.0/debian/patches/10_build_fix.patch --- matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/10_build_fix.patch 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/debian/patches/10_build_fix.patch 2011-09-26 21:50:33.000000000 +0000 @@ -0,0 +1,45 @@ +Description: Fixes path for build on Debian +Forwarded: no +Author: Sandro Tosi +Last-Update: 2010-02-06 + +Index: matplotlib-1.1.0~rc1/setupext.py +=================================================================== +--- matplotlib-1.1.0~rc1.orig/setupext.py 2011-09-24 17:08:27.000000000 +0200 ++++ matplotlib-1.1.0~rc1/setupext.py 2011-09-26 23:37:43.195196916 +0200 +@@ -50,13 +50,13 @@ + + basedir = { + 'win32' : ['win32_static',], +- 'linux2-alpha' : ['/usr/local', '/usr'], +- 'linux2-hppa' : ['/usr/local', '/usr'], +- 'linux2-mips' : ['/usr/local', '/usr'], +- 'linux2-sparc' : ['/usr/local', '/usr'], +- 'linux2' : ['/usr/local', '/usr'], +- 'linux3' : ['/usr/local', '/usr'], +- 'linux' : ['/usr/local', '/usr',], ++ 'linux2-alpha' : ['/usr'], ++ 'linux2-hppa' : ['/usr'], ++ 'linux2-mips' : ['/usr'], ++ 'linux2-sparc' : ['/usr'], ++ 'linux2' : ['/usr'], ++ 'linux3' : ['/usr'], ++ 'linux' : ['/usr',], + 'cygwin' : ['/usr/local', '/usr',], + '_darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local', + '/usr', '/sw'], +@@ -71,10 +71,10 @@ + 'freebsd5' : ['/usr/local', '/usr'], + 'freebsd6' : ['/usr/local', '/usr'], + 'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',], +- 'gnukfreebsd5' : ['/usr/local', '/usr'], +- 'gnukfreebsd6' : ['/usr/local', '/usr'], +- 'gnukfreebsd7' : ['/usr/local', '/usr'], +- 'gnukfreebsd8' : ['/usr/local', '/usr'], ++ 'gnukfreebsd5' : ['/usr'], ++ 'gnukfreebsd6' : ['/usr'], ++ 'gnukfreebsd7' : ['/usr'], ++ 'gnukfreebsd8' : ['/usr'], + 'gnu0' : ['/usr'], + 'aix5' : ['/usr/local'], + } diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/20_matplotlibrc_path_search_fix.patch matplotlib-1.2.0/debian/patches/20_matplotlibrc_path_search_fix.patch --- matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/20_matplotlibrc_path_search_fix.patch 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/debian/patches/20_matplotlibrc_path_search_fix.patch 2011-09-26 21:50:33.000000000 +0000 @@ -0,0 +1,31 @@ +Description: Fixes the path to search for matplotlibrc file +Forwarded: not-needed +Author: Sandro Tosi + +Index: matplotlib-1.1.0~rc1/lib/matplotlib/__init__.py +=================================================================== +--- matplotlib-1.1.0~rc1.orig/lib/matplotlib/__init__.py 2011-09-24 17:08:26.000000000 +0200 ++++ matplotlib-1.1.0~rc1/lib/matplotlib/__init__.py 2011-09-26 23:45:59.369692360 +0200 +@@ -485,10 +485,12 @@ + raise RuntimeError('Path in environment MATPLOTLIBDATA not a directory') + return path + +- path = os.sep.join([os.path.dirname(__file__), 'mpl-data']) ++ path = '/usr/share/matplotlib/mpl-data' + if os.path.isdir(path): + return path + ++ raise RuntimeError('Could not find the matplotlib data files') ++ + # setuptools' namespace_packages may highjack this init file + # so need to try something known to be in matplotlib, not basemap + import matplotlib.afm +@@ -596,7 +598,7 @@ + if os.path.exists(fname): return fname + + +- path = get_data_path() # guaranteed to exist or raise ++ path = '/etc' # guaranteed to exist or raise + fname = os.path.join(path, 'matplotlibrc') + if not os.path.exists(fname): + warnings.warn('Could not find matplotlibrc; using defaults') diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/40_bts608939_draw_markers_description.patch matplotlib-1.2.0/debian/patches/40_bts608939_draw_markers_description.patch --- matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/40_bts608939_draw_markers_description.patch 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/debian/patches/40_bts608939_draw_markers_description.patch 2011-09-26 21:50:33.000000000 +0000 @@ -0,0 +1,16 @@ +Description: minor glitch in draw_markers() description +Author: Jakub Wilk + +Index: matplotlib-1.1.0~rc1/doc/api/api_changes.rst +=================================================================== +--- matplotlib-1.1.0~rc1.orig/doc/api/api_changes.rst 2011-09-24 17:08:26.000000000 +0200 ++++ matplotlib-1.1.0~rc1/doc/api/api_changes.rst 2011-09-26 23:46:20.508264962 +0200 +@@ -569,7 +569,7 @@ + + * :meth:`draw_markers(self, gc, marker_path, marker_trans, path, + trans, rgbFace) +- ` + + * :meth:`draw_path_collection(self, master_transform, cliprect, + clippath, clippath_trans, paths, all_transforms, offsets, diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/50_bts608942_spaces_in_param_args.patch matplotlib-1.2.0/debian/patches/50_bts608942_spaces_in_param_args.patch --- matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/50_bts608942_spaces_in_param_args.patch 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/debian/patches/50_bts608942_spaces_in_param_args.patch 2011-09-26 21:50:33.000000000 +0000 @@ -0,0 +1,51 @@ +Description: don't separate param and its argument with a space + +Index: matplotlib-1.1.0~rc1/lib/mpl_toolkits/axes_grid1/axes_divider.py +=================================================================== +--- matplotlib-1.1.0~rc1.orig/lib/mpl_toolkits/axes_grid1/axes_divider.py 2011-09-24 17:08:27.000000000 +0200 ++++ matplotlib-1.1.0~rc1/lib/mpl_toolkits/axes_grid1/axes_divider.py 2011-09-26 23:46:30.091617839 +0200 +@@ -199,12 +199,12 @@ + def locate(self, nx, ny, nx1=None, ny1=None, axes=None, renderer=None): + """ + +- :param nx, nx1: Integers specifying the column-position of the ++ :param nx,nx1: Integers specifying the column-position of the + cell. When nx1 is None, a single nx-th column is + specified. Otherwise location of columns spanning between nx + to nx1 (but excluding nx1-th column) is specified. + +- :param ny, ny1: same as nx and nx1, but for row positions. ++ :param ny,ny1: same as nx and nx1, but for row positions. + """ + + +@@ -251,12 +251,12 @@ + (:class:`mpl_toolkits.axes_grid.axes_divider.AxesLocator`) for + specified cell. + +- :param nx, nx1: Integers specifying the column-position of the ++ :param nx,nx1: Integers specifying the column-position of the + cell. When nx1 is None, a single nx-th column is + specified. Otherwise location of columns spanning between nx + to nx1 (but excluding nx1-th column) is specified. + +- :param ny, ny1: same as nx and nx1, but for row positions. ++ :param ny,ny1: same as nx and nx1, but for row positions. + """ + return AxesLocator(self, nx, ny, nx1, ny1) + +@@ -297,12 +297,12 @@ + """ + :param axes_divider: An instance of AxesDivider class. + +- :param nx, nx1: Integers specifying the column-position of the ++ :param nx,nx1: Integers specifying the column-position of the + cell. When nx1 is None, a single nx-th column is + specified. Otherwise location of columns spanning between nx + to nx1 (but excluding nx1-th column) is is specified. + +- :param ny, ny1: same as nx and nx1, but for row positions. ++ :param ny,ny1: same as nx and nx1, but for row positions. + """ + self._axes_divider = axes_divider + diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/60_bts691960_reintroduce_examples.directory_rcparam.patch matplotlib-1.2.0/debian/patches/60_bts691960_reintroduce_examples.directory_rcparam.patch --- matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/60_bts691960_reintroduce_examples.directory_rcparam.patch 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/debian/patches/60_bts691960_reintroduce_examples.directory_rcparam.patch 2012-11-10 22:01:43.000000000 +0000 @@ -0,0 +1,81 @@ +Description: Reintroduce examples.directory rc parameter +Forwarded: https://github.com/matplotlib/matplotlib/pull/1479 +Bug-Debian: http://bugs.debian.org/691960 +Author: Sandro Tosi + +--- a/lib/matplotlib/__init__.py ++++ b/lib/matplotlib/__init__.py +@@ -825,6 +825,20 @@ Please do not ask for support with these + # this is the instance used by the matplotlib classes + rcParams = rc_params() + ++if rcParams['examples.directory']: ++ # paths that are intended to be relative to matplotlib_fname() ++ # are allowed for the examples.directory parameter. ++ # However, we will need to fully qualify the path because ++ # Sphinx requires absolute paths. ++ if not os.path.isabs(rcParams['examples.directory']): ++ _basedir, _fname = os.path.split(matplotlib_fname()) ++ # Sometimes matplotlib_fname() can return relative paths, ++ # Also, using realpath() guarentees that Sphinx will use ++ # the same path that matplotlib sees (in case of weird symlinks). ++ _basedir = os.path.realpath(_basedir) ++ _fullpath = os.path.join(_basedir, rcParams['examples.directory']) ++ rcParams['examples.directory'] = _fullpath ++ + rcParamsOrig = rcParams.copy() + + rcParamsDefault = RcParams([ (key, default) for key, (default, converter) in \ +--- a/lib/matplotlib/cbook.py ++++ b/lib/matplotlib/cbook.py +@@ -21,6 +21,7 @@ import traceback + import warnings + from weakref import ref, WeakKeyDictionary + ++import matplotlib + + import numpy as np + import numpy.ma as ma +@@ -570,9 +571,17 @@ def get_sample_data(fname, asfileobj=Tru + `mpl-data/sample_data` directory. If *asfileobj* is `True` + return a file object, otherwise just a file path. + ++ Set the rc parameter examples.directory to the directory where we should ++ look, if sample_data files are stored in a location different than ++ default (which is 'mpl-data/sample_data` at the same level of 'matplotlib` ++ Python module files). ++ + If the filename ends in .gz, the file is implicitly ungzipped. + """ +- root = os.path.join(os.path.dirname(__file__), "mpl-data", "sample_data") ++ if matplotlib.rcParams['examples.directory']: ++ root = matplotlib.rcParams['examples.directory'] ++ else: ++ root = os.path.join(os.path.dirname(__file__), "mpl-data", "sample_data") + path = os.path.join(root, fname) + + if asfileobj: +--- a/lib/matplotlib/rcsetup.py ++++ b/lib/matplotlib/rcsetup.py +@@ -616,6 +616,9 @@ defaultParams = { + 'keymap.xscale' : [['k', 'L'], validate_stringlist], + 'keymap.all_axes' : ['a', validate_stringlist], + ++ # sample data ++ 'examples.directory' : ['', str], ++ + # Animation settings + 'animation.writer' : ['ffmpeg', validate_movie_writer], + 'animation.codec' : ['mpeg4', str], +--- a/matplotlibrc.template ++++ b/matplotlibrc.template +@@ -423,6 +423,9 @@ text.hinting_factor : 8 # Specifies the + #keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear') + #keymap.all_axes : a # enable all axes + ++# Control location of examples data files ++examples.directory : /usr/share/matplotlib/sample_data ++ + ###ANIMATION settings + #animation.writer : ffmpeg # MovieWriter 'backend' to use + #animation.codec : mp4 # Codec to use for writing movie diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/series matplotlib-1.2.0/debian/patches/series --- matplotlib-1.2.0~1+6455+16~quantal1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ matplotlib-1.2.0/debian/patches/series 2012-11-10 22:01:43.000000000 +0000 @@ -0,0 +1,5 @@ +#10_build_fix.patch +20_matplotlibrc_path_search_fix.patch +40_bts608939_draw_markers_description.patch +50_bts608942_spaces_in_param_args.patch +60_bts691960_reintroduce_examples.directory_rcparam.patch diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/python-matplotlib-data.install matplotlib-1.2.0/debian/python-matplotlib-data.install --- matplotlib-1.2.0~1+6455+16~quantal1/debian/python-matplotlib-data.install 2013-01-24 01:34:16.000000000 +0000 +++ matplotlib-1.2.0/debian/python-matplotlib-data.install 2012-09-22 19:50:14.000000000 +0000 @@ -2,5 +2,6 @@ lib/matplotlib/mpl-data/fonts/ /usr/share/matplotlib/mpl-data/ lib/matplotlib/mpl-data/images/ /usr/share/matplotlib/mpl-data/ lib/matplotlib/mpl-data/lineprops.glade /usr/share/matplotlib/mpl-data/ +matplotlibrc.template /usr/share/matplotlib/matplotlib.conf lib/matplotlib/mpl-data/matplotlibrc /etc/ -sampledata/ /usr/share/matplotlib/ +lib/matplotlib/mpl-data/sample_data/ /usr/share/matplotlib/ diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/rules matplotlib-1.2.0/debian/rules --- matplotlib-1.2.0~1+6455+16~quantal1/debian/rules 2013-01-24 01:34:16.000000000 +0000 +++ matplotlib-1.2.0/debian/rules 2012-11-09 19:21:50.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/make -f -PYVERS := $(shell pyversions -v -r debian/control) +PY2VERS := $(shell pyversions -v -r debian/control) PY3VERS := $(shell py3versions -v -r debian/control) DEFPY := $(shell pyversions -v -d) PY_PLATFORM := $(shell python -c 'from distutils.util import get_platform; print get_platform()') @@ -18,17 +18,13 @@ build-indep-stamp: $(DEFPY:%=build-%-stamp) dh_testdir - # add information to use local copy of 'sampledata' and bypass downloading - echo "examples.download : False" >> $(CURDIR)/doc/matplotlibrc - echo "examples.directory : $(CURDIR)/sampledata" >> $(CURDIR)/doc/matplotlibrc - # build the doc - -( cd doc ; MATPLOTLIBDATA=../lib/matplotlib/mpl-data/ \ + -( cd doc ; MPLCONFIGDIR=. MATPLOTLIBDATA=../lib/matplotlib/mpl-data/ \ PYTHONPATH=../build/lib.$(PY_PLATFORM)-$(DEFPY) ./make.py --small all ) touch $@ -build-arch: $(PYVERS:%=build-%-stamp) $(PY3VERS:%=build-%-stamp) +build-arch: $(PY2VERS:%=build-%-stamp) $(PY3VERS:%=build-%-stamp) build-%-stamp: dh_testdir @@ -37,12 +33,27 @@ python$* ./setup.py build $(PY_BUILD_FLAGS) python$*-dbg ./setup.py build $(PY_BUILD_FLAGS) -#ifeq (,$(findstring notest,$(DEB_BUILD_OPTIONS))) -# LIB=$$(python$$* -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_purelib") -# PYTHONPATH=$$LIB python$* -c "import matplotlib as m ; m.test(verbosity=1)" -# LIB=$$(python$$*-dbg -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_purelib") -# PYTHONPATH=$$LIB python$*-dbg -c "import matplotlib as m ; m.test(verbosity=1)" -#endif +ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) + echo "backend : TkAgg" > matplotlibrc + -PYTHONPATH=$(shell python$* -c "from distutils.command.build import build ; \ + from distutils.core import Distribution ; \ + b = build(Distribution()) ; \ + b.finalize_options() ; \ + print(b.build_platlib)") \ + MATPLOTLIBDATA=$(CURDIR)/lib/matplotlib/mpl-data/ \ + MPLCONFIGDIR=. \ + xvfb-run python$* -c "import matplotlib as m ; m.test(verbosity=1)" + + -PYTHONPATH=$(shell python$*-dbg -c "from distutils.command.build import build ; \ + from distutils.core import Distribution ; \ + b = build(Distribution()) ; \ + b.finalize_options() ; \ + print(b.build_platlib)") \ + MATPLOTLIBDATA=$(CURDIR)/lib/matplotlib/mpl-data/ \ + MPLCONFIGDIR=. \ + xvfb-run python$*-dbg -c "import matplotlib as m ; m.test(verbosity=1)" + rm -f matplotlibrc +endif touch $@ @@ -52,12 +63,7 @@ dh_testdir dh_testroot - for i in $(PYVERS); do \ - python$(i) ./setup.py clean --all; \ - python$(i)-dbg ./setup.py clean --all; \ - done - - for i in $(PY3VERS); do \ + for i in $(PY2VERS) $(PY3VERS); do \ python$(i) ./setup.py clean --all; \ python$(i)-dbg ./setup.py clean --all; \ done @@ -86,9 +92,11 @@ sed -i '/^examples\./d' $(CURDIR)/doc/matplotlibrc # install -install-arch: build-arch $(PYVERS:%=install-%-stamp) $(PY3VERS:%=install-py3-%-stamp) +install-arch: build-arch $(PY2VERS:%=install-%-stamp) $(PY3VERS:%=install-py3-%-stamp) dh_testdir dh_testroot + dh_numpy + dh_numpy3 install-%-stamp: build-%-stamp dh_testdir @@ -151,10 +159,10 @@ rm -fr $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/pdfcorefonts/readme.txt chmod 644 $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/images/*.svg # link to fonts in ttf-lyx - ln -sf /usr/share/fonts/truetype/ttf-lyx/cmex10.ttf $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf - ln -sf /usr/share/fonts/truetype/ttf-lyx/cmmi10.ttf $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf - ln -sf /usr/share/fonts/truetype/ttf-lyx/cmr10.ttf $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/cmr10.ttf - ln -sf /usr/share/fonts/truetype/ttf-lyx/cmsy10.ttf $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf + for font in cmex10.ttf cmmi10.ttf cmr10.ttf cmsy10.ttf ; \ + do \ + ln -sf /usr/share/fonts/truetype/lyx/$$font $(CURDIR)/debian/$(pdata)/usr/share/matplotlib/mpl-data/fonts/ttf/$$font; \ + done # binary binary-indep: build-indep install-indep @@ -166,9 +174,8 @@ find $(CURDIR)/debian/$(pd)/ -type f -name '*.pyc' | xargs rm -f dh_installexamples -p$(pd) -i examples/* dh_compress -i -Xexamples -Xexamples/data -Xpdf -X.js -Xobjects.inv - ln -sf /usr/share/javascript/jquery/jquery.js \ - $(CURDIR)/debian/$(pd)/usr/share/doc/python-matplotlib-doc/html/_static/jquery.js dh_link -i + dh_sphinxdoc dh_lintian -i dh_fixperms -i dh_installdeb -i @@ -180,7 +187,7 @@ dh_testdir -a dh_testroot -a dh_installchangelogs -a CHANGELOG - dh_installdocs -p$(p) -a README.rst TODO + dh_installdocs -p$(p) -a README.txt TODO # make python scripts starting with '#!' executable for i in `find debian -mindepth 2 -type f ! -perm 755`; do \ if head -1 $$i | grep -q '^#!'; then \ diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/source/format matplotlib-1.2.0/debian/source/format --- matplotlib-1.2.0~1+6455+16~quantal1/debian/source/format 2013-06-22 11:48:40.356465255 +0000 +++ matplotlib-1.2.0/debian/source/format 2013-06-22 11:48:41.856531296 +0000 @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/debian/watch matplotlib-1.2.0/debian/watch --- matplotlib-1.2.0~1+6455+16~quantal1/debian/watch 2013-01-24 01:34:16.000000000 +0000 +++ matplotlib-1.2.0/debian/watch 2012-09-17 22:00:54.000000000 +0000 @@ -1,2 +1,3 @@ version=3 -http://sf.net/matplotlib/matplotlib-([0-9]+(?:\.[0-9]+)*)\.tar\.gz +opts="uversionmangle=s/rc/~rc/" \ +https://github.com/matplotlib/matplotlib/downloads .*/matplotlib-(.*).tar.gz diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/doc/README.txt matplotlib-1.2.0/doc/README.txt --- matplotlib-1.2.0~1+6455+16~quantal1/doc/README.txt 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/doc/README.txt 2012-08-28 16:32:45.000000000 +0000 @@ -39,15 +39,6 @@ then run "python make.py html" again. The top file of the results will be ./build/html/index.html -Note that Sphinx uses the installed version of the package to build -the documentation, so matplotlib must be installed *before* the docs -can be generated. Even if that is the case, one of the files needed -to do this, '../lib/matplotlib/mpl-data/matplotlibrc', is not version -controlled, but created when matplotlib is built. This means that the -documentation cannot be generated immediately after checking out the -source code, even if matplotlib is installed on your system: you will -have to run ``python setup.py build`` first. - To build a smaller version of the documentation (without high-resolution PNGs and PDF examples), type "python make.py --small html". diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/doc/_static/mpl.css matplotlib-1.2.0/doc/_static/mpl.css --- matplotlib-1.2.0~1+6455+16~quantal1/doc/_static/mpl.css 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/doc/_static/mpl.css 2012-08-28 16:29:54.000000000 +0000 @@ -505,33 +505,3 @@ ul.keywordmatches li.goodmatch a { font-weight: bold; } - -table.docutils { - border-spacing: 2px; - border: collapse; - border-top-width: 1px; - border-right-width: 0px; - border-bottom-width: 1px; - border-left-width: 0px; -} - -table.docutils tr:nth-child(even) { - background-color: #F3F3FF; -} -table.docutils tr:nth-child(odd) { - background-color: #FFFFEE; -} - -table.docutils tr { - border-style: solid none solid none; - border-width: 1px 0 1px 0; - border-color: #AAAAAA; -} - -table.docutils th { - padding: 1px 8px 1px 5px; -} - -table.docutils td { - border-width: 1px 0 1px 0; -} diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/doc/_templates/citing.html matplotlib-1.2.0/doc/_templates/citing.html --- matplotlib-1.2.0~1+6455+16~quantal1/doc/_templates/citing.html 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/doc/_templates/citing.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -{% extends "layout.html" %} -{% set title = "Citing matplotlib" %} -{% block body %} - -

Citing matplotlib

-

-If matplotlib contributes to a project that leads to a scientific publication, -please acknowledge this fact by citing the project. You can use this -BibTeX entry: -

-
-@Article{Hunter:2007,
-  Author    = {Hunter, J. D.},
-  Title     = {Matplotlib: A 2D graphics environment},
-  Journal   = {Computing In Science \& Engineering},
-  Volume    = {9},
-  Number    = {3},
-  Pages     = {90--95},
-  abstract  = {Matplotlib is a 2D graphics package used for Python
-  for application development, interactive scripting, and
-  publication-quality image generation across user
-  interfaces and operating systems.},
-  publisher = {IEEE COMPUTER SOC},
-  year      = 2007
-}
-
-{% endblock %} diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/doc/_templates/index.html matplotlib-1.2.0/doc/_templates/index.html --- matplotlib-1.2.0~1+6455+16~quantal1/doc/_templates/index.html 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/doc/_templates/index.html 2012-11-08 02:24:13.000000000 +0000 @@ -3,6 +3,40 @@ {% block body %} + + + + Fork me on GitHub

John Hunter (1968-2012)

@@ -68,9 +102,8 @@

Download

- Visit the - matplotlib downloads - page. + Matplotlib is available for +download.

Documentation

@@ -107,7 +140,7 @@

Check the faq, the api docs, -mailing +mailing list archives, and join the matplotlib mailing lists. Check out the matplotlib questions @@ -140,18 +173,6 @@ pathto('mpl_toolkits/axes_grid/index') }}">axes_grid and more.

-

Citing matplotlib

- -

- matplotlib is the brainchild of John Hunter (1968-2012), who has put an - inordinate amount of effort into producing a piece of software utilized by - thousands of scientists worldwide. - - If matplotlib contributes to a project that leads to a scientific publication, - please acknowledge this fact by citing the project. You can use this - ready-made citation entry. -

-

Open source

Please diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/doc/_templates/layout.html matplotlib-1.2.0/doc/_templates/layout.html --- matplotlib-1.2.0~1+6455+16~quantal1/doc/_templates/layout.html 2013-01-24 01:34:08.000000000 +0000 +++ matplotlib-1.2.0/doc/_templates/layout.html 2012-08-28 16:31:21.000000000 +0000 @@ -1,44 +1,11 @@ {% extends "!layout.html" %} - {% block rootrellink %}

  • home
  • -
  • downloads
  • search
  • examples
  • gallery
  • -
  • citation
  • docs »
  • {% endblock %} @@ -65,20 +32,14 @@ - - - - - -
    matplotlib
    - {{ super() }} {% endblock %} {# put the sidebar before the body #} {% block sidebar1 %}{{ sidebar() }}{% endblock %} {% block sidebar2 %}{% endblock %} + diff -Nru matplotlib-1.2.0~1+6455+16~quantal1/doc/api/api_changes.rst matplotlib-1.2.0/doc/api/api_changes.rst --- matplotlib-1.2.0~1+6455+16~quantal1/doc/api/api_changes.rst 2013-01-24 01:34:18.000000000 +0000 +++ matplotlib-1.2.0/doc/api/api_changes.rst 2012-11-08 13:38:03.000000000 +0000 @@ -11,22 +11,6 @@ For new features that were added to matplotlib, please see :ref:`whats-new`. - -Changes in 1.3.x -================ - -* Removed call of :meth:`~matplotlib.axes.Axes.grid` in - :meth:`~matplotlib.pyplot.plotfile`. To draw the axes grid, set to *True* - matplotlib.rcParams['axes.grid'] or ``axes.grid`` in ``.matplotlibrc`` or - explicitly call :meth:`~matplotlib.axes.Axes.grid` - -* A new keyword *extendrect* in :meth:`~matplotlib.pyplot.colorbar` and - :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape - of colorbar extensions. - -* The `~matplotlib.mpl` module is now deprecated. Those who relied on this - module should transition to simply using `import matplotlib as mpl`. - Changes in 1.2.x ================ @@ -82,7 +66,7 @@ projection = kwargs.pop('projection', None) if ispolar: if projection is not None and projection != 'polar': - raise ValueError('polar and projection args are inconsistent') + raise ValuError('polar and projection args are inconsistent') projection = 'polar' ax = projection_factory(projection, self, rect, **kwargs) key = self._make_key(*args, **kwargs) @@ -731,7 +715,7 @@ * :meth:`draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace) - ` +