diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 000000000000..e9d977b47f8c --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,182 @@ +# With infos from +# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/ +# https://packaging.python.org/en/latest/appveyor/ +# https://github.com/rmcgibbo/python-appveyor-conda-example + +# Backslashes in quotes need to be escaped: \ -> "\\" +branches: + except: + - /auto-backport-.*/ + +environment: + + global: + # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the + # /E:ON and /V:ON options are not enabled in the batch script intepreter + # See: http://stackoverflow.com/a/13751649/163740 + CMD_IN_ENV: cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd + # Workaround for https://github.com/conda/conda-build/issues/636 + PYTHONIOENCODING: UTF-8 + PYTEST_ARGS: -rawR --timeout=300 --durations=25 --cov-report= --cov=lib -m "not network" + PYTHONHASHSEED: 0 # Workaround for pytest-xdist flaky collection order + # https://github.com/pytest-dev/pytest/issues/920 + # https://github.com/pytest-dev/pytest/issues/1075 + + matrix: + # for testing purpose: numpy 1.8 on py2.7, for the rest use 1.10/latest + # theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit, + # one for 64bit because we construct envs anyway. But using one for the + # right python version is hopefully making it fast due to package caching. + - TARGET_ARCH: "x64" + CONDA_PY: "27" + CONDA_NPY: "18" + PYTHON_VERSION: "2.7" + TEST_ALL: "no" + CONDA_INSTALL_LOCN: "C:\\Miniconda-x64" + - TARGET_ARCH: "x64" + CONDA_PY: "35" + CONDA_NPY: "110" + PYTHON_VERSION: "3.5" + CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64" + TEST_ALL: "no" + - TARGET_ARCH: "x64" + CONDA_PY: "36" + PYTHON_VERSION: "3.6" + CONDA_NPY: "111" + CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64" + TEST_ALL: "no" + +# We always use a 64-bit machine, but can build x86 distributions +# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV). +platform: + - x64 + +# all our python builds have to happen in tests_script... +build: false + +cache: + - '%LOCALAPPDATA%\pip\Cache' + - '%USERPROFILE%\.cache\matplotlib' + +init: + - echo %PYTHON_VERSION% %CONDA_INSTALL_LOCN% + +install: + - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%; + - set PYTHONUNBUFFERED=1 + # for obvci_appveyor_python_build_env.cmd + - conda update --all --yes + - conda install anaconda-client=1.6.3 --yes + - conda install -c conda-forge --yes obvious-ci + # for msinttypes and newer stuff + - conda config --prepend channels conda-forge + - conda config --set show_channel_urls yes + - conda config --set always_yes true + # For building conda packages + - conda install --yes conda-build jinja2 anaconda-client + # this is now the downloaded conda... + - conda info -a + + # Fix the appveyor build environment to work with conda build + # workaround for missing vcvars64.bat in py34 64bit + - copy ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64" + + # For building, use a new environment which only includes the requirements for mpl + # same things as the requirements in ci/conda_recipe/meta.yaml + # if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends + # https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381 + - conda create -q -n test-environment python=%PYTHON_VERSION% + pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5" + pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10" + mock sphinx pandas + - activate test-environment + - echo %PYTHON_VERSION% %TARGET_ARCH% + - if %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache + # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124 + - pip install -q pytest "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout + + # Let the install prefer the static builds of the libs + - set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib + - mkdir lib || cmd /c "exit /b 0" + - copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib + - copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib + # These z.lib / png.lib are not static versions but files which end up as + # dependencies to the dll file. This is fine for the conda build, but not here + # and for the wheels + - del %LIBRARY_LIB%\png.lib + - del %LIBRARY_LIB%\z.lib + - set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;. + # enables the local freetype build + - copy ci\travis\setup.cfg . + # Show the installed packages + versions + - conda list + +test_script: + # Now build the thing.. + - '%CMD_IN_ENV% pip install --no-deps -ve .' + # these should show no z, png, or freetype dll... + - set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe" + - '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0' + - '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0' + - '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0' + + # this are optional dependencies so that we don't skip so many tests... + - if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow + # missing packages on conda-forge for avconv mencoder imagemagick + # This install sometimes failed randomly :-( + #- choco install imagemagick + + # Test import of tkagg backend + - python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())" + # tests + - echo The following args are passed to pytest %PYTEST_ARGS% + - python tests.py %PYTEST_ARGS% + # Generate a html for visual tests + - python tools/visualize_tests.py --no-browser + - pip install codecov + - codecov -e PYTHON_VERSION PLATFORM + +after_test: + # After the tests were a success, build packages (wheels and conda) + + # Build the wheel with the static libs + # Hide the output, the copied files really clutter the build log... + - '%CMD_IN_ENV% python setup.py bdist_wheel > NUL:' + + # And now the conda build after a cleanup... + # cleanup build files so that they don't pollute the conda build but keep the wheel in dist... + - git clean -xdfq -e dist/ + # cleanup the environment so that the test-environment does not leak into the conda build... + - set MPLBASEDIRLIST= + - set LIBRARY_LIB= + - deactivate + - path + - where python + - '%CMD_IN_ENV% conda config --get channels' + - '%CMD_IN_ENV% conda build -q .\ci\conda_recipe' + + # Move the conda package into the dist directory, to register it + # as an "artifact" for Appveyor. + - copy /y %CONDA_INSTALL_LOCN%\conda-bld\win-32\*.bz2 dist || cmd /c "exit /b 0" + - copy /y %CONDA_INSTALL_LOCN%\conda-bld\win-64\*.bz2 dist || cmd /c "exit /b 0" + - dir dist\ + - echo finished... + +artifacts: + - path: dist\* + name: packages + + - path: result_images\* + name: result_images + type: zip + +on_finish: + +on_failure: + - python tools/visualize_tests.py --no-browser + - echo zipping images after a failure... + - 7z a result_images.zip result_images\ | grep -v "Compressing" + - appveyor PushArtifact result_images.zip + +matrix: + fast_finish: true diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000000..4055ba0380ea --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,169 @@ +# Circle CI configuration file +# https://circleci.com/docs/ + +version: 2 + + +########################################### +# Define some common steps as YAML anchors. +# + +apt-run: &apt-install + name: Install apt packages + command: | + sudo apt-get -qq update + sudo apt-get install -y \ + inkscape \ + libav-tools \ + dvipng \ + pgf \ + lmodern \ + cm-super \ + texlive-latex-base \ + texlive-latex-extra \ + texlive-fonts-recommended \ + texlive-latex-recommended \ + texlive-xetex \ + graphviz \ + libgeos-dev \ + otf-freefont + +fonts-run: &fonts-install + name: Install custom fonts + # We manually install Humor-Sans using the package from Ubuntu 14.10. + # Unfortunately humor sans is not available in the Ubuntu version used by + # CircleCI but we can manually install the deb from a later version since + # it is basically just a .ttf file. + command: | + mkdir -p ~/.local/share/fonts + wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true + if [ ! -f ~/.local/share/fonts/Humor-Sans.ttf ]; then + wget https://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb + mkdir tmp + dpkg -x fonts-humor-sans_1.0-1_all.deb tmp + cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.local/share/fonts + rm -rf tmp + else + echo "Not downloading Humor-Sans; file already exists." + fi + fc-cache -f -v + +pip-run: &pip-install + # Upgrade pip and setuptools and wheel to get as clean an install as possible + name: Upgrade pip, setuptools, wheel + command: | + pip install --upgrade --user pip + pip install --upgrade --user wheel + pip install --upgrade --user setuptools + +deps-run: &deps-install + name: Install Python dependencies + command: | + pip install --user python-dateutil numpy${NUMPY_VERSION} pyparsing!=2.1.6 cycler codecov coverage sphinx pillow + pip install --user -r doc-requirements.txt + +mpl-run: &mpl-install + name: Install Matplotlib + command: pip install --user -ve . + +doc-run: &doc-build + name: Build documentation + command: python make.py html + working_directory: doc + +doc-bundle-run: &doc-bundle + name: Bundle sphinx-gallery documentation artifacts + command: tar cf doc/build/sphinx-gallery-files.tar.gz doc/api/_as_gen doc/gallery doc/tutorials + when: always + + +########################################## +# Here is where the real jobs are defined. +# + +jobs: + docs-python35: + docker: + - image: circleci/python:3.5 + steps: + - checkout + + - run: *apt-install + - run: *fonts-install + - run: *pip-install + + - run: *deps-install + - run: *mpl-install + + - run: *doc-build + + - run: *doc-bundle + - store_artifacts: + path: doc/build/sphinx-gallery-files.tar.gz + + - store_artifacts: + path: doc/build/html + + - run: + name: "Built documentation is available at:" + command: echo "${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/doc/build/html/index.html" + + - add_ssh_keys: + fingerprints: + - "78:13:59:08:61:a9:e5:09:af:df:3a:d8:89:c2:84:c0" + - deploy: + name: "Deploy new docs" + command: ./.circleci/deploy-docs.sh + + docs-python27: + docker: + - image: circleci/python:2.7 + steps: + - checkout + + - run: *apt-install + - run: *fonts-install + - run: *pip-install + + - run: + <<: *deps-install + environment: + NUMPY_VERSION: "==1.7.1" + # Linkchecker only works with python 2.7 for the time being. + # Linkchecker is currently broken with requests 2.10.0 so force an earlier version. + - run: pip install --user $PRE requests==2.9.2 linkchecker + - run: *mpl-install + + - run: *doc-build + + # We don't build the LaTeX docs here, so linkchecker will complain + - run: touch doc/build/html/Matplotlib.pdf + + # Linkchecker only works with python 2.7 for the time being + - run: + name: linkchecker + command: ~/.local/bin/linkchecker build/html/index.html + working_directory: doc + + - run: *doc-bundle + - store_artifacts: + path: doc/build/sphinx-gallery-files.tar.gz + + - store_artifacts: + path: doc/build/html + + - run: + name: "Built documentation is available at:" + command: echo "${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/doc/build/html/index.html" + + +######################################### +# Defining workflows gets us parallelism. +# + +workflows: + version: 2 + build: + jobs: + - docs-python35 + - docs-python27 diff --git a/.circleci/deploy-docs.sh b/.circleci/deploy-docs.sh new file mode 100755 index 000000000000..e6a51e58d8ad --- /dev/null +++ b/.circleci/deploy-docs.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" -o "$CIRCLE_BRANCH" != "master" -o "$CIRCLE_PULL_REQUEST" != "" ]; then + echo "Not uploading docs from non-master branch or non-Matplotlib org." + exit +fi + +git clone git@github.com:matplotlib/devdocs.git + +cd devdocs + +git checkout --orphan gh-pages || true +git reset --hard first_commit + +git rm -rf . +cp -R ../doc/build/html/. . +touch .nojekyll + +git config user.email "MatplotlibCircleBot@nomail" +git config user.name "MatplotlibCircleBot" +git config push.default simple + +git add . +git commit -m "Docs build of $CIRCLE_SHA1" + +git push --set-upstream origin gh-pages --force diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000000..cd41bdd06a92 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,13 @@ +[run] +branch = true +source = + matplotlib + mpl_toolkits +omit = matplotlib/_version.py + +[report] +exclude_lines = + raise NotImplemented + def __str__ + def __repr__ + if __name__ == .__main__.: diff --git a/.gitattributes b/.gitattributes index 176a458f94e0..64e5d9716c35 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,4 @@ * text=auto +*.svg binary +*.svg linguist-language=true +lib/matplotlib/_version.py export-subst diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000000..13aff901a065 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,46 @@ + + + +### Bug report + +**Bug summary** + + + +**Code for reproduction** + + + +```python +# Paste your code here +# +# +``` + +**Actual outcome** + + + +``` +# If applicable, paste the console output here +# +# +``` + +**Expected outcome** + + + + +**Matplotlib version** + + * Operating system: + * Matplotlib version: + * Matplotlib backend (`print(matplotlib.get_backend())`): + * Python version: + * Jupyter version (if applicable): + * Other libraries: + + + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000000..ced3ee9a82b3 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,34 @@ + + + + + + +## PR Summary + + + + + +## PR Checklist + +- [ ] Has Pytest style unit tests +- [ ] Code is PEP 8 compliant +- [ ] New features are documented, with examples if plot related +- [ ] Documentation is sphinx and numpydoc compliant +- [ ] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) +- [ ] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way + + diff --git a/.gitignore b/.gitignore index 6db5a64dc88e..8191bc39e393 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +######################################### +# OS-specific temporary and backup files +.DS_Store + ######################################### # Editor temporary/working/backup files # .#* @@ -8,6 +12,9 @@ *.kdev4 .project .pydevproject +*.swp +.idea +.vscode/ # Compiled source # ################### @@ -24,14 +31,15 @@ ################ # setup.py working directory build -# sphinx build directory -doc/_build + # setup.py dist directory dist # Egg metadata *.egg-info +.eggs # tox testing tool .tox +setup.cfg # OS generated files # ###################### @@ -49,14 +57,40 @@ lib/matplotlib/mpl-data/matplotlibrc # Documentation generated files # ################################# +# sphinx build directory +doc/_build +doc/api/_as_gen +# autogenerated by sphinx-gallery doc/examples -doc/_templates/gallery.html +doc/gallery +doc/tutorials +doc/modules +doc/pyplots/tex_demo.png doc/users/installing.rst +doc/_static/depsy_badge.svg doc/_static/matplotlibrc lib/dateutil examples/*/*.pdf examples/*/*.png +examples/*/*.svg +examples/*/*.eps +examples/*/*.svgz examples/tests/* !examples/tests/backend_driver.py texput.log +texput.aux result_images + +# Nose/Pytest generated files # +############################### +.cache/ +.coverage +.coverage.* +cover/ +.noseids + +# Conda files # +############### +__conda_version__.txt +lib/png.lib +lib/z.lib diff --git a/.mailmap b/.mailmap index 9adf7d130d6d..f638116e560f 100644 --- a/.mailmap +++ b/.mailmap @@ -1,7 +1,180 @@ -John Hunter jdh2358 -Michael Droettboom Michael Droettboom -Jouni K. Seppänen Jouni K. Seppänen +Adam Ortiz + +Adrien F. Vincent +Adrien F. Vincent + +Andrew Dawson + +anykraus + +Ariel Hernán Curiale + +Ben Cohen + Ben Root Benjamin Root -Michiel de Hoon Michiel de Hoon -Kevin Davies Kevin Davies + +Benjamin Congdon +Benjamin Congdon bcongdon + +Casper van der Wel + Christoph Gohlke cgohlke +Christoph Gohlke C. Gohlke + +Cimarron Mittelsteadt Cimarron + +Conner R. Phillips + +Dan Hickstein + +Daniel Hyams +Daniel Hyams Daniel Hyams + +David Kua + +Devashish Deshpande + +endolith + +Eric Dill + +Erik Bray + +Eric Ma +Eric Ma + +Filipe Fernandes + +Florian Le Bourdais + +Francesco Montesano montefra + +hannah + +Hans Moritz Günther + +J. Goutin JGoutin + +Jack Kelly +Jack Kelly + +Jaime Fernandez + +Jake Vanderplas +Jake Vanderplas +Jake Vanderplas + +James R. Evans + +Jeff Lutgen + +Jeffrey Bingham + +Jens Hedegaard Nielsen +Jens Hedegaard Nielsen + +John Hunter + +Jorrit Wronski + +Joseph Fox-Rabinovitz Mad Physicist +Joseph Fox-Rabinovitz Joseph Fox-Rabinovitz + +Jouni K. Seppänen + +Julien Schueller +Julien Schueller + +Kevin Davies + +kikocorreoso + +Klara Gerlei +Klara Gerlei klaragerlei + +Kristen M. Thyng + +Leeonadoh + +Lennart Fricke + +Levi Kilcher + +Lion Krischer + +Martin Fitzpatrick + +Matthew Emmett +Matthew Emmett + +Matthias Bussonnier + +Matthias Lüthi +Matthias Lüthi + +Michael Droettboom +Michael Droettboom Michael Droettboom + +Michiel de Hoon +Michiel de Hoon Michiel de Hoon +Michiel de Hoon Michiel de Hoon +Michiel de Hoon Michiel de Hoon +Michiel de Hoon Michiel de Hoon + +MinRK +MinRK Min RK + +Nelle Varoquaux + +Nic Eggert Nic Eggert +Nic Eggert Nic Eggert + +Nicolas P. Rougier + +OceanWolf + +Patrick Chen + +Paul Hobson +Paul Hobson vagrant + +Paul Ivanov + +Per Parker + +Peter Würtz +Peter Würtz + +Phil Elson +Phil Elson +Phil Elson + +productivememberofsociety666 none + +RyanPan + +Scott Lasley + +Sebastian Raschka +Sebastian Raschka + +Simon Cross + +Slav Basharov + +sohero sohero + +Stefan van der Walt + +switham switham + +Thomas A Caswell Thomas A Caswell +Thomas A Caswell Thomas A Caswell +Thomas A Caswell Thomas A Caswell <“tcaswell@gmail.com”> + +Trish Gillett-Kawamoto + +Werner F Bruhin + +Yunfei Yang Yunfei Yang +Yunfei Yang Yunfei Yang diff --git a/.travis.yml b/.travis.yml index 3c4283dcc980..8cd801b42ce3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,41 +1,175 @@ +language: python + +dist: trusty +sudo: false + +cache: + pip: true + directories: + - $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853 + - $HOME/.cache/matplotlib + +addons: + apt: + packages: + - inkscape + - libav-tools + - gdb + - mencoder + - dvipng + - pgf + - lmodern + - cm-super + - texlive-latex-base + - texlive-latex-extra + - texlive-fonts-recommended + - texlive-latex-recommended + - texlive-xetex + - graphviz + - libgeos-dev + - otf-freefont + env: global: - ARTIFACTS_AWS_REGION=us-east-1 - ARTIFACTS_S3_BUCKET=matplotlib-test-results - secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY= - secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk= - - TEST_ARGS=--no-pep8 - -language: python + - secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU=" + - NUMPY=numpy + - OPENBLAS_NUM_THREADS=1 + - PANDAS= + - NPROC=2 + - INSTALL_PEP8= + - RUN_PEP8= + - NOSE= + - PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC" + - PYTHON_ARGS= + - DELETE_FONT_CACHE= matrix: include: - - python: 2.6 - python: 2.7 - - python: 3.3 + env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose - python: 3.4 - - python: 2.7 - env: TEST_ARGS=--pep8 + env: PYTHON_ARGS=-OO + - python: 3.6 + env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas + - python: "nightly" + env: PRE=--pre + - os: osx + osx_image: xcode7.3 + language: generic # https://github.com/travis-ci/travis-ci/issues/2312 + env: MOCK=mock + only: master + cache: + # As for now travis caches only "$HOME/.cache/pip" + # https://docs.travis-ci.com/user/caching/#pip-cache + pip: false + directories: + - $HOME/Library/Caches/pip + # `cache` does not support `env`-like `global` so copy-paste from top + - $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853 + - $HOME/.cache/matplotlib + allow_failures: + - python: "nightly" + +before_install: + - | + if [[ $TRAVIS_OS_NAME != 'osx' ]]; then + # test with non-ascii in path + mkdir /tmp/λ + export PATH=$PATH:/tmp/λ + export PATH=/usr/lib/ccache:$PATH + else + brew update + brew tap homebrew/gui + brew install python libpng ffmpeg imagemagick mplayer ccache + # We could install ghostscript and inkscape here to test svg and pdf + # but this makes the test time really long. + # brew install ghostscript inkscape + export PATH=/usr/local/opt/ccache/libexec:$PATH + fi install: - - pip install -q --use-mirrors nose python-dateutil numpy pep8 pyparsing pillow - - sudo apt-get update && sudo apt-get -qq install inkscape libav-tools - - python setup.py install - -script: - - mkdir ../tmp_test_dir - - cd ../tmp_test_dir - # The number of processes is hardcoded, because using too many causes the - # Travis VM to run out of memory (since so many copies of inkscape and - # ghostscript are running at the same time). - - echo Testing using 8 processes - # Generate the font caches in a single process before starting the - # multiple processes - - python -c "from matplotlib import font_manager" - - python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 $TEST_ARGS + # Upgrade pip and setuptools. Mock has issues with the default version of + # setuptools + - | + # Setup environment + ccache -s + git describe + # Upgrade pip and setuptools and wheel to get as clean an install as possible + pip install --upgrade pip setuptools wheel + - | + # Install dependencies from pypi + pip install --upgrade $PRE \ + $MOCK \ + $NOSE \ + $NUMPY \ + $PANDAS \ + codecov \ + coverage \ + cycler \ + pillow \ + pyparsing!=2.1.6 \ + python-dateutil \ + sphinx + # GUI toolkits are pip-installable only for some versions of Python so + # don't fail if we can't install them. Make it easier to check whether the + # install was successful by trying to import the toolkit (sometimes, the + # install appears to be successful but shared libraries cannot be loaded at + # runtime, so an actual import is a better check). + pip install pyqt5 && + python -c 'import PyQt5.QtCore' && + echo 'PyQt5 is available' || + echo 'PyQt5 is not available' + pip install -U --pre \ + -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \ + wxPython && + python -c 'import wx' && + echo 'wxPython is available' || + echo 'wxPython is not available' + + # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124 + pip install $PRE \ + pytest \ + pytest-cov>=2.3.1 \ + pytest-faulthandler \ + pytest-rerunfailures \ + pytest-timeout \ + pytest-xdist \ + $INSTALL_PEP8 + + # Use the special local version of freetype for testing + cp ci/travis/setup.cfg . + - | + # Install matplotlib + pip install -ve . + +before_script: + - | + if [[ $TRAVIS_OS_NAME != 'osx' ]]; then + export DISPLAY=:99.0 + sh -e /etc/init.d/xvfb start + fi + +script: ci/travis/test_script.sh + +before_cache: + - rm -rf $HOME/.cache/matplotlib/tex.cache + - rm -rf $HOME/.cache/matplotlib/test_cache after_failure: - - tar cjf result_images.tar.bz2 result_images - - if [[ $TRAVIS_PULL_REQUEST == false ]]; then gem install travis-artifacts; fi - - if [[ $TRAVIS_PULL_REQUEST == falst ]]; then travis-artifacts upload --path result_images.tar.bz2; fi - - if [[ $TRAVIS_PULL_REQUEST != false ]]; then echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." else echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2; fi + - | + if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then + gem install travis-artifacts + cd $TRAVIS_BUILD_DIR/../tmp_test_dir + tar cjf result_images.tar.bz2 result_images + travis-artifacts upload --path result_images.tar.bz2 + echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2 + else + echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." + fi + +after_success: + - codecov -e TRAVIS_PYTHON_VERSION diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index abf009952571..000000000000 --- a/CHANGELOG +++ /dev/null @@ -1,5368 +0,0 @@ -2014-06-10 Added Colorbar.remove() - -2014-06-07 Fixed bug so radial plots can be saved as ps in py3k. - -2014-06-01 Changed the fmt kwarg of errorbar to support the - the mpl convention that "none" means "don't draw it", - and to default to the empty string, so that plotting - of data points is done with the plot() function - defaults. Deprecated use of the None object in place - "none". - -2014-05-22 Allow the linscale keyword parameter of symlog scale to be - smaller than one. - -2014-05-20 Added logic to in FontManager to invalidate font-cache if - if font-family rcparams have changed. - -2014-05-16 Fixed the positioning of multi-line text in the PGF backend. - -2014-05-14 Added Axes.add_image() as the standard way to add AxesImage - instances to Axes. This improves the consistency with - add_artist(), add_collection(), add_container(), add_line(), - add_patch(), and add_table(). - -2014-05-02 Added colorblind-friendly colormap, named 'Wistia'. - -2014-04-27 Improved input clean up in Axes.{h|v}lines - Coerce input into a 1D ndarrays (after dealing with units). - -2014-04-27 removed un-needed cast to float in stem - -2014-04-23 Updated references to "ipython -pylab" - The preferred method for invoking pylab is now using the - "%pylab" magic. - -Chris G. - -2014-04-22 Added (re-)generate a simple automatic legend to "Figure Options" - dialog of the Qt4Agg backend. - -2014-04-22 Added an example showing the difference between - interpolation = 'none' and interpolation = 'nearest' in - `imshow()` when saving vector graphics files. - -2014-04-22 Added violin plotting functions. See `Axes.violinplot`, - `Axes.violin`, `cbook.violin_stats` and `mlab.GaussianKDE` for - details. - -2014-04-10 Fixed the triangular marker rendering error. The "Up" triangle was - rendered instead of "Right" triangle and vice-versa. - -2014-04-08 Fixed a bug in parasite_axes.py by making a list out - of a generator at line 263. - -2014-04-02 Added `clipon=False` to patch creation of wedges and shadows - in `pie`. - -2014-02-25 In backend_qt4agg changed from using update -> repaint under - windows. See comment in source near `self._priv_update` for - longer explaination. - -2014-03-27 Added tests for pie ccw parameter. Removed pdf and svg images - from tests for pie linewidth parameter. - -2014-03-24 Changed the behaviour of axes to not ignore leading or trailing - patches of height 0 (or width 0) while calculating the x and y - axis limits. Patches having both height == 0 and width == 0 are - ignored. - -2014-03-24 Added bool kwarg (manage_xticks) to boxplot to enable/disable - the managemnet of the xlimits and ticks when making a boxplot. - Default in True which maintains current behavior by default. - -2014-03-23 Fixed a bug in projections/polar.py by making sure that the theta - value being calculated when given the mouse coordinates stays within - the range of 0 and 2 * pi. - -2014-03-22 Added the keyword arguments wedgeprops and textprops to pie. - Users can control the wedge and text properties of the pie - in more detail, if they choose. - -2014-03-17 Bug was fixed in append_axes from the AxesDivider class would not - append axes in the right location with respect to the reference - locator axes - -2014-03-13 Add parameter 'clockwise' to function pie, True by default. - -2014-02-28 Added 'origin' kwarg to `spy` - -2014-02-27 Implemented separate horizontal/vertical axes padding to the - ImageGrid in the AxesGrid toolkit - -2014-02-27 Allowed markevery property of matplotlib.lines.Line2D to be, an int - numpy fancy index, slice object, or float. The float behaviour - turns on markers at approximately equal display-coordinate-distances - along the line. - -2014-02-25 In backend_qt4agg changed from using update -> repaint under - windows. See comment in source near `self._priv_update` for - longer explaination. - -2014-01-02 `triplot` now returns the artist it adds and support of line and - marker kwargs has been improved. GBY - -2013-12-30 Made streamplot grid size consistent for different types of density - argument. A 30x30 grid is now used for both density=1 and - density=(1, 1). - -2013-12-03 Added a pure boxplot-drawing method that allow a more complete - customization of boxplots. It takes a list of dicts contains stats. - Also created a function (`cbook.boxplot_stats`) that generates the - stats needed. - -2013-11-28 Added qhull extension module to perform Delaunay triangulation more - robustly than before. It is used by tri.Triangulation (and hence - all pyplot.tri* methods) and mlab.griddata. Deprecated - matplotlib.delaunay module. - IMT - -2013-11-05 Add power-law normalization method. This is useful for, - e.g., showing small populations in a "hist2d" histogram. - -2013-10-27 Added get_rlabel_position and set_rlabel_position methods to - PolarAxes to control angular position of radial tick labels. - -2013-10-06 Add stride-based functions to mlab for easy creation of 2D arrays - with less memory. - -2013-10-06 Improve window and detrend functions in mlab, particulart support for - 2D arrays. - -2013-10-06 Improve performance of all spectrum-related mlab functions and plots. - -2013-10-06 Added support for magnitude, phase, and angle spectrums to - axes.specgram, and support for magnitude, phase, angle, and complex - spectrums to mlab-specgram. - -2013-10-06 Added magnitude_spectrum, angle_spectrum, and phase_spectrum plots, - as well as magnitude_spectrum, angle_spectrum, phase_spectrum, - and complex_spectrum functions to mlab - -2013-07-12 Added support for datetime axes to 2d plots. Axis values are passed - through Axes.convert_xunits/Axes.convert_yunits before being used by - contour/contourf, pcolormesh and pcolor. - -2013-07-12 Allowed matplotlib.dates.date2num, matplotlib.dates.num2date, - and matplotlib.dates.datestr2num to accept n-d inputs. Also - factored in support for n-d arrays to matplotlib.dates.DateConverter - and matplotlib.units.Registry. - -2013-06-26 Refactored the axes module: the axes module is now a folder, - containing the following submodule: - - _subplots.py, containing all the subplots helper methods - - _base.py, containing several private methods and a new - _AxesBase class. This _AxesBase class contains all the methods - that are not directly linked to plots of the "old" Axes - - _axes.py contains the Axes class. This class now inherits from - _AxesBase: it contains all "plotting" methods and labelling - methods. - This refactoring should not affect the API. Only private methods - are not importable from the axes module anymore. - -2013-05-18 Added support for arbitrary rasterization resolutions to the - SVG backend. Previously the resolution was hard coded to 72 - dpi. Now the backend class takes a image_dpi argument for - its constructor, adjusts the image bounding box accordingly - and forwards a magnification factor to the image renderer. - The code and results now resemble those of the PDF backend. - - MW - -2013-05-08 Changed behavior of hist when given stacked=True and normed=True. - Histograms are now stacked first, then the sum is normalized. - Previously, each histogram was normalized, then they were stacked. - -2013-04-25 Changed all instances of: - - from matplotlib import MatplotlibDeprecationWarning as mplDeprecation - to: - - from cbook import mplDeprecation - - and removed the import into the matplotlib namespace in __init__.py - Thomas Caswell - -2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default - margins on auto-scaleing. - TAC - -2013-04-16 Added patheffect support for Line2D objects. -JJL - -2013-03-31 Added support for arbitrary unstructured user-specified - triangulations to Axes3D.tricontour[f] - Damon McDougall - -2013-03-19 Added support for passing `linestyle` kwarg to `step` so all `plot` - kwargs are passed to the underlying `plot` call. -TAC - -2013-02-25 Added classes CubicTriInterpolator, UniformTriRefiner, TriAnalyzer - to matplotlib.tri module. - GBy - -2013-01-23 Add 'savefig.directory' to rcParams to remember and fill in the last - directory saved to for figure save dialogs - Martin Spacek - -2013-01-13 Add eventplot method to axes and pyplot and EventCollection class - to collections. - -2013-01-08 Added two extra titles to axes which are flush with the left and - right edges of the plot respectively. - Andrew Dawson - -2013-01-07 Add framealpha keyword argument to legend - PO - -2013-01-16 Till Stensitzki added a baseline feature to stackplot - -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-11-08 Replaced plt.figure and plt.subplot calls by the newer, more - convenient single call to plt.subplots() in the documentation - examples - 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 - only if get_closed() is True. Thanks to Jacob Vanderplas. - EF - -2012-08-05 When a norm is passed to contourf, either or both of the - vmin, vmax attributes of that norm are now respected. - Formerly they were respected only if both were - specified. In addition, vmin and/or vmax can now - be passed to contourf directly as kwargs. - EF - -2012-07-24 Contourf handles the extend kwarg by mapping the extended - ranges outside the normed 0-1 range so that they are - handled by colormap colors determined by the set_under - and set_over methods. Previously the extended ranges - were mapped to 0 or 1 so that the "under" and "over" - colormap colors were ignored. This change also increases - slightly the color contrast for a given set of contour - levels. - EF - -2012-06-24 Make use of mathtext in tick labels configurable - DSD - -2012-06-05 Images loaded through PIL are now ordered correctly - CG - -2012-06-02 Add new Axes method and pyplot function, hist2d. - PO - -2012-05-31 Remove support for 'cairo.' style of backend specification. - Deprecate 'cairo.format' and 'savefig.extension' rcParams and - replace with 'savefig.format'. - Martin Spacek - -2012-05-29 pcolormesh now obeys the passed in "edgecolor" kwarg. - To support this, the "shading" argument to pcolormesh now only - takes "flat" or "gouraud". To achieve the old "faceted" behavior, - pass "edgecolors='k'". - MGD - -2012-05-22 Added radius kwarg to pie charts. - HH - -2012-05-22 Collections now have a setting "offset_position" to select whether - the offsets are given in "screen" coordinates (default, - following the old behavior) or "data" coordinates. This is currently - used internally to improve the performance of hexbin. - - As a result, the "draw_path_collection" backend methods have grown - a new argument "offset_position". - MGD - -2012-05-04 Add a new argument to pie charts - startingangle - that - allows one to specify the angle offset for the first wedge - of the chart. - EP - -2012-05-03 symlog scale now obeys the logarithmic base. Previously, it was - completely ignored and always treated as base e. - MGD - -2012-05-03 Allow linscalex/y keyword to symlog scale that allows the size of - the linear portion relative to the logarithmic portion to be - adjusted. - MGD - -2012-04-14 Added new plot style: stackplot. This new feature supports stacked - area plots. - Damon McDougall - -2012-04-06 When path clipping changes a LINETO to a MOVETO, it also - changes any CLOSEPOLY command to a LINETO to the initial - point. This fixes a problem with pdf and svg where the - CLOSEPOLY would then draw a line to the latest MOVETO - position instead of the intended initial position. - JKS - -2012-03-27 Add support to ImageGrid for placing colorbars only at - one edge of each column/row. - RMM - -2012-03-07 Refactor movie writing into useful classes that make use - of pipes to write image data to ffmpeg or mencoder. Also - improve settings for these and the ability to pass custom - options. - RMM - -2012-02-29 errorevery keyword added to errorbar to enable errorbar - subsampling. fixes issue #600. - -2012-02-28 Added plot_trisurf to the mplot3d toolkit. This supports plotting - three dimensional surfaces on an irregular grid. - Damon McDougall - -2012-01-23 The radius labels in polar plots no longer use a fixed - padding, but use a different alignment depending on the - quadrant they are in. This fixes numerical problems when - (rmax - rmin) gets too small. - MGD - -2012-01-08 Add axes.streamplot to plot streamlines of a velocity field. - Adapted from Tom Flannaghan streamplot implementation. -TSY - -2011-12-29 ps and pdf markers are now stroked only if the line width - is nonzero for consistency with agg, fixes issue #621. - JKS - -2011-12-27 Work around an EINTR bug in some versions of subprocess. - JKS - -2011-10-25 added support for \operatorname to mathtext, - including the ability to insert spaces, such as - $\operatorname{arg\,max}$ - PI - -2011-08-18 Change api of Axes.get_tightbbox and add an optional - keyword parameter *call_axes_locator*. - JJL - -2011-07-29 A new rcParam "axes.formatter.use_locale" was added, that, - when True, will use the current locale to format tick - labels. This means that, for example, in the fr_FR locale, - ',' will be used as a decimal separator. - MGD - -2011-07-15 The set of markers available in the plot() and scatter() - commands has been unified. In general, this gives more - options to both than were previously available, however, - there is one backward-incompatible change to the markers in - scatter: - - "d" used to mean "diamond", it now means "narrow - diamond". "D" can be used for a "diamond". - - -MGD - -2011-07-13 Fix numerical problems in symlog scale, particularly when - linthresh <= 1.0. Symlog plots may look different if one - was depending on the old broken behavior - MGD - -2011-07-10 Fixed argument handling error in tripcolor/triplot/tricontour, - issue #203. - IMT - -2011-07-08 Many functions added to mplot3d.axes3d to bring Axes3D - objects more feature-parity with regular Axes objects. - Significant revisions to the documentation as well. - - BVR - -2011-07-07 Added compatibility with IPython strategy for picking - a version of Qt4 support, and an rcParam for making - the choice explicitly: backend.qt4. - EF - -2011-07-07 Modified AutoMinorLocator to improve automatic choice of - the number of minor intervals per major interval, and - to allow one to specify this number via a kwarg. - EF - -2011-06-28 3D versions of scatter, plot, plot_wireframe, plot_surface, - bar3d, and some other functions now support empty inputs. - BVR - -2011-06-22 Add set_theta_offset, set_theta_direction and - set_theta_zero_location to polar axes to control the - location of 0 and directionality of theta. - MGD - -2011-06-22 Add axes.labelweight parameter to set font weight to axis - labels - MGD. - -2011-06-20 Add pause function to pyplot. - EF - -2011-06-16 Added *bottom* keyword parameter for the stem command. - Also, implemented a legend handler for the stem plot. - - JJL - -2011-06-16 Added legend.frameon rcParams. - Mike Kaufman - -2011-05-31 Made backend_qt4 compatible with PySide . - Gerald Storer - -2011-04-17 Disable keyboard auto-repeat in qt4 backend by ignoring - key events resulting from auto-repeat. This makes - constrained zoom/pan work. - EF - -2011-04-14 interpolation="nearest" always interpolate images. A new - mode "none" is introduced for no interpolation - JJL - -2011-04-03 Fixed broken pick interface to AsteriskCollection objects - used by scatter. - EF - -2011-04-01 The plot directive Sphinx extension now supports all of the - features in the Numpy fork of that extension. These - include doctest formatting, an 'include-source' option, and - a number of new configuration options. - MGD - -2011-03-29 Wrapped ViewVCCachedServer definition in a factory function. - This class now inherits from urllib2.HTTPSHandler in order - to fetch data from github, but HTTPSHandler is not defined - if python was built without SSL support. - DSD - -2011-03-10 Update pytz version to 2011c, thanks to Simon Cross. - JKS - -2011-03-06 Add standalone tests.py test runner script. - JKS - -2011-03-06 Set edgecolor to 'face' for scatter asterisk-type - symbols; this fixes a bug in which these symbols were - not responding to the c kwarg. The symbols have no - face area, so only the edgecolor is visible. - EF - -2011-02-27 Support libpng version 1.5.x; suggestion by Michael - Albert. Changed installation specification to a - minimum of libpng version 1.2. - EF - -2011-02-20 clabel accepts a callable as an fmt kwarg; modified - patch by Daniel Hyams. - EF - -2011-02-18 scatter([], []) is now valid. Also fixed issues - with empty collections - BVR - -2011-02-07 Quick workaround for dviread bug #3175113 - JKS - -2011-02-05 Add cbook memory monitoring for Windows, using - tasklist. - EF - -2011-02-05 Speed up Normalize and LogNorm by using in-place - operations and by using float32 for float32 inputs - and for ints of 2 bytes or shorter; based on - patch by Christoph Gohlke. - EF - -2011-02-04 Changed imshow to use rgba as uint8 from start to - finish, instead of going through an intermediate - step as double precision; thanks to Christoph Gohlke. - EF - -2011-01-13 Added zdir and offset arguments to contourf3d to - bring contourf3d in feature parity with contour3d. - BVR - -2011-01-04 Tag 1.0.1 for release at r8896 - -2011-01-03 Added display of ticker offset to 3d plots. - BVR - -2011-01-03 Turn off tick labeling on interior subplots for - pyplots.subplots when sharex/sharey is True. - JDH - -2010-12-29 Implement axes_divider.HBox and VBox. -JJL - - -2010-11-22 Fixed error with Hammer projection. - BVR - -2010-11-12 Fixed the placement and angle of axis labels in 3D plots. - BVR - -2010-11-07 New rc parameters examples.download and examples.directory - allow bypassing the download mechanism in get_sample_data. - - JKS - -2010-10-04 Fix JPEG saving bug: only accept the kwargs documented - by PIL for JPEG files. - JKS - -2010-09-15 Remove unused _wxagg extension and numerix.h. - EF - -2010-08-25 Add new framework for doing animations with examples.- RM - -2010-08-21 Remove unused and inappropriate methods from Tick classes: - set_view_interval, get_minpos, and get_data_interval are - properly found in the Axis class and don't need to be - duplicated in XTick and YTick. - EF - -2010-08-21 Change Axis.set_view_interval() so that when updating an - existing interval, it respects the orientation of that - interval, and can enlarge but not reduce the interval. - This fixes a bug in which Axis.set_ticks would - change the view limits of an inverted axis. Whether - set_ticks should be affecting the viewLim at all remains - an open question. - EF - -2010-08-16 Handle NaN's correctly in path analysis routines. Fixes a - bug where the best location for a legend was not calculated - correctly when the line contains NaNs. - MGD - -2010-08-14 Fix bug in patch alpha handling, and in bar color kwarg - EF - -2010-08-12 Removed all traces of numerix module after 17 months of - deprecation warnings. - EF - -2010-08-05 Added keyword arguments 'thetaunits' and 'runits' for polar - plots. Fixed PolarAxes so that when it set default - Formatters, it marked them as such. Fixed semilogx and - semilogy to no longer blindly reset the ticker information - on the non-log axis. Axes.arrow can now accept unitized - data. - JRE - -2010-08-03 Add support for MPLSETUPCFG variable for custom setup.cfg - filename. Used by sage buildbot to build an mpl w/ no gui - support - JDH - -2010-08-01 Create directory specified by MPLCONFIGDIR if it does - not exist. - ADS - -2010-07-20 Return Qt4's default cursor when leaving the canvas - DSD - -2010-07-06 Tagging for mpl 1.0 at r8502 - - -2010-07-05 Added Ben Root's patch to put 3D plots in arbitrary axes, - allowing you to mix 3d and 2d in different axes/subplots or - to have multiple 3D plots in one figure. See - examples/mplot3d/subplot3d_demo.py - JDH - -2010-07-05 Preferred kwarg names in set_xlim are now 'left' and - 'right'; in set_ylim, 'bottom' and 'top'; original - kwargs are still accepted without complaint. - EF - -2010-07-05 TkAgg and FltkAgg backends are now consistent with other - interactive backends: when used in scripts from the - command line (not from ipython -pylab), show blocks, - and can be called more than once. - EF - -2010-07-02 Modified CXX/WrapPython.h to fix "swab bug" on solaris so - mpl can compile on Solaris with CXX6 in the trunk. Closes - tracker bug 3022815 - JDH - -2010-06-30 Added autoscale convenience method and corresponding - pyplot function for simplified control of autoscaling; - and changed axis, set_xlim, and set_ylim so that by - default, they turn off the autoscaling on the relevent - axis or axes. Therefore one can call set_xlim before - plotting a line, for example, and the limits will be - retained. - EF - -2010-06-20 Added Axes.tick_params and corresponding pyplot function - to control tick and tick label appearance after an Axes - has been created. - EF - -2010-06-09 Allow Axes.grid to control minor gridlines; allow - Axes.grid and Axis.grid to control major and minor - gridlines in the same method call. - EF - -2010-06-06 Change the way we do split/dividend adjustments in - finance.py to handle dividends and fix the zero division bug reported - in sf bug 2949906 and 2123566. Note that volume is not adjusted - because the Yahoo CSV does not distinguish between share - split and dividend adjustments making it near impossible to - get volume adjustement right (unless we want to guess based - on the size of the adjustment or scrape the html tables, - which we don't) - JDH - -2010-06-06 Updated dateutil to 1.5 and pytz to 2010h. - -2010-06-02 Add error_kw kwarg to Axes.bar(). - EF - -2010-06-01 Fix pcolormesh() and QuadMesh to pass on kwargs as - appropriate. - RM - -2010-05-18 Merge mpl_toolkits.gridspec into the main tree. - JJL - -2010-05-04 Improve backend_qt4 so it displays figures with the - correct size - DSD - -2010-04-20 Added generic support for connecting to a timer for events. This - adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to - the backends and a new_timer() method to each backend's - canvas to allow ease of creating a new timer. - RM - -2010-04-20 Added margins() Axes method and pyplot function. - EF - -2010-04-18 update the axes_grid documentation. -JJL - -2010-04-18 Control MaxNLocator parameters after instantiation, - and via Axes.locator_params method, with corresponding - pyplot function. -EF - -2010-04-18 Control ScalarFormatter offsets directly and via the - Axes.ticklabel_format() method, and add that to pyplot. -EF - -2010-04-16 Add a close_event to the backends. -RM - -2010-04-06 modify axes_grid examples to use axes_grid1 and axisartist. -JJL - -2010-04-06 rebase axes_grid using axes_grid1 and axisartist modules. -JJL - -2010-04-06 axes_grid toolkit is splitted into two separate modules, - axes_grid1 and axisartist. -JJL - -2010-04-05 Speed up import: import pytz only if and when it is - needed. It is not needed if the rc timezone is UTC. - EF - -2010-04-03 Added color kwarg to Axes.hist(), based on work by - Jeff Klukas. - EF - -2010-03-24 refactor colorbar code so that no cla() is necessary when - mappable is changed. -JJL - -2010-03-22 fix incorrect rubber band during the zoom mode when mouse - leaves the axes. -JJL - -2010-03-21 x/y key during the zoom mode only changes the x/y limits. -JJL - -2010-03-20 Added pyplot.sca() function suggested by JJL. - EF - -2010-03-20 Added conditional support for new Tooltip API in gtk backend. - EF - -2010-03-20 Changed plt.fig_subplot() to plt.subplots() after discussion on - list, and changed its API to return axes as a numpy object array - (with control of dimensions via squeeze keyword). FP. - -2010-03-13 Manually brought in commits from branch - - ------------------------------------------------------------------------ - r8191 | leejjoon | 2010-03-13 17:27:57 -0500 (Sat, 13 Mar 2010) | 1 line - - fix the bug that handles for scatter are incorrectly set when dpi!=72. - Thanks to Ray Speth for the bug report. - - -2010-03-03 Manually brought in commits from branch via diff/patch - (svnmerge is broken) - - ------------------------------------------------------------------------ - r8175 | leejjoon | 2010-03-03 10:03:30 -0800 (Wed, 03 Mar 2010) | 1 line - - fix arguments of allow_rasterization.draw_wrapper - ------------------------------------------------------------------------ - r8174 | jdh2358 | 2010-03-03 09:15:58 -0800 (Wed, 03 Mar 2010) | 1 line - - added support for favicon in docs build - ------------------------------------------------------------------------ - r8173 | jdh2358 | 2010-03-03 08:56:16 -0800 (Wed, 03 Mar 2010) | 1 line - - applied Mattias get_bounds patch - ------------------------------------------------------------------------ - r8172 | jdh2358 | 2010-03-03 08:31:42 -0800 (Wed, 03 Mar 2010) | 1 line - - fix svnmerge download instructions - ------------------------------------------------------------------------ - r8171 | jdh2358 | 2010-03-03 07:47:48 -0800 (Wed, 03 Mar 2010) | 1 line - - - -2010-02-25 add annotation_demo3.py that demonstrates new functionality. -JJL - -2010-02-25 refactor Annotation to support arbitrary Transform as xycoords - or textcoords. Also, if a tuple of two coordinates is provided, - they are interpreted as coordinates for each x and y position. - -JJL - -2010-02-24 Added pyplot.fig_subplot(), to create a figure and a group of - subplots in a single call. This offers an easier pattern than - manually making figures and calling add_subplot() multiple times. FP - -2010-02-17 Added Gokhan's and Mattias' customizable keybindings patch - for the toolbar. You can now set the keymap.* properties - in the matplotlibrc file. Newbindings were added for - toggling log scaling on the x-axis. JDH - -2010-02-16 Committed TJ's filled marker patch for - left|right|bottom|top|full filled markers. See - examples/pylab_examples/filledmarker_demo.py. JDH - -2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap - estimates of median confidence intervals. Based on an - initial patch by Paul Hobson. - ADS - -2010-02-06 Added setup.cfg "basedirlist" option to override setting - in setupext.py "basedir" dictionary; added "gnu0" - platform requested by Benjamin Drung. - EF - -2010-02-06 Added 'xy' scaling option to EllipseCollection. - EF - -2010-02-03 Made plot_directive use a custom PlotWarning category, so that - warnings can be turned into fatal errors easily if desired. - FP - -2010-01-29 Added draggable method to Legend to allow mouse drag - placement. Thanks Adam Fraser. JDH - -2010-01-25 Fixed a bug reported by Olle Engdegard, when using - histograms with stepfilled and log=True - MM - -2010-01-16 Upgraded CXX to 6.1.1 - JDH - -2009-01-16 Don't create minor ticks on top of existing major - ticks. Patch by Neil Crighton. -ADS - -2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch - by Neil Crighton. -ADS - -2010-01-16 Applied patch by Ian Thomas to fix two contouring - problems: now contourf handles interior masked regions, - and the boundaries of line and filled contours coincide. - EF - -2009-01-11 The color of legend patch follows the rc parameters - axes.facecolor and axes.edgecolor. -JJL - -2009-01-11 adjustable of Axes can be "box-forced" which allow - sharing axes. -JJL - -2009-01-11 Add add_click and pop_click methods in - BlockingContourLabeler. -JJL - - -2010-01-03 Added rcParams['axes.color_cycle'] - EF - -2010-01-03 Added Pierre's qt4 formlayout editor and toolbar button - JDH - -2009-12-31 Add support for using math text as marker symbols (Thanks to tcb) - - MGD - -2009-12-31 Commit a workaround for a regression in PyQt4-4.6.{0,1} - DSD - -2009-12-22 Fix cmap data for gist_earth_r, etc. -JJL - -2009-12-20 spines: put spines in data coordinates, add set_bounds() - call. -ADS - -2009-12-18 Don't limit notch size in boxplot to q1-q3 range, as this - is effectively making the data look better than it is. - ADS - -2009-12-18 mlab.prctile handles even-length data, such that the median - is the mean of the two middle values. - ADS - -2009-12-15 Add raw-image (unsampled) support for the ps backend. - JJL - -2009-12-14 Add patch_artist kwarg to boxplot, but keep old default. - Convert boxplot_demo2.py to use the new patch_artist. - ADS - -2009-12-06 axes_grid: reimplemented AxisArtist with FloatingAxes support. - Added new examples. - JJL - -2009-12-01 Applied Laurent Dufrechou's patch to improve blitting with - the qt4 backend - DSD - -2009-11-13 The pdf backend now allows changing the contents of - a pdf file's information dictionary via PdfPages.infodict. - JKS - -2009-11-12 font_manager.py should no longer cause EINTR on Python 2.6 - (but will on the 2.5 version of subprocess). Also the - fc-list command in that file was fixed so now it should - actually find the list of fontconfig fonts. - JKS - -2009-11-10 Single images, and all images in renderers with - option_image_nocomposite (i.e. agg, macosx and the svg - backend when rcParams['svg.image_noscale'] is True), are - now drawn respecting the zorder relative to other - artists. (Note that there may now be inconsistencies across - backends when more than one image is drawn at varying - zorders, but this change introduces correct behavior for - the backends in which it's easy to do so.) - -2009-10-21 Make AutoDateLocator more configurable by adding options - to control the maximum and minimum number of ticks. Also - add control of the intervals to be used for ticking. This - does not change behavior but opens previously hard-coded - behavior to runtime modification`. - RMM - -2009-10-19 Add "path_effects" support for Text and Patch. See - examples/pylab_examples/patheffect_demo.py -JJL - -2009-10-19 Add "use_clabeltext" option to clabel. If True, clabels - will be created with ClabelText class, which recalculates - rotation angle of the label during the drawing time. -JJL - -2009-10-16 Make AutoDateFormatter actually use any specified - timezone setting.This was only working correctly - when no timezone was specified. - RMM - -2009-09-27 Beginnings of a capability to test the pdf backend. - JKS - -2009-09-27 Add a savefig.extension rcparam to control the default - filename extension used by savefig. - JKS - -=============================================== -2009-09-21 Tagged for release 0.99.1 - -2009-09-20 Fix usetex spacing errors in pdf backend. - JKS - -2009-09-20 Add Sphinx extension to highlight IPython console sessions, - originally authored (I think) by Michael Droetboom. - FP - -2009-09-20 Fix off-by-one error in dviread.Tfm, and additionally protect - against exceptions in case a dvi font is missing some metrics. - JKS - -2009-09-15 Implement draw_text and draw_tex method of backend_base using - the textpath module. Implement draw_tex method of the svg - backend. - JJL - -2009-09-15 Don't fail on AFM files containing floating-point bounding boxes - JKS - -2009-09-13 AxesGrid : add modified version of colorbar. Add colorbar - location howto. - JJL - -2009-09-07 AxesGrid : implemented axisline style. - Added a demo examples/axes_grid/demo_axisline_style.py- JJL - -2009-09-04 Make the textpath class as a separate moduel - (textpath.py). Add support for mathtext and tex.- JJL - -2009-09-01 Added support for Gouraud interpolated triangles. - pcolormesh now accepts shading='gouraud' as an option. - MGD - -2009-08-29 Added matplotlib.testing package, which contains a Nose - plugin and a decorator that lets tests be marked as - KnownFailures - ADS - -2009-08-20 Added scaled dict to AutoDateFormatter for customized - scales - JDH - -2009-08-15 Pyplot interface: the current image is now tracked at the - figure and axes level, addressing tracker item 1656374. - EF - -2009-08-15 Docstrings are now manipulated with decorators defined - in a new module, docstring.py, thanks to Jason Coombs. - EF - -2009-08-14 Add support for image filtering for agg back end. See the example - demo_agg_filter.py. -JJL - -2009-08-09 AnnotationBbox added. Similar to Annotation, but works with - OffsetBox instead of Text. See the example - demo_annotation_box.py. -JJL - -2009-08-07 BboxImage implemented. Two examples, demo_bboximage.py and - demo_ribbon_box.py added. - JJL - -2009-08-07 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) - - becomes: - - 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) - - becomes: - - 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) - - becomes: - - draw_image(self, gc, x, y, im) - - - MGD - -2009-08-06 Tagging the 0.99.0 release at svn r7397 - JDH - - * fixed an alpha colormapping bug posted on sf 2832575 - - * fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py - (patch by Christoph Gohlke) - - * remove dup gui event in enter/leave events in gtk - - * lots of fixes for os x binaries (Thanks Russell Owen) - - * attach gtk events to mpl events -- fixes sf bug 2816580 - - * applied sf patch 2815064 (middle button events for wx) and - patch 2818092 (resize events for wx) - - * fixed boilerplate.py so it doesn't break the ReST docs. - - * removed a couple of cases of mlab.load - - * fixed rec2csv win32 file handle bug from sf patch 2831018 - - * added two examples from Josh Hemann: examples/pylab_examples/barchart_demo2.py - and examples/pylab_examples/boxplot_demo2.py - - * handled sf bugs 2831556 and 2830525; better bar error messages and - backend driver configs - - * added miktex win32 patch from sf patch 2820194 - - * apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel - -2009-08-04 Made cbook.get_sample_data make use of the ETag and Last-Modified - headers of mod_dav_svn. - JKS - -2009-08-03 Add PathCollection; modify contourf to use complex - paths instead of simple paths with cuts. - EF - - -2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS - -2009-08-03 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. - JDH - -2009-07-31 Added cbook.get_sample_data for urllib enabled fetching and - cacheing of data needed for examples. See - examples/misc/sample_data_demo.py - JDH - -2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD - -2009-07-30 Add set_cmap and register_cmap, and improve get_cmap, - to provide convenient handling of user-generated - colormaps. Reorganized _cm and cm modules. - EF - -2009-07-28 Quiver speed improved, thanks to tip by Ray Speth. -EF - -2009-07-27 Simplify argument handling code for plot method. -EF - -2009-07-25 Allow "plot(1, 2, 'r*')" to work. - EF - -2009-07-22 Added an 'interp' keyword to griddata so the faster linear - interpolation method can be chosen. Default is 'nn', so - default behavior (using natural neighbor method) is unchanged (JSW) - -2009-07-22 Improved boilerplate.py so that it generates the correct - signatures for pyplot functions. - JKS - -2009-07-19 Fixed the docstring of Axes.step to reflect the correct - meaning of the kwargs "pre" and "post" - See SF bug - https://sourceforge.net/tracker/index.php?func=detail&aid=2823304&group_id=80706&atid=560720 - - JDH - -2009-07-18 Fix support for hatches without color fills to pdf and svg - backends. Add an example of that to hatch_demo.py. - JKS - -2009-07-17 Removed fossils from swig version of agg backend. - EF - -2009-07-14 initial submission of the annotation guide. -JJL - -2009-07-14 axes_grid : minor improvements in anchored_artists and - inset_locator. -JJL - -2009-07-14 Fix a few bugs in ConnectionStyle algorithms. Add - ConnectionPatch class. -JJL - -2009-07-11 Added a fillstyle Line2D property for half filled markers - -- see examples/pylab_examples/fillstyle_demo.py JDH - -2009-07-08 Attempt to improve performance of qt4 backend, do not call - qApp.processEvents while processing an event. Thanks Ole - Streicher for tracking this down - DSD - -2009-06-24 Add withheader option to mlab.rec2csv and changed - use_mrecords default to False in mlab.csv2rec since this is - partially broken - JDH - -2009-06-24 backend_agg.draw_marker quantizes the main path (as in the - draw_path). - JJL - -2009-06-24 axes_grid: floating axis support added. - JJL - -2009-06-14 Add new command line options to backend_driver.py to support - running only some directories of tests - JKS - -2009-06-13 partial cleanup of mlab and its importation in pylab - EF - -2009-06-13 Introduce a rotation_mode property for the Text artist. See - examples/pylab_examples/demo_text_rotation_mode.py -JJL - -2009-06-07 add support for bz2 files per sf support request 2794556 - - JDH - -2009-06-06 added a properties method to the artist and inspector to - return a dict mapping property name -> value; see sf - feature request 2792183 - JDH - -2009-06-06 added Neil's auto minor tick patch; sf patch #2789713 - JDH - -2009-06-06 do not apply alpha to rgba color conversion if input is - already rgba - JDH - -2009-06-03 axes_grid : Initial check-in of curvelinear grid support. See - examples/axes_grid/demo_curvelinear_grid.py - JJL - -2009-06-01 Add set_color method to Patch - EF - -2009-06-01 Spine is now derived from Patch - ADS - -2009-06-01 use cbook.is_string_like() instead of isinstance() for spines - ADS - -2009-06-01 cla() support for spines - ADS - -2009-06-01 Removed support for gtk < 2.4. - EF - -2009-05-29 Improved the animation_blit_qt4 example, which was a mix - of the object-oriented and pylab interfaces. It is now - strictly object-oriented - DSD - -2009-05-28 Fix axes_grid toolkit to work with spine patch by ADS. - JJL - -2009-05-28 Applied fbianco's patch to handle scroll wheel events in - the qt4 backend - DSD - -2009-05-26 Add support for "axis spines" to have arbitrary location. -ADS - -2009-05-20 Add an empty matplotlibrc to the tests/ directory so that running - tests will use the default set of rcparams rather than the user's - config. - RMM - -2009-05-19 Axis.grid(): allow use of which='major,minor' to have grid - on major and minor ticks. -ADS - -2009-05-18 Make psd(), csd(), and cohere() wrap properly for complex/two-sided - versions, like specgram() (SF #2791686) - RMM - -2009-05-18 Fix the linespacing bug of multiline text (#1239682). See - examples/pylab_examples/multiline.py -JJL - -2009-05-18 Add *annotation_clip* attr. for text.Annotation class. - If True, annotation is only drawn when the annotated point is - inside the axes area. -JJL - -2009-05-17 Fix bug(#2749174) that some properties of minor ticks are - not conserved -JJL - -2009-05-17 applied Michiel's sf patch 2790638 to turn off gtk event - loop in setupext for pygtk>=2.15.10 - JDH - -2009-05-17 applied Michiel's sf patch 2792742 to speed up Cairo and - macosx collections; speedups can be 20x. Also fixes some - bugs in which gc got into inconsistent state - -====================================================================== - -2008-05-17 Release 0.98.5.3 at r7107 from the branch - JDH - -2009-05-13 An optional offset and bbox support in restore_bbox. - Add animation_blit_gtk2.py. -JJL - -2009-05-13 psfrag in backend_ps now uses baseline-alignment - when preview.sty is used ((default is - bottom-alignment). Also, a small api imporvement - in OffsetBox-JJL - -2009-05-13 When the x-coordinate of a line is monotonically - increasing, it is now automatically clipped at - the stage of generating the transformed path in - the draw method; this greatly speeds up zooming and - panning when one is looking at a short segment of - a long time series, for example. - EF - -2009-05-11 aspect=1 in log-log plot gives square decades. -JJL - -2009-05-08 clabel takes new kwarg, rightside_up; if False, labels - will not be flipped to keep them rightside-up. This - allows the use of clabel to make streamfunction arrows, - as requested by Evan Mason. - EF - -2009-05-07 'labelpad' can now be passed when setting x/y labels. This - allows controlling the spacing between the label and its - axis. - RMM - -2009-05-06 print_ps now uses mixed-mode renderer. Axes.draw rasterize - artists whose zorder smaller than rasterization_zorder. - -JJL - -2009-05-06 Per-artist Rasterization, originally by Eric Bruning. -JJ - -2009-05-05 Add an example that shows how to make a plot that updates - using data from another process. Thanks to Robert - Cimrman - RMM - -2009-05-05 Add Axes.get_legend_handles_labels method. - JJL - -2009-05-04 Fix bug that Text.Annotation is still drawn while set to - not visible. - JJL - -2009-05-04 Added TJ's fill_betweenx patch - JDH - -2009-05-02 Added options to plotfile based on question from - Joseph Smidt and patch by Matthias Michler. - EF - - -2009-05-01 Changed add_artist and similar Axes methods to - return their argument. - EF - -2009-04-30 Incorrect eps bbox for landscape mode fixed - JJL - -2009-04-28 Fixed incorrect bbox of eps output when usetex=True. - JJL - -2009-04-24 Changed use of os.open* to instead use subprocess.Popen. - os.popen* are deprecated in 2.6 and are removed in 3.0. - RMM - -2009-04-20 Worked on axes_grid documentation. Added - axes_grid.inset_locator. - JJL - -2009-04-17 Initial check-in of the axes_grid toolkit. - JJL - -2009-04-17 Added a support for bbox_to_anchor in - offsetbox.AnchoredOffsetbox. Improved a documentation. - - JJL - -2009-04-16 Fixed a offsetbox bug that multiline texts are not - correctly aligned. - JJL - -2009-04-16 Fixed a bug in mixed mode renderer that images produced by - an rasterizing backend are placed with incorrect size. - - JJL - -2009-04-14 Added Jonathan Taylor's Reinier Heeres' port of John - Porters' mplot3d to svn trunk. Package in - mpl_toolkits.mplot3d and demo is examples/mplot3d/demo.py. - Thanks Reiner - -2009-04-06 The pdf backend now escapes newlines and linefeeds in strings. - Fixes sf bug #2708559; thanks to Tiago Pereira for the report. - -2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to - create an output file. Thanks to Joao Luis Silva for reporting - this. - JKS - -2009-04-05 _png.read_png() reads 12 bit PNGs (patch from - Tobias Wood) - ADS - -2009-04-04 Allow log axis scale to clip non-positive values to - small positive value; this is useful for errorbars. - EF - -2009-03-28 Make images handle nan in their array argument. - A helper, cbook.safe_masked_invalid() was added. - EF - -2009-03-25 Make contour and contourf handle nan in their Z argument. - EF - -2009-03-20 Add AuxTransformBox in offsetbox.py to support some transformation. - anchored_text.py example is enhanced and renamed - (anchored_artists.py). - JJL - -2009-03-20 Add "bar" connection style for annotation - JJL - -2009-03-17 Fix bugs in edge color handling by contourf, found - by Jae-Joon Lee. - EF - -2009-03-14 Added 'LightSource' class to colors module for - creating shaded relief maps. shading_example.py - added to illustrate usage. - JSW - -2009-03-11 Ensure wx version >= 2.8; thanks to Sandro Tosi and - Chris Barker. - EF - -2009-03-10 Fix join style bug in pdf. - JKS - -2009-03-07 Add pyplot access to figure number list - EF - -2009-02-28 hashing of FontProperties accounts current rcParams - JJL - -2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF - -2009-02-26 Add optional bbox_to_anchor argument for legend class - JJL - -2009-02-26 Support image clipping in pdf backend. - JKS - -2009-02-25 Improve tick location subset choice in FixedLocator. - EF - -2009-02-24 Deprecate numerix, and strip out all but the numpy - part of the code. - EF - -2009-02-21 Improve scatter argument handling; add an early error - message, allow inputs to have more than one dimension. - EF - -2009-02-16 Move plot_directive.py to the installed source tree. Add - support for inline code content - MGD - -2009-02-16 Move mathmpl.py to the installed source tree so it is - available to other projects. - MGD - -2009-02-14 Added the legend title support - JJL - -2009-02-10 Fixed a bug in backend_pdf so it doesn't break when the setting - pdf.use14corefonts=True is used. Added test case in - unit/test_pdf_use14corefonts.py. - NGR - -2009-02-08 Added a new imsave function to image.py and exposed it in - the pyplot interface - GR - -2009-02-04 Some reorgnization of the legend code. anchored_text.py - added as an example. - JJL - -2009-02-04 Add extent keyword arg to hexbin - ADS - -2009-02-04 Fix bug in mathtext related to \dots and \ldots - MGD - -2009-02-03 Change default joinstyle to round - MGD - -2009-02-02 Reduce number of marker XObjects in pdf output - JKS - -2009-02-02 Change default resolution on polar plot to 1 - MGD - -2009-02-02 Avoid malloc errors in ttconv for fonts that don't have - e.g., PostName (a version of Tahoma triggered this) - JKS - -2009-01-30 Remove support for pyExcelerator in exceltools -- use xlwt - instead - JDH - -2009-01-29 Document 'resolution' kwarg for polar plots. Support it - when using pyplot.polar, not just Figure.add_axes. - MGD - -2009-01-29 Rework the nan-handling/clipping/quantizing/simplification - framework so each is an independent part of a pipeline. - Expose the C++-implementation of all of this so it can be - used from all Python backends. Add rcParam - "path.simplify_threshold" to control the threshold of - similarity below which vertices will be removed. - -2009-01-26 Improved tight bbox option of the savefig. - JJL - -2009-01-26 Make curves and NaNs play nice together - MGD - -2009-01-21 Changed the defaults of acorr and xcorr to use - usevlines=True, maxlags=10 and normed=True since these are - the best defaults - -2009-01-19 Fix bug in quiver argument handling. - EF - -2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF - -2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is - "tight", try to determine the tight bounding box. - JJL - -2009-01-16 Fix bug in is_string_like so it doesn't raise an - unnecessary exception. - EF - -2009-01-16 Fix an infinite recursion in the unit registry when searching - for a converter for a sequence of strings. Add a corresponding - test. - RM - -2009-01-16 Bugfix of C typedef of MPL_Int64 that was failing on - Windows XP 64 bit, as reported by George Goussard on numpy - mailing list. - ADS - -2009-01-16 Added helper function LinearSegmentedColormap.from_list to - facilitate building simple custom colomaps. See - examples/pylab_examples/custom_cmap_fromlist.py - JDH - -2009-01-16 Applied Michiel's patch for macosx backend to fix rounding - bug. Closed sf bug 2508440 - JSW - -2009-01-10 Applied Michiel's hatch patch for macosx backend and - draw_idle patch for qt. Closes sf patched 2497785 and - 2468809 - JDH - -2009-01-10 Fix bug in pan/zoom with log coordinates. - EF - -2009-01-06 Fix bug in setting of dashed negative contours. - EF - -2009-01-06 Be fault tolerant when len(linestyles)>NLev in contour. - MM - -2009-01-06 Added marginals kwarg to hexbin to plot marginal densities - JDH - -2009-01-06 Change user-visible multipage pdf object to PdfPages to - avoid accidents with the file-like PdfFile. - JKS - -2009-01-05 Fix a bug in pdf usetex: allow using non-embedded fonts. - JKS - -2009-01-05 optional use of preview.sty in usetex mode. - JJL - -2009-01-02 Allow multipage pdf files. - JKS - -2008-12-31 Improve pdf usetex by adding support for font effects - (slanting and extending). - JKS - -2008-12-29 Fix a bug in pdf usetex support, which occurred if the same - Type-1 font was used with different encodings, e.g., with - Minion Pro and MnSymbol. - JKS - -2008-12-20 fix the dpi-dependent offset of Shadow. - JJL - -2008-12-20 fix the hatch bug in the pdf backend. minor update - in docs and example - JJL - -2008-12-19 Add axes_locator attribute in Axes. Two examples are added. - - JJL - -2008-12-19 Update Axes.legend documnetation. /api/api_changes.rst is also - updated to describe chages in keyword parameters. - Issue a warning if old keyword parameters are used. - JJL - -2008-12-18 add new arrow style, a line + filled triangles. -JJL - -================================================================== -2008-12-18 Re-Released 0.98.5.2 from v0_98_5_maint at r6679 - Released 0.98.5.2 from v0_98_5_maint at r6667 - -2008-12-18 Removed configobj, experimental traits and doc/mpl_data link - JDH - -2008-12-18 Fix bug where a line with NULL data limits prevents - subsequent data limits from calculating correctly - MGD - -2008-12-17 Major documentation generator changes - MGD - -2008-12-17 Applied macosx backend patch with support for path - collections, quadmesh, etc... - JDH - -2008-12-17 fix dpi-dependent behavior of text bbox and arrow in annotate - -JJL - -2008-12-17 Add group id support in artist. Two examples which - demostrate svg filter are added. -JJL - -2008-12-16 Another attempt to fix dpi-dependent behavior of Legend. -JJL - -2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text. - -2008-12-16 Added markevery property to Line2D to support subsampling - of markers - JDH -2008-12-15 Removed mpl_data symlink in docs. On platforms that do not - support symlinks, these become copies, and the font files - are large, so the distro becomes unneccessarily bloaded. - Keeping the mpl_examples dir because relative links are - harder for the plot directive and the *.py files are not so - large. - JDH - -2008-12-15 Fix \$ in non-math text with usetex off. Document - differences between usetex on/off - MGD - -2008-12-15 Fix anti-aliasing when auto-snapping - MGD - -2008-12-15 Fix grid lines not moving correctly during pan and zoom - MGD - -2008-12-12 Preparations to eliminate maskedarray rcParams key: its - use will now generate a warning. Similarly, importing - the obsolote numerix.npyma will generate a warning. - EF - -2008-12-12 Added support for the numpy.histogram() weights parameter - to the axes hist() method. Docs taken from numpy - MM - -2008-12-12 Fixed warning in hist() with numpy 1.2 - MM - -2008-12-12 Removed external packages: configobj and enthought.traits - which are only required by the experimental traited config - and are somewhat out of date. If needed, install them - independently, see: - - http://code.enthought.com/projects/traits - - and: - - http://www.voidspace.org.uk/python/configobj.html - -2008-12-12 Added support to asign labels to histograms of multiple - data. - MM - -================================================================= -2008-12-11 Released 0.98.5 at svn r6573 - -2008-12-11 Use subprocess.Popen instead of os.popen in dviread - (Windows problem reported by Jorgen Stenarson) - JKS - -2008-12-10 Added Michael's font_manager fix and Jae-Joon's - figure/subplot fix. Bumped version number to 0.98.5 - JDH - -================================================================= -2008-12-09 Released 0.98.4 at svn r6536 - -2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH - -2008-12-08 Removed the prints in the set_*style commands. Return the - list of pprinted strings instead - JDH - -2008-12-08 Some of the changes Michael made to improve the output of - the property tables in the rest docs broke of made - difficult to use some of the interactive doc helpers, e.g., - setp and getp. Having all the rest markup in the ipython - shell also confused the docstrings. I added a new rc param - docstring.harcopy, to format the docstrings differently for - hardcopy and other use. Ther ArtistInspector could use a - little refactoring now since there is duplication of effort - between the rest out put and the non-rest output - JDH - -2008-12-08 Updated spectral methods (psd, csd, etc.) to scale one-sided - densities by a factor of 2 and, optionally, scale all densities - by the sampling frequency. This gives better MatLab - compatibility. -RM - -2008-12-08 Fixed alignment of ticks in colorbars. -MGD - -2008-12-07 drop the deprecated "new" keyword of np.histogram() for - numpy 1.2 or later. -JJL - -2008-12-06 Fixed a bug in svg backend that new_figure_manager() - ignores keywords arguments such as figsize, etc. -JJL - -2008-12-05 Fixed a bug that the handlelength of the new legend class - set too short when numpoints=1 -JJL - -2008-12-04 Added support for data with units (e.g., dates) to - Axes.fill_between. -RM - -2008-12-04 Added fancybox keyword to legend. Also applied some changes - for better look, including baseline adjustment of the - multiline texts so that it is center aligned. -JJL - -2008-12-02 The transmuter classes in the patches.py are reorganized as - subclasses of the Style classes. A few more box and arrow - styles are added. -JJL - -2008-12-02 Fixed a bug in the new legend class that didn't allowed - a tuple of coordinate vlaues as loc. -JJL - -2008-12-02 Improve checks for external dependencies, using subprocess - (instead of deprecated popen*) and distutils (for version - checking) - DSD - -2008-11-30 Reimplementaion of the legend which supports baseline alignement, - multi-column, and expand mode. - JJL - -2008-12-01 Fixed histogram autoscaling bug when bins or range are given - explicitly (fixes Debian bug 503148) - MM - -2008-11-25 Added rcParam axes.unicode_minus which allows plain hypen - for minus when False - JDH - -2008-11-25 Added scatterpoints support in Legend. patch by Erik - Tollerud - JJL - -2008-11-24 Fix crash in log ticking. - MGD - -2008-11-20 Added static helper method BrokenHBarCollection.span_where - and Axes/pyplot method fill_between. See - examples/pylab/fill_between.py - JDH - -2008-11-12 Add x_isdata and y_isdata attributes to Artist instances, - and use them to determine whether either or both - coordinates are used when updating dataLim. This is - used to fix autoscaling problems that had been triggered - by axhline, axhspan, axvline, axvspan. - EF - -2008-11-11 Update the psd(), csd(), cohere(), and specgram() methods - of Axes and the csd() cohere(), and specgram() functions - in mlab to be in sync with the changes to psd(). - In fact, under the hood, these all call the same core - to do computations. - RM - -2008-11-11 Add 'pad_to' and 'sides' parameters to mlab.psd() to - allow controlling of zero padding and returning of - negative frequency components, respecitively. These are - added in a way that does not change the API. - RM - -2008-11-10 Fix handling of c kwarg by scatter; generalize - is_string_like to accept numpy and numpy.ma string - array scalars. - RM and EF - -2008-11-09 Fix a possible EINTR problem in dviread, which might help - when saving pdf files from the qt backend. - JKS - -2008-11-05 Fix bug with zoom to rectangle and twin axes - MGD - -2008-10-24 Added Jae Joon's fancy arrow, box and annotation - enhancements -- see - examples/pylab_examples/annotation_demo2.py - -2008-10-23 Autoscaling is now supported with shared axes - EF - -2008-10-23 Fixed exception in dviread that happened with Minion - JKS - -2008-10-21 set_xlim, ylim now return a copy of the viewlim array to - avoid modify inplace surprises - -2008-10-20 Added image thumbnail generating function - matplotlib.image.thumbnail. See - examples/misc/image_thumbnail.py - JDH - -2008-10-20 Applied scatleg patch based on ideas and work by Erik - Tollerud and Jae-Joon Lee. - MM - -2008-10-11 Fixed bug in pdf backend: if you pass a file object for - output instead of a filename, e.g., in a wep app, we now - flush the object at the end. - JKS - -2008-10-08 Add path simplification support to paths with gaps. - EF - -2008-10-05 Fix problem with AFM files that don't specify the font's - full name or family name. - JKS - -2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel_format() method, - for easy access to the set_powerlimits method of the - major ScalarFormatter. - EF - -2008-10-04 Experimental new kwarg borderpad to replace pad in legend, - based on suggestion by Jae-Joon Lee. - EF - -2008-09-27 Allow spy to ignore zero values in sparse arrays, based - on patch by Tony Yu. Also fixed plot to handle empty - data arrays, and fixed handling of markers in figlegend. - EF - -2008-09-24 Introduce drawstyles for lines. Transparently split linestyles - like 'steps--' into drawstyle 'steps' and linestyle '--'. - Legends always use drawstyle 'default'. - MM - -2008-09-18 Fixed quiver and quiverkey bugs (failure to scale properly - when resizing) and added additional methods for determining - the arrow angles - EF - -2008-09-18 Fix polar interpolation to handle negative values of theta - MGD - -2008-09-14 Reorganized cbook and mlab methods related to numerical - calculations that have little to do with the goals of those two - modules into a separate module numerical_methods.py - Also, added ability to select points and stop point selection - with keyboard in ginput and manual contour labeling code. - Finally, fixed contour labeling bug. - DMK - -2008-09-11 Fix backtick in Postscript output. - MGD - -2008-09-10 [ 2089958 ] Path simplification for vector output backends - Leverage the simplification code exposed through - path_to_polygons to simplify certain well-behaved paths in - the vector backends (PDF, PS and SVG). "path.simplify" - must be set to True in matplotlibrc for this to work. - - MGD - -2008-09-10 Add "filled" kwarg to Path.intersects_path and - Path.intersects_bbox. - MGD - -2008-09-07 Changed full arrows slightly to avoid an xpdf rendering - problem reported by Friedrich Hagedorn. - JKS - -2008-09-07 Fix conversion of quadratic to cubic Bezier curves in PDF - and PS backends. Patch by Jae-Joon Lee. - JKS - -2008-09-06 Added 5-point star marker to plot command - EF - -2008-09-05 Fix hatching in PS backend - MGD - -2008-09-03 Fix log with base 2 - MGD - -2008-09-01 Added support for bilinear interpolation in - NonUniformImage; patch by Gregory Lielens. - EF - -2008-08-28 Added support for multiple histograms with data of - different length - MM - -2008-08-28 Fix step plots with log scale - MGD - -2008-08-28 Fix masked arrays with markers in non-Agg backends - MGD - -2008-08-28 Fix clip_on kwarg so it actually works correctly - MGD - -2008-08-25 Fix locale problems in SVG backend - MGD - -2008-08-22 fix quiver so masked values are not plotted - JSW - -2008-08-18 improve interactive pan/zoom in qt4 backend on windows - DSD - -2008-08-11 Fix more bugs in NaN/inf handling. In particular, path simplification - (which does not handle NaNs or infs) will be turned off automatically - when infs or NaNs are present. Also masked arrays are now converted - to arrays with NaNs for consistent handling of masks and NaNs - - MGD and EF - -================================================================= -2008-08-03 Released 0.98.3 at svn r5947 - -2008-08-01 Backported memory leak fixes in _ttconv.cpp - MGD - -2008-07-31 Added masked array support to griddata. - JSW - -2008-07-26 Added optional C and reduce_C_function arguments to - axes.hexbin(). This allows hexbin to accumulate the values - of C based on the x,y coordinates and display in hexagonal - bins. - ADS - -2008-07-24 Deprecated (raise NotImplementedError) all the mlab2 - functions from matplotlib.mlab out of concern that some of - them were not clean room implementations. JDH - -2008-07-24 Rewrite of a significant portion of the clabel code (class - ContourLabeler) to improve inlining. - DMK - -2008-07-22 Added Barbs polygon collection (similar to Quiver) for plotting - wind barbs. Added corresponding helpers to Axes and pyplot as - well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM - -2008-07-21 Added scikits.delaunay as matplotlib.delaunay. Added griddata - function in matplotlib.mlab, with example (griddata_demo.py) in - pylab_examples. griddata function will use mpl_toolkits._natgrid - if installed. - JSW - -2008-07-21 Re-introduced offset_copy that works in the context of the - new transforms. - MGD - -2008-07-21 Committed patch by Ryan May to add get_offsets and - set_offsets to Collections base class - EF - -2008-07-21 Changed the "asarray" strategy in image.py so that - colormapping of masked input should work for all - image types (thanks Klaus Zimmerman) - EF - -2008-07-20 Rewrote cbook.delete_masked_points and corresponding - unit test to support rgb color array inputs, datetime - inputs, etc. - EF - -2008-07-20 Renamed unit/axes_unit.py to cbook_unit.py and modified - in accord with Ryan's move of delete_masked_points from - axes to cbook. - EF - -2008-07-18 Check for nan and inf in axes.delete_masked_points(). - This should help hexbin and scatter deal with nans. - ADS - -2008-07-17 Added ability to manually select contour label locations. - Also added a waitforbuttonpress function. - DMK - -2008-07-17 Fix bug with NaNs at end of path (thanks, Andrew Straw for - the report) - MGD - -2008-07-16 Improve error handling in texmanager, thanks to Ian Henry - for reporting - DSD - -2008-07-12 Added support for external backends with the - "module://my_backend" syntax - JDH - -2008-07-11 Fix memory leak related to shared axes. Grouper should - store weak references. - MGD - -2008-07-10 Bugfix: crash displaying fontconfig pattern - MGD - -2008-07-10 Bugfix: [ 2013963 ] update_datalim_bounds in Axes not works - MGD - -2008-07-10 Bugfix: [ 2014183 ] multiple imshow() causes gray edges - MGD - -2008-07-09 Fix rectangular axes patch on polar plots bug - MGD - -2008-07-09 Improve mathtext radical rendering - MGD - -2008-07-08 Improve mathtext superscript placement - MGD - -2008-07-07 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD - -2008-07-03 Implemented findobj method for artist and pyplot - see - examples/pylab_examples/findobj_demo.py - JDH - -2008-06-30 Another attempt to fix TextWithDash - DSD - -2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to - have been unnecessary and caused a bug reported by P. - Raybaut - DSD - -2008-06-27 Fixed tick positioning bug - MM - -2008-06-27 Fix dashed text bug where text was at the wrong end of the - dash - MGD - -2008-06-26 Fix mathtext bug for expressions like $x_{\leftarrow}$ - MGD - -2008-06-26 Fix direction of horizontal/vertical hatches - MGD - -2008-06-25 Figure.figurePatch renamed Figure.patch, Axes.axesPatch - renamed Axes.patch, Axes.axesFrame renamed Axes.frame, - Axes.get_frame, which returns Axes.patch, is deprecated. - Examples and users guide updated - JDH - -2008-06-25 Fix rendering quality of pcolor - MGD - -================================================================= -2008-06-24 Released 0.98.2 at svn r5667 - (source only for debian) JDH - -2008-06-24 Added "transparent" kwarg to savefig. - MGD - -2008-06-24 Applied Stefan's patch to draw a single centered marker over - a line with numpoints==1 - JDH - -2008-06-23 Use splines to render circles in scatter plots - MGD - -=============================================================== -2008-06-22 Released 0.98.1 at revision 5637 - -2008-06-22 Removed axes3d support and replaced it with a - NotImplementedError for one release cycle - -2008-06-21 fix marker placement bug in backend_ps - DSD - -2008-06-20 [ 1978629 ] scale documentation missing/incorrect for log - MGD - -2008-06-20 Added closed kwarg to PolyCollection. Fixes bug [ 1994535 - ] still missing lines on graph with svn (r 5548). - MGD - -2008-06-20 Added set/get_closed method to Polygon; fixes error - in hist - MM - -2008-06-19 Use relative font sizes (e.g., 'medium' and 'large') in - rcsetup.py and matplotlibrc.template so that text will - be scaled by default when changing rcParams['font.size'] - - EF - -2008-06-17 Add a generic PatchCollection class that can contain any - kind of patch. - MGD - -2008-06-13 Change pie chart label alignment to avoid having labels - overwrite the pie - MGD - -2008-06-12 Added some helper functions to the mathtext parser to - return bitmap arrays or write pngs to make it easier to use - mathtext outside the context of an mpl figure. modified - the mathpng sphinxext to use the mathtext png save - functionality - see examples/api/mathtext_asarray.py - JDH - -2008-06-11 Use matplotlib.mathtext to render math expressions in - online docs - MGD - -2008-06-11 Move PNG loading/saving to its own extension module, and - remove duplicate code in _backend_agg.cpp and _image.cpp - that does the same thing - MGD - -2008-06-11 Numerous mathtext bugfixes, primarily related to - dpi-independence - MGD - -2008-06-10 Bar now applies the label only to the first patch only, and - sets '_nolegend_' for the other patch labels. This lets - autolegend work as expected for hist and bar - see - https://sourceforge.net/tracker/index.php?func=detail&aid=1986597&group_id=80706&atid=560720 - JDH - -2008-06-10 Fix text baseline alignment bug. [ 1985420 ] Repair of - baseline alignment in Text._get_layout. Thanks Stan West - - MGD - -2008-06-09 Committed Gregor's image resample patch to downsampling - images with new rcparam image.resample - JDH - -2008-06-09 Don't install Enthought.Traits along with matplotlib. For - matplotlib developers convenience, it can still be - installed by setting an option in setup.cfg while we figure - decide if there is a future for the traited config - DSD - -2008-06-09 Added range keyword arg to hist() - MM - -2008-06-07 Moved list of backends to rcsetup.py; made use of lower - case for backend names consistent; use validate_backend - when importing backends subpackage - EF - -2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and - Olle Engdegard: make histtype='step' unfilled by default - and introduce histtype='stepfilled'; use default color - cycle; introduce reverse cumulative histogram; new align - keyword - MM - -2008-06-06 Fix closed polygon patch and also provide the option to - not close the polygon - MGD - -2008-06-05 Fix some dpi-changing-related problems with PolyCollection, - as called by Axes.scatter() - MGD - -2008-06-05 Fix image drawing so there is no extra space to the right - or bottom - MGD - -2006-06-04 Added a figure title command suptitle as a Figure method - and pyplot command -- see examples/figure_title.py - JDH - -2008-06-02 Added support for log to hist with histtype='step' and fixed - a bug for log-scale stacked histograms - MM - -=============================================================== -2008-05-29 Released 0.98.0 at revision 5314 - -2008-05-29 matplotlib.image.imread now no longer always returns RGBA - -- 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. - -2008-05-29 Implement path clipping in PS backend - JDH - -2008-05-29 Fixed two bugs in texmanager.py: - improved comparison of dvipng versions - fixed a bug introduced when get_grey method was added - - DSD - -2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte - characters are used with Type 3 fonts - MGD - -2008-05-28 Allow keyword args to configure widget properties as - requested in - http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722 - - JDH - -2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in - http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720 - -2008-05-28 zero width/height Rectangles no longer influence the - autoscaler. Useful for log histograms with empty bins - - JDH - -2008-05-28 Fix rendering of composite glyphs in Type 3 conversion - (particularly as evidenced in the Eunjin.ttf Korean font) - Thanks Jae-Joon Lee for finding this! - -2008-05-27 Rewrote the cm.ScalarMappable callback infrastructure to - use cbook.CallbackRegistry rather than custom callback - handling. Amy users of add_observer/notify of the - cm.ScalarMappable should uae the - cm.ScalarMappable.callbacksSM CallbackRegistry instead. JDH - -2008-05-27 Fix TkAgg build on Ubuntu 8.04 (and hopefully a more - general solution for other platforms, too.) - -2008-05-24 Added PIL support for loading images to imread (if PIL is - available) - JDH - -2008-05-23 Provided a function and a method for controlling the - plot color cycle. - EF - -2008-05-23 Major revision of hist(). Can handle 2D arrays and create - stacked histogram plots; keyword 'width' deprecated and - rwidth (relative width) introduced; align='edge' changed - to center of bin - MM - -2008-05-22 Added support for ReST-based doumentation using Sphinx. - Documents are located in doc/, and are broken up into - a users guide and an API reference. To build, run the - make.py files. Sphinx-0.4 is needed to build generate xml, - which will be useful for rendering equations with mathml, - use sphinx from svn until 0.4 is released - DSD - -2008-05-21 Fix segfault in TkAgg backend - MGD - -2008-05-21 Fix a "local variable unreferenced" bug in plotfile - MM - -2008-05-19 Fix crash when Windows can not access the registry to - determine font path [Bug 1966974, thanks Patrik Simons] - MGD - -2008-05-16 removed some unneeded code w/ the python 2.4 requirement. - cbook no longer provides compatibility for reversed, - enumerate, set or izip. removed lib/subprocess, mpl1, - sandbox/units, and the swig code. This stuff should remain - on the maintenance branch for archival purposes. JDH - -2008-05-16 Reorganized examples dir - JDH - -2008-05-16 Added 'elinewidth' keyword arg to errorbar, based on patch - by Christopher Brown - MM - -2008-05-16 Added 'cumulative' keyword arg to hist to plot cumulative - histograms. For normed hists, this is normalized to one - MM - -2008-05-15 Fix Tk backend segfault on some machines - MGD - -2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD - -2008-05-09 Fix /singlequote (') in Postscript backend - MGD - -2008-05-08 Fix kerning in SVG when embedding character outlines - MGD - -2008-05-07 Switched to future numpy histogram semantic in hist - MM - -2008-05-06 Fix strange colors when blitting in QtAgg and Qt4Agg - MGD - -2008-05-05 pass notify_axes_change to the figure's add_axobserver - in the qt backends, like we do for the other backends. - Thanks Glenn Jones for the report - DSD - -2008-05-02 Added step histograms, based on patch by Erik Tollerud. - MM - -2008-05-02 On PyQt <= 3.14 there is no way to determine the underlying - Qt version. [1851364] - MGD - -2008-05-02 Don't call sys.exit() when pyemf is not found [1924199] - - MGD - -2008-05-02 Update _subprocess.c from upstream Python 2.5.2 to get a - few memory and reference-counting-related bugfixes. See - bug 1949978. - MGD - -2008-04-30 Added some record array editing widgets for gtk -- see - examples/rec_edit*.py - JDH - -2008-04-29 Fix bug in mlab.sqrtm - MM - -2008-04-28 Fix bug in SVG text with Mozilla-based viewers (the symbol - tag is not supported) - MGD - -2008-04-27 Applied patch by Michiel de Hoon to add hexbin - axes method and pyplot function - EF - -2008-04-25 Enforce python >= 2.4; remove subprocess build - EF - -2008-04-25 Enforce the numpy requirement at build time - JDH - -2008-04-24 Make numpy 1.1 and python 2.3 required when importing - matplotlib - EF - -2008-04-24 Fix compilation issues on VS2003 (Thanks Martin Spacek for - all the help) - MGD - -2008-04-24 Fix sub/superscripts when the size of the font has been - changed - MGD - -2008-04-22 Use "svg.embed_char_paths" consistently everywhere - MGD - -2008-04-20 Add support to MaxNLocator for symmetric axis autoscaling. - EF - -2008-04-20 Fix double-zoom bug. - MM - -2008-04-15 Speed up color mapping. - EF - -2008-04-12 Speed up zooming and panning of dense images. - EF - -2008-04-11 Fix global font rcParam setting after initialization - time. - MGD - -2008-04-11 Revert commits 5002 and 5031, which were intended to - avoid an unnecessary call to draw(). 5002 broke saving - figures before show(). 5031 fixed the problem created in - 5002, but broke interactive plotting. Unnecessary call to - draw still needs resolution - DSD - -2008-04-07 Improve color validation in rc handling, suggested - by Lev Givon - EF - -2008-04-02 Allow to use both linestyle definition arguments, '-' and - 'solid' etc. in plots/collections - MM - -2008-03-27 Fix saving to Unicode filenames with Agg backend - (other backends appear to already work...) - (Thanks, Christopher Barker) - MGD - -2008-03-26 Fix SVG backend bug that prevents copying and pasting in - Inkscape (thanks Kaushik Ghose) - MGD - -2008-03-24 Removed an unnecessary call to draw() in the backend_qt* - mouseReleaseEvent. Thanks to Ted Drain - DSD - -2008-03-23 Fix a pdf backend bug which sometimes caused the outermost - gsave to not be balanced with a grestore. - JKS - -2008-03-20 Fixed a minor bug in ContourSet._process_linestyles when - len(linestyles)==Nlev - MM - -2008-03-19 Changed ma import statements to "from numpy import ma"; - this should work with past and future versions of - numpy, whereas "import numpy.ma as ma" will work only - with numpy >= 1.05, and "import numerix.npyma as ma" - is obsolete now that maskedarray is replacing the - earlier implementation, as of numpy 1.05. - -2008-03-14 Removed an apparently unnecessary call to - FigureCanvasAgg.draw in backend_qt*agg. Thanks to Ted - Drain - DSD - -2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a - buffer width/bbox width mismatch in _backend_agg's - copy_from_bbox - DSD - -2008-02-29 Fix class Wx toolbar pan and zoom functions (Thanks Jeff - Peery) - MGD - -2008-02-16 Added some new rec array functionality to mlab - (rec_summarize, rec2txt and rec_groupby). See - examples/rec_groupby_demo.py. Thanks to Tim M for rec2txt. - -2008-02-12 Applied Erik Tollerud's span selector patch - JDH - -2008-02-11 Update plotting() doc string to refer to getp/setp. - JKS - -2008-02-10 Fixed a problem with square roots in the pdf backend with - usetex. - JKS - -2008-02-08 Fixed minor __str__ bugs so getp(gca()) works. - JKS - -2008-02-05 Added getters for title, xlabel, ylabel, as requested - by Brandon Kieth - EF - -2008-02-05 Applied Gael's ginput patch and created - examples/ginput_demo.py - JDH - -2008-02-03 Expose interpnames, a list of valid interpolation - methods, as an AxesImage class attribute. - EF - -2008-02-03 Added BoundaryNorm, with examples in colorbar_only.py - and image_masked.py. - EF - -2008-02-03 Force dpi=72 in pdf backend to fix picture size bug. - JKS - -2008-02-01 Fix doubly-included font problem in Postscript backend - MGD - -2008-02-01 Fix reference leak in ft2font Glyph objects. - MGD - -2008-01-31 Don't use unicode strings with usetex by default - DSD - -2008-01-31 Fix text spacing problems in PDF backend with *some* fonts, - such as STIXGeneral. - -2008-01-31 Fix \sqrt with radical number (broken by making [ and ] - work below) - MGD - -2008-01-27 Applied Martin Teichmann's patch to improve the Qt4 - backend. Uses Qt's builtin toolbars and statusbars. - See bug 1828848 - DSD - -2008-01-10 Moved toolkits to mpl_toolkits, made mpl_toolkits - a namespace package - JSWHIT - -2008-01-10 Use setup.cfg to set the default parameters (tkagg, - numpy) when building windows installers - DSD - -2008-01-10 Fix bug displaying [ and ] in mathtext - MGD - -2008-01-10 Fix bug when displaying a tick value offset with scientific - notation. (Manifests itself as a warning that the \times - symbol can not be found). - MGD - -2008-01-10 Use setup.cfg to set the default parameters (tkagg, - numpy) when building windows installers - DSD - -=============================================================== -2008-01-06 Released 0.91.2 at revision 4802 - -2007-12-26 Reduce too-late use of matplotlib.use() to a warning - instead of an exception, for backwards compatibility - EF - -2007-12-25 Fix bug in errorbar, identified by Noriko Minakawa - EF - -2007-12-25 Changed masked array importing to work with the upcoming - numpy 1.05 (now the maskedarray branch) as well as with - earlier versions. - EF - -2007-12-16 rec2csv saves doubles without losing precision. Also, it - does not close filehandles passed in open. - JDH,ADS - -2007-12-13 Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel - to matplotlib.toolkits.exceltools - JDH - -2007-12-12 Support alpha-blended text in the Agg and Svg backends - - MGD - -2007-12-10 Fix SVG text rendering bug. - MGD - -2007-12-10 Increase accuracy of circle and ellipse drawing by using an - 8-piece bezier approximation, rather than a 4-piece one. - Fix PDF, SVG and Cairo backends so they can draw paths - (meaning ellipses as well). - MGD - -2007-12-07 Issue a warning when drawing an image on a non-linear axis. - MGD - -2007-12-06 let widgets.Cursor initialize to the lower x and y bounds - rather than 0,0, which can cause havoc for dates and other - transforms - DSD - -2007-12-06 updated references to mpl data directories for py2exe - DSD - -2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD - -2007-12-05 Fix how fonts are cached to avoid loading the same one multiple times. - (This was a regression since 0.90 caused by the refactoring of - font_manager.py) - MGD - -2007-12-05 Support arbitrary rotation of usetex text in Agg backend. - MGD - -2007-12-04 Support '|' as a character in mathtext - MGD - -=============================================================== -2007-11-27 Released 0.91.1 at revision 4517 - -=============================================================== -2007-11-27 Released 0.91.0 at revision 4478 - -2007-11-13 All backends now support writing to a file-like object, not - just a regular file. savefig() can be passed a file-like - object in place of a file path. - MGD - -2007-11-13 Improved the default backend selection at build time: - SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable - backend in this progression will be chosen in the default - config file. If a backend is defined in setup.cfg, that will - be the default backend - DSD - -2007-11-13 Improved creation of default config files at build time for - traited config package - DSD - -2007-11-12 Exposed all the build options in setup.cfg. These options are - read into a dict called "options" by setupext.py. Also, added - "-mpl" tags to the version strings for packages provided by - matplotlib. Versions provided by mpl will be identified and - updated on subsequent installs - DSD - -2007-11-12 Added support for STIX fonts. A new rcParam, - mathtext.fontset, can be used to choose between: - - 'cm': - The TeX/LaTeX Computer Modern fonts - - 'stix': - The STIX fonts (see stixfonts.org) - - 'stixsans': - The STIX fonts, using sans-serif glyphs by default - - 'custom': - A generic Unicode font, in which case the mathtext font - must be specified using mathtext.bf, mathtext.it, - mathtext.sf etc. - - Added a new example, stix_fonts_demo.py to show how to access - different fonts and unusual symbols. - - - MGD - -2007-11-12 Options to disable building backend extension modules moved - from setup.py to setup.cfg - DSD - -2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in - paintEvent, which has to be destroyed using the method end(). If - matplotlib raises an exception before the call to end - and it - does if you feed it with bad data - this method end() is never - called and Qt4 will start spitting error messages - -2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use - system pyparsing, API is too variable from one release - to the next - DSD - -2007-11-08 Made pylab use straight numpy instead of oldnumeric - by default - EF - -2007-11-08 Added additional record array utilites to mlab (rec2excel, - rec2gtk, rec_join, rec_append_field, rec_drop_field) - JDH - -2007-11-08 Updated pytz to version 2007g - DSD - -2007-11-08 Updated pyparsing to version 1.4.8 - DSD - -2007-11-08 Moved csv2rec to recutils and added other record array - utilities - JDH - -2007-11-08 If available, use existing pyparsing installation - DSD - -2007-11-07 Removed old enthought.traits from lib/matplotlib, added - Gael Varoquaux's enthought.traits-2.6b1, which is stripped - of setuptools. The package is installed to site-packages - if not already available - DSD - -2007-11-05 Added easy access to minor tick properties; slight mod - of patch by Pierre G-M - EF - -2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg - backend and qt4 blitting demo - DSD - -2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg - backend and qt4 blitting demo - DSD - -2007-10-31 Made log color scale easier to use with contourf; - automatic level generation now works. - EF - -2007-10-29 TRANSFORMS REFACTORING - - The primary goal of this refactoring was to make it easier - to extend matplotlib to support new kinds of projections. - This is primarily an internal improvement, and the possible - user-visible changes it allows are yet to come. - - The transformation framework was completely rewritten in - Python (with Numpy). This will make it easier to add news - kinds of transformations without writing C/C++ code. - - Transforms are composed into a 'transform tree', made of - transforms whose value depends on other transforms (their - children). When the contents of children change, their - parents are automatically updated to reflect those changes. - To do this an "invalidation" method is used: when children - change, all of their ancestors are marked as "invalid". - When the value of a transform is accessed at a later time, - its value is recomputed only if it is invalid, otherwise a - cached value may be used. This prevents unnecessary - recomputations of transforms, and contributes to better - interactive performance. - - The framework can be used for both affine and non-affine - transformations. However, for speed, we want use the - backend renderers to perform affine transformations - whenever possible. Therefore, it is possible to perform - just the affine or non-affine part of a transformation on a - set of data. The affine is always assumed to occur after - the non-affine. For any transform: - - full transform == non-affine + affine - - Much of the drawing has been refactored in terms of - compound paths. Therefore, many methods have been removed - from the backend interface and replaced with a a handful to - draw compound paths. This will make updating the backends - easier, since there is less to update. It also should make - the backends more consistent in terms of functionality. - - User visible changes: - - - POLAR PLOTS: Polar plots are now interactively zoomable, - and the r-axis labels can be interactively rotated. - Straight line segments are now interpolated to follow the - curve of the r-axis. - - - Non-rectangular clipping works in more backends and with - more types of objects. - - - Sharing an axis across figures is now done in exactly - the same way as sharing an axis between two axes in the - same figure: - - fig1 = figure() - fig2 = figure() - - ax1 = fig1.add_subplot(111) - ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1) - - - linestyles now include steps-pre, steps-post and - steps-mid. The old step still works and is equivalent to - step-pre. - - - Multiple line styles may be provided to a collection. - - See API_CHANGES for more low-level information about this - refactoring. - -2007-10-24 Added ax kwarg to Figure.colorbar and pyplot.colorbar - EF - -2007-10-19 Removed a gsave/grestore pair surrounding _draw_ps, which - was causing a loss graphics state info (see "EPS output - problem - scatter & edgecolors" on mpl-dev, 2007-10-29) - - DSD - -2007-10-15 Fixed a bug in patches.Ellipse that was broken for - aspect='auto'. Scale free ellipses now work properly for - equal and auto on Agg and PS, and they fall back on a - polygonal approximation for nonlinear transformations until - we convince oursleves that the spline approximation holds - for nonlinear transformations. Added - unit/ellipse_compare.py to compare spline with vertex - approx for both aspects. JDH - -2007-10-05 remove generator expressions from texmanager and mpltraits. - generator expressions are not supported by python-2.3 - DSD - -2007-10-01 Made matplotlib.use() raise an exception if called after - backends has been imported. - EF - -2007-09-30 Modified update* methods of Bbox and Interval so they - work with reversed axes. Prior to this, trying to - set the ticks on a reversed axis failed with an - uninformative error message. - EF - -2007-09-30 Applied patches to axes3d to fix index error problem - EF - -2007-09-24 Applied Eike Welk's patch reported on mpl-dev on 2007-09-22 - Fixes a bug with multiple plot windows in the qt backend, - ported the changes to backend_qt4 as well - DSD - -2007-09-21 Changed cbook.reversed to yield the same result as the - python reversed builtin - DSD - -2007-09-13 The usetex support in the pdf backend is more usable now, - so I am enabling it. - JKS - -2007-09-12 Fixed a Axes.bar unit bug - JDH - -2007-09-10 Made skiprows=1 the default on csv2rec - JDH - -2007-09-09 Split out the plotting part of pylab and put it in - pyplot.py; removed numerix from the remaining pylab.py, - which imports everything from pyplot.py. The intention - is that apart from cleanups, the result of importing - from pylab is nearly unchanged, but there is the - new alternative of importing from pyplot to get - the state-engine graphics without all the numeric - functions. - Numpified examples; deleted two that were obsolete; - modified some to use pyplot. - EF - -2007-09-08 Eliminated gd and paint backends - EF - -2007-09-06 .bmp file format is now longer an alias for .raw - -2007-09-07 Added clip path support to pdf backend. - JKS - -2007-09-06 Fixed a bug in the embedding of Type 1 fonts in PDF. - Now it doesn't crash Preview.app. - JKS - -2007-09-06 Refactored image saving code so that all GUI backends can - save most image types. See FILETYPES for a matrix of - backends and their supported file types. - Backend canvases should no longer write their own print_figure() - method -- instead they should write a print_xxx method for - each filetype they can output and add an entry to their - class-scoped filetypes dictionary. - MGD - -2007-09-05 Fixed Qt version reporting in setupext.py - DSD - -2007-09-04 Embedding Type 1 fonts in PDF, and thus usetex support - via dviread, sort of works. To test, enable it by - renaming _draw_tex to draw_tex. - JKS - -2007-09-03 Added ability of errorbar show limits via caret or - arrowhead ends on the bars; patch by Manual Metz. - EF - -2007-09-03 Created type1font.py, added features to AFM and FT2Font - (see API_CHANGES), started work on embedding Type 1 fonts - in pdf files. - JKS - -2007-09-02 Continued work on dviread.py. - JKS - -2007-08-16 Added a set_extent method to AxesImage, allow data extent - to be modified after initial call to imshow - DSD - -2007-08-14 Fixed a bug in pyqt4 subplots-adjust. Thanks to - Xavier Gnata for the report and suggested fix - DSD - -2007-08-13 Use pickle to cache entire fontManager; change to using - font_manager module-level function findfont wrapper for - the fontManager.findfont method - EF - -2007-08-11 Numpification and cleanup of mlab.py and some examples - EF - -2007-08-06 Removed mathtext2 - -2007-07-31 Refactoring of distutils scripts. - - Will not fail on the entire build if an optional Python - package (e.g., Tkinter) is installed but its development - headers are not (e.g., tk-devel). Instead, it will - continue to build all other extensions. - - Provide an overview at the top of the output to display - what dependencies and their versions were found, and (by - extension) what will be built. - - Use pkg-config, when available, to find freetype2, since - this was broken on Mac OS-X when using MacPorts in a non- - standard location. - -2007-07-30 Reorganized configuration code to work with traited config - objects. The new config system is located in the - matplotlib.config package, but it is disabled by default. - To enable it, set NEWCONFIG=True in matplotlib.__init__.py. - The new configuration system will still use the old - matplotlibrc files by default. To switch to the experimental, - traited configuration, set USE_TRAITED_CONFIG=True in - config.__init__.py. - -2007-07-29 Changed default pcolor shading to flat; added aliases - to make collection kwargs agree with setter names, so - updating works; related minor cleanups. - Removed quiver_classic, scatter_classic, pcolor_classic. - EF - -2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model. - - There is one (known) backward incompatible change. The - 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, - e.g., $\mathcal{R}$. - - Other new features include: - - - Math may be interspersed with non-math text. Any text - with an even number of $'s (non-escaped) will be sent to - the mathtext parser for layout. - - - Sub/superscripts are less likely to accidentally overlap. - - - Support for sub/superscripts in either order, e.g., $x^i_j$ - and $x_j^i$ are equivalent. - - - Double sub/superscripts (e.g., $x_i_j$) are considered - ambiguous and raise an exception. Use braces to disambiguate. - - - $\frac{x}{y}$ can be used for displaying fractions. - - - $\sqrt[3]{x}$ can be used to display the radical symbol - with a root number and body. - - - $\left(\frac{x}{y}\right)$ may be used to create - parentheses and other delimiters that automatically - resize to the height of their contents. - - - Spacing around operators etc. is now generally more like - TeX. - - - Added support (and fonts) for boldface (\bf) and - sans-serif (\sf) symbols. - - - Log-like function name shortcuts are supported. For - example, $\sin(x)$ may be used instead of ${\rm sin}(x)$ - - - Limited use of kerning for the easy case (same font) - - Behind the scenes, the pyparsing.py module used for doing - the math parsing was updated to the latest stable version - (1.4.6). A lot of duplicate code was refactored out of the - Font classes. - - - MGD - -2007-07-19 completed numpification of most trivial cases - NN - -2007-07-19 converted non-numpy relicts throughout the code - NN - -2007-07-19 replaced the Python code in numerix/ by a minimal wrapper around - numpy that explicitly mentions all symbols that need to be - addressed for further numpification - NN - -2007-07-18 make usetex respect changes to rcParams. texmanager used to - only configure itself when it was created, now it - reconfigures when rcParams are changed. Thank you Alexander - Schmolck for contributing a patch - DSD - -2007-07-17 added validation to setting and changing rcParams - DSD - -2007-07-17 bugfix segfault in transforms module. Thanks Ben North for - the patch. - ADS - -2007-07-16 clean up some code in ticker.ScalarFormatter, use unicode to - render multiplication sign in offset ticklabel - DSD - -2007-07-16 fixed a formatting bug in ticker.ScalarFormatter's scientific - notation (10^0 was being rendered as 10 in some cases) - DSD - -2007-07-13 Add MPL_isfinite64() and MPL_isinf64() for testing - doubles in (the now misnamed) MPL_isnan.h. - ADS - -2007-07-13 The matplotlib._isnan module removed (use numpy.isnan) - ADS - -2007-07-13 Some minor cleanups in _transforms.cpp - ADS - -2007-07-13 Removed the rest of the numerix extension code detritus, - numpified axes.py, and cleaned up the imports in axes.py - - JDH - -2007-07-13 Added legend.loc as configurable option that could in - future default to 'best'. - NN - -2007-07-12 Bugfixes in mlab.py to coerce inputs into numpy arrays. -ADS - -2007-07-11 Added linespacing kwarg to text.Text - EF - -2007-07-11 Added code to store font paths in SVG files. - MGD - -2007-07-10 Store subset of TTF font as a Type 3 font in PDF files. - MGD - -2007-07-09 Store subset of TTF font as a Type 3 font in PS files. - MGD - -2007-07-09 Applied Paul's pick restructure pick and add pickers, - sourceforge patch 1749829 - JDH - - -2007-07-09 Applied Allan's draw_lines agg optimization. JDH - - -2007-07-08 Applied Carl Worth's patch to fix cairo draw_arc - SC - -2007-07-07 fixed bug 1712099: xpdf distiller on windows - DSD - -2007-06-30 Applied patches to tkagg, gtk, and wx backends to reduce - memory leakage. Patches supplied by Mike Droettboom; - see tracker numbers 1745400, 1745406, 1745408. - Also made unit/memleak_gui.py more flexible with - command-line options. - EF - -2007-06-30 Split defaultParams into separate file rcdefaults (together with - validation code). Some heavy refactoring was necessary to do so, - but the overall behavior should be the same as before. - NN - -2007-06-27 Added MPLCONFIGDIR for the default location for mpl data - and configuration. useful for some apache installs where - HOME is not writable. Tried to clean up the logic in - _get_config_dir to support non-writable HOME where are - writable HOME/.matplotlib already exists - JDH - -2007-06-27 Fixed locale bug reported at - http://sourceforge.net/tracker/index.php?func=detail&aid=1744154&group_id=80706&atid=560720 - by adding a cbook.unicode_safe function - JDH - -2007-06-27 Applied Micheal's tk savefig bugfix described at - http://sourceforge.net/tracker/index.php?func=detail&aid=1716732&group_id=80706&atid=560720 - Thanks Michael! - - -2007-06-27 Patch for get_py2exe_datafiles() to work with new directory - layout. (Thanks Tocer and also Werner Bruhin.) -ADS - - -2007-06-27 Added a scroll event to the mpl event handling system and - implemented it for backends GTK* -- other backend - users/developers/maintainers, please add support for your - backend. - JDH - -2007-06-25 Changed default to clip=False in colors.Normalize; - modified ColorbarBase for easier colormap display - EF - -2007-06-13 Added maskedarray option to rc, numerix - EF - -2007-06-11 Python 2.5 compatibility fix for mlab.py - EF - -2007-06-10 In matplotlibrc file, use 'dashed' | 'solid' instead - of a pair of floats for contour.negative_linestyle - EF - -2007-06-08 Allow plot and fill fmt string to be any mpl string - colorspec - EF - -2007-06-08 Added gnuplot file plotfile function to pylab -- see - examples/plotfile_demo.py - JDH - -2007-06-07 Disable build of numarray and Numeric extensions for - internal MPL use and the numerix layer. - ADS - -2007-06-07 Added csv2rec to matplotlib.mlab to support automatically - converting csv files to record arrays using type - introspection, and turned on native datetime support using - the new units support in matplotlib.dates. See - examples/loadrec.py ! JDH - -2007-06-07 Simplified internal code of _auto_legend_data - NN - -2007-06-04 Added labeldistance arg to Axes.pie to control the raidal - distance of the wedge labels - JDH - -2007-06-03 Turned mathtext in SVG into single with multiple - objects (easier to edit in inkscape). - NN - -=============================================================== -2007-06-02 Released 0.90.1 at revision 3352 - -2007-06-02 Display only meaningful labels when calling legend() - without args. - NN - -2007-06-02 Have errorbar follow the color cycle even if line is not plotted. - Suppress plotting of errorbar caps for capsize=0. - NN - -2007-06-02 Set markers to same alpha value as line. - NN - -2007-06-02 Fix mathtext position in svg backend. - NN - -2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to - Travis -- job well done. - ADS - -2007-05-18 Added LaTeX unicode support. Enable with the - 'text.latex.unicode' rcParam. This requires the ucs and - inputenc LaTeX packages. - ADS - -2007-04-23 Fixed some problems with polar -- added general polygon - clipping to clip the lines a nd grids to the polar axes. - Added support for set_rmax to easily change the maximum - radial grid. Added support for polar legend - JDH - -2007-04-16 Added Figure.autofmt_xdate to handle adjusting the bottom - and rotating the tick labels for date plots when the ticks - often overlap - JDH - -2007-04-09 Beginnings of usetex support for pdf backend. -JKS - -2007-04-07 Fixed legend/LineCollection bug. Added label support - to collections. - EF - -2007-04-06 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. - EF - -2007-04-06 Fixed rotation of ellipses in pdf backend - (sf bug #1690559) -JKS - -2007-04-04 More matshow tweaks; documentation updates; new method - set_bounds() for formatters and locators. - EF - -2007-04-02 Fixed problem with imshow and matshow of integer arrays; - fixed problems with changes to color autoscaling. - EF - -2007-04-01 Made image color autoscaling work correctly with - a tracking colorbar; norm.autoscale now scales - unconditionally, while norm.autoscale_None changes - only None-valued vmin, vmax. - EF - -2007-03-31 Added a qt-based subplot-adjustment dialog - DSD - -2007-03-30 Fixed a bug in backend_qt4, reported on mpl-dev - DSD - -2007-03-26 Removed colorbar_classic from figure.py; fixed bug in - Figure.clf() in which _axobservers was not getting - cleared. Modernization and cleanups. - EF - -2007-03-26 Refactored some of the units support -- units now live in - the respective x and y Axis instances. See also - API_CHANGES for some alterations to the conversion - interface. JDH - -2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric - and numarray support for masked arrays is broken in other - ways when using quiver. I didn't pursue that.) - ADS - -2007-03-23 Made font_manager.py close opened files. - JKS - -2007-03-22 Made imshow default extent match matshow - EF - -2007-03-22 Some more niceties for xcorr -- a maxlags option, normed - now works for xcorr as well as axorr, usevlines is - supported, and a zero correlation hline is added. See - examples/xcorr_demo.py. Thanks Sameer for the patch. - - JDH - -2007-03-21 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. - Modified Axes.errorbar which uses vlines and hlines. See - API_CHANGES; the return signature for these three functions - is now different - -2007-03-20 Refactored units support and added new examples - JDH - -2007-03-19 Added Mike's units patch - JDH - -2007-03-18 Matshow as an Axes method; test version matshow1() in - pylab; added 'integer' Boolean kwarg to MaxNLocator - initializer to force ticks at integer locations. - EF - -2007-03-17 Preliminary support for clipping to paths agg - JDH - -2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF - -2007-03-14 Add masked-array support to hist. - EF - -2007-03-03 Change barh to take a kwargs dict and pass it to bar. - Fixes sf bug #1669506. - -2007-03-02 Add rc parameter pdf.inheritcolor, which disables all - color-setting operations in the pdf backend. The idea is - that you include the resulting file in another program and - set the colors (both stroke and fill color) there, so you - can use the same pdf file for e.g., a paper and a - presentation and have them in the surrounding color. You - will probably not want to draw figure and axis frames in - that case, since they would be filled in the same color. - JKS - -2007-02-26 Prevent building _wxagg.so with broken Mac OS X wxPython. - ADS - -2007-02-23 Require setuptools for Python 2.3 - ADS - -2007-02-22 WXAgg accelerator updates - KM - WXAgg's C++ accelerator has been fixed to use the correct wxBitmap - constructor. - - The backend has been updated to use new wxPython functionality to - provide fast blit() animation without the C++ accelerator. This - requires wxPython 2.8 or later. Previous versions of wxPython can - use the C++ acclerator or the old pure Python routines. - - setup.py no longer builds the C++ accelerator when wxPython >= 2.8 - is present. - - The blit() method is now faster regardless of which agg/wxPython - conversion routines are used. - -2007-02-21 Applied the PDF backend patch by Nicolas Grilly. - This impacts several files and directories in matplotlib: - - - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts, - holding AFM files for the 14 PDF core fonts. These fonts are - embedded in every PDF viewing application. - - - setup.py: Added the directory pdfcorefonts to package_data. - - - lib/matplotlib/__init__.py: Added the default parameter - 'pdf.use14corefonts'. When True, the PDF backend uses - only the 14 PDF core fonts. - - - lib/matplotlib/afm.py: Added some keywords found in - recent AFM files. Added a little workaround to handle - Euro symbol. - - - lib/matplotlib/fontmanager.py: Added support for the 14 - PDF core fonts. These fonts have a dedicated cache (file - pdfcorefont.cache), not the same as for other AFM files - (file .afmfont.cache). Also cleaned comments to conform - to CODING_GUIDE. - - - lib/matplotlib/backends/backend_pdf.py: - Added support for 14 PDF core fonts. - Fixed some issues with incorrect character widths and - encodings (works only for the most common encoding, - WinAnsiEncoding, defined by the official PDF Reference). - Removed parameter 'dpi' because it causes alignment issues. - - -JKS (patch by Nicolas Grilly) - -2007-02-17 Changed ft2font.get_charmap, and updated all the files where - get_charmap is mentioned - ES - -2007-02-13 Added barcode demo- JDH - -2007-02-13 Added binary colormap to cm - JDH - -2007-02-13 Added twiny to pylab - JDH - -2007-02-12 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 - ADS - -2007-02-07 Committed Rob Hetland's patch for qt4: remove - references to text()/latin1(), plus some improvements - to the toolbar layout - DSD - -=============================================================== -2007-02-06 Released 0.90.0 at revision 3003 - -2007-01-22 Extended the new picker API to text, patches and patch - collections. Added support for user customizable pick hit - testing and attribute tagging of the PickEvent - Details - and examples in examples/pick_event_demo.py - JDH - -2007-01-16 Begun work on a new pick API using the mpl event handling - frameowrk. Artists will define their own pick method with - a configurable epsilon tolerance and return pick attrs. - All artists that meet the tolerance threshold will fire a - PickEvent with artist dependent attrs; e.g., a Line2D can set - the indices attribute that shows the indices into the line - that are within epsilon of the pick point. See - examples/pick_event_demo.py. The implementation of pick - for the remaining Artists remains to be done, but the core - infrastructure at the level of event handling is in place - with a proof-of-concept implementation for Line2D - JDH - -2007-01-16 src/_image.cpp: update to use Py_ssize_t (for 64-bit systems). - Use return value of fread() to prevent warning messages - SC. - -2007-01-15 src/_image.cpp: combine buffer_argb32() and buffer_bgra32() into - a new method color_conv(format) - SC - -2007-01-14 backend_cairo.py: update draw_arc() so that - examples/arctest.py looks correct - SC - -2007-01-12 backend_cairo.py: enable clipping. Update draw_image() so that - examples/contour_demo.py looks correct - SC - -2007-01-12 backend_cairo.py: fix draw_image() so that examples/image_demo.py - now looks correct - SC - -2007-01-11 Added Axes.xcorr and Axes.acorr to plot the cross - correlation of x vs y or the autocorrelation of x. pylab - wrappers also provided. See examples/xcorr_demo.py - JDH - -2007-01-10 Added "Subplot.label_outer" method. It will set the - visibility of the ticklabels so that yticklabels are only - visible in the first column and xticklabels are only - visible in the last row - JDH - -2007-01-02 Added additional kwarg documentation - JDH - -2006-12-28 Improved error message for nonpositive input to log - transform; added log kwarg to bar, barh, and hist, - and modified bar method to behave sensibly by default - when the ordinate has a log scale. (This only works - if the log scale is set before or by the call to bar, - hence the utility of the log kwarg.) - EF - -2006-12-27 backend_cairo.py: update draw_image() and _draw_mathtext() to work - with numpy - SC - -2006-12-20 Fixed xpdf dependency check, which was failing on windows. - Removed ps2eps dependency check. - DSD - -2006-12-19 Added Tim Leslie's spectral patch - JDH - -2006-12-17 Added rc param 'axes.formatter.limits' to control - the default threshold for switching to scientific - notation. Added convenience method - Axes.ticklabel_format() for turning scientific notation - on or off on either or both axes. - EF - -2006-12-16 Added ability to turn control scientific notation - in ScalarFormatter - EF - -2006-12-16 Enhanced boxplot to handle more flexible inputs - EF - -2006-12-13 Replaced calls to where() in colors.py with much faster - clip() and putmask() calls; removed inappropriate - uses of getmaskorNone (which should be needed only - very rarely); all in response to profiling by - David Cournapeau. Also fixed bugs in my 2-D - array support from 12-09. - EF - -2006-12-09 Replaced spy and spy2 with the new spy that combines - marker and image capabilities - EF - -2006-12-09 Added support for plotting 2-D arrays with plot: - columns are plotted as in Matlab - EF - -2006-12-09 Added linewidth kwarg to bar and barh; fixed arg - checking bugs - EF - -2006-12-07 Made pcolormesh argument handling match pcolor; - fixed kwarg handling problem noted by Pierre GM - EF - -2006-12-06 Made pcolor support vector X and/or Y instead of - requiring 2-D arrays - EF - -2006-12-05 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 - JDH - -2006-12-03 Added LogNorm to colors.py as illustrated by - examples/pcolor_log.py, based on suggestion by - Jim McDonald. Colorbar modified to handle LogNorm. - Norms have additional "inverse" method. - EF - -2006-12-02 Changed class names in colors.py to match convention: - normalize -> Normalize, no_norm -> NoNorm. Old names - are still available. - Changed __init__.py rc defaults to match those in - matplotlibrc - EF - -2006-11-22 Fixed bug in set_*lim that I had introduced on 11-15 - EF - -2006-11-22 Added examples/clippedline.py, which shows how to clip line - data based on view limits -- it also changes the marker - style when zoomed in - JDH - -2006-11-21 Some spy bug-fixes and added precision arg per Robert C's - suggestion - JDH - -2006-11-19 Added semi-automatic docstring generation detailing all the - kwargs that functions take using the artist introspection - tools; e.g., 'help text now details the scatter kwargs - that control the Text properties - JDH - -2006-11-17 Removed obsolete scatter_classic, leaving a stub to - raise NotImplementedError; same for pcolor_classic - EF - -2006-11-15 Removed obsolete pcolor_classic - EF - -2006-11-15 Fixed 1588908 reported by Russel Owen; factored - nonsingular method out of ticker.py, put it into - transforms.py as a function, and used it in - set_xlim and set_ylim. - EF - -2006-11-14 Applied patch 1591716 by Ulf Larssen to fix a bug in - apply_aspect. Modified and applied patch - 1594894 by mdehoon to fix bugs and improve - formatting in lines.py. Applied patch 1573008 - by Greg Willden to make psd etc. plot full frequency - range for complex inputs. - EF - -2006-11-14 Improved the ability of the colorbar to track - changes in corresponding image, pcolor, or - contourf. - EF - -2006-11-11 Fixed bug that broke Numeric compatibility; - added support for alpha to colorbar. The - alpha information is taken from the mappable - object, not specified as a kwarg. - EF - -2006-11-05 Added broken_barh function for makring a sequence of - horizontal bars broken by gaps -- see examples/broken_barh.py - -2006-11-05 Removed lineprops and markerprops from the Annotation code - and replaced them with an arrow configurable with kwarg - arrowprops. See examples/annotation_demo.py - JDH - -2006-11-02 Fixed a pylab subplot bug that was causing axes to be - deleted with hspace or wspace equals zero in - subplots_adjust - JDH - -2006-10-31 Applied axes3d patch 1587359 - http://sourceforge.net/tracker/index.php?func=detail&aid=1587359&group_id=80706&atid=560722 - JDH - -=============================================================== -2006-10-26 Released 0.87.7 at revision 2835 - -2006-10-25 Made "tiny" kwarg in Locator.nonsingular much smaller - EF - -2006-10-17 Closed sf bug 1562496 update line props dash/solid/cap/join - styles - JDH - -2006-10-17 Complete overhaul of the annotations API and example code - - See matplotlib.text.Annotation and - examples/annotation_demo.py JDH - -2006-10-12 Committed Manuel Metz's StarPolygon code and - examples/scatter_star_poly.py - JDH - - -2006-10-11 commented out all default values in matplotlibrc.template - Default values should generally be taken from defaultParam in - __init__.py - the file matplotlib should only contain those values - that the user wants to explicitly change from the default. - (see thread "marker color handling" on matplotlib-devel) - -2006-10-10 Changed default comment character for load to '#' - JDH - -2006-10-10 deactivated rcfile-configurability of markerfacecolor - and markeredgecolor. Both are now hardcoded to the special value - 'auto' to follow the line color. Configurability at run-time - (using function arguments) remains functional. - NN - -2006-10-07 introduced dummy argument magnification=1.0 to - FigImage.make_image to satisfy unit test figimage_demo.py - The argument is not yet handled correctly, which should only - show up when using non-standard DPI settings in PS backend, - introduced by patch #1562394. - NN - -2006-10-06 add backend-agnostic example: simple3d.py - NN - -2006-09-29 fix line-breaking for SVG-inline images (purely cosmetic) - NN - -2006-09-29 reworked set_linestyle and set_marker - markeredgecolor and markerfacecolor now default to - a special value "auto" that keeps the color in sync with - the line color - further, the intelligence of axes.plot is cleaned up, - improved and simplified. Complete compatibility cannot be - guaranteed, but the new behavior should be much more predictable - (see patch #1104615 for details) - NN - -2006-09-29 changed implementation of clip-path in SVG to work around a - limitation in inkscape - NN - -2006-09-29 added two options to matplotlibrc: - svg.image_inline - svg.image_noscale - see patch #1533010 for details - NN - -2006-09-29 axes.py: cleaned up kwargs checking - NN - -2006-09-29 setup.py: cleaned up setup logic - NN - -2006-09-29 setup.py: check for required pygtk versions, fixes bug #1460783 - SC - -=============================================================== -2006-09-27 Released 0.87.6 at revision 2783 - -2006-09-24 Added line pointers to the Annotation code, and a pylab - interface. See matplotlib.text.Annotation, - examples/annotation_demo.py and - examples/annotation_demo_pylab.py - JDH - -2006-09-18 mathtext2.py: The SVG backend now supports the same things that - the AGG backend does. Fixed some bugs with rendering, and out of - bounds errors in the AGG backend - ES. Changed the return values - of math_parse_s_ft2font_svg to support lines (fractions etc.) - -2006-09-17 Added an Annotation class to facilitate annotating objects - and an examples file examples/annotation_demo.py. I want - to add dash support as in TextWithDash, but haven't decided - yet whether inheriting from TextWithDash is the right base - class or if another approach is needed - JDH - -=============================================================== -2006-09-05 Released 0.87.5 at revision 2761 - -2006-09-04 Added nxutils for some numeric add-on extension code -- - specifically a better/more efficient inside polygon tester (see - unit/inside_poly_*.py) - JDH - -2006-09-04 Made bitstream fonts the rc default - JDH - -2006-08-31 Fixed alpha-handling bug in ColorConverter, affecting - collections in general and contour/contourf in - particular. - EF - -2006-08-30 ft2font.cpp: Added draw_rect_filled method (now used by mathtext2 - to draw the fraction bar) to FT2Font - ES - -2006-08-29 setupext.py: wrap calls to tk.getvar() with str(). On some - systems, getvar returns a Tcl_Obj instead of a string - DSD - -2006-08-28 mathtext2.py: Sub/superscripts can now be complex (i.e. - fractions etc.). The demo is also updated - ES - -2006-08-28 font_manager.py: Added /usr/local/share/fonts to list of - X11 font directories - DSD - -2006-08-28 mahtext2.py: Initial support for complex fractions. Also, - rendering is now completely separated from parsing. The - sub/superscripts now work better. - Updated the mathtext2_demo.py - ES - -2006-08-27 qt backends: don't create a QApplication when backend is - imported, do it when the FigureCanvasQt is created. Simplifies - applications where mpl is embedded in qt. Updated - embedding_in_qt* examples - DSD - -2006-08-27 mahtext2.py: Now the fonts are searched in the OS font dir and - in the mpl-data dir. Also env is not a dict anymore. - ES - -2006-08-26 minor changes to __init__.py, mathtex2_demo.py. Added matplotlibrc - key "mathtext.mathtext2" (removed the key "mathtext2") - ES - -2006-08-21 mathtext2.py: Initial support for fractions - Updated the mathtext2_demo.py - _mathtext_data.py: removed "\" from the unicode dicts - mathtext.py: Minor modification (because of _mathtext_data.py)- ES - -2006-08-20 Added mathtext2.py: Replacement for mathtext.py. Supports _ ^, - \rm, \cal etc., \sin, \cos etc., unicode, recursive nestings, - inline math mode. The only backend currently supported is Agg - __init__.py: added new rc params for mathtext2 - added mathtext2_demo.py example - ES - -2006-08-19 Added embedding_in_qt4.py example - DSD - -2006-08-11 Added scale free Ellipse patch for Agg - CM - -2006-08-10 Added converters to and from julian dates to matplotlib.dates - (num2julian and julian2num) - JDH - -2006-08-08 Fixed widget locking so multiple widgets could share the - event handling - JDH - -2006-08-07 Added scale free Ellipse patch to SVG and PS - CM - -2006-08-05 Re-organized imports in numerix for numpy 1.0b2 -- TEO - -2006-08-04 Added draw_markers to PDF backend. - JKS - -2006-08-01 Fixed a bug in postscript's rendering of dashed lines - DSD - -2006-08-01 figure.py: savefig() update docstring to add support for 'format' - argument. - backend_cairo.py: print_figure() add support 'format' argument. - SC - -2006-07-31 Don't let postscript's xpdf distiller compress images - DSD - -2006-07-31 Added shallowcopy() methods to all Transformations; - removed copy_bbox_transform and copy_bbox_transform_shallow - from transforms.py; - added offset_copy() function to transforms.py to - facilitate positioning artists with offsets. - See examples/transoffset.py. - EF - -2006-07-31 Don't let postscript's xpdf distiller compress images - DSD - -2006-07-29 Fixed numerix polygon bug reported by Nick Fotopoulos. - Added inverse_numerix_xy() transform method. - Made autoscale_view() preserve axis direction - (e.g., increasing down).- EF - -2006-07-28 Added shallow bbox copy routine for transforms -- mainly - useful for copying transforms to apply offset to. - JDH - -2006-07-28 Added resize method to FigureManager class - for Qt and Gtk backend - CM - -2006-07-28 Added subplots_adjust button to Qt backend - CM - -2006-07-26 Use numerix more in collections. - Quiver now handles masked arrays. - EF - -2006-07-22 Fixed bug #1209354 - DSD - -2006-07-22 make scatter() work with the kwarg "color". Closes bug - 1285750 - DSD - -2006-07-20 backend_cairo.py: require pycairo 1.2.0. - print_figure() update to output SVG using cairo. - -2006-07-19 Added blitting for Qt4Agg - CM - -2006-07-19 Added lasso widget and example examples/lasso_demo.py - JDH - -2006-07-18 Added blitting for QtAgg backend - CM - -2006-07-17 Fixed bug #1523585: skip nans in semilog plots - DSD - -2006-07-12 Add support to render the scientific notation label - over the right-side y-axis - DSD - -=============================================================== -2006-07-11 Released 0.87.4 at revision 2558 - -2006-07-07 Fixed a usetex bug with older versions of latex - DSD - -2006-07-07 Add compatibility for NumPy 1.0 - TEO - -2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD - -2006-06-26 Fixed a usetex bug. On windows, usetex will prcess - postscript output in the current directory rather than - in a temp directory. This is due to the use of spaces - and tildes in windows paths, which cause problems with - latex. The subprocess module is no longer used. - DSD - -2006-06-22 Various changes to bar(), barh(), and hist(). - Added 'edgecolor' keyword arg to bar() and barh(). - The x and y args in barh() have been renamed to width - and bottom respectively, and their order has been swapped - to maintain a (position, value) order ala matlab. left, - height, width and bottom args can now all be scalars or - sequences. barh() now defaults to edge alignment instead - of center alignment. Added a keyword arg 'align' to bar(), - barh() and hist() that controls between edge or center bar - alignment. Fixed ignoring the rcParams['patch.facecolor'] - for bar color in bar() and barh(). Fixed ignoring the - rcParams['lines.color'] for error bar color in bar() - and barh(). Fixed a bug where patches would be cleared - when error bars were plotted if rcParams['axes.hold'] - was False. - MAS - -2006-06-22 Added support for numerix 2-D arrays as alternatives to - a sequence of (x,y) tuples for specifying paths in - collections, quiver, contour, pcolor, transforms. - Fixed contour bug involving setting limits for - color mapping. Added numpy-style all() to numerix. - EF - -2006-06-20 Added custom FigureClass hook to pylab interface - see - examples/custom_figure_class.py - -2006-06-16 Added colormaps from gist (gist_earth, gist_stern, - gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW - -2006-06-16 Added a pointer to parent in figure canvas so you can - access the container with fig.canvas.manager. Useful if - you want to set the window title, e.g., in gtk - fig.canvas.manager.window.set_title, though a GUI neutral - method would be preferable JDH - -2006-06-16 Fixed colorbar.py to handle indexed colors (i.e., - norm = no_norm()) by centering each colored region - on its index. - EF - -2006-06-15 Added scalex and scaley to Axes.autoscale_view to support - selective autoscaling just the x or y axis, and supported - these command in plot so you can say plot(something, - scaley=False) and just the x axis will be autoscaled. - Modified axvline and axhline to support this, so for - example axvline will no longer autoscale the y axis. JDH - -2006-06-13 Fix so numpy updates are backward compatible - TEO - -2006-06-12 Updated numerix to handle numpy restructuring of - oldnumeric - TEO - -2006-06-12 Updated numerix.fft to handle numpy restructuring - Added ImportError to numerix.linear_algebra for numpy -TEO - -2006-06-11 Added quiverkey command to pylab and Axes, using - QuiverKey class in quiver.py. Changed pylab and Axes - to use quiver2 if possible, but drop back to the - newly-renamed quiver_classic if necessary. Modified - examples/quiver_demo.py to illustrate the new quiver - and quiverkey. Changed LineCollection implementation - slightly to improve compatibility with PolyCollection. - EF - -2006-06-11 Fixed a usetex bug for windows, running latex on files - with spaces in their names or paths was failing - DSD - -2006-06-09 Made additions to numerix, changes to quiver to make it - work with all numeric flavors. - EF - -2006-06-09 Added quiver2 function to pylab and method to axes, - with implementation via a Quiver class in quiver.py. - quiver2 will replace quiver before the next release; - it is placed alongside it initially to facilitate - testing and transition. See also - examples/quiver2_demo.py. - EF - -2006-06-08 Minor bug fix to make ticker.py draw proper minus signs - with usetex - DSD - -=============================================================== -2006-06-06 Released 0.87.3 at revision 2432 - -2006-05-30 More partial support for polygons with outline or fill, - but not both. Made LineCollection inherit from - ScalarMappable. - EF - -2006-05-29 Yet another revision of aspect-ratio handling. - EF - -2006-05-27 Committed a patch to prevent stroking zero-width lines in - the svg backend - DSD - -2006-05-24 Fixed colorbar positioning bug identified by Helge - Avlesen, and improved the algorithm; added a 'pad' - kwarg to control the spacing between colorbar and - parent axes. - EF - -2006-05-23 Changed color handling so that collection initializers - can take any mpl color arg or sequence of args; deprecated - float as grayscale, replaced by string representation of - float. - EF - -2006-05-19 Fixed bug: plot failed if all points were masked - EF - -2006-05-19 Added custom symbol option to scatter - JDH - -2006-05-18 New example, multi_image.py; colorbar fixed to show - offset text when the ScalarFormatter is used; FixedFormatter - augmented to accept and display offset text. - EF - -2006-05-14 New colorbar; old one is renamed to colorbar_classic. - New colorbar code is in colorbar.py, with wrappers in - figure.py and pylab.py. - Fixed aspect-handling bug reported by Michael Mossey. - Made backend_bases.draw_quad_mesh() run.- EF - -2006-05-08 Changed handling of end ranges in contourf: replaced - "clip-ends" kwarg with "extend". See docstring for - details. -EF - -2006-05-08 Added axisbelow to rc - JDH - -2006-05-08 If using PyGTK require version 2.2+ - SC - -2006-04-19 Added compression support to PDF backend, controlled by - new pdf.compression rc setting. - JKS - -2006-04-19 Added Jouni's PDF backend - -2006-04-18 Fixed a bug that caused agg to not render long lines - -2006-04-16 Masked array support for pcolormesh; made pcolormesh support the - same combinations of X,Y,C dimensions as pcolor does; - improved (I hope) description of grid used in pcolor, - pcolormesh. - EF - -2006-04-14 Reorganized axes.py - EF - -2006-04-13 Fixed a bug Ryan found using usetex with sans-serif fonts and - exponential tick labels - DSD - -2006-04-11 Refactored backend_ps and backend_agg to prevent module-level - texmanager imports. Now these imports only occur if text.usetex - rc setting is true - DSD - -2006-04-10 Committed changes required for building mpl on win32 - platforms with visual studio. This allows wxpython - blitting for fast animations. - CM - -2006-04-10 Fixed an off-by-one bug in Axes.change_geometry. - -2006-04-10 Fixed bug in pie charts where wedge wouldn't have label in - legend. Submitted by Simon Hildebrandt. - ADS - -2006-05-06 Usetex makes temporary latex and dvi files in a temporary - directory, rather than in the user's current working - directory - DSD - -2006-04-05 Apllied Ken's wx deprecation warning patch closing sf patch - #1465371 - JDH - -2006-04-05 Added support for the new API in the postscript backend. - Allows values to be masked using nan's, and faster file - creation - DSD - -2006-04-05 Use python's subprocess module for usetex calls to - external programs. subprocess catches when they exit - abnormally so an error can be raised. - DSD - -2006-04-03 Fixed the bug in which widgets would not respond to - events. This regressed the twinx functionality, so I - also updated subplots_adjust to update axes that share - an x or y with a subplot instance. - CM - -2006-04-02 Moved PBox class to transforms and deleted pbox.py; - made pylab axis command a thin wrapper for Axes.axis; - more tweaks to aspect-ratio handling; fixed Axes.specgram - to account for the new imshow default of unit aspect - ratio; made contour set the Axes.dataLim. - EF - -2006-03-31 Fixed the Qt "Underlying C/C++ object deleted" bug. - JRE - -2006-03-31 Applied Vasily Sulatskov's Qt Navigation Toolbar enhancement. - JRE - -2006-03-31 Ported Norbert's rewriting of Halldor's stineman_interp - algorithm to make it numerix compatible and added code to - matplotlib.mlab. See examples/interp_demo.py - JDH - -2006-03-30 Fixed a bug in aspect ratio handling; blocked potential - crashes when panning with button 3; added axis('image') - support. - EF - -2006-03-28 More changes to aspect ratio handling; new PBox class - in new file pbox.py to facilitate resizing and repositioning - axes; made PolarAxes maintain unit aspect ratio. - EF - -2006-03-23 Refactored TextWithDash class to inherit from, rather than - delegate to, the Text class. Improves object inspection - and closes bug # 1357969 - DSD - -2006-03-22 Improved aspect ratio handling, including pylab interface. - Interactive resizing, pan, zoom of images and plots - (including panels with a shared axis) should work. - Additions and possible refactoring are still likely. - EF - -2006-03-21 Added another colorbrewer colormap (RdYlBu) - JSWHIT - -2006-03-21 Fixed tickmarks for logscale plots over very large ranges. - Closes bug # 1232920 - DSD - -2006-03-21 Added Rob Knight's arrow code; see examples/arrow_demo.py - JDH - -2006-03-20 Added support for masking values with nan's, using ADS's - isnan module and the new API. Works for *Agg backends - DSD - -2006-03-20 Added contour.negative_linestyle rcParam - ADS - -2006-03-20 Added _isnan extension module to test for nan with Numeric - - ADS - -2006-03-17 Added Paul and Alex's support for faceting with quadmesh - in sf patch 1411223 - JDH - -2006-03-17 Added Charle Twardy's pie patch to support colors=None. - Closes sf patch 1387861 - JDH - -2006-03-17 Applied sophana's patch to support overlapping axes with - toolbar navigation by toggling activation with the 'a' key. - Closes sf patch 1432252 - JDH - -2006-03-17 Applied Aarre's linestyle patch for backend EMF; closes sf - patch 1449279 - JDH - -2006-03-17 Applied Jordan Dawe's patch to support kwarg properties - for grid lines in the grid command. Closes sf patch - 1451661 - JDH - -2006-03-17 Center postscript output on page when using usetex - DSD - -2006-03-17 subprocess module built if Python <2.4 even if subprocess - can be imported from an egg - ADS - -2006-03-17 Added _subprocess.c from Python upstream and hopefully - enabled building (without breaking) on Windows, although - not tested. - ADS - -2006-03-17 Updated subprocess.py to latest Python upstream and - reverted name back to subprocess.py - ADS - -2006-03-16 Added John Porter's 3D handling code - - -=============================================================== -2006-03-16 Released 0.87.2 at revision 2150 - -2006-03-15 Fixed bug in MaxNLocator revealed by daigos@infinito.it. - The main change is that Locator.nonsingular now adjusts - vmin and vmax if they are nearly the same, not just if - they are equal. A new kwarg, "tiny", sets the threshold. - - EF - -2006-03-14 Added import of compatibility library for newer numpy - linear_algebra - TEO - -2006-03-12 Extended "load" function to support individual columns and - moved "load" and "save" into matplotlib.mlab so they can be - used outside of pylab -- see examples/load_converter.py - - JDH - -2006-03-12 Added AutoDateFormatter and AutoDateLocator submitted - by James Evans. Try the load_converter.py example for a - demo. - ADS - -2006-03-11 Added subprocess module from python-2.4 - DSD - -2006-03-11 Fixed landscape orientation support with the usetex - option. The backend_ps print_figure method was - getting complicated, I added a _print_figure_tex - method to maintain some degree of sanity - DSD - -2006-03-11 Added "papertype" savefig kwarg for setting - postscript papersizes. papertype and ps.papersize - rc setting can also be set to "auto" to autoscale - pagesizes - DSD - -2006-03-09 Apply P-J's patch to make pstoeps work on windows - patch report # 1445612 - DSD - -2006-03-09 Make backend rc parameter case-insensitive - DSD - -2006-03-07 Fixed bug in backend_ps related to C0-C6 papersizes, - which were causing problems with postscript viewers. - Supported page sizes include letter, legal, ledger, - A0-A10, and B0-B10 - DSD - -=============================================================== -2006-03-07 Released 0.87.1 - -2006-03-04 backend_cairo.py: - fix get_rgb() bug reported by Keith Briggs. - Require pycairo 1.0.2. - Support saving png to file-like objects. - SC - -2006-03-03 Fixed pcolor handling of vmin, vmax - EF - -2006-03-02 improve page sizing with usetex with the latex - geometry package. Closes bug # 1441629 - DSD - -2006-03-02 Fixed dpi problem with usetex png output. Accepted a - modified version of patch # 1441809 - DSD - -2006-03-01 Fixed axis('scaled') to deal with case xmax < xmin - JSWHIT - -2006-03-01 Added reversed colormaps (with '_r' appended to name) - JSWHIT - -2006-02-27 Improved eps bounding boxes with usetex - DSD - -2006-02-27 Test svn commit, again! - -2006-02-27 Fixed two dependency checking bugs related to usetex - on Windows - DSD - -2006-02-27 Made the rc deprecation warnings a little more human - readable. - -2006-02-26 Update the previous gtk.main_quit() bug fix to use gtk.main_level() - - SC - -2006-02-24 Implemented alpha support in contour and contourf - EF - -2006-02-22 Fixed gtk main quit bug when quit was called before - mainloop. - JDH - -2006-02-22 Small change to colors.py to workaround apparent - bug in numpy masked array module - JSWHIT - -2006-02-22 Fixed bug in ScalarMappable.to_rgba() reported by - Ray Jones, and fixed incorrect fix found by Jeff - Whitaker - EF - -=============================================================== -2006-02-22 Released 0.87 - -2006-02-21 Fixed portrait/landscape orientation in postscript backend - DSD - -2006-02-21 Fix bug introduced in yesterday's bug fix - SC - -2006-02-20 backend_gtk.py FigureCanvasGTK.draw(): fix bug reported by - David Tremouilles - SC - -2006-02-20 Remove the "pygtk.require('2.4')" error from - examples/embedding_in_gtk2.py - SC - -2006-02-18 backend_gtk.py FigureCanvasGTK.draw(): simplify to use (rather than - duplicate) the expose_event() drawing code - SC - -2006-02-12 Added stagger or waterfall plot capability to LineCollection; - illustrated in examples/collections.py. - EF - -2006-02-11 Massive cleanup of the usetex code in the postscript backend. Possibly - fixed the clipping issue users were reporting with older versions of - ghostscript - DSD - -2006-02-11 Added autolim kwarg to axes.add_collection. Changed - collection get_verts() methods accordingly. - EF - -2006-02-09 added a temporary rc parameter text.dvipnghack, to allow Mac users to get nice - results with the usetex option. - DSD - -2006-02-09 Fixed a bug related to setting font sizes with the usetex option. - DSD - -2006-02-09 Fixed a bug related to usetex's latex code. - DSD - -2006-02-09 Modified behavior of font.size rc setting. You should define font.size in pts, - which will set the "medium" or default fontsize. Special text sizes like axis - labels or tick labels can be given relative font sizes like small, large, - x-large, etc. and will scale accordingly. - DSD - -2006-02-08 Added py2exe specific datapath check again. Also added new - py2exe helper function get_py2exe_datafiles for use in py2exe - setup.py scripts. - CM - -2006-02-02 Added box function to pylab - -2006-02-02 Fixed a problem in setupext.py, tk library formatted in unicode - caused build problems - DSD - -2006-02-01 Dropped TeX engine support in usetex to focus on LaTeX. - DSD - -2006-01-29 Improved usetex option to respect the serif, sans-serif, monospace, - and cursive rc settings. Removed the font.latex.package rc setting, - it is no longer required - DSD - -2006-01-29 Fixed tex's caching to include font.family rc information - DSD - -2006-01-29 Fixed subpixel rendering bug in *Agg that was causing - uneven gridlines - JDH - -2006-01-28 Added fontcmd to backend_ps's RendererPS.draw_tex, to support other - font families in eps output - DSD - -2006-01-28 Added MaxNLocator to ticker.py, and changed contour.py to - use it by default. - EF - -2006-01-28 Added fontcmd to backend_ps's RendererPS.draw_tex, to support other - font families in eps output - DSD - -2006-01-27 Buffered reading of matplotlibrc parameters in order to allow - 'verbose' settings to be processed first (allows verbose.report - during rc validation process) - DSD - -2006-01-27 Removed setuptools support from setup.py and created a - separate setupegg.py file to replace it. - CM - -2006-01-26 Replaced the ugly datapath logic with a cleaner approach from - http://wiki.python.org/moin/DistutilsInstallDataScattered. - Overrides the install_data command. - CM - -2006-01-24 Don't use character typecodes in cntr.c --- changed to use - defined typenumbers instead. - TEO - -2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency - -2006-01-24 Added masked array support to scatter - EF - -2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency - checking - DSD - -=============================================================== -2006-01-24 Released 0.86.2 - -2006-01-20 Added a converters dict to pylab load to convert selected - coloumns to float -- especially useful for files with date - strings, uses a datestr2num converter - JDH - -2006-01-20 Added datestr2num to matplotlib dates to convert a string - or sequence of strings to a matplotlib datenum - -2006-01-18 Added quadrilateral pcolormesh patch 1409190 by Alex Mont - and Paul Kienzle -- this is *Agg only for now. See - examples/quadmesh_demo.py - JDH - -2006-01-18 Added Jouni's boxplot patch - JDH - -2006-01-18 Added comma delimiter for pylab save - JDH - -2006-01-12 Added Ryan's legend patch - JDH - - -2006-1-12 Fixed numpy / numeric to use .dtype.char to keep in SYNC with numpy SVN - -=============================================================== -2006-1-11 Released 0.86.1 - -2006-1-11 Fixed setup.py for win32 build and added rc template to the MANIFEST.in - -2006-1-10 Added xpdf distiller option. matplotlibrc ps.usedistiller can now be - none, false, ghostscript, or xpdf. Validation checks for - dependencies. This needs testing, but the xpdf option should produce - the highest-quality output and small file sizes - DSD - -2006-01-10 For the usetex option, backend_ps now does all the LaTeX work in the - os's temp directory - DSD - -2006-1-10 Added checks for usetex dependencies. - DSD - -======================================================================= -2006-1-9 Released 0.86 - -2006-1-4 Changed to support numpy (new name for scipy_core) - TEO - -2006-1-4 Added Mark's scaled axes patch for shared axis - -2005-12-28 Added Chris Barker's build_wxagg patch - JDH - -2005-12-27 Altered numerix/scipy to support new scipy package - structure - TEO -2005-12-20 Fixed Jame's Boyles date tick reversal problem - JDH - -2005-12-20 Added Jouni's rc patch to support lists of keys to set on - - JDH - -2005-12-12 Updated pyparsing and mathtext for some speed enhancements - (Thanks Paul McGuire) and minor fixes to scipy numerix and - setuptools - -2005-12-12 Matplotlib data is now installed as package_data in - the matplotlib module. This gets rid of checking the - many possibilities in matplotlib._get_data_path() - CM - -2005-12-11 Support for setuptools/pkg_resources to build and use - matplotlib as an egg. Still allows matplotlib to exist - using a traditional distutils install. - ADS - -2005-12-03 Modified setup to build matplotlibrc based on compile time - findings. It will set numerix in the order of scipy, - numarray, Numeric depending on which are founds, and - backend as in preference order GTKAgg, WXAgg, TkAgg, GTK, - Agg, PS - -2005-12-03 Modified scipy patch to support Numeric, scipy and numarray - Some work remains to be done because some of the scipy - imports are broken if only the core is installed. e.g., - apparently we need from scipy.basic.fftpack import * rather - than from scipy.fftpack import * - -2005-12-03 Applied some fixes to Nicholas Young's nonuniform image - patch - -2005-12-01 Applied Alex Gontmakher hatch patch - PS only for now - -2005-11-30 Added Rob McMullen's EMF patch - -2005-11-30 Added Daishi's patch for scipy - -2005-11-30 Fixed out of bounds draw markers segfault in agg - -2005-11-28 Got TkAgg blitting working 100% (cross fingers) correctly. - CM - -2005-11-27 Multiple changes in cm.py, colors.py, figure.py, image.py, - contour.py, contour_demo.py; new _cm.py, examples/image_masked.py. - 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. Also added - some line breaks to the color data dictionaries. 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. Reworked color - handling in contour.py, especially in the ContourLabeller - mixin. - - EF - -2005-11-25 Changed text.py to ensure color is hashable. EF - -======================================================================= -2005-11-16 Released 0.85 - -2005-11-16 Changed the default default linewidth in rc to 1.0 - -2005-11-16 Replaced agg_to_gtk_drawable with pure pygtk pixbuf code in - backend_gtkagg. When the equivalent is doe for blit, the - agg extension code will no longer be needed - -2005-11-16 Added a maxdict item to cbook to prevent caches from - growing w/o bounds - -2005-11-15 Fixed a colorup/colordown reversal bug in finance.py -- - Thanks Gilles - -2005-11-15 Applied Jouni K Steppanen's boxplot patch SF patch#1349997 - - JDH - - -2005-11-09 added axisbelow attr for Axes to determine whether ticks and such - are above or below the actors - -2005-11-08 Added Nicolas' irregularly spaced image patch - - -2005-11-08 Deprecated HorizontalSpanSelector and replaced with - SpanSelection that takes a third arg, direction. The - new SpanSelector supports horizontal and vertical span - selection, and the appropriate min/max is returned. - CM - -2005-11-08 Added lineprops dialog for gtk - -2005-11-03 Added FIFOBuffer class to mlab to support real time feeds - and examples/fifo_buffer.py - -2005-11-01 Contributed Nickolas Young's patch for afm mathtext to - support mathtext based upon the standard postscript Symbol - font when ps.usetex = True. - -2005-10-26 Added support for scatter legends - thanks John Gill - -2005-10-20 Fixed image clipping bug that made some tex labels - disappear. JDH - -2005-10-14 Removed sqrt from dvipng 1.6 alpha channel mask. - -2005-10-14 Added width kwarg to hist function - -2005-10-10 Replaced all instances of os.rename with shutil.move - -2005-10-05 Added Michael Brady's ydate patch - -2005-10-04 Added rkern's texmanager patch - -2005-09-25 contour.py modified to use a single ContourSet class - that handles filled contours, line contours, and labels; - added keyword arg (clip_ends) to contourf. - Colorbar modified to work with new ContourSet object; - if the ContourSet has lines rather than polygons, the - colorbar will follow suit. Fixed a bug introduced in - 0.84, in which contourf(...,colors=...) was broken - EF - -======================================================================= -2005-09-19 Released 0.84 - -2005-09-14 Added a new 'resize_event' which triggers a callback with a - backend_bases.ResizeEvent object - JDH - -2005-09-14 font_manager.py: removed chkfontpath from x11FontDirectory() - SC - -2005-09-14 Factored out auto date locator/formatter factory code into - matplotlib.date.date_ticker_factory; applies John Bryne's - quiver patch. - -2005-09-13 Added Mark's axes positions history patch #1286915 - -2005-09-09 Added support for auto canvas resizing with - fig.set_figsize_inches(9,5,forward=True) # inches - OR - fig.resize(400,300) # pixels - -2005-09-07 figure.py: update Figure.draw() to use the updated - renderer.draw_image() so that examples/figimage_demo.py works again. - examples/stock_demo.py: remove data_clipping (which no longer - exists) - SC - -2005-09-06 Added Eric's tick.direction patch: in or out in rc - -2005-09-06 Added Martin's rectangle selector widget - -2005-09-04 Fixed a logic err in text.py that was preventing rgxsuper - from matching - JDH - -2005-08-29 Committed Ken's wx blit patch #1275002 - -2005-08-26 colorbar modifications - now uses contourf instead of imshow - so that colors used by contourf are displayed correctly. - Added two new keyword args (cspacing and clabels) that are - only relevant for ContourMappable images - JSWHIT - -2005-08-24 Fixed a PS image bug reported by Darren - JDH - -2005-08-23 colors.py: change hex2color() to accept unicode strings as well as - normal strings. Use isinstance() instead of types.IntType etc - SC - -2005-08-16 removed data_clipping line and rc property - JDH - -2005-08-22 backend_svg.py: Remove redundant "x=0.0 y=0.0" from svg element. - Increase svg version from 1.0 to 1.1. Add viewBox attribute to svg - element to allow SVG documents to scale-to-fit into an arbitrary - viewport - SC - -2005-08-16 Added Eric's dot marker patch - JDH - -2005-08-08 Added blitting/animation for TkAgg - CM - -2005-08-05 Fixed duplicate tickline bug - JDH - -2005-08-05 Fixed a GTK animation bug that cropped up when doing - animations in gtk//gtkagg canvases that had widgets packed - above them - -2005-08-05 Added Clovis Goldemberg patch to the tk save dialog - -2005-08-04 Removed origin kwarg from backend.draw_image. origin is - handled entirely by the frontend now. - -2005-07-03 Fixed a bug related to TeX commands in backend_ps - -2005-08-03 Fixed SVG images to respect upper and lower origins. - -2005-08-03 Added flipud method to image and removed it from to_str. - -2005-07-29 Modified figure.figaspect to take an array or number; - modified backend_svg to write utf-8 - JDH - -2005-07-30 backend_svg.py: embed png image files in svg rather than linking - to a separate png file, fixes bug #1245306 (thanks to Norbert Nemec - for the patch) - SC - -======================================================================= - -2005-07-29 Released 0.83.2 - -2005-07-27 Applied SF patch 1242648: minor rounding error in - IndexDateFormatter in dates.py - -2005-07-27 Applied sf patch 1244732: Scale axis such that circle - looks like circle - JDH -2005-07-29 Improved message reporting in texmanager and backend_ps - DSD - -2005-07-28 backend_gtk.py: update FigureCanvasGTK.draw() (needed due to the - recent expose_event() change) so that examples/anim.py works in the - usual way - SC - -2005-07-26 Added new widgets Cursor and HorizontalSpanSelector to - matplotlib.widgets. See examples/widgets/cursor.py and - examples/widgets/span_selector.py - JDH - -2005-07-26 added draw event to mpl event hierarchy -- triggered on - figure.draw - -2005-07-26 backend_gtk.py: allow 'f' key to toggle window fullscreen mode - -2005-07-26 backend_svg.py: write "<.../>" elements all on one line and remove - surplus spaces - SC - -2005-07-25 backend_svg.py: simplify code by deleting GraphicsContextSVG and - RendererSVG.new_gc(), and moving the gc.get_capstyle() code into - RendererSVG._get_gc_props_svg() - SC - -2005-07-24 backend_gtk.py: call FigureCanvasBase.motion_notify_event() on - all motion-notify-events, not just ones where a modifier key or - button has been pressed (fixes bug report from Niklas Volbers) - SC - -2005-07-24 backend_gtk.py: modify print_figure() use own pixmap, fixing - problems where print_figure() overwrites the display pixmap. - return False from all button/key etc events - to allow the event - to propagate further - SC - -2005-07-23 backend_gtk.py: change expose_event from using set_back_pixmap(); - clear() to draw_drawable() - SC - -2005-07-23 backend_gtk.py: removed pygtk.require() - matplotlib/__init__.py: delete 'FROZEN' and 'McPLError' which are - no longer used - SC - -2005-07-22 backend_gdk.py: removed pygtk.require() - SC - -2005-07-21 backend_svg.py: Remove unused imports. Remove methods doc strings - which just duplicate the docs from backend_bases.py. Rename - draw_mathtext to _draw_mathtext. - SC - -2005-07-17 examples/embedding_in_gtk3.py: new example demonstrating placing - a FigureCanvas in a gtk.ScrolledWindow - SC - -2005-07-14 Fixed a Windows related bug (#1238412) in texmanager - DSD - -2005-07-11 Fixed color kwarg bug, setting color=1 or 0 caused an - exception - DSD - -2005-07-07 Added Eric's MA set_xdata Line2D fix - JDH - -2005-07-06 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. e.g., the new names are matplotlibrc - tex.cache 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. Also fixed - texmanager to put all files, including temp files in - ~/.matplotlib/tex.cache, which allows you to usetex in - non-writable dirs. - -2005-07-05 Fixed bug #1231611 in subplots adjust layout. The problem - was that the text cacheing mechanism was not using the - transformation affine in the key. - JDH - -2005-07-05 Fixed default backend import problem when using API (SF bug - # 1209354 - see API_CHANGES for more info - JDH - -2005-07-04 backend_gtk.py: require PyGTK version 2.0.0 or higher - SC - -2005-06-30 setupext.py: added numarray_inc_dirs for building against - numarray when not installed in standard location - ADS - -2005-06-27 backend_svg.py: write figure width, height as int, not float. - Update to fix some of the pychecker warnings - SC - -2005-06-23 Updated examples/agg_test.py to demonstrate curved paths - and fills - JDH - -2005-06-21 Moved some texmanager and backend_agg tex caching to class - level rather than instance level - JDH - -2005-06-20 setupext.py: fix problem where _nc_backend_gdk is installed to the - wrong directory - SC - -2005-06-19 Added 10.4 support for CocoaAgg. - CM - -2005-06-18 Move Figure.get_width_height() to FigureCanvasBase and return - int instead of float. - SC - -2005-06-18 Applied Ted Drain's QtAgg patch: 1) Changed the toolbar to - be a horizontal bar of push buttons instead of a QToolbar - and updated the layout algorithms in the main window - accordingly. This eliminates the ability to drag and drop - the toolbar and detach it from the window. 2) Updated the - resize algorithm in the main window to show the correct - size for the plot widget as requested. This works almost - correctly right now. It looks to me like the final size of - the widget is off by the border of the main window but I - haven't figured out a way to get that information yet. We - could just add a small margin to the new size but that - seems a little hacky. 3) Changed the x/y location label to - be in the toolbar like the Tk backend instead of as a - status line at the bottom of the widget. 4) Changed the - toolbar pixmaps to use the ppm files instead of the png - files. I noticed that the Tk backend buttons looked much - nicer and it uses the ppm files so I switched them. - -2005-06-17 Modified the gtk backend to not queue mouse motion events. - This allows for live updates when dragging a slider. - CM - -2005-06-17 Added starter CocoaAgg backend. Only works on OS 10.3 for - now and requires PyObjC. (10.4 is high priority) - CM - -2005-06-17 Upgraded pyparsing and applied Paul McGuire's suggestions - for speeding things up. This more than doubles the speed - of mathtext in my simple tests. JDH - -2005-06-16 Applied David Cooke's subplot make_key patch - -======================================================== - -2005-06-15 0.82 released - -2005-06-15 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 - -2005-06-15 backend_cairo.py: updated to use pycairo 0.5.0 - SC - -2005-06-14 Wrote some GUI neutral widgets (Button, Slider, - RadioButtons, CheckButtons) in matplotlib.widgets. See - examples/widgets/*.py - JDH - -2005-06-14 Exposed subplot parameters as rc vars and as the fig - SubplotParams instance subplotpars. See - figure.SubplotParams, figure.Figure.subplots_adjust and the - pylab method subplots_adjust and - examples/subplots_adjust.py . Also added a GUI neutral - widget for adjusting subplots, see - examples/subplot_toolbar.py - JDH - -2005-06-13 Exposed cap and join style for lines with new rc params and - line properties - - lines.dash_joinstyle : miter # miter|round|bevel - lines.dash_capstyle : butt # butt|round|projecting - lines.solid_joinstyle : miter # miter|round|bevel - lines.solid_capstyle : projecting # butt|round|projecting - - -2005-06-13 Added kwargs to Axes init - -2005-06-13 Applied Baptiste's tick patch - JDH - -2005-06-13 Fixed rc alias 'l' bug reported by Fernando by removing - aliases for mainlevel rc options. - JDH - -2005-06-10 Fixed bug #1217637 in ticker.py - DSD - -2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed - DSD - -2005-06-08 Added Sean Richard's hist binning fix -- see API_CHANGES - JDH - -2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed - - DSD - - -===================================================================== - -2005-06-07 matplotlib-0.81 released - -2005-06-06 Added autoscale_on prop to axes - -2005-06-06 Added Nick's picker "among" patch - JDH - -2005-06-05 Fixed a TeX/LaTeX font discrepency in backend_ps. - DSD - -2005-06-05 Added a ps.distill option in rc settings. If True, postscript - output will be distilled using ghostscript, which should trim - the file size and allow it to load more quickly. Hopefully this - will address the issue of large ps files due to font - definitions. Tested with gnu-ghostscript-8.16. - DSD - -2005-06-03 Improved support for tex handling of text in backend_ps. - DSD - -2005-06-03 Added rc options to render text with tex or latex, and to select - the latex font package. - DSD - -2005-06-03 Fixed a bug in ticker.py causing a ZeroDivisionError - -2005-06-02 backend_gtk.py remove DBL_BUFFER, add line to expose_event to - try to fix pygtk 2.6 redraw problem - SC - -2005-06-01 The default behavior of ScalarFormatter now renders scientific - notation and large numerical offsets in a label at the end of - the axis. - DSD - -2005-06-01 Added Nicholas' frombyte image patch - JDH - -2005-05-31 Added vertical TeX support for agg - JDH - -2005-05-31 Applied Eric's cntr patch - JDH - -2005-05-27 Finally found the pesky agg bug (which Maxim was kind - enough to fix within hours) that was causing a segfault in - the win32 cached marker drawing. Now windows users can get - the enormouse performance benefits of caced markers w/o - those occasional pesy screenshots. - JDH - -2005-05-27 Got win32 build system working again, using a more recent - version of gtk and pygtk in the win32 build, gtk 2.6 from - http://www.gimp.org/~tml/gimp/win32/downloads.html (you - will also need libpng12.dll to use these). I haven't - tested whether this binary build of mpl for win32 will work - with older gtk runtimes, so you may need to upgrade. - -2005-05-27 Fixed bug where 2nd wxapp could be started if using wxagg - backend. - ADS - -2005-05-26 Added Daishi text with dash patch -- see examples/dashtick.py - -2005-05-26 Moved backend_latex functionality into backend_ps. If - text.usetex=True, the PostScript backend will use LaTeX to - generate the .ps or .eps file. Ghostscript is required for - eps output. - DSD - -2005-05-24 Fixed alignment and color issues in latex backend. - DSD - -2005-05-21 Fixed raster problem for small rasters with dvipng -- looks - like it was a premultipled alpha problem - JDH - -2005-05-20 Added linewidth and faceted kwarg to scatter to control - edgewidth and color. Also added autolegend patch to - inspect line segments. - -2005-05-18 Added Orsay and JPL qt fixes - JDH - -2005-05-17 Added a psfrag latex backend -- some alignment issues need - to be worked out. Run with -dLaTeX and a *.tex file and - *.eps file are generated. latex and dvips the generated - latex file to get ps output. Note xdvi *does* not work, - you must generate ps.- JDH - -2005-05-13 Added Florent Rougon's Axis set_label1 - patch - -2005-05-17 pcolor optimization, fixed bug in previous pcolor patch - JSWHIT - -2005-05-16 Added support for masked arrays in pcolor - JSWHIT - - -2005-05-12 Started work on TeX text for antigrain using pngdvi -- see - examples/tex_demo.py and the new module - matplotlib.texmanager. Rotated text not supported and - rendering small glyps is not working right yet. BUt large - fontsizes and/or high dpi saved figs work great. - -2005-05-10 New image resize options interpolation options. New values - for the interp kwarg are - - 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', - 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', - 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', - 'lanczos', 'blackman' - - See help(imshow) for details, particularly the - interpolation, filternorm and filterrad kwargs - - -2005-05-10 Applied Eric's contour mem leak fixes - JDH - -2005-05-10 Extended python agg wrapper and started implementing - backend_agg2, an agg renderer based on the python wrapper. - This will be more flexible and easier to extend than the - current backend_agg. See also examples/agg_test.py - JDH - -2005-05-09 Added Marcin's no legend patch to exclude lines from the - autolegend builder - - plot(x, y, label='nolegend') - -2005-05-05 Upgraded to agg23 - -2005-05-05 Added newscalarformatter_demo.py to examples. -DSD - -2005-05-04 Added NewScalarFormatter. Improved formatting of ticklabels, - scientific notation, and the ability to plot large large - numbers with small ranges, by determining a numerical offset. - See ticker.NewScalarFormatter for more details. -DSD - -2005-05-03 Added the option to specify a delimiter in pylab.load -DSD - -2005-04-28 Added Darren's line collection example - -2005-04-28 Fixed aa property in agg - JDH - -2005-04-27 Set postscript page size in .matplotlibrc - DSD - -2005-04-26 Added embedding in qt example. - JDH - -2005-04-14 Applied Michael Brady's qt backend patch: 1) fix a bug - where keyboard input was grabbed by the figure and not - released 2) turn on cursor changes 3) clean up a typo - and commented-out print statement. - JDH - - -2005-04-14 Applied Eric Firing's masked data lines patch and contour - patch. 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. - - see examples/masked_demo.py - JDH - -2005-04-13 Applied Tim Leslie's arrow key event handling patch - JDH - - -================================================================= -0.80 released - -2005-04-11 Applied a variant of rick's xlim/ylim/axis patch. These - functions now take kwargs to let you selectively alter only - the min or max if desired. e.g., xlim(xmin=2) or - axis(ymax=3). They always return the new lim. - JDH - - -2005-04-11 Incorporated Werner's wx patch -- wx backend should be - compatible with wxpython2.4 and recent versions of 2.5. - Some early versions of wxpython 2.5 will not work because - there was a temporary change in the dc API that was rolled - back to make it 2.4 compliant - -2005-04-11 modified tkagg show so that new figure window pops up on - call to figure - -2005-04-11 fixed wxapp init bug - -2005-04-02 updated backend_ps.draw_lines, draw_markers for use with the - new API - DSD - -2005-04-01 Added editable polygon example - -========================================================================== - -2005-03-31 0.74 released - -2005-03-30 Fixed and added checks for floating point inaccuracy in - ticker.Base - DSD - -2005-03-30 updated /ellipse definition in backend_ps.py to address bug - #1122041 - DSD - -2005-03-29 Added unicode support for Agg and PS - JDH - -2005-03-28 Added Jarrod's svg patch for text - JDH - -2005-03-28 Added Ludal's arrow and quiver patch - JDH - -2005-03-28 Added label kwarg to Axes to facilitate forcing the - creation of new Axes with otherwise identical attributes - -2005-03-28 Applied boxplot and OSX font search patches - -2005-03-27 Added ft2font NULL check to fix Japanase font bug - JDH - -2005-03-27 Added sprint legend patch plus John Gill's tests and fix -- - see examples/legend_auto.py - JDH - -========================================================================== - -2005-03-19 0.73.1 released - -2005-03-19 Reverted wxapp handling because it crashed win32 - JDH - -2005-03-18 Add .number attribute to figure objects returned by figure() - FP - -=========================================================================== -2005-03-18 0.73 released - -2005-03-16 Fixed labelsep bug - -2005-03-16 Applied Darren's ticker fix for small ranges - JDH - -2005-03-16 Fixed tick on horiz colorbar - JDH - -2005-03-16 Added Japanses winreg patch - JDH - -2005-03-15 backend_gtkagg.py: changed to use double buffering, this fixes - the problem reported Joachim Berdal Haga - "Parts of plot lagging - from previous frame in animation". Tested with anim.py and it makes - no noticable difference to performance (23.7 before, 23.6 after) - - SC - -2005-03-14 add src/_backend_gdk.c extension to provide a substitute function - for pixbuf.get_pixels_array(). Currently pixbuf.get_pixels_array() - only works with Numeric, and then only works if pygtk has been - compiled with Numeric support. The change provides a function - pixbuf_get_pixels_array() which works with Numeric and numarray and - is always available. It means that backend_gtk should be able to - display images and mathtext in all circumstances. - SC - -2005-03-11 Upgraded CXX to 5.3.1 - -2005-03-10 remove GraphicsContextPS.set_linestyle() - and GraphicsContextSVG.set_linestyle() since they do no more than - the base class GraphicsContext.set_linestyle() - SC - -2005-03-09 Refactored contour functionality into dedicated module - -2005-03-09 Added Eric's contourf updates and Nadia's clabel functionality - -2005-03-09 Moved colorbar to figure.Figure to expose it for API developers - - JDH - -2005-03-09 backend_cairo.py: implemented draw_markers() - SC - -2005-03-09 cbook.py: only use enumerate() (the python version) if the builtin - version is not available. - Add new function 'izip' which is set to itertools.izip if available - and the python equivalent if not available. - SC - -2005-03-07 backend_gdk.py: remove PIXELS_PER_INCH from points_to_pixels(), but - still use it to adjust font sizes. This allows the GTK version of - line_styles.py to more closely match GTKAgg, previously the markers - were being drawn too large. - SC - -2005-03-01 Added Eric's contourf routines - -2005-03-01 Added start of proper agg SWIG wrapper. I would like to - expose agg functionality directly a the user level and this - module will serve that purpose eventually, and will - hopefully take over most of the functionality of the - current _image and _backend_agg modules. - JDH - -2005-02-28 Fixed polyfit / polyval to convert input args to float - arrays - JDH - - -2005-02-25 Add experimental feature to backend_gtk.py to enable/disable - double buffering (DBL_BUFFER=True/False) - SC - -2005-02-24 colors.py change ColorConverter.to_rgb() so it always returns rgb - (and not rgba), allow cnames keys to be cached, change the exception - raised from RuntimeError to ValueError (like hex2color()) - hex2color() use a regular expression to check the color string is - valid - SC - - -2005-02-23 Added rc param ps.useafm so backend ps can use native afm - fonts or truetype. afme breaks mathtext but causes much - smaller font sizes and may result in images that display - better in some contexts (e.g., pdfs incorporated into latex - docs viewed in acrobat reader). I would like to extend - this approach to allow the user to use truetype only for - mathtext, which should be easy. - -2005-02-23 Used sequence protocol rather than tuple in agg collection - drawing routines for greater flexibility - JDH - - -=========================================================== -2005-02-22 0.72.1 released - -2005-02-21 fixed linestyles for collections -- contour now dashes for - levels <0 - -2005-02-21 fixed ps color bug - JDH - -2005-02-15 fixed missing qt file - -2005-02-15 banished error_msg and report_error. Internal backend - methods like error_msg_gtk are preserved. backend writers, - check your backends, and diff against 0.72 to make sure I - did the right thing! - JDH - - -2005-02-14 Added enthought traits to matplotlib tree - JDH - -=========================================================== - -2005-02-14 0.72 released - -2005-02-14 fix bug in cbook alltrue() and onetrue() - SC - -2005-02-11 updated qtagg backend from Ted - JDH - -2005-02-11 matshow fixes for figure numbering, return value and docs - FP - -2005-02-09 new zorder example for fine control in zorder_demo.py - FP - -2005-02-09 backend renderer draw_lines now has transform in backend, - as in draw_markers; use numerix in _backend_agg, aded small - line optimization to agg - -2005-02-09 subplot now deletes axes that it overlaps - -2005-02-08 Added transparent support for gzipped files in load/save - Fernando - Perez (FP from now on). - -2005-02-08 Small optimizations in PS backend. They may have a big impact for - large plots, otherwise they don't hurt - FP - -2005-02-08 Added transparent support for gzipped files in load/save - Fernando - Perez (FP from now on). - -2005-02-07 Added newstyle path drawing for markers - only implemented - in agg currently - JDH - -2005-02-05 Some superscript text optimizations for ticking log plots - -2005-02-05 Added some default key press events to pylab figures: 'g' - toggles grid - JDH - -2005-02-05 Added some support for handling log switching for lines - that have nonpos data - JDH - -2005-02-04 Added Nadia's contour patch - contour now has matlab - compatible syntax; this also fixed an unequal sized contour - array bug- JDH - -2005-02-04 Modified GTK backends to allow the FigureCanvas to be resized - smaller than its original size - SC - -2005-02-02 Fixed a bug in dates mx2num - JDH - -2005-02-02 Incorporated Fernando's matshow - JDH - -2005-02-01 Added Fernando's figure num patch, including experemental - support for pylab backend switching, LineCOllection.color - warns, savefig now a figure method, fixed a close(fig) bug - - JDH - -2005-01-31 updated datalim in contour - JDH - -2005-01-30 Added backend_qtagg.py provided by Sigve Tjora - SC - -2005-01-28 Added tk.inspect rc param to .matplotlibrc. IDLE users - should set tk.pythoninspect:True and interactive:True and - backend:TkAgg - -2005-01-28 Replaced examples/interactive.py with an updated script from - Fernando Perez - SC - -2005-01-27 Added support for shared x or y axes. See - examples/shared_axis_demo.py and examples/ganged_plots.py - -2005-01-27 Added Lee's patch for missing symbols \leq and \LEFTbracket - to _mathtext_data - JDH - -2005-01-26 Added Baptiste's two scales patch -- see help(twinx) in the - pylab interface for more info. See also - examples/two_scales.py - -2005-01-24 Fixed a mathtext parser bug that prevented font changes in - sub/superscripts - JDH - -2005-01-24 Fixed contour to work w/ interactive changes in colormaps, - clim, etc - JDH - -=============================================================== - -2005-01-21 matplotlib-0.71 released - -2005-01-21 Refactored numerix to solve vexing namespace issues - JDH - -2005-01-21 Applied Nadia's contour bug fix - JDH - -2005-01-20 Made some changes to the contour routine - particularly - region=1 seems t fix a lot of the zigzag strangeness. - Added colormaps as default for contour - JDH - -2005-01-19 Restored builtin names which were overridden (min, max, - abs, round, and sum) in pylab. This is a potentially - significant change for those who were relying on an array - version of those functions that previously overrode builtin - function names. - ADS - -2005-01-18 Added accents to mathtext: \hat, \breve, \grave, \bar, - \acute, \tilde, \vec, \dot, \ddot. All of them have the - same syntax, e.g., to make an overbar you do \bar{o} or to - make an o umlaut you do \ddot{o}. The shortcuts are also - provided, e.g., \"o \'e \`e \~n \.x \^y - JDH - -2005-01-18 Plugged image resize memory leaks - JDH - -2005-01-18 Fixed some mathtext parser problems relating to superscripts - -2005-01-17 Fixed a yticklabel problem for colorbars under change of - clim - JDH - -2005-01-17 Cleaned up Destroy handling in wx reducing memleak/fig from - approx 800k to approx 6k- JDH - -2005-01-17 Added kappa to latex_to_bakoma - JDH - -2005-01-15 Support arbitrary colorbar axes and horizontal colorbars - JDH - -2005-01-15 Fixed colormap number of colors bug so that the colorbar - has the same discretization as the image - JDH - -2005-01-15 Added Nadia's x,y contour fix - JDH - -2005-01-15 backend_cairo: added PDF support which requires pycairo 0.1.4. - Its not usable yet, but is ready for when the Cairo PDF backend - matures - SC - -2005-01-15 Added Nadia's x,y contour fix - -2005-01-12 Fixed set clip_on bug in artist - JDH - -2005-01-11 Reverted pythoninspect in tkagg - JDH - -2005-01-09 Fixed a backend_bases event bug caused when an event is - triggered when location is None - JDH - -2005-01-07 Add patch from Stephen Walton to fix bug in pylab.load() - when the % character is included in a comment. - ADS - -2005-01-07 Added markerscale attribute to Legend class. This allows - the marker size in the legend to be adjusted relative to - that in the plot. - ADS - -2005-01-06 Add patch from Ben Vanhaeren to make the FigureManagerGTK vbox a - public attribute - SC - -==================================================================== -2004-12-30 Release 0.70 - -2004-12-28 Added coord location to key press and added a - examples/picker_demo.py - -2004-12-28 Fixed coords notification in wx toolbar - JDH - -2004-12-28 Moved connection and disconnection event handling to the - FigureCanvasBase. Backends now only need to connect one - time for each of the button press, button release and key - press/release functions. The base class deals with - callbacks and multiple connections. This fixes flakiness - on some backends (tk, wx) in the presence of multiple - connections and/or disconnect - JDH - -2004-12-27 Fixed PS mathtext bug where color was not set - Jochen - please verify correct - JDH - -2004-12-27 Added Shadow class and added shadow kwarg to legend and pie - for shadow effect - JDH - -2004-12-27 Added pie charts and new example/pie_demo.py - -2004-12-23 Fixed an agg text rotation alignment bug, fixed some text - kwarg processing bugs, and added examples/text_rotation.py - to explain and demonstrate how text rotations and alignment - work in matplotlib. - JDH - -====================================================================== - -2004-12-22 0.65.1 released - JDH - -2004-12-22 Fixed colorbar bug which caused colorbar not to respond to - changes in colormap in some instances - JDH - -2004-12-22 Refactored NavigationToolbar in tkagg to support app - embedding , init now takes (canvas, window) rather than - (canvas, figman) - JDH - -2004-12-21 Refactored axes and subplot management - removed - add_subplot and add_axes from the FigureManager. classic - toolbar updates are done via an observer pattern on the - figure using add_axobserver. Figure now maintains the axes - stack (for gca) and supports axes deletion. Ported changes - to GTK, Tk, Wx, and FLTK. Please test! Added delaxes - JDH - -2004-12-21 Lots of image optimizations - 4x performance boost over - 0.65 JDH - -2004-12-20 Fixed a figimage bug where the axes is shown and modified - tkagg to move the destroy binding into the show method. - -2004-12-18 Minor refactoring of NavigationToolbar2 to support - embedding in an application - JDH - -2004-12-14 Added linestyle to collections (currently broken) - JDH - -2004-12-14 Applied Nadia's setupext patch to fix libstdc++ link - problem with contour and solaris -JDH - -2004-12-14 A number of pychecker inspired fixes, including removal of - True and False from cbook which I erroneously thought was - needed for python2.2 - JDH - -2004-12-14 Finished porting doc strings for set introspection. - Used silent_list for many get funcs that return - lists. JDH - -2004-12-13 dates.py: removed all timezone() calls, except for UTC - SC - -====================================================================== - -2004-12-13 0.65 released - JDH - -2004-12-13 colors.py: rgb2hex(), hex2color() made simpler (and faster), also - rgb2hex() - added round() instead of integer truncation - hex2color() - changed 256.0 divisor to 255.0, so now - '#ffffff' becomes (1.0,1.0,1.0) not (0.996,0.996,0.996) - SC - -2004-12-11 Added ion and ioff to pylab interface - JDH - -2004-12-11 backend_template.py: delete FigureCanvasTemplate.realize() - most - backends don't use it and its no longer needed - - backend_ps.py, backend_svg.py: delete show() and - draw_if_interactive() - they are not needed for image backends - - backend_svg.py: write direct to file instead of StringIO - - SC - -2004-12-10 Added zorder to artists to control drawing order of lines, - patches and text in axes. See examples/zoder_demo.py - JDH - -2004-12-10 Fixed colorbar bug with scatter - JDH - -2004-12-10 Added Nadia Dencheva contour code - JDH - -2004-12-10 backend_cairo.py: got mathtext working - SC - -2004-12-09 Added Norm Peterson's svg clipping patch - -2004-12-09 Added Matthew Newville's wx printing patch - -2004-12-09 Migrated matlab to pylab - JDH - -2004-12-09 backend_gtk.py: split into two parts - - backend_gdk.py - an image backend - - backend_gtk.py - A GUI backend that uses GDK - SC - -2004-12-08 backend_gtk.py: remove quit_after_print_xvfb(*args), show_xvfb(), - Dialog_MeasureTool(gtk.Dialog) one month after sending mail to - matplotlib-users asking if anyone still uses these functions - SC - -2004-12-02 backend_bases.py, backend_template.py: updated some of the method - documentation to make them consistent with each other - SC - -2004-12-04 Fixed multiple bindings per event for TkAgg mpl_connect and - mpl_disconnect. Added a "test_disconnect" command line - parameter to coords_demo.py JTM - -2004-12-04 Fixed some legend bugs JDH - -2004-11-30 Added over command for oneoff over plots. e.g., over(plot, x, - y, lw=2). Works with any plot function. - -2004-11-30 Added bbox property to text - JDH - -2004-11-29 Zoom to rect now respect reversed axes limits (for both - linear and log axes). - GL - -2004-11-29 Added the over command to the matlab interface. over - allows you to add an overlay plot regardless of hold - state. - JDH - -2004-11-25 Added Printf to mplutils for printf style format string - formatting in C++ (should help write better exceptions) - -2004-11-24 IMAGE_FORMAT: remove from agg and gtkagg backends as its no longer - used - SC - -2004-11-23 Added matplotlib compatible set and get introspection. See - set_and_get.py - -2004-11-23 applied Norbert's patched and exposed legend configuration - to kwargs - JDH - -2004-11-23 backend_gtk.py: added a default exception handler - SC - -2004-11-18 backend_gtk.py: change so that the backend knows about all image - formats and does not need to use IMAGE_FORMAT in other backends - SC - -2004-11-18 Fixed some report_error bugs in string interpolation as - reported on SF bug tracker- JDH - -2004-11-17 backend_gtkcairo.py: change so all print_figure() calls render using - Cairo and get saved using backend_gtk.print_figure() - SC - -2004-11-13 backend_cairo.py: Discovered the magic number (96) required for - Cairo PS plots to come out the right size. Restored Cairo PS output - and added support for landscape mode - SC - -2004-11-13 Added ishold - JDH - -2004-11-12 Added many new matlab colormaps - autumn bone cool copper - flag gray hot hsv jet pink prism spring summer winter - PG - -2004-11-11 greatly simplify the emitted postscript code - JV - -2004-11-12 Added new plotting functions spy, spy2 for sparse matrix - visualization - JDH - -2004-11-11 Added rgrids, thetragrids for customizing the grid - locations and labels for polar plots - JDH - -2004-11-11 make the Gtk backends build without an X-server connection - JV - -2004-11-10 matplotlib/__init__.py: Added FROZEN to signal we are running under - py2exe (or similar) - is used by backend_gtk.py - SC - -2004-11-09 backend_gtk.py: Made fix suggested by maffew@cat.org.au - to prevent problems when py2exe calls pygtk.require(). - SC - -2004-11-09 backend_cairo.py: Added support for printing to a fileobject. - Disabled cairo PS output which is not working correctly. - SC - -============================================================== -2004-11-08 matplotlib-0.64 released - -2004-11-04 Changed -dbackend processing to only use known backends, so - we don't clobber other non-matplotlib uses of -d, like -debug. - -2004-11-04 backend_agg.py: added IMAGE_FORMAT to list the formats that the - backend can save to. - backend_gtkagg.py: added support for saving JPG files by using the - GTK backend - SC - -2004-10-31 backend_cairo.py: now produces png and ps files (although the figure - sizing needs some work). pycairo did not wrap all the necessary - functions, so I wrapped them myself, they are included in the - backend_cairo.py doc string. - SC - -2004-10-31 backend_ps.py: clean up the generated PostScript code, use - the PostScript stack to hold itermediate values instead of - storing them in the dictionary. - JV - -2004-10-30 backend_ps.py, ft2font.cpp, ft2font.h: fix the position of - text in the PostScript output. The new FT2Font method - get_descent gives the distance between the lower edge of - the bounding box and the baseline of a string. In - backend_ps the text is shifted upwards by this amount. - JV - -2004-10-30 backend_ps.py: clean up the code a lot. Change the - PostScript output to be more DSC compliant. All - definitions for the generated PostScript are now in a - PostScript dictionary 'mpldict'. Moved the long comment - about drawing ellipses from the PostScript output into a - Python comment. - JV - -2004-10-30 backend_gtk.py: removed FigureCanvasGTK.realize() as its no longer - needed. Merged ColorManager into GraphicsContext - backend_bases.py: For set_capstyle/joinstyle() only set cap or - joinstyle if there is no error. - SC - -2004-10-30 backend_gtk.py: tidied up print_figure() and removed some of the - dependency on widget events - SC - -2004-10-28 backend_cairo.py: The renderer is complete except for mathtext, - draw_image() and clipping. gtkcairo works reasonably well. cairo - does not yet create any files since I can't figure how to set the - 'target surface', I don't think pycairo wraps the required functions - - SC - -2004-10-28 backend_gtk.py: Improved the save dialog (GTK 2.4 only) so it - presents the user with a menu of supported image formats - SC - -2004-10-28 backend_svg.py: change print_figure() to restore original face/edge - color - backend_ps.py : change print_figure() to ensure original face/edge - colors are restored even if there's an IOError - SC - -2004-10-27 Applied Norbert's errorbar patch to support barsabove kwarg - -2004-10-27 Applied Norbert's legend patch to support None handles - -2004-10-27 Added two more backends: backend_cairo.py, backend_gtkcairo.py - They are not complete yet, currently backend_gtkcairo just renders - polygons, rectangles and lines - SC - -2004-10-21 Added polar axes and plots - JDH - -2004-10-20 Fixed corrcoef bug exposed by corrcoef(X) where X is matrix - - JDH - -2004-10-19 Added kwarg support to xticks and yticks to set ticklabel - text properties -- thanks to T. Edward Whalen for the suggestion - -2004-10-19 Added support for PIL images in imshow(), image.py - ADS - -2004-10-19 Re-worked exception handling in _image.py and _transforms.py - to avoid masking problems with shared libraries. - JTM - -2004-10-16 Streamlined the matlab interface wrapper, removed the - noplot option to hist - just use mlab.hist instead. - -2004-09-30 Added Andrew Dalke's strftime code to extend the range of - dates supported by the DateFormatter - JDH - -2004-09-30 Added barh - JDH - -2004-09-30 Removed fallback to alternate array package from numerix - so that ImportErrors are easier to debug. JTM - -2004-09-30 Add GTK+ 2.4 support for the message in the toolbar. SC - -2004-09-30 Made some changes to support python22 - lots of doc - fixes. - JDH - -2004-09-29 Added a Verbose class for reporting - JDH - -============================================================== - -2004-09-28 Released 0.63.0 - -2004-09-28 Added save to file object for agg - see - examples/print_stdout.py - -2004-09-24 Reorganized all py code to lib subdir - -2004-09-24 Fixed axes resize image edge effects on interpolation - - required upgrade to agg22 which fixed an agg bug related to - this problem - -2004-09-20 Added toolbar2 message display for backend_tkagg. JTM - - -2004-09-17 Added coords formatter attributes. These must be callable, - and return a string for the x or y data. These will be used - to format the x and y data for the coords box. Default is - the axis major formatter. e.g.: - - # format the coords message box - def price(x): return '$%1.2f'%x - ax.format_xdata = DateFormatter('%Y-%m-%d') - ax.format_ydata = price - - -2004-09-17 Total rewrite of dates handling to use python datetime with - num2date, date2num and drange. pytz for timezone handling, - dateutils for spohisticated ticking. date ranges from - 0001-9999 are supported. rrules allow arbitrary date - ticking. examples/date_demo*.py converted to show new - usage. new example examples/date_demo_rrule.py shows how - to use rrules in date plots. The date locators are much - more general and almost all of them have different - constructors. See matplotlib.dates for more info. - -2004-09-15 Applied Fernando's backend __init__ patch to support easier - backend maintenance. Added his numutils to mlab. JDH - -2004-09-16 Re-designated all files in matplotlib/images as binary and - w/o keyword substitution using "cvs admin -kb *.svg ...". - See binary files in "info cvs" under Linux. This was messing - up builds from CVS on windows since CVS was doing lf -> cr/lf - and keyword substitution on the bitmaps. - JTM - -2004-09-15 Modified setup to build array-package-specific extensions - for those extensions which are array-aware. Setup builds - extensions automatically for either Numeric, numarray, or - both, depending on what you have installed. Python proxy - modules for the array-aware extensions import the version - optimized for numarray or Numeric determined by numerix. - - JTM - -2004-09-15 Moved definitions of infinity from mlab to numerix to avoid - divide by zero warnings for numarray - JTM - -2004-09-09 Added axhline, axvline, axhspan and axvspan - -============================================================== -2004-08-30 matplotlib 0.62.4 released - -2004-08-30 Fixed a multiple images with different extent bug, - Fixed markerfacecolor as RGB tuple - -2004-08-27 Mathtext now more than 5x faster. Thanks to Paul Mcguire - for fixes both to pyparsing and to the matplotlib grammar! - mathtext broken on python2.2 - -2004-08-25 Exposed Darren's and Greg's log ticking and formatting - options to semilogx and friends - -2004-08-23 Fixed grid w/o args to toggle grid state - JDH - -2004-08-11 Added Gregory's log patches for major and minor ticking - -2004-08-18 Some pixel edge effects fixes for images - -2004-08-18 Fixed TTF files reads in backend_ps on win32. - -2004-08-18 Added base and subs properties for logscale plots, user - modifiable using - set_[x,y]scale('log',base=b,subs=[mt1,mt2,...]) - GL - -2004-08-18 fixed a bug exposed by trying to find the HOME dir on win32 - thanks to Alan Issac for pointing to the light - JDH - -2004-08-18 fixed errorbar bug in setting ecolor - JDH - -2004-08-12 Added Darren Dale's exponential ticking patch - -2004-08-11 Added Gregory's fltkagg backend - -========================================================================== -2004-08-09 matplotlib-0.61.0 released - -2004-08-08 backend_gtk.py: get rid of the final PyGTK deprecation warning by - replacing gtkOptionMenu with gtkMenu in the 2.4 version of the - classic toolbar. - -2004-08-06 Added Tk zoom to rect rectangle, proper idle drawing, and - keybinding - JDH - -2004-08-05 Updated installing.html and INSTALL - JDH - -2004-08-01 backend_gtk.py: move all drawing code into the expose_event() - -2004-07-28 Added Greg's toolbar2 and backend_*agg patches - JDH - -2004-07-28 Added image.imread with support for loading png into - numerix arrays - -2004-07-28 Added key modifiers to events - implemented dynamic updates - and rubber banding for interactive pan/zoom - JDH - -2004-07-27 did a readthrough of SVG, replacing all the string - additions with string interps for efficiency, fixed some - layout problems, added font and image support (through - external pngs) - JDH - -2004-07-25 backend_gtk.py: modify toolbar2 to make it easier to support GTK+ - 2.4. Add GTK+ 2.4 toolbar support. - SC - -2004-07-24 backend_gtk.py: Simplified classic toolbar creation - SC - -2004-07-24 Added images/matplotlib.svg to be used when GTK+ windows are - minimised - SC - -2004-07-22 Added right mouse click zoom for NavigationToolbar2 panning - mode. - JTM - -2004-07-22 Added NavigationToolbar2 support to backend_tkagg. - Minor tweak to backend_bases. - JTM - -2004-07-22 Incorporated Gergory's renderer cache and buffer object - cache - JDH - -2004-07-22 Backend_gtk.py: Added support for GtkFileChooser, changed - FileSelection/FileChooser so that only one instance pops up, - and made them both modal. - SC - -2004-07-21 Applied backend_agg memory leak patch from hayden - - jocallo@online.no. Found and fixed a leak in binary - operations on transforms. Moral of the story: never incref - where you meant to decref! Fixed several leaks in ft2font: - moral of story: almost always return Py::asObject over - Py::Object - JDH - -2004-07-21 Fixed a to string memory allocation bug in agg and image - modules - JDH - -2004-07-21 Added mpl_connect and mpl_disconnect to matlab interface - - JDH - -2004-07-21 Added beginnings of users_guide to CVS - JDH - -2004-07-20 ported toolbar2 to wx - -2004-07-20 upgraded to agg21 - JDH - -2004-07-20 Added new icons for toolbar2 - JDH - -2004-07-19 Added vertical mathtext for *Agg and GTK - thanks Jim - Benson! - JDH - -2004-07-16 Added ps/eps/svg savefig options to wx and gtk JDH - -2004-07-15 Fixed python framework tk finder in setupext.py - JDH - -2004-07-14 Fixed layer images demo which was broken by the 07/12 image - extent fixes - JDH - -2004-07-13 Modified line collections to handle arbitrary length - segments for each line segment. - JDH - -2004-07-13 Fixed problems with image extent and origin - - set_image_extent deprecated. Use imshow(blah, blah, - extent=(xmin, xmax, ymin, ymax) instead - JDH - -2004-07-12 Added prototype for new nav bar with codifed event - handling. Use mpl_connect rather than connect for - matplotlib event handling. toolbar style determined by rc - toolbar param. backend status: gtk: prototype, wx: in - progress, tk: not started - JDH - -2004-07-11 backend_gtk.py: use builtin round() instead of redefining it. - - SC - -2004-07-10 Added embedding_in_wx3 example - ADS - -2004-07-09 Added dynamic_image_wxagg to examples - ADS - -2004-07-09 added support for embedding TrueType fonts in PS files - PEB - -2004-07-09 fixed a sfnt bug exposed if font cache is not built - -2004-07-09 added default arg None to matplotlib.matlab grid command to - toggle current grid state - -============================ - -2004-07-08 0.60.2 released - -2004-07-08 fixed a mathtext bug for '6' - -2004-07-08 added some numarray bug workarounds - -======= - -2004-07-07 0.60 released - -2004-07-07 Fixed a bug in dynamic_demo_wx - - -2004-07-07 backend_gtk.py: raise SystemExit immediately if - 'import pygtk' fails - SC - -2004-07-05 Added new mathtext commands \over{sym1}{sym2} and - \under{sym1}{sym2} - -2004-07-05 Unified image and patch collections colormapping and - scaling args. Updated docstrings for all - JDH - -2004-07-05 Fixed a figure legend bug and added - examples/figlegend_demo.py - JDH - -2004-07-01 Fixed a memory leak in image and agg to string methods - -2004-06-25 Fixed fonts_demo spacing problems and added a kwargs - version of the fonts_demo fonts_demo_kw.py - JDH - -2004-06-25 finance.py: handle case when urlopen() fails - SC - -2004-06-24 Support for multiple images on axes and figure, with - blending. Support for upper and lower image origins. - clim, jet and gray functions in matlab interface operate on - current image - JDH - -2004-06-23 ported code to Perry's new colormap and norm scheme. Added - new rc attributes image.aspect, image.interpolation, - image.cmap, image.lut, image.origin - -2004-06-20 backend_gtk.py: replace gtk.TRUE/FALSE with True/False. - simplified _make_axis_menu(). - SC - -2004-06-19 anim_tk.py: Updated to use TkAgg by default (not GTK) - backend_gtk_py: Added '_' in front of private widget - creation functions - SC - -2004-06-17 backend_gtk.py: Create a GC once in realise(), not every - time draw() is called. - SC - -2004-06-16 Added new py2exe FAQ entry and added frozen support in - get_data_path for py2exe - JDH - -2004-06-16 Removed GTKGD, which was always just a proof-of-concept - backend - JDH - -2004-06-16 backend_gtk.py updates to replace deprecated functions - gtk.mainquit(), gtk.mainloop(). - Update NavigationToolbar to use the new GtkToolbar API - SC - -2004-06-15 removed set_default_font from font_manager to unify font - customization using the new function rc. See API_CHANGES - for more info. The examples fonts_demo.py and - fonts_demo_kw.py are ported to the new API - JDH - -2004-06-15 Improved (yet again!) axis scaling to properly handle - singleton plots - JDH - -2004-06-15 Restored the old FigureCanvasGTK.draw() - SC - -2004-06-11 More memory leak fixes in transforms and ft2font - JDH - -2004-06-11 Eliminated numerix .numerix file and environment variable - NUMERIX. Fixed bug which prevented command line overrides: - --numarray or --numeric. - JTM - -2004-06-10 Added rc configuration function rc; deferred all rc param - setting until object creation time; added new rc attrs: - lines.markerfacecolor, lines.markeredgecolor, - lines.markeredgewidth, patch.linewidth, patch.facecolor, - patch.edgecolor, patch.antialiased; see - examples/customize_rc.py for usage - JDH - - ---------------------------------------------------------------- -2004-06-09 0.54.2 released - -2004-06-08 Rewrote ft2font using CXX as part of general memory leak - fixes; also fixed transform memory leaks - JDH - -2004-06-07 Fixed several problems with log ticks and scaling - JDH - -2004-06-07 Fixed width/height issues for images - JDH - -2004-06-03 Fixed draw_if_interactive bug for semilogx; - -2004-06-02 Fixed text clipping to clip to axes - JDH - -2004-06-02 Fixed leading newline text and multiple newline text - JDH - -2004-06-02 Fixed plot_date to return lines - JDH - -2004-06-01 Fixed plot to work with x or y having shape N,1 or 1,N - JDH - -2004-05-31 Added renderer markeredgewidth attribute of Line2D. - ADS - -2004-05-29 Fixed tick label clipping to work with navigation. - -2004-05-28 Added renderer grouping commands to support groups in - SVG/PS. - JDH - -2004-05-28 Fixed, this time I really mean it, the singleton plot - plot([0]) scaling bug; Fixed Flavio's shape = N,1 bug - JDH - -2004-05-28 added colorbar - JDH - -2004-05-28 Made some changes to the matplotlib.colors.Colormap to - propertly support clim - JDH - ------------------------------------------------------------------ -2004-05-27 0.54.1 released - -2004-05-27 Lots of small bug fixes: rotated text at negative angles, - errorbar capsize and autoscaling, right tick label - position, gtkagg on win98, alpha of figure background, - singleton plots - JDH - -2004-05-26 Added Gary's errorbar stuff and made some fixes for length - one plots and constant data plots - JDH - -2004-05-25 Tweaked TkAgg backend so that canvas.draw() works - more like the other backends. Fixed a bug resulting - in 2 draws per figure mangager show(). - JTM - ------------------------------------------------------------- -2004-05-19 0.54 released - -2004-05-18 Added newline seperated text with rotations to text.Text - layout - JDH - -2004-05-16 Added fast pcolor using PolyCollections. - JDH - -2004-05-14 Added fast polygon collections - changed scatter to use - them. Added multiple symbols to scatter. 10x speedup on - large scatters using *Agg and 5X speedup for ps. - JDH - -2004-05-14 On second thought... created an "nx" namespace in - in numerix which maps type names onto typecodes - the same way for both numarray and Numeric. This - undoes my previous change immediately below. To get a - typename for Int16 useable in a Numeric extension: - say nx.Int16. - JTM - -2004-05-15 Rewrote transformation class in extension code, simplified - all the artist constructors - JDH - -2004-05-14 Modified the type definitions in the numarray side of - numerix so that they are Numeric typecodes and can be - used with Numeric compilex extensions. The original - numarray types were renamed to type. - JTM - -2004-05-06 Gary Ruben sent me a bevy of new plot symbols and markers. - See matplotlib.matlab.plot - JDH - -2004-05-06 Total rewrite of mathtext - factored ft2font stuff out of - layout engine and defined abstract class for font handling - to lay groundwork for ps mathtext. Rewrote parser and made - layout engine much more precise. Fixed all the layout - hacks. Added spacing commands \/ and \hspace. Added - composite chars and defined angstrom. - JDH - -2004-05-05 Refactored text instances out of backend; aligned - text with arbitrary rotations is now supported - JDH - -2004-05-05 Added a Matrix capability for numarray to numerix. JTM - -2004-05-04 Updated whats_new.html.template to use dictionary and - template loop, added anchors for all versions and items; - updated goals.txt to use those for links. PG - -2004-05-04 Added fonts_demo.py to backend_driver, and AFM and TTF font - caches to font_manager.py - PEB - -2004-05-03 Redid goals.html.template to use a goals.txt file that - has a pseudo restructured text organization. PG - -2004-05-03 Removed the close buttons on all GUIs and added the python - #! bang line to the examples following Steve Chaplin's - advice on matplotlib dev - -2004-04-29 Added CXX and rewrote backend_agg using it; tracked down - and fixed agg memory leak - JDH - -2004-04-29 Added stem plot command - JDH - -2004-04-28 Fixed PS scaling and centering bug - JDH - -2004-04-26 Fixed errorbar autoscale problem - JDH - -2004-04-22 Fixed copy tick attribute bug, fixed singular datalim - ticker bug; fixed mathtext fontsize interactive bug. - JDH - -2004-04-21 Added calls to draw_if_interactive to axes(), legend(), - and pcolor(). Deleted duplicate pcolor(). - JTM - ------------------------------------------------------------- -2004-04-21 matplotlib 0.53 release - -2004-04-19 Fixed vertical alignment bug in PS backend - JDH - -2004-04-17 Added support for two scales on the "same axes" with tick - different ticking and labeling left right or top bottom. - See examples/two_scales.py - JDH - -2004-04-17 Added default dirs as list rather than single dir in - setupext.py - JDH - -2004-04-16 Fixed wx exception swallowing bug (and there was much - rejoicing!) - JDH - -2004-04-16 Added new ticker locator a formatter, fixed default font - return - JDH - -2004-04-16 Added get_name method to FontProperties class. Fixed font lookup - in GTK and WX backends. - PEB - -2004-04-16 Added get- and set_fontstyle msethods. - PEB - -2004-04-10 Mathtext fixes: scaling with dpi, - JDH - -2004-04-09 Improved font detection algorithm. - PEB - -2004-04-09 Move deprecation warnings from text.py to __init__.py - PEB - -2004-04-09 Added default font customization - JDH - -2004-04-08 Fixed viewlim set problem on axes and axis. - JDH - -2004-04-07 Added validate_comma_sep_str and font properties paramaters to - __init__. Removed font families and added rcParams to - FontProperties __init__ arguments in font_manager. Added - default font property parameters to .matplotlibrc file with - descriptions. Added deprecation warnings to the get_- and - set_fontXXX methods of the Text object. - PEB - -2004-04-06 Added load and save commands for ASCII data - JDH - -2004-04-05 Improved font caching by not reading AFM fonts until needed. - Added better documentation. Changed the behaviour of the - get_family, set_family, and set_name methods of FontProperties. - - PEB - -2004-04-05 Added WXAgg backend - JDH - -2004-04-04 Improved font caching in backend_agg with changes to - font_manager - JDH - -2004-03-29 Fixed fontdicts and kwargs to work with new font manager - - JDH - - - - - - - - --------------------------------------------- -This is the Old, stale, never used changelog - -2002-12-10 - Added a TODO file and CHANGELOG. Lots to do -- get - crackin'! - - - Fixed y zoom tool bug - - - Adopted a compromise fix for the y data clipping problem. - The problem was that for solid lines, the y data clipping - (as opposed to the gc clipping) caused artifactual - horizontal solid lines near the ylim boundaries. I did a - 5% offset hack in Axes set_ylim functions which helped, - but didn't cure the problem for very high gain y zooms. - So I disabled y data clipping for connected lines . If - you need extensive y clipping, either plot(y,x) because x - data clipping is always enabled, or change the _set_clip - code to 'if 1' as indicated in the lines.py src. See - _set_clip in lines.py and set_ylim in figure.py for more - information. - - -2002-12-11 - Added a measurement dialog to the figure window to - measure axes position and the delta x delta y with a left - mouse drag. These defaults can be overridden by deriving - from Figure and overrriding button_press_event, - button_release_event, and motion_notify_event, - and _dialog_measure_tool. - - - fixed the navigation dialog so you can check the axes the - navigation buttons apply to. - - - -2003-04-23 Released matplotlib v0.1 - -2003-04-24 Added a new line style PixelLine2D which is the plots the - markers as pixels (as small as possible) with format - symbol ',' - - Added a new class Patch with derived classes Rectangle, - RegularPolygon and Circle - -2003-04-25 Implemented new functions errorbar, scatter and hist - - Added a new line type '|' which is a vline. syntax is - plot(x, Y, '|') where y.shape = len(x),2 and each row gives - the ymin,ymax for the respective values of x. Previously I - had implemented vlines as a list of lines, but I needed the - efficientcy of the numeric clipping for large numbers of - vlines outside the viewport, so I wrote a dedicated class - Vline2D which derives from Line2D - - -2003-05-01 - - Fixed ytick bug where grid and tick show outside axis viewport with gc clip - -2003-05-14 - - Added new ways to specify colors 1) matlab format string 2) - html-style hex string, 3) rgb tuple. See examples/color_demo.py - -2003-05-28 - - Changed figure rendering to draw form a pixmap to reduce flicker. - See examples/system_monitor.py for an example where the plot is - continusouly updated w/o flicker. This example is meant to - simulate a system monitor that shows free CPU, RAM, etc... - -2003-08-04 - - Added Jon Anderson's GTK shell, which doesn't require pygtk to - have threading built-in and looks nice! - -2003-08-25 - - Fixed deprecation warnings for python2.3 and pygtk-1.99.18 - -2003-08-26 - - Added figure text with new example examples/figtext.py - - -2003-08-27 - - Fixed bugs i figure text with font override dictionairies and fig - text that was placed outside the window bounding box - -2003-09-1 thru 2003-09-15 - - Added a postscript and a GD module backend - -2003-09-16 - - Fixed font scaling and point scaling so circles, squares, etc on - lines will scale with DPI as will fonts. Font scaling is not fully - implemented on the gtk backend because I have not figured out how - to scale fonts to arbitrary sizes with GTK - -2003-09-17 - - Fixed figure text bug which crashed X windows on long figure text - extending beyond display area. This was, I believe, due to the - vestigial erase functionality that was no longer needed since I - began rendering to a pixmap - -2003-09-30 Added legend - -2003-10-01 Fixed bug when colors are specified with rgb tuple or hex - string. - - -2003-10-21 Andrew Straw provided some legend code which I modified - and incorporated. Thanks Andrew! - -2003-10-27 Fixed a bug in axis.get_view_distance that affected zoom in - versus out with interactive scrolling, and a bug in the axis text - reset system that prevented the text from being redrawn on a - interactive gtk view lim set with the widget - - Fixed a bug in that prevented the manual setting of ticklabel - strings from working properly - -2003-11-02 - Do a nearest neighbor color pick on GD when - allocate fails - -2003-11-02 - - Added pcolor plot - - Added MRI example - - Fixed bug that screwed up label position if xticks or yticks were - empty - - added nearest neighbor color picker when GD max colors exceeded - - fixed figure background color bug in GD backend - -2003-11-10 - 2003-11-11 - - major refactoring. - * Ticks (with labels, lines and grid) handled by dedicated class - * Artist now know bounding box and dpi - * Bounding boxes and transforms handled by dedicated classes - * legend in dedicated class. Does a better job of alignment and - bordering. Can be initialized with specific line instances. - See examples/legend_demo2.py - - -2003-11-14 Fixed legend positioning bug and added new position args - -2003-11-16 Finsihed porting GD to new axes API - - -2003-11-20 - add TM for matlab on website and in docs - - -2003-11-20 - make a nice errorbar and scatter screenshot - -2003-11-20 - auto line style cycling for multiple line types - broken - -2003-11-18 (using inkrect) :logical rect too big on gtk backend - -2003-11-18 ticks don't reach edge of axes in gtk mode -- - rounding error? - -2003-11-20 - port Gary's errorbar code to new API before 0.40 - -2003-11-20 - problem with stale _set_font. legend axes box - doesn't resize on save in GTK backend -- see htdocs legend_demo.py - -2003-11-21 - make a dash-dot dict for the GC - -2003-12-15 - fix install path bug diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 4f3f29ced942..000000000000 --- a/INSTALL +++ /dev/null @@ -1,323 +0,0 @@ -.. The source of this document is INSTALL. During the doc build process, -.. this file is copied over to doc/users/installing.rst. -.. Therefore, you must edit INSTALL, *not* doc/users/installing.rst! - -********** -Installing -********** - -There are many different ways to install matplotlib, and the best way -depends on what operating system you are using, what you already have -installed, and how you want to use it. To avoid wading through all -the details (and potential complications) on this page, the easiest -thing for you to do is use one of the pre-packaged python -distributions that already provide matplotlib built-in. The Continuum.io -Python distribution `(Anaconda) -`_ and the Enthought -distribution `(Canopy) `_ -are both excellent choices that "just work" out of the box for any -platform. Both of these packages include matplotlib and -*lots* of other useful tools. -Another excellent alternative for Windows users is `Python (x, y) -`_ . matplotlib is also packaged for almost -every major Linux distribution. So if you are on Linux, your package -manager will probably provide matplotlib prebuilt. - -Manually installing pre-built packages -====================================== - -General instructions --------------------- - -For some people, the prepackaged pythons discussed above are not an -option. That's OK, it's usually pretty easy to get a custom install -working. You will first need to find out if you have python installed -on your machine, and if not, install it. The official python builds -are available for download `here `_, -but OS X users please read :ref:`which-python-for-osx`. - -Once you have python up and running, you will need to install `numpy -`_. numpy provides high-performance array data -structures and mathematical functions, and is a requirement for -matplotlib. You can test your progress:: - - >>> import numpy - >>> print numpy.__version__ - -matplotlib requires numpy version |minimum_numpy_version| or later. -Although it is not a requirement to use matplotlib, we strongly -encourage you to install `ipython `_, which is an -interactive shell for python that is matplotlib-aware. - -Next, we need to get matplotlib installed. We provide prebuilt -binaries for OS X and Windows on the matplotlib `download -`_. Click on -the latest release of the "matplotlib" package, choose your python -version (2.6, 2.7, 3.3, or 3.4) and your platform (macosx or win32). If you -have any problems, please check the :ref:`installing-faq`, search -using Google, and/or post a question the `mailing list -`_. - -If you are on Debian/Ubuntu linux, it suffices to do:: - - > sudo apt-get install python-matplotlib - -Instructions for installing our OSX binaries are found in the FAQ -:ref:`install_osx_binaries`. - - -Once you have ipython, numpy and matplotlib installed, you can use -ipython's "pylab" mode to have a MATLAB-like environment that automatically -handles most of the configuration details for you, so you can get up -and running quickly:: - - johnh@flag:~> ipython -pylab - Python 2.4.5 (#4, Apr 12 2008, 09:09:16) - IPython 0.9.0 -- An enhanced Interactive Python. - - Welcome to pylab, a matplotlib-based Python environment. - For more information, type 'help(pylab)'. - - In [1]: x = randn(10000) - - In [2]: hist(x, 100) - -Note that when testing matplotlib installations from the interactive -python console, there are some issues relating to user interface -toolkits and interactive settings that are discussed in -:ref:`mpl-shell`. - - -Installing on Windows ---------------------- - -If you don't already have Python installed, we recommend using -one of the `scipy-stack compatible Python distributions -`_ such as Python(x,y), -Enthought Canopy, or Continuum Anaconda, which have matplotlib and -many of its dependencies, plus other useful packages, preinstalled. - -For `standard Python `_ installations -you will also need to install compatible versions of -`setuptools `_, -`numpy `_, -`python-dateutil `_, -`pytz `_, -`pyparsing `_ and -`six `_ -in addition to -`matplotlib `_. - -In case Python is not installed for all users (not the default), the -Microsoft Visual C++ 2008 ( -`64 bit `_ -or -`32 bit `_ -for Python 2.6 to 3.2) or Microsoft Visual C++ 2010 ( -`64 bit `_ -or -`32 bit `_ -for Python 3.3 and 3.4) redistributable packages need to be installed. - -Matplotlib depends on `Pillow `_ -for reading and saving JPEG, BMP, and TIFF image files. -Matplotlib requires `MiKTeX `_ and -`GhostScript `_ for rendering text -with LaTeX. -`FFmpeg `_, `avconv `_, -`mencoder `_, or -`ImageMagick `_ are required for the -animation module. - -The following backends should work out of the box: agg, tkagg, ps, -pdf and svg. -For other backends you may need to install -`pycairo `_, -`PyQt4 `_, -`PyQt5 `_, -`PySide `_, -`wxPython `_, -`PyGTK `_, -`Tornado `_, -or GhostScript. - -TkAgg is probably the best backend for interactive use from the -standard Python shell or IPython. It is enabled as the default backend -for the official binaries. GTK3 is not supported on Windows. - -The Windows installers (:file:`*.exe`) and wheels (:file:`*.whl`) on -the download page do not contain test data or example code. -If you want to try the many demos that come in the matplotlib source -distribution, download the zip file and look in the :file:`examples` -subdirectory. -To run the test suite, copy the lib\matplotlib\tests and -lib\mpl_toolkits\tests directories from the source distribution to -sys.prefix\Lib\site-packages\matplotlib and -sys.prefix\Lib\site-packages\mpl_toolkits respectively, and install -`nose `_, -`mock `_, -Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, and -`Inkscape `_. - -.. _install_from_source: - -Installing from source -====================== - -If you are interested in contributing to matplotlib development, -running the latest source code, or just like to build everything -yourself, it is not difficult to build matplotlib from source. Grab -the latest *tar.gz* release file from `the download page -`_, or if you want -to develop matplotlib or just need the latest bugfixed version, grab -the latest git version :ref:`install-from-git`. - -Once you have satisfied the requirements detailed below (mainly -python, numpy, libpng and freetype), you can build matplotlib:: - - cd matplotlib - python setup.py build - python setup.py install - -We provide a `setup.cfg -`_ -file that goes with :file:`setup.py` which you can use to customize -the build process. For example, which default backend to use, whether -some of the optional libraries that matplotlib ships with are -installed, and so on. This file will be particularly useful to those -packaging matplotlib. - -If you have installed prerequisites to nonstandard places and need to -inform matplotlib where they are, edit ``setupext.py`` and add the base -dirs to the ``basedir`` dictionary entry for your ``sys.platform``. -e.g., if the header to some required library is in -``/some/path/include/someheader.h``, put ``/some/path`` in the -``basedir`` list for your platform. - -.. _install_requirements: - -Build requirements -================== - -These are external packages which you will need to install before -installing matplotlib. If you are building on OSX, see -:ref:`build_osx`. If you are installing dependencies with a package -manager on Linux, you may need to install the development packages -(look for a "-dev" postfix) in addition to the libraries themselves. - -.. note:: - - If you are on debian/ubuntu, you can get all the dependencies - required to build matplotlib with:: - - sudo apt-get build-dep python-matplotlib - - If you are on Fedora/RedHat, you can get all the dependencies - required to build matplotlib by first installing ``yum-builddep`` - and then running:: - - su -c "yum-builddep python-matplotlib" - - This does not build matplotlib, but it does get the install the - build dependencies, which will make building from source easier. - -:term:`python` 2.6, 2.7, 3.1 or 3.2 - `Download python `_. - -:term:`numpy` |minimum_numpy_version| (or later) - array support for python (`download numpy `_) - -:term:`dateutil` 1.1 or later - Provides extensions to python datetime handling. If using pip, - easy_install or installing from source, the installer will attempt - to download and install `python_dateutil` from PyPI. Note that - `python_dateutil` also depends on `six`. `pip` and other package - managers should handle installing that secondary dependency - automatically. - -`pyparsing` - Required for matplotlib's mathtext math rendering support. If - using pip, easy_install or installing from source, the installer - will attempt to download and install `pyparsing` from PyPI. - -six 1.3 or later - Python 2/3 compatibility library. This is also a dependency of - :term:`dateutil`. - -libpng 1.2 (or later) - library for loading and saving :term:`PNG` files (`download - `__). libpng requires - zlib. If you are a Windows user, you can ignore this because we - build support into the matplotlib single-click installer - - -**Optional GUI frameworks** - -These are optional packages which you may want to install to use -matplotlib with a user interface toolkit. See -:ref:`what-is-a-backend` for more details on the optional matplotlib -backends and the capabilities they provide. - -:term:`tk` 8.3 or later - The TCL/Tk widgets library used by the TkAgg backend - -:term:`pyqt` 4.0 or later - The Qt4 widgets library python wrappers for the Qt4Agg backend - -:term:`pygtk` 2.4 or later - The python wrappers for the GTK widgets library for use with the - GTK or GTKAgg backend - -:term:`wxpython` 2.8 or later - The python wrappers for the wx widgets library for use with the - WX or WXAgg backend - -**Optional external programs** - -ffmpeg/avconv or mencoder - Required for the animation module to be save out put to movie - formats. - -ImageMagick - Required for the animation module to be able to save to animated gif. - -**Optional dependencies** - -`Pillow http://python-imaging.github.io/`__ - If Pillow is installed, matplotlib can read and write a larger - selection of image file formats. - - -:term:`freetype` 1.4 (or later) - library for reading true type font files. If you are a windows - user, you can ignore this since we build support into the - matplotlib single click installer. - -**Required libraries that ship with matplotlib** - -:term:`agg` 2.4 - The antigrain C++ rendering engine. matplotlib links against the - agg template source statically, so it will not affect anything on - your system outside of matplotlib. - -`PyCXX` 6.2.4 - A library for writing Python extensions in C++. - -`qhull` 2012.1 - A library for computing convex hulls. Used for computing triangulation - and meshes. - -`ttconv` - truetype font utility - -.. _build_osx: - -Building on OSX -=============== - -The build situation on OSX is complicated by the various places one -can get the libpng and freetype requirements (darwinports, fink, -/usr/X11R6) and the different architectures (e.g., x86, ppc, universal) and -the different OSX version (e.g., 10.4 and 10.5). We recommend that you build -the way we do for the OSX release: get the source from the tarball or the -git repository and follow the instruction in :file:`README.osx`. diff --git a/INSTALL.rst b/INSTALL.rst new file mode 100644 index 000000000000..3e5d1dde0dc8 --- /dev/null +++ b/INSTALL.rst @@ -0,0 +1,372 @@ +.. The source of this document is INSTALL.rst. During the doc build process, +.. this file is copied over to doc/users/installing.rst. +.. Therefore, you must edit INSTALL.rst, *not* doc/users/installing.rst! + +.. _pip: https://pypi.python.org/pypi/pip/ + +========== +Installing +========== + +.. note:: + + If you wish to contribute to the project, it's recommended you + :ref:`install the latest development version`. + + +.. contents:: + +Installing an official release +============================== + +Matplotlib and most of its dependencies are all available as wheel +packages for macOS, Windows and Linux distributions:: + + python -m pip install -U pip + python -m pip install -U matplotlib + +.. note:: + + The following backends work out of the box: Agg, ps, pdf, svg and TkAgg. + + For support of other GUI frameworks, LaTeX rendering, saving + animations and a larger selection of file formats, you may need to + install :ref:`additional dependencies `. + +Although not required, we suggest also installing ``IPython`` for +interactive use. To easily install a complete Scientific Python +stack, see :ref:`install_scipy_dists` below. + +.. _installing_windows: + +Windows +------- + +In case Python 2.7 or 3.4 are not installed for all users, +the Microsoft Visual C++ 2008 +(`64 bit `__ +or +`32 bit `__ +for Python 2.7) or Microsoft Visual C++ 2010 +(`64 bit `__ +or +`32 bit `__ +for Python 3.4) redistributable packages need to be installed. + +macOS +----- + +If you are using Python 2.7 on a Mac you may need to do:: + + xcode-select --install + +so that *subprocess32*, a dependency, may be compiled. + +To use the native OSX backend you will need :ref:`a framework build +` build of Python. + + +Linux +----- + +On extremely old versions of Linux and Python 2.7 you may need to +install the master version of *subprocess32* (`see comments +`__). + + +Test Data +--------- + +The wheels (:file:`*.whl`) on the `PyPI download page +`_ do not contain test data +or example code. +If you want to try the many demos that come in the Matplotlib source +distribution, download the :file:`*.tar.gz` file and look in the +:file:`examples` subdirectory. +To run the test suite: + + * extract the :file:`lib\\matplotlib\\tests` or + :file:`lib\\mpl_toolkits\\tests` directories from the source distribution; + * install test dependencies: `pytest `_, + `mock `_, Pillow, MiKTeX, GhostScript, + ffmpeg, avconv, mencoder, ImageMagick, and `Inkscape + `_; + * run ``py.test path\to\tests\directory``. + + +Third-party distributions of Matplotlib +======================================= + +.. _install_scipy_dists: + +Scientific Python Distributions +------------------------------- + +Both `Anaconda `_ and `Canopy +`_ are both excellent +choices that "just work" out of the box for Windows, macOS and common +Linux platforms. `WinPython `__ is an +option for windows users. All of these distributions include +Matplotlib and *lots* of other useful tools. + + +Linux : using your package manager +---------------------------------- + +If you are on Linux, you might prefer to use your package manager. Matplotlib +is packaged for almost every major Linux distribution. + +* Debian / Ubuntu: ``sudo apt-get install python3-matplotlib`` +* Fedora: ``sudo dnf install python3-matplotlib`` +* Red Hat: ``sudo yum install python3-matplotlib`` +* Arch: ``sudo pacman -S python-matplotlib`` + + + +.. _install_from_source: + +Installing from source +====================== + +If you are interested in contributing to Matplotlib development, +running the latest source code, or just like to build everything +yourself, it is not difficult to build Matplotlib from source. Grab +the latest *tar.gz* release file from `the PyPI files page +`_, or if you want to +develop Matplotlib or just need the latest bugfixed version, grab the +latest git version :ref:`install-from-git`. + +The standard environment variables `CC`, `CXX`, `PKG_CONFIG` are respected. +This means you can set them if your toolchain is prefixed. This may be used for +cross compiling. +:: + + export CC=x86_64-pc-linux-gnu-gcc + export CXX=x86_64-pc-linux-gnu-g++ + export PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config + +Once you have satisfied the requirements detailed below (mainly +Python, NumPy, libpng and FreeType), you can build Matplotlib. +:: + + cd matplotlib + python setup.py build + python setup.py install + +We provide a `setup.cfg +`_ +file that goes with :file:`setup.py` which you can use to customize +the build process. For example, which default backend to use, whether +some of the optional libraries that Matplotlib ships with are +installed, and so on. This file will be particularly useful to those +packaging Matplotlib. + +If you have installed prerequisites to nonstandard places and need to +inform Matplotlib where they are, edit ``setupext.py`` and add the base +dirs to the ``basedir`` dictionary entry for your ``sys.platform``; +e.g., if the header of some required library is in +``/some/path/include/someheader.h``, put ``/some/path`` in the +``basedir`` list for your platform. + +.. _install_requirements: + +Dependencies +------------ + +Matplotlib requires a large number of dependencies: + + * `Python `_ (>= 2.7 or >= 3.4) + * `NumPy `_ (>= |minimum_numpy_version|) + * `setuptools `__ + * `dateutil `_ (>= 2.0) + * `pyparsing `__ + * `libpng `__ (>= 1.2) + * `pytz `__ + * FreeType (>= 2.3) + * `cycler `__ (>= 0.10.0) + * `six `_ + * `backports.functools_lru_cache `_ + (for Python 2.7 only) + * `subprocess32 `_ (for Python + 2.7 only, on Linux and macOS only) + + +Optionally, you can also install a number of packages to enable better user +interface toolkits. See :ref:`what-is-a-backend` for more details on the +optional Matplotlib backends and the capabilities they provide. + + * :term:`tk` (>= 8.3, != 8.6.0 or 8.6.1): for the TkAgg backend; + * `PyQt4 `_ (>= 4.4) or + `PySide `_: for the Qt4Agg backend; + * `PyQt5 `_: for the Qt5Agg backend; + * :term:`pygtk` (>= 2.4): for the GTK and the GTKAgg backend; + * :term:`wxpython` (>= 2.8 or later): for the WX or WXAgg backend; + * `pycairo `_: for GTK3Cairo; + * `Tornado `_: for the WebAgg backend. + +For better support of animation output format and image file formats, LaTeX, +etc., you can install the following: + + * `ffmpeg `_/`avconv + `_: for saving movies; + * `ImageMagick `_: for saving + animated gifs; + * `Pillow `_ (>=2.0): for a larger selection of + image file formats: JPEG, BMP, and TIFF image files; + * `LaTeX `_ and `GhostScript + `_ (for rendering text with LaTeX). + +.. note:: + + Matplotlib depends on a large number of non-Python libraries. + `pkg-config `__ + can be used to find required non-Python libraries and thus make the install + go more smoothly if the libraries and headers are not in the expected + locations. + +.. note:: + + The following libraries are shipped with Matplotlib: + + - `Agg`: the Anti-Grain Geometry C++ rendering engine; + - `qhull`: to compute Delaunay triangulation; + - `ttconv`: a true type font utility. + +.. _build_linux: + +Building on Linux +----------------- + +It is easiest to use your system package manager to install the dependencies. + +If you are on Debian/Ubuntu, you can get all the dependencies +required to build Matplotlib with:: + + sudo apt-get build-dep python-matplotlib + +If you are on Fedora, you can get all the dependencies required to build +Matplotlib with:: + + sudo dnf builddep python-matplotlib + +If you are on RedHat, you can get all the dependencies required to build +Matplotlib by first installing ``yum-builddep`` and then running:: + + su -c "yum-builddep python-matplotlib" + +These commands do not build Matplotlib, but instead get and install the +build dependencies, which will make building from source easier. + + +.. _build_osx: + +Building on macOS +----------------- + +The build situation on macOS is complicated by the various places one +can get the libpng and FreeType requirements (MacPorts, Fink, +/usr/X11R6), the different architectures (e.g., x86, ppc, universal), and +the different macOS versions (e.g., 10.4 and 10.5). We recommend that you build +the way we do for the macOS release: get the source from the tarball or the +git repository and install the required dependencies through a third-party +package manager. Two widely used package managers are Homebrew, and MacPorts. +The following example illustrates how to install libpng and FreeType using +``brew``:: + + brew install libpng freetype pkg-config + +If you are using MacPorts, execute the following instead:: + + port install libpng freetype pkgconfig + +After installing the above requirements, install Matplotlib from source by +executing:: + + python setup.py install + +Note that your environment is somewhat important. Some conda users have +found that, to run the tests, their PYTHONPATH must include +/path/to/anaconda/.../site-packages and their DYLD_FALLBACK_LIBRARY_PATH +must include /path/to/anaconda/lib. + + +.. _build_windows: + +Building on Windows +------------------- + +The Python shipped from https://www.python.org is compiled with Visual Studio +2008 for versions before 3.3, Visual Studio 2010 for 3.3 and 3.4, and +Visual Studio 2015 for 3.5 and 3.6. Python extensions are recommended to be compiled +with the same compiler. + +Since there is no canonical Windows package manager, the methods for building +FreeType, zlib, and libpng from source code are documented as a build script +at `matplotlib-winbuild `_. + + +There are a few possibilities to build Matplotlib on Windows: + +* Wheels via `matplotlib-winbuild `_ +* Wheels by using conda packages +* Conda packages + +Wheel builds using conda packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is a wheel build, but we use conda packages to get all the requirements. The binary +requirements (png, FreeType,...) are statically linked and therefore not needed during the wheel +install. + +The commands below assume that you can compile a native Python lib for the Python version of your +choice. See `this howto `_ +for how to install and setup such environments. If in doubt: use Python >= 3.5 as it mostly works +without fiddling with environment variables:: + + # create a new environment with the required packages + conda create -n "matplotlib_build" python=3.5 numpy python-dateutil pyparsing pytz tornado "cycler>=0.10" tk libpng zlib freetype + activate matplotlib_build + # if you want a qt backend, you also have to install pyqt (be aware that pyqt doesn't mix well if + # you have created the environment with conda-forge already activated...) + conda install pyqt + # this package is only available in the conda-forge channel + conda install -c conda-forge msinttypes + # for Python 2.7 + conda install -c conda-forge backports.functools_lru_cache + + # copy the libs which have "wrong" names + set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib + mkdir lib || cmd /c "exit /b 0" + copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib + copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib + + # Make the header files and the rest of the static libs available during the build + # CONDA_DEFAULT_ENV is a env variable which is set to the currently active environment path + set MPLBASEDIRLIST=%CONDA_DEFAULT_ENV%\Library\;. + + # build the wheel + python setup.py bdist_wheel + +The `build_alllocal.cmd` script in the root folder automates these steps if +you have already created and activated the conda environment. + + +Conda packages +^^^^^^^^^^^^^^ + +This needs a `working installed C compiler +`_ +for the version of Python you are compiling the package for but you don't need +to setup the environment variables:: + + # only the first time... + conda install conda-build + + # the Python version you want a package for... + set CONDA_PY=3.5 + + # builds the package, using a clean build environment + conda build ci\conda_recipe + + # install the new package + conda install --use-local matplotlib diff --git a/LICENSE/LICENSE b/LICENSE/LICENSE index a161f24107e3..ec51537db27d 100644 --- a/LICENSE/LICENSE +++ b/LICENSE/LICENSE @@ -1,5 +1,55 @@ -LICENSE AGREEMENT FOR MATPLOTLIB 1.2.0 --------------------------------------- +License agreement for matplotlib versions 1.3.0 and later +========================================================= + +1. This LICENSE AGREEMENT is between the Matplotlib Development Team +("MDT"), 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, MDT +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 MDT's +License Agreement and MDT's notice of copyright, i.e., "Copyright (c) +2012- Matplotlib Development Team; 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. MDT is making matplotlib available to Licensee on an "AS +IS" basis. MDT MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, MDT 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. MDT 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 MDT and +Licensee. This License Agreement does not grant permission to use MDT +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. + +License agreement for matplotlib versions prior to 1.3.0 +======================================================== 1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the Individual or Organization ("Licensee") accessing and otherwise using @@ -9,30 +59,30 @@ 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 +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-2011 John D. Hunter; All Rights Reserved" are retained in -matplotlib 1.2.0 alone or in any derivative version prepared by +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 1.2.0 or any part thereof, and wants to +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 1.2.0. +the changes made to matplotlib. -4. JDH is making matplotlib 1.2.0 available to Licensee on an "AS +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 1.2.0 +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 -1.2.0 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR + 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 +MATPLOTLIB , OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material @@ -44,6 +94,6 @@ 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, +8. By copying, installing or otherwise using matplotlib, Licensee agrees to be bound by the terms and conditions of this License -Agreement. +Agreement. \ No newline at end of file diff --git a/LICENSE/LICENSE.PIL b/LICENSE/LICENSE.PIL new file mode 100644 index 000000000000..3f77350b923b --- /dev/null +++ b/LICENSE/LICENSE.PIL @@ -0,0 +1,12 @@ +Software License + +The Python Imaging Library (PIL) is + + Copyright © 1997-2011 by Secret Labs AB + Copyright © 1995-2011 by Fredrik Lundh + +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 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. \ No newline at end of file diff --git a/LICENSE/LICENSE_AMSFONTS b/LICENSE/LICENSE_AMSFONTS new file mode 100644 index 000000000000..3627bb9bb617 --- /dev/null +++ b/LICENSE/LICENSE_AMSFONTS @@ -0,0 +1,240 @@ +The cmr10.pfb file is a Type-1 version of one of Knuth's Computer Modern fonts. +It is included here as test data only, but the following license applies. + +Copyright (c) 1997, 2009, American Mathematical Society (http://www.ams.org). +All Rights Reserved. + +"cmb10" is a Reserved Font Name for this Font Software. +"cmbsy10" is a Reserved Font Name for this Font Software. +"cmbsy5" is a Reserved Font Name for this Font Software. +"cmbsy6" is a Reserved Font Name for this Font Software. +"cmbsy7" is a Reserved Font Name for this Font Software. +"cmbsy8" is a Reserved Font Name for this Font Software. +"cmbsy9" is a Reserved Font Name for this Font Software. +"cmbx10" is a Reserved Font Name for this Font Software. +"cmbx12" is a Reserved Font Name for this Font Software. +"cmbx5" is a Reserved Font Name for this Font Software. +"cmbx6" is a Reserved Font Name for this Font Software. +"cmbx7" is a Reserved Font Name for this Font Software. +"cmbx8" is a Reserved Font Name for this Font Software. +"cmbx9" is a Reserved Font Name for this Font Software. +"cmbxsl10" is a Reserved Font Name for this Font Software. +"cmbxti10" is a Reserved Font Name for this Font Software. +"cmcsc10" is a Reserved Font Name for this Font Software. +"cmcsc8" is a Reserved Font Name for this Font Software. +"cmcsc9" is a Reserved Font Name for this Font Software. +"cmdunh10" is a Reserved Font Name for this Font Software. +"cmex10" is a Reserved Font Name for this Font Software. +"cmex7" is a Reserved Font Name for this Font Software. +"cmex8" is a Reserved Font Name for this Font Software. +"cmex9" is a Reserved Font Name for this Font Software. +"cmff10" is a Reserved Font Name for this Font Software. +"cmfi10" is a Reserved Font Name for this Font Software. +"cmfib8" is a Reserved Font Name for this Font Software. +"cminch" is a Reserved Font Name for this Font Software. +"cmitt10" is a Reserved Font Name for this Font Software. +"cmmi10" is a Reserved Font Name for this Font Software. +"cmmi12" is a Reserved Font Name for this Font Software. +"cmmi5" is a Reserved Font Name for this Font Software. +"cmmi6" is a Reserved Font Name for this Font Software. +"cmmi7" is a Reserved Font Name for this Font Software. +"cmmi8" is a Reserved Font Name for this Font Software. +"cmmi9" is a Reserved Font Name for this Font Software. +"cmmib10" is a Reserved Font Name for this Font Software. +"cmmib5" is a Reserved Font Name for this Font Software. +"cmmib6" is a Reserved Font Name for this Font Software. +"cmmib7" is a Reserved Font Name for this Font Software. +"cmmib8" is a Reserved Font Name for this Font Software. +"cmmib9" is a Reserved Font Name for this Font Software. +"cmr10" is a Reserved Font Name for this Font Software. +"cmr12" is a Reserved Font Name for this Font Software. +"cmr17" is a Reserved Font Name for this Font Software. +"cmr5" is a Reserved Font Name for this Font Software. +"cmr6" is a Reserved Font Name for this Font Software. +"cmr7" is a Reserved Font Name for this Font Software. +"cmr8" is a Reserved Font Name for this Font Software. +"cmr9" is a Reserved Font Name for this Font Software. +"cmsl10" is a Reserved Font Name for this Font Software. +"cmsl12" is a Reserved Font Name for this Font Software. +"cmsl8" is a Reserved Font Name for this Font Software. +"cmsl9" is a Reserved Font Name for this Font Software. +"cmsltt10" is a Reserved Font Name for this Font Software. +"cmss10" is a Reserved Font Name for this Font Software. +"cmss12" is a Reserved Font Name for this Font Software. +"cmss17" is a Reserved Font Name for this Font Software. +"cmss8" is a Reserved Font Name for this Font Software. +"cmss9" is a Reserved Font Name for this Font Software. +"cmssbx10" is a Reserved Font Name for this Font Software. +"cmssdc10" is a Reserved Font Name for this Font Software. +"cmssi10" is a Reserved Font Name for this Font Software. +"cmssi12" is a Reserved Font Name for this Font Software. +"cmssi17" is a Reserved Font Name for this Font Software. +"cmssi8" is a Reserved Font Name for this Font Software. +"cmssi9" is a Reserved Font Name for this Font Software. +"cmssq8" is a Reserved Font Name for this Font Software. +"cmssqi8" is a Reserved Font Name for this Font Software. +"cmsy10" is a Reserved Font Name for this Font Software. +"cmsy5" is a Reserved Font Name for this Font Software. +"cmsy6" is a Reserved Font Name for this Font Software. +"cmsy7" is a Reserved Font Name for this Font Software. +"cmsy8" is a Reserved Font Name for this Font Software. +"cmsy9" is a Reserved Font Name for this Font Software. +"cmtcsc10" is a Reserved Font Name for this Font Software. +"cmtex10" is a Reserved Font Name for this Font Software. +"cmtex8" is a Reserved Font Name for this Font Software. +"cmtex9" is a Reserved Font Name for this Font Software. +"cmti10" is a Reserved Font Name for this Font Software. +"cmti12" is a Reserved Font Name for this Font Software. +"cmti7" is a Reserved Font Name for this Font Software. +"cmti8" is a Reserved Font Name for this Font Software. +"cmti9" is a Reserved Font Name for this Font Software. +"cmtt10" is a Reserved Font Name for this Font Software. +"cmtt12" is a Reserved Font Name for this Font Software. +"cmtt8" is a Reserved Font Name for this Font Software. +"cmtt9" is a Reserved Font Name for this Font Software. +"cmu10" is a Reserved Font Name for this Font Software. +"cmvtt10" is a Reserved Font Name for this Font Software. +"euex10" is a Reserved Font Name for this Font Software. +"euex7" is a Reserved Font Name for this Font Software. +"euex8" is a Reserved Font Name for this Font Software. +"euex9" is a Reserved Font Name for this Font Software. +"eufb10" is a Reserved Font Name for this Font Software. +"eufb5" is a Reserved Font Name for this Font Software. +"eufb7" is a Reserved Font Name for this Font Software. +"eufm10" is a Reserved Font Name for this Font Software. +"eufm5" is a Reserved Font Name for this Font Software. +"eufm7" is a Reserved Font Name for this Font Software. +"eurb10" is a Reserved Font Name for this Font Software. +"eurb5" is a Reserved Font Name for this Font Software. +"eurb7" is a Reserved Font Name for this Font Software. +"eurm10" is a Reserved Font Name for this Font Software. +"eurm5" is a Reserved Font Name for this Font Software. +"eurm7" is a Reserved Font Name for this Font Software. +"eusb10" is a Reserved Font Name for this Font Software. +"eusb5" is a Reserved Font Name for this Font Software. +"eusb7" is a Reserved Font Name for this Font Software. +"eusm10" is a Reserved Font Name for this Font Software. +"eusm5" is a Reserved Font Name for this Font Software. +"eusm7" is a Reserved Font Name for this Font Software. +"lasy10" is a Reserved Font Name for this Font Software. +"lasy5" is a Reserved Font Name for this Font Software. +"lasy6" is a Reserved Font Name for this Font Software. +"lasy7" is a Reserved Font Name for this Font Software. +"lasy8" is a Reserved Font Name for this Font Software. +"lasy9" is a Reserved Font Name for this Font Software. +"lasyb10" is a Reserved Font Name for this Font Software. +"lcircle1" is a Reserved Font Name for this Font Software. +"lcirclew" is a Reserved Font Name for this Font Software. +"lcmss8" is a Reserved Font Name for this Font Software. +"lcmssb8" is a Reserved Font Name for this Font Software. +"lcmssi8" is a Reserved Font Name for this Font Software. +"line10" is a Reserved Font Name for this Font Software. +"linew10" is a Reserved Font Name for this Font Software. +"msam10" is a Reserved Font Name for this Font Software. +"msam5" is a Reserved Font Name for this Font Software. +"msam6" is a Reserved Font Name for this Font Software. +"msam7" is a Reserved Font Name for this Font Software. +"msam8" is a Reserved Font Name for this Font Software. +"msam9" is a Reserved Font Name for this Font Software. +"msbm10" is a Reserved Font Name for this Font Software. +"msbm5" is a Reserved Font Name for this Font Software. +"msbm6" is a Reserved Font Name for this Font Software. +"msbm7" is a Reserved Font Name for this Font Software. +"msbm8" is a Reserved Font Name for this Font Software. +"msbm9" is a Reserved Font Name for this Font Software. +"wncyb10" is a Reserved Font Name for this Font Software. +"wncyi10" is a Reserved Font Name for this Font Software. +"wncyr10" is a Reserved Font Name for this Font Software. +"wncysc10" is a Reserved Font Name for this Font Software. +"wncyss10" is a Reserved Font Name for this Font Software. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +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 THE +COPYRIGHT HOLDER 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. diff --git a/LICENSE/LICENSE_CONDA b/LICENSE/LICENSE_CONDA new file mode 100644 index 000000000000..8794a6d484af --- /dev/null +++ b/LICENSE/LICENSE_CONDA @@ -0,0 +1,51 @@ +Except where noted below, conda is released under the following terms: + +(c) 2012 Continuum Analytics, Inc. / http://continuum.io +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. + * Neither the name of Continuum Analytics, Inc. 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 CONTINUUM ANALYTICS 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. + + +Exceptions +========== + +versioneer.py is Public Domain + +The ProgressBar package is released under the following terms: + +# progressbar - Text progress bar library for Python. +# Copyright (c) 2005 Nilton Volpato +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \ No newline at end of file diff --git a/LICENSE/LICENSE_JQUERY b/LICENSE/LICENSE_JQUERY new file mode 100644 index 000000000000..f35387a3ab48 --- /dev/null +++ b/LICENSE/LICENSE_JQUERY @@ -0,0 +1,61 @@ +Comment found in jQuery source code: + +/*! + * jQuery JavaScript Library v1.11.3 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2015-04-28T16:19Z + */ + +Comment found in jQuery UI source code: + +/*! jQuery UI - v1.11.4 - 2015-03-11 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +Text found at http://jquery.org/license: + + jQuery Foundation projects are released under the terms of the license + specified in the project's repository or if not specified, under the + MIT license. + + The MIT License is simple and easy to understand and it places almost + no restrictions on what you can do with a jQuery Foundation project. + + You are free to use any jQuery Foundation project in any other project + (even commercial projects) as long as the copyright header is left + intact. + +The text links to https://tldrlegal.com/license/mit-license +which includes the following as the "Full License Text": + + The MIT License (MIT) + + Copyright (c) + + 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. \ No newline at end of file diff --git a/LICENSE/Solarized.txt b/LICENSE/Solarized.txt new file mode 100644 index 000000000000..6e5a0475dd24 --- /dev/null +++ b/LICENSE/Solarized.txt @@ -0,0 +1,20 @@ +https://github.com/altercation/solarized/blob/master/LICENSE +Copyright (c) 2011 Ethan Schoonover + +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 --git a/MANIFEST.in b/MANIFEST.in index 92f11d0dd7fe..85caada2a1bd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include CHANGELOG INSTALL -include TODO CONTRIBUTING.md +include CONTRIBUTING.md include Makefile MANIFEST.in include matplotlibrc.template setup.cfg.template include setupext.py setup.py distribute_setup.py @@ -9,6 +9,7 @@ include lib/matplotlib/mpl-data/images/* include lib/matplotlib/mpl-data/fonts/ttf/* include lib/matplotlib/mpl-data/fonts/pdfcorefonts/* include lib/matplotlib/mpl-data/fonts/afm/* +include lib/matplotlib/mpl-data/stylelib/* recursive-include lib/matplotlib/mpl-data/sample_data * recursive-include LICENSE * recursive-include examples * @@ -16,3 +17,6 @@ recursive-include doc * recursive-include src *.cpp *.c *.h *.m recursive-include lib * recursive-include extern * +include versioneer.py +include lib/matplotlib/_version.py +include tests.py diff --git a/Makefile b/Makefile deleted file mode 100644 index d333f7f88901..000000000000 --- a/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# Makefile for matplotlib - -PYTHON = `which python` -VERSION = `${PYTHON} setup.py --version` - -DISTFILES = API_CHANGES KNOWN_BUGS INSTALL README TODO license \ - CHANGELOG Makefile INTERACTIVE \ - MANIFEST.in lib lib/matplotlib lib/dateutil lib/pytz examples setup.py - -RELEASE = matplotlib-${VERSION} - - -clean: - ${PYTHON} setup.py clean;\ - rm -f *.png *.ps *.eps *.svg *.jpg *.pdf - find . -name "_tmp*.py" | xargs rm -f;\ - find . \( -name "*~" -o -name "*.pyc" \) | xargs rm -f;\ - find unit \( -name "*.png" -o -name "*.ps" -o -name "*.pdf" -o -name "*.eps" \) | xargs rm -f - find . \( -name "#*" -o -name ".#*" -o -name ".*~" -o -name "*~" \) | xargs rm -f - - -release: ${DISTFILES} - rm -f MANIFEST;\ - ${PYTHON} license.py ${VERSION} license/LICENSE;\ - ${PYTHON} setup.py sdist --formats=gztar,zip; - -pyback: - tar cvfz pyback.tar.gz *.py lib src examples/*.py unit/*.py - - -_build_osx105: - CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build - -build_osx105: - echo "Use 'make -f fetch deps mpl_install instead'" - - -jdh_doc_snapshot: - git pull;\ - python setup.py install --prefix=~/dev;\ - cd doc;\ - rm -rf build;\ - python make.py clean;\ - python make.py html latex sf sfpdf; - - -test: - ${PYTHON} tests.py - - -test-coverage: - ${PYTHON} tests.py --with-coverage --cover-package=matplotlib - - diff --git a/README.osx b/README.osx deleted file mode 100644 index 12915d488bf3..000000000000 --- a/README.osx +++ /dev/null @@ -1,31 +0,0 @@ -Building mpl on OSX is sometimes a nightmare because of all the -different types of zlib, png and freetype that may be on your system. - -For developers who want to build matplotlib from source, 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 brew: - -Example usage:: - - brew install libpng freetype pkgconfig - -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 - - -Note that your environment is somewhat important. Some conda users have -found that, to run the tests, their PYTHONPATH must include -/path/to/anaconda/.../site-packages and their DYLD_FALLBACK_LIBRARY_PATH -must include /path/to/anaconda/lib. diff --git a/README.rst b/README.rst index 6e01ea7275cc..26ccde2860ae 100644 --- a/README.rst +++ b/README.rst @@ -1,26 +1,83 @@ +|Travis|_ |AppVeyor|_ |Codecov|_ |PyPi|_ |Gitter|_ |Depsy|_ + + +.. |Travis| image:: https://travis-ci.org/matplotlib/matplotlib.svg?branch=master +.. _Travis: https://travis-ci.org/matplotlib/matplotlib + +.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=master&svg=true +.. _AppVeyor: https://ci.appveyor.com/project/matplotlib/matplotlib + +.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=master&service=github +.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=master + +.. |PyPi| image:: https://badge.fury.io/py/matplotlib.svg +.. _PyPi: https://badge.fury.io/py/matplotlib + +.. |Gitter| image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg + :target: https://gitter.im/matplotlib/matplotlib?utm_source=share-link&utm_medium=link&utm_campaign=share-link + +.. |Depsy| image:: http://depsy.org/api/package/pypi/matplotlib/badge.svg +.. _Depsy: http://depsy.org/package/python/matplotlib + +.. |NUMFocus| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A +.. _NUMFocus: http://www.numfocus.org + + ########## -matplotlib +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. +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 (à la MATLAB or Mathematica), web application servers, and various +graphical user interface toolkits. `Home page `_ Installation -============= +============ -For installation instructions and requirements, see the INSTALL file. +For installation instructions and requirements, see the INSTALL.rst file or the +`install `_ documentation. If you +think you may want to contribute to matplotlib, check out the `guide to +working with the source code +`_. Testing ======= After installation, you can launch the test suite:: - python tests.py + py.test + +Or from the Python interpreter:: + + import matplotlib + matplotlib.test() Consider reading http://matplotlib.org/devel/coding_guide.html#testing for -more information. +more information. Note that the test suite requires pytest and, on Python 2.7, +mock. Please install with pip or your package manager of choice. + +Contact +======= +matplotlib's communication channels include active mailing lists: + +* `Users `_ mailing list: matplotlib-users@python.org +* `Announcement `_ mailing list: matplotlib-announce@python.org +* `Development `_ mailing list: matplotlib-devel@python.org + +The first is a good starting point for general questions and discussions. + +`Gitter `_ is for coordinating development and asking questions directly related to contributing to matplotlib. + +Contribute +========== +You've discovered a bug or something else you want to change - excellent! + +You've worked out a way to fix it – even better! + +You want to tell us about it – best of all! + +Start at the `contributing guide `_! diff --git a/boilerplate.py b/boilerplate.py deleted file mode 100644 index 1791c808192d..000000000000 --- a/boilerplate.py +++ /dev/null @@ -1,330 +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 - -from __future__ import (absolute_import, division, print_function, - unicode_literals) - -import six - -import os -import inspect -import random -import types - -import textwrap - -# this line imports the installed copy of matplotlib, and not the local copy -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', - 'angle_spectrum', - 'arrow', - 'axhline', - 'axhspan', - 'axvline', - 'axvspan', - 'bar', - 'barh', - 'broken_barh', - 'boxplot', - 'cohere', - 'clabel', - 'contour', - 'contourf', - 'csd', - 'errorbar', - 'eventplot', - 'fill', - 'fill_between', - 'fill_betweenx', - 'hexbin', - 'hist', - 'hist2d', - 'hlines', - 'imshow', - 'loglog', - 'magnitude_spectrum', - 'pcolor', - 'pcolormesh', - 'phase_spectrum', - 'pie', - 'plot', - 'plot_date', - 'psd', - 'quiver', - 'quiverkey', - 'scatter', - 'semilogx', - 'semilogy', - 'specgram', - #'spy', - 'stackplot', - 'stem', - 'step', - 'streamplot', - 'tricontour', - 'tricontourf', - 'tripcolor', - 'triplot', - 'violinplot', - '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.lines)', - '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 = () - else: - def_edited = [] - for val in defaults: - if isinstance(val, unicode): - val = val.encode('ascii', 'ignore') - def_edited.append(val) - defaults = tuple(def_edited) - - # 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()) - pyplot.write('\n') - - -if __name__ == '__main__': - # Write the matplotlib.pyplot file - build_pyplot() diff --git a/build_alllocal.cmd b/build_alllocal.cmd new file mode 100644 index 000000000000..7a357302c4ae --- /dev/null +++ b/build_alllocal.cmd @@ -0,0 +1,36 @@ +:: This assumes you have installed all the dependencies via conda packages: +:: # create a new environment with the required packages +:: conda create -n "matplotlib_build" python=3.4 numpy python-dateutil pyparsing pytz tornado "cycler>=0.10" tk libpng zlib freetype +:: activate matplotlib_build +:: if you want qt backend, you also have to install pyqt +:: conda install pyqt +:: # this package is only available in the conda-forge channel +:: conda install -c conda-forge msinttypes +:: if you build on py2.7: +:: conda install -c conda-forge backports.functools_lru_cache + +set TARGET=bdist_wheel +IF [%1]==[] ( + echo Using default target: %TARGET% +) else ( + set TARGET=%1 + echo Using user supplied target: %TARGET% +) + +IF NOT DEFINED CONDA_PREFIX ( + echo No Conda env activated: you need to create a conda env with the right packages and activate it! + GOTO:eof +) + +:: copy the libs which have "wrong" names +set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib +mkdir lib || cmd /c "exit /b 0" +copy %LIBRARY_LIB%\zlibstatic.lib lib\z.lib +copy %LIBRARY_LIB%\libpng_static.lib lib\png.lib + +:: Make the header files and the rest of the static libs available during the build +:: CONDA_PREFIX is a env variable which is set to the currently active environment path +set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;. + +:: build the target +python setup.py %TARGET% diff --git a/ci/appveyor/vcvars64.bat b/ci/appveyor/vcvars64.bat new file mode 100644 index 000000000000..c4659becc3ae --- /dev/null +++ b/ci/appveyor/vcvars64.bat @@ -0,0 +1 @@ +CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 \ No newline at end of file diff --git a/ci/codecov.yml b/ci/codecov.yml new file mode 100644 index 000000000000..61c425bf202e --- /dev/null +++ b/ci/codecov.yml @@ -0,0 +1,30 @@ +# codecov can find this file anywhere in the repo, so we don't need to clutter +# the root folder. +comment: false + +codecov: + notify: + require_ci_to_pass: no + +coverage: + status: + patch: + default: + target: 50% + if_no_uploads: error + if_not_found: success + if_ci_failed: failure + project: + default: false + library: + target: 50% + if_no_uploads: error + if_not_found: success + if_ci_failed: failure + paths: '!lib/.*/tests/.*' + tests: + target: auto + if_no_uploads: error + if_not_found: success + if_ci_failed: failure + paths: 'lib/.*/tests/.*' diff --git a/ci/conda_recipe/README.md b/ci/conda_recipe/README.md new file mode 100644 index 000000000000..7819c9f0c766 --- /dev/null +++ b/ci/conda_recipe/README.md @@ -0,0 +1,3 @@ +# conda package + +Up to now, this is mainly used to build a test conda package on windows on appveyor. \ No newline at end of file diff --git a/ci/conda_recipe/bld.bat b/ci/conda_recipe/bld.bat new file mode 100644 index 000000000000..a7810d418d2f --- /dev/null +++ b/ci/conda_recipe/bld.bat @@ -0,0 +1,16 @@ +set LIBPATH=%LIBRARY_LIB%; +set INCLUDE=%INCLUDE%;%PREFIX%\Library\include\freetype2 + +ECHO [directories] > setup.cfg +ECHO basedirlist = %LIBRARY_PREFIX% >> setup.cfg +ECHO [packages] >> setup.cfg +ECHO tests = False >> setup.cfg +ECHO sample_data = False >> setup.cfg +ECHO toolkits_tests = False >> setup.cfg + +@rem workaround for https://github.com/matplotlib/matplotlib/issues/6460 +@rem see also https://github.com/conda-forge/libpng-feedstock/pull/4 +copy /y %LIBRARY_LIB%\libpng16.lib %LIBRARY_LIB%\png.lib + +%PYTHON% setup.py install --single-version-externally-managed --record=record.txt +if errorlevel 1 exit 1 diff --git a/ci/conda_recipe/build.sh b/ci/conda_recipe/build.sh new file mode 100644 index 000000000000..c2967acb98cf --- /dev/null +++ b/ci/conda_recipe/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +if [ `uname` == Linux ]; then + pushd $PREFIX/lib + ln -s libtcl8.5.so libtcl.so + ln -s libtk8.5.so libtk.so + popd +fi + +cat < setup.cfg +[directories] +basedirlist = $PREFIX + +[packages] +tests = False +toolkit_tests = False +sample_data = False + +EOF + +# The macosx backend isn't building with conda at this stage. +if [ `uname` == Darwin ]; then +cat << EOF >> setup.cfg + +[gui_support] +tkagg = true +macosx = false + +EOF +fi + +cat setup.cfg +sed -i.bak "s|/usr/local|$PREFIX|" setupext.py + + +$PYTHON setup.py install --single-version-externally-managed --record=record.txt + diff --git a/ci/conda_recipe/cfg_qt4agg.patch b/ci/conda_recipe/cfg_qt4agg.patch new file mode 100644 index 000000000000..16e6fc6c3934 --- /dev/null +++ b/ci/conda_recipe/cfg_qt4agg.patch @@ -0,0 +1,13 @@ +diff --git setup.cfg.template setup.cfg.template +index cae6f67..fd11c79 100644 +--- setup.cfg.template ++++ setup.cfg.template +@@ -88,7 +88,7 @@ + # if you have disabled the relevent extension modules. Agg will be used + # by default. + # +-#backend = Agg ++backend = Qt4Agg + # + + [package_data] diff --git a/ci/conda_recipe/condaversion.patch b/ci/conda_recipe/condaversion.patch new file mode 100644 index 000000000000..915fda3bcc23 --- /dev/null +++ b/ci/conda_recipe/condaversion.patch @@ -0,0 +1,15 @@ +diff --git setup.py setup.py +index 8af8b6d..4e4f9d2 100644 +--- setup.py ++++ setup.py +@@ -57,6 +57,9 @@ + import versioneer + __version__ = versioneer.get_version() + ++# For conda builds... ++with open("__conda_version__.txt", "w") as f: ++ f.write(__version__) + + # These are the packages in the order we want to display them. This + # list may contain strings to create section headers for the display. + \ No newline at end of file diff --git a/ci/conda_recipe/meta.yaml b/ci/conda_recipe/meta.yaml new file mode 100644 index 000000000000..ad3c80da231f --- /dev/null +++ b/ci/conda_recipe/meta.yaml @@ -0,0 +1,75 @@ +# Full credit goes to https://github.com/conda/conda-recipes for providing this recipe. +# It has been subsequently adapted for automated building with conda-forge and matplotlib. + +package: + name: matplotlib + version: 1.9.9 + +source: + path: ../../ + + patches: + # A patch to make Qt4Agg the default backend. + - cfg_qt4agg.patch # [linux] + # Patches the matplotlibrc template to default to Qt4. + - rctmp_pyside.patch # [not osx] + # dynamic version from git + # we can't use condas usual dynamic versions as setup.py uses + # multiprocessing during the configure stage and this seems to confuse conda-build. + # https://github.com/conda/conda-build/issues/1061 + - condaversion.patch + + +requirements: + build: + - python + - setuptools + - pkg-config # [not win] + - numpy x.x + - python-dateutil + - freetype 2.6* + - msinttypes # [win] + - cycler >=0.10 + - pytest >=3.0.0 + - pyparsing + - pytz +# - py2cairo # [linux and py2k] + - tornado + - libpng >=1.6.21,<1.7 + - zlib 1.2* # [win] + - pyqt # [not osx] + - tk 8.5* # [linux] + - backports.functools_lru_cache # [py2k] + + run: + - python + - numpy x.x + - cycler >=0.10 + - python-dateutil + - freetype 2.6* + - pytz + - pyparsing +# - py2cairo # [linux and py2k] + - qt 4* + - libpng >=1.6.21,<1.7 + - pyqt # [not osx] + - tk 8.5* # [linux and win] + - backports.functools_lru_cache # [py2k] + +test: + imports: + - matplotlib + - matplotlib.pyplot + +about: + home: http://matplotlib.org/ + license: PSF-based (http://matplotlib.org/users/license.html) + summary: Publication quality figures in Python + +extra: + recipe-maintainers: + - janschulz # only in the mpl repository + - mdboom # rest form conda-forge + - ocefpaf + - pelson + - tacaswell diff --git a/ci/conda_recipe/osx-tk.patch b/ci/conda_recipe/osx-tk.patch new file mode 100644 index 000000000000..1411225550e9 --- /dev/null +++ b/ci/conda_recipe/osx-tk.patch @@ -0,0 +1,60 @@ +diff --git setupext.py setupext.py +index ddf2ca1..b9e0729 100755 +--- setupext.py ++++ setupext.py +@@ -1659,52 +1659,11 @@ class BackendTkAgg(OptionalBackendPackage): + ext.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. +- 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'] +- ext.include_dirs.extend(tk_include_dirs) +- ext.extra_link_args.extend(frameworks) +- ext.extra_compile_args.extend(frameworks) ++ ext.include_dirs.append(join(sys.prefix, 'include')) ++ ext.libraries.extend(['tk8.5', 'tcl8.5']) ++ ext.library_dirs.append(join(sys.prefix, 'lib')) + + # you're still here? ok we'll try it this way... + else: diff --git a/ci/conda_recipe/rctmp_pyside.patch b/ci/conda_recipe/rctmp_pyside.patch new file mode 100644 index 000000000000..c5541f8064c5 --- /dev/null +++ b/ci/conda_recipe/rctmp_pyside.patch @@ -0,0 +1,19 @@ +diff --git a/matplotlibrc.template b/matplotlibrc.template +index 2f0e5c4..c9b6e49 100644 +--- a/matplotlibrc.template ++++ b/matplotlibrc.template +@@ -38,12 +38,12 @@ + # + # If you omit this parameter, it will always default to "Agg", which is a + # non-interactive backend. +-backend : $TEMPLATE_BACKEND ++backend : Qt4Agg + + # If you are using the Qt4Agg backend, you can choose here + # to use the PyQt4 bindings or the newer PySide bindings to + # the underlying Qt4 toolkit. +-#backend.qt4 : PyQt4 # PyQt4 | PySide ++backend.qt4 : PyQt4 # PyQt4 | PySide + + # Note that this can be overridden by the environment variable + # QT_API used by Enthought Tool Suite (ETS); valid values are diff --git a/ci/conda_recipe/run_test.py b/ci/conda_recipe/run_test.py new file mode 100644 index 000000000000..5b3d95d1174f --- /dev/null +++ b/ci/conda_recipe/run_test.py @@ -0,0 +1,28 @@ +import os +import platform +import sys + +import matplotlib +import matplotlib.pyplot +import matplotlib._cntr +import matplotlib._image +import matplotlib._path +import matplotlib._png +import matplotlib._tri +import matplotlib.backends._backend_agg +import matplotlib.ft2font +import matplotlib.ttconv +if platform.system() not in ['Windows']: + import matplotlib.backends._tkagg + +import pylab +import mpl_toolkits + +if int(os.getenv('GUI_TEST', 0)): + assert matplotlib.rcParams['backend.qt4'] == 'PyQt4' + + import matplotlib.pyplot as plt + plt.ioff() + plt.title('If this window displays, success: CLOSE TO CONTINUE TESTS') + plt.plot([1,2,5,9]) + plt.show() diff --git a/ci/travis/matplotlibDeployKey.enc b/ci/travis/matplotlibDeployKey.enc new file mode 100644 index 000000000000..f73fb807cdf5 Binary files /dev/null and b/ci/travis/matplotlibDeployKey.enc differ diff --git a/ci/travis/setup.cfg b/ci/travis/setup.cfg new file mode 100644 index 000000000000..61cdc102a0f8 --- /dev/null +++ b/ci/travis/setup.cfg @@ -0,0 +1,2 @@ +[test] +local_freetype=True \ No newline at end of file diff --git a/ci/travis/test_script.sh b/ci/travis/test_script.sh new file mode 100755 index 000000000000..e5a7cb190fab --- /dev/null +++ b/ci/travis/test_script.sh @@ -0,0 +1,28 @@ +#! /bin/bash + +set -ev + +# This script is meant to be called by the "script" step defined in +# .travis.yml. See http://docs.travis-ci.com/ for more details. +# The behavior of the script is controlled by environment variabled defined +# in the .travis.yml in the top level folder of the project. + +# The number of processes is hardcoded, because using too many causes the +# Travis VM to run out of memory (since so many copies of inkscape and +# ghostscript are running at the same time). + +if [[ $DELETE_FONT_CACHE == 1 ]]; then + rm -rf ~/.cache/matplotlib +fi +# Workaround for pytest-xdist flaky collection order +# https://github.com/pytest-dev/pytest/issues/920 +# https://github.com/pytest-dev/pytest/issues/1075 +export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))') +echo PYTHONHASHSEED=$PYTHONHASHSEED + +echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8 +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + pytest $PYTEST_ARGS $RUN_PEP8 +else + gdb -return-child-result -batch -ex r -ex bt --args python $PYTHON_ARGS -m pytest $PYTEST_ARGS $RUN_PEP8 +fi diff --git a/distribute_setup.py b/distribute_setup.py deleted file mode 100755 index cf3013d0f184..000000000000 --- a/distribute_setup.py +++ /dev/null @@ -1,557 +0,0 @@ -#!python -"""Bootstrap distribute installation - -If you want to use setuptools in your package's setup.py, just include this -file in the same directory with it, and add this to the top of your setup.py:: - - from distribute_setup import use_setuptools - use_setuptools() - -If you want to require a specific version of setuptools, set a download -mirror, or use an alternate download directory, you can do so by supplying -the appropriate options to ``use_setuptools()``. - -This file can also be run as a script to install or upgrade setuptools. -""" -import os -import shutil -import sys -import time -import fnmatch -import tempfile -import tarfile -import optparse - -from distutils import log - -try: - from site import USER_SITE -except ImportError: - USER_SITE = None - -try: - import subprocess - - def _python_cmd(*args): - args = (sys.executable,) + args - return subprocess.call(args) == 0 - -except ImportError: - # will be used for python 2.3 - def _python_cmd(*args): - args = (sys.executable,) + args - # quoting arguments if windows - if sys.platform == 'win32': - def quote(arg): - if ' ' in arg: - return '"%s"' % arg - return arg - args = [quote(arg) for arg in args] - return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 - -MINIMUM_VERSION = "0.6.28" -DEFAULT_VERSION = "0.6.45" -DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" -SETUPTOOLS_FAKED_VERSION = "0.6c11" - -SETUPTOOLS_PKG_INFO = """\ -Metadata-Version: 1.0 -Name: setuptools -Version: %s -Summary: xxxx -Home-page: xxx -Author: xxx -Author-email: xxx -License: xxx -Description: xxx -""" % SETUPTOOLS_FAKED_VERSION - - -def _install(tarball, install_args=()): - # extracting the tarball - tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s', tmpdir) - old_wd = os.getcwd() - try: - os.chdir(tmpdir) - tar = tarfile.open(tarball) - _extractall(tar) - tar.close() - - # going in the directory - subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) - os.chdir(subdir) - log.warn('Now working in %s', subdir) - - # installing - log.warn('Installing Distribute') - if not _python_cmd('setup.py', 'install', *install_args): - log.warn('Something went wrong during the installation.') - log.warn('See the error message above.') - # exitcode will be 2 - return 2 - finally: - os.chdir(old_wd) - shutil.rmtree(tmpdir) - - -def _build_egg(egg, tarball, to_dir): - # extracting the tarball - tmpdir = tempfile.mkdtemp() - log.warn('Extracting in %s', tmpdir) - old_wd = os.getcwd() - try: - os.chdir(tmpdir) - tar = tarfile.open(tarball) - _extractall(tar) - tar.close() - - # going in the directory - subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) - os.chdir(subdir) - log.warn('Now working in %s', subdir) - - # building an egg - log.warn('Building a Distribute egg in %s', to_dir) - _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) - - finally: - os.chdir(old_wd) - shutil.rmtree(tmpdir) - # returning the result - log.warn(egg) - if not os.path.exists(egg): - raise IOError('Could not build the egg.') - - -def _do_download(version, download_base, to_dir, download_delay): - egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg' - % (version, sys.version_info[0], sys.version_info[1])) - if not os.path.exists(egg): - tarball = download_setuptools(version, download_base, - to_dir, download_delay) - _build_egg(egg, tarball, to_dir) - sys.path.insert(0, egg) - import setuptools - setuptools.bootstrap_install_from = egg - - -def use_setuptools(version=MINIMUM_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, download_delay=15, no_fake=True): - # making sure we use the absolute path - to_dir = os.path.abspath(to_dir) - was_imported = 'pkg_resources' in sys.modules or \ - 'setuptools' in sys.modules - try: - try: - import pkg_resources - - # Setuptools 0.7b and later is a suitable (and preferable) - # substitute for any Distribute version. - try: - pkg_resources.require("setuptools>=0.7b") - return - except (pkg_resources.DistributionNotFound, - pkg_resources.VersionConflict): - pass - - if not hasattr(pkg_resources, '_distribute'): - if not no_fake: - _fake_setuptools() - raise ImportError - except ImportError: - return _do_download(version, download_base, to_dir, download_delay) - try: - pkg_resources.require("distribute>=" + version) - return - except pkg_resources.VersionConflict: - e = sys.exc_info()[1] - if was_imported: - sys.stderr.write( - "The required version of distribute (>=%s) is not available,\n" - "and can't be installed while this script is running. Please\n" - "install a more recent version first, using\n" - "'easy_install -U distribute'." - "\n\n(Currently using %r)\n" % (version, e.args[0])) - sys.exit(2) - else: - del pkg_resources, sys.modules['pkg_resources'] # reload ok - return _do_download(version, download_base, to_dir, - download_delay) - except pkg_resources.DistributionNotFound: - return _do_download(version, download_base, to_dir, - download_delay) - finally: - if not no_fake: - _create_fake_setuptools_pkg_info(to_dir) - - -def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, - to_dir=os.curdir, delay=15): - """Download distribute from a specified location and return its filename - - `version` should be a valid distribute version number that is available - as an egg for download under the `download_base` URL (which should end - with a '/'). `to_dir` is the directory where the egg will be downloaded. - `delay` is the number of seconds to pause before an actual download - attempt. - """ - # making sure we use the absolute path - to_dir = os.path.abspath(to_dir) - try: - from urllib.request import urlopen - except ImportError: - from urllib2 import urlopen - tgz_name = "distribute-%s.tar.gz" % version - url = download_base + tgz_name - saveto = os.path.join(to_dir, tgz_name) - src = dst = None - if not os.path.exists(saveto): # Avoid repeated downloads - try: - log.warn("Downloading %s", url) - src = urlopen(url) - # Read/write all in one block, so we don't create a corrupt file - # if the download is interrupted. - data = src.read() - dst = open(saveto, "wb") - dst.write(data) - finally: - if src: - src.close() - if dst: - dst.close() - return os.path.realpath(saveto) - - -def _no_sandbox(function): - def __no_sandbox(*args, **kw): - try: - from setuptools.sandbox import DirectorySandbox - if not hasattr(DirectorySandbox, '_old'): - def violation(*args): - pass - DirectorySandbox._old = DirectorySandbox._violation - DirectorySandbox._violation = violation - patched = True - else: - patched = False - except ImportError: - patched = False - - try: - return function(*args, **kw) - finally: - if patched: - DirectorySandbox._violation = DirectorySandbox._old - del DirectorySandbox._old - - return __no_sandbox - - -def _patch_file(path, content): - """Will backup the file then patch it""" - f = open(path) - existing_content = f.read() - f.close() - if existing_content == content: - # already patched - log.warn('Already patched.') - return False - log.warn('Patching...') - _rename_path(path) - f = open(path, 'w') - try: - f.write(content) - finally: - f.close() - return True - -_patch_file = _no_sandbox(_patch_file) - - -def _same_content(path, content): - f = open(path) - existing_content = f.read() - f.close() - return existing_content == content - - -def _rename_path(path): - new_name = path + '.OLD.%s' % time.time() - log.warn('Renaming %s to %s', path, new_name) - os.rename(path, new_name) - return new_name - - -def _remove_flat_installation(placeholder): - if not os.path.isdir(placeholder): - log.warn('Unkown installation at %s', placeholder) - return False - found = False - for file in os.listdir(placeholder): - if fnmatch.fnmatch(file, 'setuptools*.egg-info'): - found = True - break - if not found: - log.warn('Could not locate setuptools*.egg-info') - return - - log.warn('Moving elements out of the way...') - pkg_info = os.path.join(placeholder, file) - if os.path.isdir(pkg_info): - patched = _patch_egg_dir(pkg_info) - else: - patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) - - if not patched: - log.warn('%s already patched.', pkg_info) - return False - # now let's move the files out of the way - for element in ('setuptools', 'pkg_resources.py', 'site.py'): - element = os.path.join(placeholder, element) - if os.path.exists(element): - _rename_path(element) - else: - log.warn('Could not find the %s element of the ' - 'Setuptools distribution', element) - return True - -_remove_flat_installation = _no_sandbox(_remove_flat_installation) - - -def _after_install(dist): - log.warn('After install bootstrap.') - placeholder = dist.get_command_obj('install').install_purelib - _create_fake_setuptools_pkg_info(placeholder) - - -def _create_fake_setuptools_pkg_info(placeholder): - if not placeholder or not os.path.exists(placeholder): - log.warn('Could not find the install location') - return - pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1]) - setuptools_file = 'setuptools-%s-py%s.egg-info' % \ - (SETUPTOOLS_FAKED_VERSION, pyver) - pkg_info = os.path.join(placeholder, setuptools_file) - if os.path.exists(pkg_info): - log.warn('%s already exists', pkg_info) - return - - log.warn('Creating %s', pkg_info) - try: - f = open(pkg_info, 'w') - except EnvironmentError: - log.warn("Don't have permissions to write %s, skipping", pkg_info) - return - try: - f.write(SETUPTOOLS_PKG_INFO) - finally: - f.close() - - pth_file = os.path.join(placeholder, 'setuptools.pth') - log.warn('Creating %s', pth_file) - f = open(pth_file, 'w') - try: - f.write(os.path.join(os.curdir, setuptools_file)) - finally: - f.close() - -_create_fake_setuptools_pkg_info = _no_sandbox( - _create_fake_setuptools_pkg_info -) - - -def _patch_egg_dir(path): - # let's check if it's already patched - pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') - if os.path.exists(pkg_info): - if _same_content(pkg_info, SETUPTOOLS_PKG_INFO): - log.warn('%s already patched.', pkg_info) - return False - _rename_path(path) - os.mkdir(path) - os.mkdir(os.path.join(path, 'EGG-INFO')) - pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO') - f = open(pkg_info, 'w') - try: - f.write(SETUPTOOLS_PKG_INFO) - finally: - f.close() - return True - -_patch_egg_dir = _no_sandbox(_patch_egg_dir) - - -def _before_install(): - log.warn('Before install bootstrap.') - _fake_setuptools() - - -def _under_prefix(location): - if 'install' not in sys.argv: - return True - args = sys.argv[sys.argv.index('install') + 1:] - for index, arg in enumerate(args): - for option in ('--root', '--prefix'): - if arg.startswith('%s=' % option): - top_dir = arg.split('root=')[-1] - return location.startswith(top_dir) - elif arg == option: - if len(args) > index: - top_dir = args[index + 1] - return location.startswith(top_dir) - if arg == '--user' and USER_SITE is not None: - return location.startswith(USER_SITE) - return True - - -def _fake_setuptools(): - log.warn('Scanning installed packages') - try: - import pkg_resources - except ImportError: - # we're cool - log.warn('Setuptools or Distribute does not seem to be installed.') - return - ws = pkg_resources.working_set - try: - setuptools_dist = ws.find( - pkg_resources.Requirement.parse('setuptools', replacement=False) - ) - except TypeError: - # old distribute API - setuptools_dist = ws.find( - pkg_resources.Requirement.parse('setuptools') - ) - - if setuptools_dist is None: - log.warn('No setuptools distribution found') - return - # detecting if it was already faked - setuptools_location = setuptools_dist.location - log.warn('Setuptools installation detected at %s', setuptools_location) - - # if --root or --preix was provided, and if - # setuptools is not located in them, we don't patch it - if not _under_prefix(setuptools_location): - log.warn('Not patching, --root or --prefix is installing Distribute' - ' in another location') - return - - # let's see if its an egg - if not setuptools_location.endswith('.egg'): - log.warn('Non-egg installation') - res = _remove_flat_installation(setuptools_location) - if not res: - return - else: - log.warn('Egg installation') - pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO') - if (os.path.exists(pkg_info) and - _same_content(pkg_info, SETUPTOOLS_PKG_INFO)): - log.warn('Already patched.') - return - log.warn('Patching...') - # let's create a fake egg replacing setuptools one - res = _patch_egg_dir(setuptools_location) - if not res: - return - log.warn('Patching complete.') - _relaunch() - - -def _relaunch(): - log.warn('Relaunching...') - # we have to relaunch the process - # pip marker to avoid a relaunch bug - _cmd1 = ['-c', 'install', '--single-version-externally-managed'] - _cmd2 = ['-c', 'install', '--record'] - if sys.argv[:3] == _cmd1 or sys.argv[:3] == _cmd2: - sys.argv[0] = 'setup.py' - args = [sys.executable] + sys.argv - sys.exit(subprocess.call(args)) - - -def _extractall(self, path=".", members=None): - """Extract all members from the archive to the current working - directory and set owner, modification time and permissions on - directories afterwards. `path' specifies a different directory - to extract to. `members' is optional and must be a subset of the - list returned by getmembers(). - """ - import copy - import operator - from tarfile import ExtractError - directories = [] - - if members is None: - members = self - - for tarinfo in members: - if tarinfo.isdir(): - # Extract directories with a safe mode. - directories.append(tarinfo) - tarinfo = copy.copy(tarinfo) - tarinfo.mode = 448 # decimal for oct 0700 - self.extract(tarinfo, path) - - # Reverse sort directories. - if sys.version_info < (2, 4): - def sorter(dir1, dir2): - return cmp(dir1.name, dir2.name) - directories.sort(sorter) - directories.reverse() - else: - directories.sort(key=operator.attrgetter('name'), reverse=True) - - # Set correct owner, mtime and filemode on directories. - for tarinfo in directories: - dirpath = os.path.join(path, tarinfo.name) - try: - self.chown(tarinfo, dirpath) - self.utime(tarinfo, dirpath) - self.chmod(tarinfo, dirpath) - except ExtractError: - e = sys.exc_info()[1] - if self.errorlevel > 1: - raise - else: - self._dbg(1, "tarfile: %s" % e) - - -def _build_install_args(options): - """ - Build the arguments to 'python setup.py install' on the distribute package - """ - install_args = [] - if options.user_install: - if sys.version_info < (2, 6): - log.warn("--user requires Python 2.6 or later") - raise SystemExit(1) - install_args.append('--user') - return install_args - -def _parse_args(): - """ - Parse the command line for options - """ - parser = optparse.OptionParser() - parser.add_option( - '--user', dest='user_install', action='store_true', default=False, - help='install in user site package (requires Python 2.6 or later)') - parser.add_option( - '--download-base', dest='download_base', metavar="URL", - default=DEFAULT_URL, - help='alternative URL from where to download the distribute package') - options, args = parser.parse_args() - # positional arguments are ignored - return options - -def main(version=DEFAULT_VERSION): - """Install or upgrade setuptools and EasyInstall""" - options = _parse_args() - tarball = download_setuptools(download_base=options.download_base) - return _install(tarball, _build_install_args(options)) - -if __name__ == '__main__': - sys.exit(main()) diff --git a/doc-requirements.txt b/doc-requirements.txt new file mode 100644 index 000000000000..3bb8f19e183d --- /dev/null +++ b/doc-requirements.txt @@ -0,0 +1,16 @@ +# Requirements for building docs +# You will first need a matching matplotlib installed +# e.g (from the matplotlib root directory) +# pip install -e . +# +# Install the documentation requirements with: +# pip install -r doc-requirements.txt +# +sphinx>=1.3,!=1.5.0 +colorspacious +ipython +mock +numpydoc +pillow +scipy +sphinx-gallery>=0.1.12 diff --git a/doc/README.txt b/doc/README.txt index 9ae05cb477bc..3ac8e84205df 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -1,26 +1,65 @@ -maptlotlib documentation +Matplotlib documentation ======================== -This is the top level build directory for the matplotlib + +Building the documentation +-------------------------- + +To build the documentation, you will need additional dependencies: + +* Sphinx-1.3 or later (version 1.5.0 is not supported) +* numpydoc 0.4 or later +* IPython +* mock +* colorspacious +* pillow +* graphviz + +All of these dependencies *except graphviz* can be installed through pip:: + + pip install -r ../doc-requirements.txt + +or all of them via conda and pip:: + + conda install sphinx numpydoc ipython mock graphviz pillow \ + sphinx-gallery + pip install colorspacious + +To build the HTML documentation, type ``python make.py html`` in this +directory. 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**: Matplotlib must be installed *before* the docs can be +generated. + +You can build the documentation with several options: + +* `--small` saves figures in low resolution. +* `--allowsphinxwarnings`: Don't turn Sphinx warnings into errors. +* `-n N` enables parallel build of the documentation using N process. + +Organization +------------- + +This is the top level build directory for the Matplotlib documentation. All of the documentation is written using sphinx, a python documentation system built on top of ReST. This directory contains - -* users - the user documentation, eg plotting tutorials, configuration +* users - the user documentation, e.g., plotting tutorials, configuration tips, etc. -* devel - documentation for matplotlib developers +* devel - documentation for Matplotlib developers * faq - frequently asked questions * api - placeholders to automatically generate the api documentation * mpl_toolkits - documentation of individual toolkits that ship with - matplotlib + Matplotlib * make.py - the build script to build the html or PDF docs -* index.rst - the top level include document for matplotlib docs +* index.rst - the top level include document for Matplotlib docs * conf.py - the sphinx configuration @@ -30,24 +69,5 @@ python documentation system built on top of ReST. This directory contains * sphinxext - Sphinx extensions for the mpl docs -* mpl_examples - a link to the matplotlib examples in case any +* mpl_examples - a link to the Matplotlib examples in case any documentation wants to literal include them - -To build the HTML documentation, install sphinx (1.0 or greater -required), then type "python make.py html" in this directory. Wait -for the initial run (which builds the example gallery) to be done, -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 --git a/doc/_static/.gitignore b/doc/_static/.gitignore new file mode 100644 index 000000000000..bbdc34458abc --- /dev/null +++ b/doc/_static/.gitignore @@ -0,0 +1,5 @@ +contour_frontpage.png +histogram_frontpage.png +membrane_frontpage.png +surface3d_frontpage.png + diff --git a/doc/_static/adjustText.png b/doc/_static/adjustText.png new file mode 100644 index 000000000000..417aebd730ba Binary files /dev/null and b/doc/_static/adjustText.png differ diff --git a/doc/_static/anatomy.png b/doc/_static/anatomy.png new file mode 100644 index 000000000000..d3054395b06e Binary files /dev/null and b/doc/_static/anatomy.png differ diff --git a/doc/_static/basemap_contour1.png b/doc/_static/basemap_contour1.png new file mode 100644 index 000000000000..28198ab6d19f Binary files /dev/null and b/doc/_static/basemap_contour1.png differ diff --git a/doc/_static/boxplot_explanation.png b/doc/_static/boxplot_explanation.png new file mode 100644 index 000000000000..d057496e4e44 Binary files /dev/null and b/doc/_static/boxplot_explanation.png differ diff --git a/doc/_static/cartopy_hurricane_katrina_01_00.png b/doc/_static/cartopy_hurricane_katrina_01_00.png new file mode 100644 index 000000000000..b50ec001ec01 Binary files /dev/null and b/doc/_static/cartopy_hurricane_katrina_01_00.png differ diff --git a/doc/_static/depsy_badge_default.svg b/doc/_static/depsy_badge_default.svg new file mode 100644 index 000000000000..2fa22b8a14b3 --- /dev/null +++ b/doc/_static/depsy_badge_default.svg @@ -0,0 +1 @@ +DepsyDepsy100th percentile100th percentile \ No newline at end of file diff --git a/doc/_static/ggplot.png b/doc/_static/ggplot.png new file mode 100644 index 000000000000..f103f2541b75 Binary files /dev/null and b/doc/_static/ggplot.png differ diff --git a/doc/_static/holoviews.png b/doc/_static/holoviews.png new file mode 100644 index 000000000000..f495d0e25737 Binary files /dev/null and b/doc/_static/holoviews.png differ diff --git a/doc/_static/logo2.png b/doc/_static/logo2.png index dc2d80cefe31..72843ab1febb 100644 Binary files a/doc/_static/logo2.png and b/doc/_static/logo2.png differ diff --git a/doc/_static/logo2.svg b/doc/_static/logo2.svg new file mode 100644 index 000000000000..f2d289c72a07 --- /dev/null +++ b/doc/_static/logo2.svg @@ -0,0 +1,552 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/_static/matplotlib_iterm2_demo.png b/doc/_static/matplotlib_iterm2_demo.png new file mode 100644 index 000000000000..72e316e3f61d Binary files /dev/null and b/doc/_static/matplotlib_iterm2_demo.png differ diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 545997d29c82..5979826c330f 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -6,7 +6,6 @@ body { font-family: "Helvetica Neue", Helvetica, 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; font-size: 14px; - letter-spacing: -0.01em; line-height: 150%; text-align: center; background-color: #BFD1D4; @@ -14,8 +13,9 @@ body { padding: 0; border: 1px solid #aaa; color: #333; - margin: 0px 80px 0px 80px; + margin: auto; min-width: 740px; + max-width: 1200px; } a { @@ -23,6 +23,14 @@ a { text-decoration: none; } +div.highlight-python a { + color: #CA7900; +} + +div.highlight-python a:hover { + color: #2491CF; +} + strong { font-weight: strong; } @@ -43,6 +51,7 @@ pre { border: 1px solid #ccc; background-color: #f8f8f8; line-height: 140%; + overflow-x: auto; } td.linenos pre { @@ -223,6 +232,9 @@ div.sphinxsidebar { text-align: left; /* margin-left: -100%; */ } +div.sphinxsidebarwrapper { + padding-top: 28px +} div.sphinxsidebar h4, div.sphinxsidebar h3 { margin: 1em 0 0.5em 0; @@ -269,7 +281,7 @@ h2 { } h3 { - margin: 1em 0 -0.3em 0; + margin: 0.2em 0 0.1em 0; font-size: 1.2em; } @@ -355,6 +367,19 @@ div.admonition, div.warning { font-size: 0.9em; } +div.warning { + color: #b94a48; + background-color: #F3E5E5; + border: 1px solid #eed3d7; +} + +div.green { + color: #468847; + background-color: #dff0d8; + border: 1px solid #d6e9c6; +} + + div.admonition p, div.warning p { margin: 0.5em 1em 0.5em 1em; padding: 0; @@ -364,6 +389,11 @@ div.admonition pre, div.warning pre { margin: 0.4em 1em 0.4em 1em; } +div.admonition p.admonition-title + p { + display: inline; +} + + div.admonition p.admonition-title, div.warning p.admonition-title { margin: 0; @@ -371,12 +401,45 @@ div.warning p.admonition-title { font-size: 14px; } +div.admonition { + margin-bottom: 10px; + margin-top: 10px; + padding: 7px; + border-radius: 4px; + -moz-border-radius: 4px; + } + + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.topic { + background-color: #eee; + border: 1px solid #CCC; + margin: 10px 0px; + padding: 7px 7px 0px; + border-radius: 4px; + -moz-border-radius: 4px; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; +} + +div.seealso { + background-color: #FFFBE8; + border: 1px solid #fbeed5; + color: #AF8A4B; + } + div.warning { border: 1px solid #940000; } div.warning p.admonition-title { - background-color: #CF0000; border-bottom-color: #940000; } @@ -510,19 +573,13 @@ table.docutils { .longtable.docutils { font-size: 12px; margin-bottom: 30px; - background-color: #ccc; } .longtable.docutils, .longtable.docutils td { border-color: #ccc; } -/* module summary table */ -.longtable.docutils { - font-size: 12px; - margin-bottom: 30px; -} -.longtable.docutils, .longtable.docutils td { - border-color: #ccc; +.longtable.docutils tr.row-even{ + background-color: #eff3f4; } /* function and class description */ @@ -557,16 +614,20 @@ dl.class dd, dl.function dd { } /* function and class description */ -dl.class, dl.function, dl.method, dl.attribute { +dl.function, dl.method, dl.attribute { border-top: 1px solid #ccc; padding-top: 6px; } -dl.class, dl.function { +dl.function { border-top: 1px solid #888; - margin-top: 15px; + margin-top: 15px; } +dl.class { + padding-top: 6px; + margin-top: 15px; +} .descclassname { color: #aaa; @@ -649,4 +710,203 @@ figcaption { text-align: center; } +/* "Go to released version" message. */ +#unreleased-message { + background: #d62728; + box-sizing: border-box; + color: #fff; + font-weight: bold; + left: 0; + min-height: 3em; + padding: 0.5em; + position: fixed; + top: 0; + width: 100%; + z-index: 10000; +} + +#unreleased-message + div { + margin-top: 3em; +} + +#unreleased-message a { + color: #fff; + text-decoration:underline; +} + +/* Fork me on GitHub "button" */ +#forkongithub a{ + background:#FF7F0E; + color:#fff !important; + text-decoration:none; + text-align:center; + font-weight:bold; + padding:5px 40px; + line-height:1.5rem; + position:relative; + transition:background .25s ease; +} +#forkongithub a:hover{ + background:#CA7900; +} +#forkongithub a::before,#forkongithub a::after{ + content:""; + width:100%; + display:block; + position:absolute; + top:1px; + left:0; + height:1px; + background:#fff; +} +#forkongithub a::after{ + bottom:1px; + top:auto; +} +@media screen and (min-width:700px){ + #forkongithub{ + position:absolute; + top:0; + right:0; + width:150px; + overflow:hidden; + height:150px; + z-index:9999; + } + #forkongithub a{ + width:150px; + position:absolute; + top:40px; + right:-60px; + transform:rotate(45deg); + -webkit-transform:rotate(45deg); + -ms-transform:rotate(45deg); + -moz-transform:rotate(45deg); + -o-transform:rotate(45deg); + box-shadow:4px 4px 10px rgba(0,0,0,0.8); + } +} + +.donate_button { + background:#11557C; + font-weight:normal; + border:solid 1px #fff; + outline: solid 1px #11557C; + clear: both; + display: block; + width:200px; + line-height:2.8; + font-size: 16px; + text-align: center; + cursor:pointer; + color:#fff; + text-decoration: none; + margin: 30px auto 0; + z-index:1; + transition: background .25s ease; +} + +.donate_button:last-of-type { + margin: 15px auto 30px; + + +} + +.donate_button:hover, .donate_button:active, .donate_button:focus { + background: #003c63; + outline-color: #003c63; +} + + +div.responsive_screenshots { + /* Horizontally centered */ + display: block; + margin: auto; + + /* Do not go beyond 1:1 scale (and ensure a 1x4 tight layout) */ + max-width: 640px; /* at most 4 x 1:1 subfig width */ + max-height: 120px; /* at most 1 x 1:1 subfig height */ +} + +/* To avoid subfigure parts outside of the responsive_screenshots */ +/* element (see: https://stackoverflow.com/questions/2062258/ */ +/* floating-stuff-within-a-div-floats-outside-of-div-why) */ +span.clear_screenshots { clear: left; display: block; } + +div.responsive_subfig{ + float: left; + width: 25%; /* we want 4 subfigs in a row */ + + /* Include content, padding and border in width. This should */ + /* avoid having to use tricks like "width: 24.9999%" */ + box-sizing: border-box; +} + +div.responsive_subfig img { + /* Horizontally centered */ + display: block; + margin: auto; + + /* Possible downscaling */ + max-width: 162px; /* at most 1 x 1:1 subfig width */ + max-height: 139px; /* at most 1 x 1:1 subfig height */ + + width: 100%; +} + +@media only screen and (max-width: 1000px){ + /* The value of 1000px was handcrafted to provide a more or less */ + /* smooth transition between the 1x4 and the 2x2 layouts. It is */ + /* NB: it is slightly below 1024px: so one should still have a */ + /* row in a 1024x768 window */ + + div.responsive_screenshots { + /* Do not go beyond 1:1 scale (and ensure a 2x2 tight layout) */ + max-width: 324px; /* at most 2 x 1:1 subfig width */ + max-height: 278px; /* at most 2 x 1:1 subfig height */ + } + + div.responsive_subfig { + width: 50%; /* we want 2 subfigs in a row */ + } +} + +/* Sphinx gallery display */ + +div.align-center { + margin: auto; + text-align: center; +} + +p.caption { + font-weight: bold; +} + +div#gallery.section, div#tutorials.section { + overflow: hidden; +} + +.sphx-glr-thumbcontainer { + border: solid #d6d6d6 1px !important; + text-align: center !important; + font-size: 1.2em !important; +} + +div.sphx-glr-download { + width: auto !important; +} + +div.sphx-glr-download a { + background-color: #d9edf7 !important; + border: 1px solid #bce8f1 !important; + background-image: none !important; +} + +p.sphx-glr-signature a.reference.external { + display: none !important; +} + +.sphx-glr-thumbcontainer a.internal { + font-weight: 400; +} diff --git a/doc/_static/numfocus_badge.png b/doc/_static/numfocus_badge.png new file mode 100644 index 000000000000..b8d8e6ca838f Binary files /dev/null and b/doc/_static/numfocus_badge.png differ diff --git a/doc/_static/probscale_demo.png b/doc/_static/probscale_demo.png new file mode 100644 index 000000000000..55d8df2d08bf Binary files /dev/null and b/doc/_static/probscale_demo.png differ diff --git a/doc/_static/seaborn.png b/doc/_static/seaborn.png new file mode 100644 index 000000000000..d1e815ef89b6 Binary files /dev/null and b/doc/_static/seaborn.png differ diff --git a/doc/_static/toolbar.png b/doc/_static/toolbar.png index b63976bb3b2d..024ed625d2ca 100644 Binary files a/doc/_static/toolbar.png and b/doc/_static/toolbar.png differ diff --git a/doc/_templates/autofunctions.rst b/doc/_templates/autofunctions.rst new file mode 100644 index 000000000000..2f687e253e55 --- /dev/null +++ b/doc/_templates/autofunctions.rst @@ -0,0 +1,19 @@ + +{{ fullname | escape | underline }} + + +.. currentmodule:: {{ fullname }} + +{% block functions %} +{% if functions %} + +Functions +--------- + +.. autosummary:: + :template: autosummary.rst + :toctree: +{% for item in functions %}{% if item not in ['plotting', 'colormaps'] %} + {{ item }}{% endif %}{% endfor %} +{% endif %} +{% endblock %} diff --git a/doc/_templates/automodule.rst b/doc/_templates/automodule.rst new file mode 100644 index 000000000000..7fa0780eb266 --- /dev/null +++ b/doc/_templates/automodule.rst @@ -0,0 +1,35 @@ +{{ fullname | escape | underline}} + + +.. automodule:: {{ fullname }} + :no-members: + :no-inherited-members: + +{% block classes %} +{% if classes %} + +Classes +------- + +.. autosummary:: + :template: autosummary.rst + :toctree: +{% for item in classes %}{% if item not in ['zip', 'map', 'reduce'] %} + {{ item }}{% endif %}{% endfor %} +{% endif %} +{% endblock %} + +{% block functions %} +{% if functions %} + +Functions +--------- + +.. autosummary:: + :template: autosummary.rst + :toctree: + +{% for item in functions %}{% if item not in ['zip', 'map', 'reduce'] %} + {{ item }}{% endif %}{% endfor %} +{% endif %} +{% endblock %} diff --git a/doc/_templates/autosummary.rst b/doc/_templates/autosummary.rst new file mode 100644 index 000000000000..cf000cc16de0 --- /dev/null +++ b/doc/_templates/autosummary.rst @@ -0,0 +1,16 @@ +{{ fullname | escape | underline}} + + +.. currentmodule:: {{ module }} + +.. auto{{ objtype }}:: {{ objname }} + +{% if objtype in ['class', 'method', 'function'] %} + +.. include:: {{module}}.{{objname}}.examples + +.. raw:: html + +
+ +{% endif %} \ No newline at end of file diff --git a/doc/_templates/badgesidebar.html b/doc/_templates/badgesidebar.html new file mode 100644 index 000000000000..1067b5cb9ad7 --- /dev/null +++ b/doc/_templates/badgesidebar.html @@ -0,0 +1,16 @@ + + + + +
+ + + + + +
+ +Travis-CI: + + +
diff --git a/doc/_templates/citing.html b/doc/_templates/citing.html index ad5620256882..1c3005fe169b 100644 --- a/doc/_templates/citing.html +++ b/doc/_templates/citing.html @@ -1,10 +1,10 @@ {% extends "layout.html" %} -{% set title = "Citing matplotlib" %} +{% set title = "Citing Matplotlib" %} {% block body %} -

Citing matplotlib

+

Citing Matplotlib

-If matplotlib contributes to a project that leads to a scientific publication, +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:

@@ -21,7 +21,25 @@

Citing matplotlib

publication-quality image generation across user interfaces and operating systems.}, publisher = {IEEE COMPUTER SOC}, + doi = {10.1109/MCSE.2007.55}, year = 2007 } + + +

DOIs

+
+
v2.0.2
10.5281/zenodo.573577.svg
+
v2.0.1
10.5281/zenodo.570311.svg
+
v2.0.0
10.5281/zenodo.248351.svg
+
v1.5.3
10.5281/zenodo.61948
+
v1.5.2
10.5281/zenodo.56926
+
v1.5.1
10.5281/zenodo.44579
+
v1.5.0
10.5281/zenodo.32914
+
v1.4.3
10.5281/zenodo.15423
+
v1.4.2
10.5281/zenodo.12400
+
v1.4.1
10.5281/zenodo.12287
+
v1.4.0
10.5281/zenodo.11451
+
+ {% endblock %} diff --git a/doc/_templates/donate_sidebar.html b/doc/_templates/donate_sidebar.html new file mode 100644 index 000000000000..4cc2bf15a125 --- /dev/null +++ b/doc/_templates/donate_sidebar.html @@ -0,0 +1,5 @@ + +
+ + +
diff --git a/doc/_templates/function.rst b/doc/_templates/function.rst new file mode 100644 index 000000000000..4a7464080456 --- /dev/null +++ b/doc/_templates/function.rst @@ -0,0 +1,12 @@ +:mod:`{{module}}`.{{objname}} +{{ underline }}==================== + +.. currentmodule:: {{ module }} + +.. autofunction:: {{ objname }} + +.. include:: {{module}}.{{objname}}.examples + +.. raw:: html + +
\ No newline at end of file diff --git a/doc/_templates/index.html b/doc/_templates/index.html index 664e92fcf14e..5701548a048d 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -1,5 +1,5 @@ {% extends "layout.html" %} -{% set title = 'matplotlib: python plotting' %} +{% set title = 'Matplotlib: Python plotting' %} {% block extrahead %} @@ -41,70 +45,56 @@

Introduction

-

matplotlib is a python 2D plotting library which produces +

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 six graphical user + interactive environments across platforms. Matplotlib can be used + in Python scripts, the Python and IPython shell, + the jupyter notebook, + web application servers, and four graphical user interface toolkits.

-

screenshots

- -

matplotlib tries to make easy things easy and hard things possible. +

+ + +

Matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, - errorcharts, scatterplots, etc, with just a few lines of code. - For a sampling, see the screenshots, thumbnail gallery, and - examples directory

+ errorcharts, scatterplots, etc., with just a few lines of code. + For examples, see the sample plots and thumbnail gallery.

-

For simple plotting the

pyplot
interface provides a +

For simple plotting the pyplot module provides a MATLAB-like interface, particularly when combined - with

IPython
. For the power user, you have full control + with IPython. For the power user, you have full control of line styles, font properties, axes properties, etc, via an object oriented interface or via a set of functions familiar to MATLAB users.

-
-

John Hunter (1968-2012)

- - - - - -
- - -

- On August 28 2012, John D. Hunter, the creator of matplotlib, died - from complications arising from cancer treatment, after a brief but - intense battle with this terrible illness. John is survived by his - wife Miriam, his three daughters Rahel, Ava and Clara, his sisters - Layne and Mary, and his mother Sarah.

- -

- If you have benefited from John's many contributions, please say - thanks in the way that would matter most to him. Please consider - making a donation to - the John Hunter Memorial - Fund.

-
-
- -

Download

- - Visit the - matplotlib downloads - page. +

Installation

+ + Visit the Matplotlib installation instructions.

Documentation

- This is the documentation for matplotlib version {{ version }}. +

This is the documentation for Matplotlib version {{ version }}.

+ +

To get started, read the + User's Guide.

Trying to learn how to do a particular kind of plot? Check out - the gallery, examples, - or the list of plotting + the examples gallery + or the list of plotting commands.

Other learning resources

@@ -123,65 +113,78 @@

Other learning resources

Need help?

-

matplotlib is a welcoming, inclusive project, and we try to follow +

Matplotlib is a welcoming, inclusive project, and we try to follow the Python Software Foundation Code of Conduct in everything we do.

Check the faq, -the api docs, -mailing -list archives, and join the matplotlib -mailing lists. -Check out the matplotlib questions +the api docs and +mailing list archives for resources. +Join the gitter and the mailing lists: Users, +Announce and +Devel. +Check out the Matplotlib questions on stackoverflow. The search tool searches all of the documentation, including full text search of over 350 complete -examples which exercise almost every corner of matplotlib.

+examples which exercise almost every corner of Matplotlib.

You can file bugs, patches and feature requests on the github tracker, but it is a good idea to ping us on the mailing list too.

-

To keep up to date with what's going on in matplotlib, see +

To keep up to date with what's going on in Matplotlib, see the what's new -page, the more detailed changelog or browse -the source +page or browse the source code. Anything that could require changes to your existing code is logged in the api changes file.

Toolkits

-

There are several matplotlib add-on toolkits, -including a choice of two projection and mapping toolkits basemap and -cartopy, -3d plotting with mplot3d, -axes and axis helpers in axes_grid and more. +

Matplotlib ships with several add-on toolkits, + Including 3d plotting with mplot3d, + axes helpers in axes_grid1 and + axis helpers in axisartist.

-

Citing matplotlib

+

Third party packages

+ +

A large number of third party packages + extend and build on Matplotlib functionality, including several higher-level plotting interfaces + seaborn, + holoviews, + ggplot, and + two projection and mapping toolkits + basemap and + cartopy. +

+ +

Citing Matplotlib

- matplotlib is the brainchild of John Hunter (1968-2012), who, along with its many + Matplotlib is the brainchild of John Hunter (1968-2012), who, along with its many contributors, have put an immeasurable amount of time and 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, + If Matplotlib contributes to a project that leads to a scientific publication, please acknowledge this work by citing the project. You can use this ready-made citation entry.

Open source

- + A Fiscally Sponsored Project of NUMFocus

-Please consider donating -to support matplotlib development or to the John Hunter Memorial Fund. +Please +consider donating +to the Matplotlib project through the Numfocus organization or to +the John Hunter Technology Fellowship.

-The matplotlib license is based on the Python Software Foundation +The Matplotlib license is based on the Python Software Foundation (PSF) license.

@@ -190,14 +193,17 @@

Open source

who have made significant contributions.

+

+Matplotlib is hosted on Github. +Issues and +Pull requests +are tracked at Github too. +

+

* MATLAB is a registered trademark of The MathWorks, Inc.

-

- -Mathematica is a registered trademark of Wolfram Research, Inc. -

{% endblock %} diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 3ff290b420ae..093dd8cb104e 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -38,8 +38,8 @@

{{ _('Navigation') }}

{%- endfor %}
  • home
  • -
  • examples
  • -
  • gallery
  • +
  • examples
  • +
  • tutorials
  • pyplot
  • docs »
  • @@ -69,23 +69,6 @@

    {{ _('Navigation') }}

    {%- for sidebartemplate in sidebars %} {%- include sidebartemplate %} {%- endfor %} - {%- else %} - {#- old style sidebars: using blocks -- should be deprecated #} - {%- block sidebartoc %} - {%- include "localtoc.html" %} - {%- endblock %} - {%- block sidebarrel %} - {%- include "relations.html" %} - {%- endblock %} - {%- block sidebarsourcelink %} - {%- include "sourcelink.html" %} - {%- endblock %} - {%- if customsidebar %} - {%- include customsidebar %} - {%- endif %} - {%- block sidebarsearch %} - {%- include "searchbox.html" %} - {%- endblock %} {%- endif %}
    @@ -99,7 +82,8 @@

    {{ _('Navigation') }}

    VERSION: '{{ release|e }}', COLLAPSE_INDEX: false, FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}', - HAS_SOURCE: {{ has_source|lower }} + HAS_SOURCE: {{ has_source|lower }}, + SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}' }; {%- for scriptfile in script_files %} @@ -170,7 +154,7 @@

    {{ _('Navigation') }}

    {%- endif %} {%- endblock %} {%- block extrahead %} {% endblock %} - + @@ -178,36 +162,23 @@

    {{ _('Navigation') }}

    {% block relbar1 %} - - - - - +{%- if '+' in release %} +
    + You are reading documentation for the unreleased version of Matplotlib. + + Try searching for the released version of this page instead? + +
    +{%- endif %} +
    +{%- if builder in ('htmlhelp', 'devhelp', 'latex') %} +matplotlib +{%- else %} +matplotlib +{%- endif %} - - - - - - {% endblock %} @@ -224,7 +195,6 @@

    {{ _('Navigation') }}

    {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} {%- block sidebar2 %}{{ sidebar() }}{% endblock %} -
    {%- block document %}
    @@ -264,7 +234,166 @@

    {{ _('Navigation') }}

    href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}.{% endtrans %} {%- endif %}
    -{%- endblock %} + {%- endblock %} + + +
    + + + + + + +
    +
    +
    +
    +
    +
    + + +
    diff --git a/doc/api/animation_api.rst b/doc/api/animation_api.rst index d43dc351abae..689fb497ee42 100644 --- a/doc/api/animation_api.rst +++ b/doc/api/animation_api.rst @@ -1,12 +1,318 @@ -********* -animation -********* +====================== + ``animation`` module +====================== +.. automodule:: matplotlib.animation + :no-members: + :no-undoc-members: -:mod:`matplotlib.animation` -=========================== +.. contents:: Table of Contents + :depth: 1 + :local: + :backlinks: entry -.. automodule:: matplotlib.animation - :members: - :undoc-members: - :show-inheritance: + +Animation +========= + +The easiest way to make a live animation in matplotlib is to use one of the +`Animation` classes. + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + FuncAnimation + ArtistAnimation + +In both cases it is critical to keep a reference to the instance +object. The animation is advanced by a timer (typically from the host +GUI framework) which the `Animation` object holds the only reference +to. If you do not hold a reference to the `Animation` object, it (and +hence the timers), will be garbage collected which will stop the +animation. + +To save an animation to disk use `Animation.save` or `Animation.to_html5_video` + +See :ref:`ani_writer_classes` below for details about what movie formats are +supported. + + +``FuncAnimation`` +----------------- + +The inner workings of `FuncAnimation` is more-or-less:: + + for d in frames: + artists = func(d, *fargs) + fig.canvas.draw_idle() + fig.canvas.start_event_loop(interval) + + +with details to handle 'blitting' (to dramatically improve the live +performance), to be non-blocking, not repeatedly start/stop the GUI +event loop, handle repeats, multiple animated axes, and easily save +the animation to a movie file. + +'Blitting' is a `old technique +`__ in computer graphics. The +general gist is to take an existing bit map (in our case a mostly +rasterized figure) and then 'blit' one more artist on top. Thus, by +managing a saved 'clean' bitmap, we can only re-draw the few artists +that are changing at each frame and possibly save significant amounts of +time. When using blitting (by passing ``blit=True``) the core loop of +`FuncAnimation` gets a bit more complicated :: + + ax = fig.gca() + + def update_blit(artists): + fig.canvas.restore_region(bg_cache) + for a in artists: + a.axes.draw_artist(a) + + ax.figure.canvas.blit(ax.bbox) + + artists = init_func() + + for a in artists: + a.set_animated(True) + + fig.canvas.draw() + bg_cache = fig.canvas.copy_from_bbox(ax.bbox) + + for f in frames: + artists = func(f, *fargs) + update_blit(artists) + fig.canvas.start_event_loop(interval) + +This is of course leaving out many details (such as updating the +background when the figure is resized or fully re-drawn). However, +this hopefully minimalist example gives a sense of how ``init_func`` +and ``func`` are used inside of `FuncAnimation` and the theory of how +'blitting' works. + +The expected signature on ``func`` and ``init_func`` is very simple to +keep `FuncAnimation` out of your book keeping and plotting logic, but +this means that the callable objects you pass in must know what +artists they should be working on. There are several approaches to +handling this, of varying complexity and encapsulation. The simplest +approach, which works quite well in the case of a script, is to define the +artist at a global scope and let Python sort things out. For example :: + + import numpy as np + import matplotlib.pyplot as plt + from matplotlib.animation import FuncAnimation + + fig, ax = plt.subplots() + xdata, ydata = [], [] + ln, = plt.plot([], [], 'ro', animated=True) + + def init(): + ax.set_xlim(0, 2*np.pi) + ax.set_ylim(-1, 1) + return ln, + + def update(frame): + xdata.append(frame) + ydata.append(np.sin(frame)) + ln.set_data(xdata, ydata) + return ln, + + ani = FuncAnimation(fig, update, frames=np.linspace(0, 2*np.pi, 128), + init_func=init, blit=True) + plt.show() + + +The second method is to us `functools.partial` to 'bind' artists to +function. A third method is to use closures to build up the required +artists and functions. A fourth method is to create a class. + + + + +Examples +~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + ../gallery/animation/animate_decay + ../gallery/animation/bayes_update_sgskip + ../gallery/animation/double_pendulum_animated_sgskip + ../gallery/animation/dynamic_image + ../gallery/animation/histogram + ../gallery/animation/rain + ../gallery/animation/random_data + ../gallery/animation/simple_3danim + ../gallery/animation/simple_anim + ../gallery/animation/strip_chart_demo + ../gallery/animation/unchained + +``ArtistAnimation`` +------------------- + + +Examples +~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + ../gallery/animation/basic_example + ../gallery/animation/basic_example_writer_sgskip + ../gallery/animation/dynamic_image2 + + + + +Writer Classes +============== + + + +The provided writers fall into two broad categories: pipe-based and +file-based. The pipe-based writers stream the captured frames over a +pipe to an external process. The pipe-based variants tend to be more +performant, but may not work on all systems. + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + + FFMpegWriter + ImageMagickFileWriter + AVConvWriter + +Alternatively the file-based writers save temporary files for each +frame which are stitched into a single file at the end. Although +slower, these writers can be easier to debug. + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + FFMpegFileWriter + ImageMagickWriter + AVConvFileWriter + + +Fundamentally, a `MovieWriter` provides a way to grab sequential frames +from the same underlying `~matplotlib.figure.Figure` object. The base +class `MovieWriter` implements 3 methods and a context manager. The +only difference between the pipe-based and file-based writers is in the +arguments to their respective ``setup`` methods. + +The ``setup()`` method is used to prepare the writer (possibly opening +a pipe), successive calls to ``grab_frame()`` capture a single frame +at a time and ``finish()`` finalizes the movie and writes the output +file to disk. For example :: + + moviewriter = MovieWriter(...) + moviewriter.setup(fig=fig, 'my_movie.ext', dpi=100) + for j in range(n): + update_figure(n) + moviewriter.grab_frame() + moviewriter.finish() + + +If using the writer classes directly (not through `Animation.save`), it is strongly encouraged +to use the `~MovieWriter.saving` context manager :: + + with moviewriter.saving(fig, 'myfile.mp4', dpi=100): + for j in range(n): + update_figure(n) + moviewriter.grab_frame() + + +to ensures that setup and cleanup are performed as necessary. + + +:ref:`sphx_glr_gallery_animation_moviewriter_sgskip.py` + + +.. _ani_writer_classes: + +Helper Classes +============== + + +Animation Base Classes +---------------------- + + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Animation + TimedAnimation + + +Custom Animation classes +------------------------ + +:ref:`sphx_glr_gallery_animation_subplots.py` + +Writer Registry +--------------- + +A module-level registry is provided to map between the name of the +writer and the class to allow a string to be passed to +`Animation.save` instead of a writer instance. + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + MovieWriterRegistry + +Writer Base Classes +------------------- + +To reduce code duplication base classes + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + AbstractMovieWriter + MovieWriter + FileMovieWriter + +and mixins are provided + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + AVConvBase + FFMpegBase + ImageMagickBase + +See the source code for how to easily implement new `MovieWriter` +classes. + + +Inheritance Diagrams +==================== + +.. inheritance-diagram:: matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation + :private-bases: + +.. inheritance-diagram:: matplotlib.animation.AVConvFileWriter matplotlib.animation.AVConvWriter matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter + :private-bases: + + + +Deprecated +========== + + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + MencoderBase + MencoderFileWriter + MencoderWriter diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index a79b57124180..db4155131947 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -1,16 +1,1090 @@ -=========== -API Changes -=========== +============= + 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. +Log of changes to Matplotlib that affect the outward-facing API. If +updating Matplotlib breaks your scripts, this list may help you figure +out what caused the breakage and how to fix it by updating your code. -For new features that were added to matplotlib, please see +For new features that were added to Matplotlib, please see :ref:`whats-new`. +API Changes in 2.1.0 +==================== + +cbook deprecations +------------------ + +Many unused or near-unused cbook functions and classes have been deprecated: +``converter``, ``tostr``, ``todatetime``, ``todate``, ``tofloat``, ``toint``, +``unique``, ``is_string_like``, ``is_sequence_of_strings``, ``is_scalar``, +``Sorter``, ``Xlator``, ``soundex``, ``Null``, ``dict_delall``, ``RingBuffer``, +``get_split_ind``, ``wrap``, ``get_recursive_filelist``, ``pieces``, +``exception_to_str``, ``allequal``, ``alltrue``, ``onetrue``, ``allpairs``, +``finddir``, ``reverse_dict``, ``restrict_dict``, ``issubclass_safe``, +``recursive_remove``, ``unmasked_index_ranges``. + + +Improved Delaunay triangulations with large offsets +--------------------------------------------------- + +Delaunay triangulations now deal with large x,y offsets in a better +way. This can cause minor changes to any triangulations calculated +using Matplotlib, i.e. any use of `matplotlib.tri.Triangulation` that +requests that a Delaunay triangulation is calculated, which includes +`matplotlib.pyplot.tricontour`, `matplotlib.pyplot.tricontourf`, +`matplotlib.pyplot.tripcolor`, `matplotlib.pyplot.triplot`, +`mlab.griddata` and `mpl_toolkits.mplot3d.plot_trisurf`. + + +Deprecation in EngFormatter +--------------------------- + +Passing a string as *num* argument when calling an instance of +`matplotlib.ticker.EngFormatter` is deprecated and will be removed in 2.3. + + +:meth:`matpltolib.cbook.CallbackRegistry.process` suppresses exceptions by default +---------------------------------------------------------------------------------- + +Matplotlib uses instances of :obj:`~matplotlib.cbook.CallbackRegistry` +as a bridge between user input event from the GUI and user callbacks. +Previously, any exceptions raised in a user call back would bubble out +of of the ``process`` method, which is typically in the GUI event +loop. Most GUI frameworks simple print the traceback to the screen +and continue as there is not always a clear method of getting the +exception back to the user. However PyQt5 now exits the process when +it receives and un-handled python exception in the event loop. Thus, +:meth:`~matplotlib.cbook.CallbackRegistry.process` now suppresses and +prints tracebacks to stderr by default. + +What :meth:`~matplotlib.cbook.CallbackRegistry.process` does with exceptions +is now user configurable via the ``exception_handler`` attribute and kwarg. To +restore the previous behavior pass ``None`` :: + + cb = CallbackRegistry(exception_handler=None) + + +A function which take and ``Exception`` as its only argument may also be passed :: + + def maybe_reraise(exc): + if isinstance(exc, RuntimeError): + pass + else: + raise exc + + cb = CallbackRegistry(exception_handler=maybe_reraise) + + + + +`mpl_toolkits.axes_grid` has been deprecated +-------------------------------------------- + +All functionallity from `mpl_toolkits.axes_grid` can be found in either +`mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes from +`mpl_toolkits.axes_grid` based on `Axis` from `mpl_toolkits.axisartist` can be +found in `mpl_toolkits.axisartist` + + +Improved toggling of the axes grids +----------------------------------- + +The `g` key binding now switches the states of the `x` and `y` grids +independently (by cycling through all four on/off combinations). + +The new `G` key binding switches the states of the minor grids. + +Both bindings are disabled if only a subset of the grid lines (in either +direction) is visible, to avoid making irreversible changes to the figure. + + +Removal of warning on empty legends +----------------------------------- + +``plt.legend`` used to issue a warning when no labeled artist could be +found. This warning has been removed. + + +More accurate legend autopositioning +------------------------------------ + +Automatic positioning of legends now prefers using the area surrounded +by a `Line2D` rather than placing the legend over the line itself. + + +Cleanup of stock sample data +---------------------------- + +The sample data of stocks has been cleaned up to remove redundancies and +increase portability. The ``AAPL.dat.gz``, ``INTC.dat.gz`` and ``aapl.csv`` +files have been removed entirely and will also no longer be available from +`matplotlib.cbook.get_sample_data`. If a CSV file is required, we suggest using +the ``msft.csv`` that continues to be shipped in the sample data. If a NumPy +binary file is acceptable, we suggest using one of the following two new files. +The ``aapl.npy.gz`` and ``goog.npy`` files have been replaced by ``aapl.npz`` +and ``goog.npz``, wherein the first column's type has changed from +`datetime.date` to `np.datetime64` for better portability across Python +versions. Note that matplotlib does not fully support `np.datetime64` as yet. + + +Updated qhull to 2015.2 +----------------------- + +The version of qhull shipped with Matplotlib, which is used for +Delaunay triangulation, has been updated from version 2012.1 to +2015.2. + + +Use backports.functools_lru_cache instead of functools32 +-------------------------------------------------------- + +It's better maintained and more widely used (by pylint, jaraco, etc). + + +`cbook.is_numlike` only performs an instance check, `cbook.is_string_like` is deprecated +---------------------------------------------------------------------------------------- + +`cbook.is_numlike` now only checks that its argument is an instance of +``(numbers.Number, np.Number)``. In particular, this means that arrays are now +not num-like. + +`cbook.is_string_like` and `cbook.is_sequence_of_strings` have been +deprecated. Use ``isinstance(obj, six.string_types)`` and ``iterable(obj) and +all(isinstance(o, six.string_types) for o in obj)`` instead. + + +Elliptical arcs now drawn between correct angles +------------------------------------------------ + +The `matplotlib.patches.Arc` patch is now correctly drawn between the given +angles. + +Previously a circular arc was drawn and then stretched into an ellipse, +so the resulting arc did not lie between *theta1* and *theta2*. + + +Changes to PDF backend methods +------------------------------ + +The methods `embedTeXFont` and `tex_font_mapping` of +`matplotlib.backend_pdf.PdfFile` have been removed. +It is unlikely that external users would have called +these methods, which are related to the font system +internal to the PDF backend. + + +``-d$backend`` no longer sets the backend +----------------------------------------- + +It is no longer possible to set the backend by passing ``-d$backend`` at the command line. Use the ``MPLBACKEND`` environment variable instead. + + +Path.intersects_bbox always treats the bounding box as filled +------------------------------------------------------------- + +Previously, when ``Path.intersects_bbox`` was called with ``filled`` set to +``False``, it would treat both the path and the bounding box as unfilled. This +behavior was not well documented and it is usually not the desired behavior, +since bounding boxes are used to represent more complex shapes located inside +the bounding box. This behavior has now been changed: when ``filled`` is +``False``, the path will be treated as unfilled, but the bounding box is still +treated as filled. The old behavior was arguably an implementation bug. + +When ``Path.intersects_bbox`` is called with ``filled`` set to ``True`` +(the default value), there is no change in behavior. For those rare cases where +``Path.intersects_bbox`` was called with ``filled`` set to ``False`` and where +the old behavior is actually desired, the suggested workaround is to call +``Path.intersects_path`` with a rectangle as the path:: + + from matplotlib.path import Path + from matplotlib.transforms import Bbox, BboxTransformTo + rect = Path.unit_rectangle().transformed(BboxTransformTo(bbox)) + result = path.intersects_path(rect, filled=False) + + +Removed resolution kwarg from PolarAxes +--------------------------------------- + +The kwarg `resolution` of `matplotlib.projections.polar.PolarAxes` has been +removed. It has triggered a deprecation warning of being with no effect +beyond version `0.98.x`. + + +Deprecation of `GraphicsContextBase`\'s ``linestyle`` property. +--------------------------------------------------------------- + +The ``GraphicsContextBase.get_linestyle`` and +``GraphicsContextBase.set_linestyle`` methods, which effectively had no effect, +have been deprecated. + + +NavigationToolbar2.dynamic_update is deprecated +----------------------------------------------- + +Use `FigureCanvas.draw_idle` instead. + + +Unique identifier added to `RendererBase` classes +------------------------------------------------- + +Since ``id()`` is not guaranteed to be unique between objects that exist at +different times, a new private property ``_uid`` has been added to +`RendererBase` which is used along with the renderer's ``id()`` to cache +certain expensive operations. + +If a custom renderer does not subclass `RendererBase` or `MixedModeRenderer`, +it is not required to implement this ``_uid`` property, but this may produce +incorrect behavior when the renderers' ``id()`` clashes. + + +WX no longer calls generates ``IdleEvent`` events or calls ``idle_event`` +------------------------------------------------------------------------- + +Removed unused private method ``_onIdle`` from ``FigureCanvasWx``. + +The ``IdleEvent`` class and ``FigureCanvasBase.idle_event`` method +will be removed in 2.2 + + +Correct scaling of :func:`magnitude_spectrum()` +----------------------------------------------- + +The functions :func:`matplotlib.mlab.magnitude_spectrum()` and :func:`matplotlib.pyplot.magnitude_spectrum()` implicitly assumed the sum +of windowing function values to be one. In Matplotlib and Numpy the +standard windowing functions are scaled to have maximum value of one, +which usually results in a sum of the order of n/2 for a n-point +signal. Thus the amplitude scaling :func:`magnitude_spectrum()` was +off by that amount when using standard windowing functions (`Bug 8417 +`_ ). Now the +behavior is consistent with :func:`matplotlib.pyplot.psd()` and +:func:`scipy.signal.welch()`. The following example demonstrates the +new and old scaling:: + + import matplotlib.pyplot as plt + import numpy as np + + tau, n = 10, 1024 # 10 second signal with 1024 points + T = tau/n # sampling interval + t = np.arange(n)*T + + a = 4 # amplitude + x = a*np.sin(40*np.pi*t) # 20 Hz sine with amplitude a + + # New correct behavior: Amplitude at 20 Hz is a/2 + plt.magnitude_spectrum(x, Fs=1/T, sides='onesided', scale='linear') + + # Original behavior: Amplitude at 20 Hz is (a/2)*(n/2) for a Hanning window + w = np.hanning(n) # default window is a Hanning window + plt.magnitude_spectrum(x*np.sum(w), Fs=1/T, sides='onesided', scale='linear') + + + +Default behavior of log scales changed to mask <= 0 values +---------------------------------------------------------- + +Calling `matplotlib.axes.Axes.set_xscale` or `matplotlib.axes.Axes.set_yscale` +now uses 'mask' as the default method to handle invalid values (as opposed to +'clip'). This means that any values <= 0 on a log scale will not be shown. + +Previously they were clipped to a very small number and shown. + + +Code Removal +------------ + +matplotlib.delaunay +~~~~~~~~~~~~~~~~~~~ +Remove the delaunay triangulation code which is now handled by Qhull +via ``matplotlib.tri`` + + +qt4_compat.py +~~~~~~~~~~~~~ +Moved to ``qt_compat.py``. Renamed because it now handles Qt5 as well. + + +Deprecated methods +~~~~~~~~~~~~~~~~~~ + +The ``GraphicsContextBase.set_graylevel``, ``FigureCanvasBase.onHilite`` and +``mpl_toolkits.axes_grid1.mpl_axes.Axes.toggle_axisline`` methods have been +removed. + +The ``ArtistInspector.findobj`` method, which was never working due to the lack +of a ``get_children`` method, has been removed. + +The deprecated ``point_in_path``, ``get_path_extents``, +``point_in_path_collection``, ``path_intersects_path``, +``convert_path_to_polygons``, ``cleanup_path`` and ``clip_path_to_rect`` +functions in the ``matplotlib.path`` module have been removed. Their +functionality remains exposed as methods on the ``Path`` class. + + +`Axes.set_aspect("normal")` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Support for setting an ``Axes``' aspect to ``"normal"`` has been removed, in +favor of the synonym ``"auto"``. + + +``shading`` kwarg to ``pcolor`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``shading`` kwarg to ``pcolor`` has been removed. Set ``edgecolors`` +appropriately instead. + + +Removed internal functions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``matplotlib.backends.backend_ps.seq_allequal`` function has been removed. +Use ``np.array_equal`` instead. + +The deprecated ``matplotlib.rcsetup.validate_maskedarray``, +``matplotlib.rcsetup.deprecate_savefig_extension`` and +``matplotlib.rcsetup.validate_tkpythoninspect`` functions, and associated +``savefig.extension`` and ``tk.pythoninspect`` rcparams entries have been +removed. + + +Deprecations +------------ + +- `matplotlib.testing.noseclasses` is deprecated and will be removed in 2.3 + + +Functions removed from the `lines` module +----------------------------------------- + +The `matplotlib.lines` module no longer imports the `pts_to_prestep`, +`pts_to_midstep` and `pts_to_poststep` functions from the `matplotlib.cbook` +module. + + +API Changes in 2.0.1 +==================== + +Extensions to `matplotlib.backend_bases.GraphicsContextBase` +------------------------------------------------------------ + +To better support controlling the color of hatches, the method +`matplotlib.backend_bases.GraphicsContextBase.set_hatch_color` was +added to the expected API of ``GraphicsContext`` classes. Calls to +this method are currently wrapped with a ``try:...except Attribute:`` +block to preserve back-compatibility with any third-party backends +which do not extend `~matplotlib.backend_bases.GraphicsContextBase`. + +This value can be accessed in the backends via +`matplotlib.backend_bases.GraphicsContextBase.get_hatch_color` (which +was added in 2.0 see :ref:`gc_get_hatch_color_wn`) and should be used +to color the hatches. + +In the future there may also be ``hatch_linewidth`` and +``hatch_density`` related methods added. It is encouraged, but not +required that third-party backends extend +`~matplotlib.backend_bases.GraphicsContextBase` to make adapting to +these changes easier. + + +`afm.get_fontconfig_fonts` returns a list of paths and does not check for existence +----------------------------------------------------------------------------------- + +`afm.get_fontconfig_fonts` used to return a set of paths encoded as a +``{key: 1, ...}`` dict, and checked for the existence of the paths. It now +returns a list and dropped the existence check, as the same check is performed +by the caller (`afm.findSystemFonts`) as well. + + +`bar` now returns rectangles of negative height or width if the corresponding input is negative +----------------------------------------------------------------------------------------------- + +`plt.bar` used to normalize the coordinates of the rectangles that it created, +to keep their height and width positives, even if the corresponding input was +negative. This normalization has been removed to permit a simpler computation +of the correct `sticky_edges` to use. + + +Do not clip line width when scaling dashes +------------------------------------------ + +The algorithm to scale dashes was changed to no longer clip the +scaling factor: the dash patterns now continue to shrink at thin line widths. +If the line width is smaller than the effective pixel size, this may result in +dashed lines turning into solid gray-ish lines. This also required slightly +tweaking the default patterns for '--', ':', and '.-' so that with the default +line width the final patterns would not change. + +There is no way to restore the old behavior. + + +Deprecate 'Vega' color maps +--------------------------- + +The "Vega" colormaps are deprecated in Matplotlib 2.0.1 and will be +removed in Matplotlib 2.2. Use the "tab" colormaps instead: "tab10", +"tab20", "tab20b", "tab20c". + + +API Changes in 2.0.0 +==================== + +Deprecation and removal +----------------------- + +Color of Axes +~~~~~~~~~~~~~ +The ``axisbg`` and ``axis_bgcolor`` properties on ``Axes`` have been +deprecated in favor of ``facecolor``. + +GTK and GDK backends deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The GDK and GTK backends have been deprecated. These obsolete backends +allow figures to be rendered via the GDK API to files and GTK2 figures. +They are untested and known to be broken, and their use has been +discouraged for some time. Instead, use the `GTKAgg` and `GTKCairo` +backends for rendering to GTK2 windows. + +WX backend deprecated +~~~~~~~~~~~~~~~~~~~~~ +The WX backend has been deprecated. It is untested, and its +use has been discouraged for some time. Instead, use the `WXAgg` +backend for rendering figures to WX windows. + +CocoaAgg backend removed +~~~~~~~~~~~~~~~~~~~~~~~~ +The deprecated and not fully functional CocoaAgg backend has been removed. + +`round` removed from TkAgg Backend +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The TkAgg backend had its own implementation of the `round` function. This +was unused internally and has been removed. Instead, use either the +`round` builtin function or `numpy.round`. + +'hold' functionality deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The 'hold' keyword argument and all functions and methods related +to it are deprecated, along with the 'axes.hold' `rcParams` entry. +The behavior will remain consistent with the default ``hold=True`` +state that has long been in place. Instead of using a function +or keyword argument (``hold=False``) to change that behavior, +explicitly clear the axes or figure as needed prior to subsequent +plotting commands. + + +`Artist.update` has return value +-------------------------------- + +The methods `matplotlib.artist.Artist.set`, +`matplotlib.Artist.update`, and the function `matplotlib.artist.setp` +now use a common codepath to look up how to update the given artist +properties (either using the setter methods or an attribute/property). + +The behavior of `matplotlib.Artist.update` is slightly changed to +return a list of the values returned from the setter methods to avoid +changing the API of `matplotlib.Artist.set` and +`matplotlib.artist.setp`. + +The keys passed into `matplotlib.Artist.update` are now converted to +lower case before being processed, to match the behavior of +`matplotlib.Artist.set` and `matplotlib.artist.setp`. This should not +break any user code because there are no set methods with capitals in +their names, but this puts a constraint on naming properties in the future. + + +`Legend` initializers gain edgecolor and facecolor kwargs +--------------------------------------------------------- + +The :class:`~matplotlib.legend.Legend` background patch (or 'frame') +can have its ``edgecolor`` and ``facecolor`` determined by the +corresponding keyword arguments to the :class:`matplotlib.legend.Legend` +initializer, or to any of the methods or functions that call that +initializer. If left to their default values of `None`, their values +will be taken from ``matplotlib.rcParams``. The previously-existing +``framealpha`` kwarg still controls the alpha transparency of the +patch. + + +Qualitative colormaps +--------------------- + +Colorbrewer's qualitative/discrete colormaps ("Accent", "Dark2", "Paired", +"Pastel1", "Pastel2", "Set1", "Set2", "Set3") are now implemented as +``ListedColormap`` instead of ``LinearSegmentedColormap``. + +To use these for images where categories are specified as integers, for +instance, use:: + + plt.imshow(x, cmap='Dark2', norm=colors.NoNorm()) + + +Change in the ``draw_image`` backend API +---------------------------------------- + +The ``draw_image`` method implemented by backends has changed its interface. + +This change is only relevant if the backend declares that it is able +to transform images by returning ``True`` from ``option_scale_image``. +See the ``draw_image`` docstring for more information. + + + +`matplotlib.ticker.LinearLocator` algorithm update +-------------------------------------------------- + +The ``matplotlib.ticker.LinearLocator`` is used to define the range and +location of axis ticks when the user wants an exact number of ticks. +``LinearLocator`` thus differs from the default locator ``MaxNLocator``, +for which the user specifies a maximum number of intervals rather than +a precise number of ticks. + +The view range algorithm in ``matplotlib.ticker.LinearLocator`` has been +changed so that more convenient tick locations are chosen. The new algorithm +returns a plot view range that is a multiple of the user-requested number of +ticks. This ensures tick marks will be located at whole integers more +consistently. For example, when both y-axes of a``twinx`` plot use +``matplotlib.ticker.LinearLocator`` with the same number of ticks, +their y-tick locations and grid lines will coincide. + +`matplotlib.ticker.LogLocator` gains numticks kwarg +--------------------------------------------------- + +The maximum number of ticks generated by the +`~matplotlib.ticker.LogLocator` can now be controlled explicitly +via setting the new 'numticks' kwarg to an integer. By default +the kwarg is None which internally sets it to the 'auto' string, +triggering a new algorithm for adjusting the maximum according +to the axis length relative to the ticklabel font size. + +`matplotlib.ticker.LogFormatter`: two new kwargs +------------------------------------------------ + +Previously, minor ticks on log-scaled axes were not labeled by +default. An algorithm has been added to the +`~matplotlib.ticker.LogFormatter` to control the labeling of +ticks between integer powers of the base. The algorithm uses +two parameters supplied in a kwarg tuple named 'minor_thresholds'. +See the docstring for further explanation. + +To improve support for axes using `~matplotlib.ticker.SymmetricLogLocator`, +a 'linthresh' kwarg was added. + + +New defaults for 3D quiver function in mpl_toolkits.mplot3d.axes3d.py +--------------------------------------------------------------------- + +Matplotlib has both a 2D and a 3D ``quiver`` function. These changes +affect only the 3D function and make the default behavior of the 3D +function match the 2D version. There are two changes: + +1) The 3D quiver function previously normalized the arrows to be the + same length, which makes it unusable for situations where the + arrows should be different lengths and does not match the behavior + of the 2D function. This normalization behavior is now controlled + with the ``normalize`` keyword, which defaults to False. + +2) The ``pivot`` keyword now defaults to ``tail`` instead of + ``tip``. This was done in order to match the default behavior of + the 2D quiver function. + +To obtain the previous behavior with the 3D quiver function, one can +call the function with :: + + ax.quiver(x, y, z, u, v, w, normalize=True, pivot='tip') + +where "ax" is an ``Axes3d`` object created with something like :: + + import mpl_toolkits.mplot3d.axes3d + ax = plt.sublot(111, projection='3d') + + +Stale figure behavior +--------------------- + +Attempting to draw the figure will now mark it as not stale (independent if +the draw succeeds). This change is to prevent repeatedly trying to re-draw a +figure which is raising an error on draw. The previous behavior would only mark +a figure as not stale after a full re-draw succeeded. + + +The spectral colormap is now nipy_spectral +------------------------------------------ + +The colormaps formerly known as ``spectral`` and ``spectral_r`` have been +replaced by ``nipy_spectral`` and ``nipy_spectral_r`` since Matplotlib +1.3.0. Even though the colormap was deprecated in Matplotlib 1.3.0, it never +raised a warning. As of Matplotlib 2.0.0, using the old names raises a +deprecation warning. In the future, using the old names will raise an error. + +Default install no longer includes test images +---------------------------------------------- + +To reduce the size of wheels and source installs, the tests and +baseline images are no longer included by default. + +To restore installing the tests and images, use a `setup.cfg` with :: + + [packages] + tests = True + toolkits_tests = True + +in the source directory at build/install time. + +Changes in 1.5.3 +================ + +``ax.plot(..., marker=None)`` gives default marker +-------------------------------------------------- + +Prior to 1.5.3 kwargs passed to `~matplotlib.Axes.plot` were handled +in two parts -- default kwargs generated internal to +`~matplotlib.Axes.plot` (such as the cycled styles) and user supplied +kwargs. The internally generated kwargs were passed to the +`matplotlib.lines.Line2D.__init__` and the user kwargs were passed to +``ln.set(**kwargs)`` to update the artist after it was created. Now +both sets of kwargs are merged and passed to +`~matplotlib.lines.Line2D.__init__`. This change was made to allow `None` +to be passed in via the user kwargs to mean 'do the default thing' as +is the convention through out mpl rather than raising an exception. + +Unlike most `~matplotlib.lines.Line2D` setter methods +`~matplotlib.lines.Line2D.set_marker` did accept `None` as a valid +input which was mapped to 'no marker'. Thus, by routing this +``marker=None`` through ``__init__`` rather than ``set(...)`` the meaning +of ``ax.plot(..., marker=None)`` changed from 'no markers' to 'default markers +from rcparams'. + +This is change is only evident if ``mpl.rcParams['lines.marker']`` has a value +other than ``'None'`` (which is string ``'None'`` which means 'no marker'). + + +Changes in 1.5.2 +================ + + +Default Behavior Changes +------------------------ + +Changed default ``autorange`` behavior in boxplots +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Prior to v1.5.2, the whiskers of boxplots would extend to the mininum +and maximum values if the quartiles were all equal (i.e., Q1 = median += Q3). This behavior has been disabled by default to restore consistency +with other plotting packages. + +To restore the old behavior, simply set ``autorange=True`` when +calling ``plt.boxplot``. + + +Changes in 1.5.0 +================ + +Code Changes +------------ + +Reversed `matplotlib.cbook.ls_mapper`, added `ls_mapper_r` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Formerly, `matplotlib.cbook.ls_mapper` was a dictionary with +the long-form line-style names (`"solid"`) as keys and the short +forms (`"-"`) as values. This long-to-short mapping is now done +by `ls_mapper_r`, and the short-to-long mapping is done by the +`ls_mapper`. + +Prevent moving artists between Axes, Property-ify Artist.axes, deprecate Artist.{get,set}_axes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This was done to prevent an Artist that is +already associated with an Axes from being moved/added to a different Axes. +This was never supported as it causes havoc with the transform stack. +The apparent support for this (as it did not raise an exception) was +the source of multiple bug reports and questions on SO. + +For almost all use-cases, the assignment of the axes to an artist should be +taken care of by the axes as part of the ``Axes.add_*`` method, hence the +deprecation of {get,set}_axes. + +Removing the ``set_axes`` method will also remove the 'axes' line from +the ACCEPTS kwarg tables (assuming that the removal date gets here +before that gets overhauled). + +Tightened input validation on 'pivot' kwarg to quiver +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Tightened validation so that only {'tip', 'tail', 'mid', and 'middle'} +(but any capitalization) are valid values for the 'pivot' kwarg in +the `Quiver.__init__` (and hence `Axes.quiver` and +`plt.quiver` which both fully delegate to `Quiver`). Previously any +input matching 'mid.*' would be interpreted as 'middle', 'tip.*' as +'tip' and any string not matching one of those patterns as 'tail'. + +The value of `Quiver.pivot` is normalized to be in the set {'tip', +'tail', 'middle'} in `Quiver.__init__`. + +Reordered `Axes.get_children` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The artist order returned by `Axes.get_children` did not +match the one used by `Axes.draw`. They now use the same +order, as `Axes.draw` now calls `Axes.get_children`. + +Changed behaviour of contour plots +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The default behaviour of :func:`~matplotlib.pyplot.contour` and +:func:`~matplotlib.pyplot.contourf` when using a masked array is now determined +by the new keyword argument `corner_mask`, or if this is not specified then +the new rcParam `contour.corner_mask` instead. The new default behaviour is +equivalent to using `corner_mask=True`; the previous behaviour can be obtained +using `corner_mask=False` or by changing the rcParam. The example +http://matplotlib.org/examples/pylab_examples/contour_corner_mask.html +demonstrates the difference. Use of the old contouring algorithm, which is +obtained with `corner_mask='legacy'`, is now deprecated. + +Contour labels may now appear in different places than in earlier versions of +Matplotlib. + +In addition, the keyword argument `nchunk` now applies to +:func:`~matplotlib.pyplot.contour` as well as +:func:`~matplotlib.pyplot.contourf`, and it subdivides the domain into +subdomains of exactly `nchunk` by `nchunk` quads, whereas previously it was +only roughly `nchunk` by `nchunk` quads. + +The C/C++ object that performs contour calculations used to be stored in the +public attribute QuadContourSet.Cntr, but is now stored in a private attribute +and should not be accessed by end users. + +Added set_params function to all Locator types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This was a bug fix targeted at making the api for Locators more consistent. + +In the old behavior, only locators of type MaxNLocator have set_params() +defined, causing its use on any other Locator to raise an AttributeError *( +aside: set_params(args) is a function that sets the parameters of a Locator +instance to be as specified within args)*. The fix involves moving set_params() +to the Locator class such that all subtypes will have this function defined. + +Since each of the Locator subtypes have their own modifiable parameters, a +universal set_params() in Locator isn't ideal. Instead, a default no-operation +function that raises a warning is implemented in Locator. Subtypes extending +Locator will then override with their own implementations. Subtypes that do +not have a need for set_params() will fall back onto their parent's +implementation, which raises a warning as intended. + +In the new behavior, Locator instances will not raise an AttributeError +when set_params() is called. For Locators that do not implement set_params(), +the default implementation in Locator is used. + +Disallow ``None`` as x or y value in ax.plot +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Do not allow ``None`` as a valid input for the ``x`` or ``y`` args in +`ax.plot`. This may break some user code, but this was never officially +supported (ex documented) and allowing ``None`` objects through can lead +to confusing exceptions downstream. + +To create an empty line use :: + + ln1, = ax.plot([], [], ...) + ln2, = ax.plot([], ...) + +In either case to update the data in the `Line2D` object you must update +both the ``x`` and ``y`` data. + + +Removed `args` and `kwargs` from `MicrosecondLocator.__call__` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The call signature of :meth:`~matplotlib.dates.MicrosecondLocator.__call__` +has changed from `__call__(self, *args, **kwargs)` to `__call__(self)`. +This is consistent with the superclass :class:`~matplotlib.ticker.Locator` +and also all the other Locators derived from this superclass. + + +No `ValueError` for the MicrosecondLocator and YearLocator +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The :class:`~matplotlib.dates.MicrosecondLocator` and +:class:`~matplotlib.dates.YearLocator` objects when called will return +an empty list if the axes have no data or the view has no interval. +Previously, they raised a `ValueError`. This is consistent with all +the Date Locators. + +'OffsetBox.DrawingArea' respects the 'clip' keyword argument +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The call signature was `OffsetBox.DrawingArea(..., clip=True)` but nothing +was done with the `clip` argument. The object did not do any clipping +regardless of that parameter. Now the object can and does clip the +child `Artists` if they are set to be clipped. + +You can turn off the clipping on a per-child basis using +`child.set_clip_on(False)`. + +Add salt to clipPath id +~~~~~~~~~~~~~~~~~~~~~~~ + +Add salt to the hash used to determine the id of the ``clipPath`` +nodes. This is to avoid conflicts when two svg documents with the same +clip path are included in the same document (see +https://github.com/ipython/ipython/issues/8133 and +https://github.com/matplotlib/matplotlib/issues/4349 ), however this +means that the svg output is no longer deterministic if the same +figure is saved twice. It is not expected that this will affect any +users as the current ids are generated from an md5 hash of properties +of the clip path and any user would have a very difficult time +anticipating the value of the id. + +Changed snap threshold for circle markers to inf +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When drawing circle markers above some marker size (previously 6.0) +the path used to generate the marker was snapped to pixel centers. However, +this ends up distorting the marker away from a circle. By setting the +snap threshold to inf snapping is never done on circles. + +This change broke several tests, but is an improvement. + +Preserve units with Text position +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Previously the 'get_position' method on Text would strip away unit information +even though the units were still present. There was no inherent need to do +this, so it has been changed so that unit data (if present) will be preserved. +Essentially a call to 'get_position' will return the exact value from a call to +'set_position'. + +If you wish to get the old behaviour, then you can use the new method called +'get_unitless_position'. + +New API for custom Axes view changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Interactive pan and zoom were previously implemented using a Cartesian-specific +algorithm that was not necessarily applicable to custom Axes. Three new private +methods, :meth:`~matplotlib.axes._base._AxesBase._get_view`, +:meth:`~matplotlib.axes._base._AxesBase._set_view`, and +:meth:`~matplotlib.axes._base._AxesBase._set_view_from_bbox`, allow for custom +``Axes`` classes to override the pan and zoom algorithms. Implementors of +custom ``Axes`` who override these methods may provide suitable behaviour for +both pan and zoom as well as the view navigation buttons on the interactive +toolbars. + +MathTex visual changes +---------------------- + +The spacing commands in mathtext have been changed to more closely +match vanilla TeX. + + +Improved spacing in mathtext +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The extra space that appeared after subscripts and superscripts has +been removed. + +No annotation coordinates wrap +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In #2351 for 1.4.0 the behavior of ['axes points', 'axes pixel', +'figure points', 'figure pixel'] as coordinates was change to +no longer wrap for negative values. In 1.4.3 this change was +reverted for 'axes points' and 'axes pixel' and in addition caused +'axes fraction' to wrap. For 1.5 the behavior has been reverted to +as it was in 1.4.0-1.4.2, no wrapping for any type of coordinate. + +Deprecation +----------- + +Deprecated `GraphicsContextBase.set_graylevel` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The `GraphicsContextBase.set_graylevel` function has been deprecated in 1.5 and +will be removed in 1.6. It has been unused. The +`GraphicsContextBase.set_foreground` could be used instead. + +deprecated idle_event +~~~~~~~~~~~~~~~~~~~~~ + +The `idle_event` was broken or missing in most backends and causes spurious +warnings in some cases, and its use in creating animations is now obsolete due +to the animations module. Therefore code involving it has been removed from all +but the wx backend (where it partially works), and its use is deprecated. The +animations module may be used instead to create animations. + +`color_cycle` deprecated +~~~~~~~~~~~~~~~~~~~~~~~~ + +In light of the new property cycling feature, +the Axes method *set_color_cycle* is now deprecated. +Calling this method will replace the current property cycle with +one that cycles just the given colors. + +Similarly, the rc parameter *axes.color_cycle* is also deprecated in +lieu of the new *axes.prop_cycle* parameter. Having both parameters in +the same rc file is not recommended as the result cannot be +predicted. For compatibility, setting *axes.color_cycle* will +replace the cycler in *axes.prop_cycle* with a color cycle. +Accessing *axes.color_cycle* will return just the color portion +of the property cycle, if it exists. + +Timeline for removal has not been set. + + +Bundled jquery +-------------- + +The version of jquery bundled with the webagg backend has been upgraded +from 1.7.1 to 1.11.3. If you are using the version of jquery bundled +with webagg you will need to update your html files as such + +.. code-block:: diff + + - + + + + +Code Removed +------------ + +Removed `Image` from main namespace +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`Image` was imported from PIL/pillow to test if PIL is available, but +there is no reason to keep `Image` in the namespace once the availability +has been determined. + +Removed `lod` from Artist +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Removed the method *set_lod* and all references to +the attribute *_lod* as the are not used anywhere else in the +code base. It appears to be a feature stub that was never built +out. + +Removed threading related classes from cbook +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The classes ``Scheduler``, ``Timeout``, and ``Idle`` were in cbook, but +are not used internally. They appear to be a prototype for the idle event +system which was not working and has recently been pulled out. + +Removed `Lena` images from sample_data +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``lena.png`` and ``lena.jpg`` images have been removed from +Matplotlib's sample_data directory. The images are also no longer +available from `matplotlib.cbook.get_sample_data`. We suggest using +`matplotlib.cbook.get_sample_data('grace_hopper.png')` or +`matplotlib.cbook.get_sample_data('grace_hopper.jpg')` instead. + + +Legend +~~~~~~ +Removed handling of `loc` as a positional argument to `Legend` + + +Legend handlers +~~~~~~~~~~~~~~~ +Remove code to allow legend handlers to be callable. They must now +implement a method ``legend_artist``. + + +Axis +~~~~ +Removed method ``set_scale``. This is now handled via a private method which +should not be used directly by users. It is called via ``Axes.set_{x,y}scale`` +which takes care of ensuring the related changes are also made to the Axes +object. + +finance.py +~~~~~~~~~~ + +Removed functions with ambiguous argument order from finance.py + + +Annotation +~~~~~~~~~~ + +Removed ``textcoords`` and ``xytext`` proprieties from Annotation objects. + + +spinxext.ipython_*.py +~~~~~~~~~~~~~~~~~~~~~ + +Both ``ipython_console_highlighting`` and ``ipython_directive`` have been +moved to `IPython`. + +Change your import from 'matplotlib.sphinxext.ipython_directive' to +'IPython.sphinxext.ipython_directive' and from +'matplotlib.sphinxext.ipython_directive' to +'IPython.sphinxext.ipython_directive' + + +LineCollection.color +~~~~~~~~~~~~~~~~~~~~ + +Deprecated in 2005, use ``set_color`` + + +remove ``'faceted'`` as a valid value for `shading` in ``tri.tripcolor`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use `edgecolor` instead. Added validation on ``shading`` to +only be valid values. + + +Remove ``faceted`` kwarg from scatter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Remove support for the ``faceted`` kwarg. This was deprecated in +d48b34288e9651ff95c3b8a071ef5ac5cf50bae7 (2008-04-18!) and replaced by +``edgecolor``. + + +Remove ``set_colorbar`` method from ``ScalarMappable`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Remove ``set_colorbar`` method, use `colorbar` attribute directly. + + +patheffects.svg +~~~~~~~~~~~~~~~ + + - remove ``get_proxy_renderer`` method from ``AbstarctPathEffect`` class + - remove ``patch_alpha`` and ``offset_xy`` from ``SimplePatchShadow`` + + +Remove ``testing.image_util.py`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Contained only a no-longer used port of functionality from PIL + + +Remove ``mlab.FIFOBuffer`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Not used internally and not part of core mission of mpl. + + +Remove ``mlab.prepca`` +~~~~~~~~~~~~~~~~~~~~~~ +Deprecated in 2009. + + +Remove ``NavigationToolbar2QTAgg`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Added no functionality over the base ``NavigationToolbar2Qt`` + + +mpl.py +~~~~~~ + +Remove the module `matplotlib.mpl`. Deprecated in 1.3 by +PR #1670 and commit 78ce67d161625833cacff23cfe5d74920248c5b2 + + Changes in 1.4.x ================ @@ -71,7 +1145,7 @@ original location: * The Sphinx extensions `ipython_directive` and `ipython_console_highlighting` have been moved to the IPython - project itself. While they remain in matplotlib for this release, + project itself. While they remain in Matplotlib for this release, they have been deprecated. Update your extensions in `conf.py` to point to `IPython.sphinxext.ipython_directive` instead of `matplotlib.sphinxext.ipython_directive`. @@ -100,7 +1174,7 @@ original location: * The legend handler interface has changed from a callable, to any object which implements the ``legend_artists`` method (a deprecation phase will see this interface be maintained for v1.4). See - :ref:`plotting-guide-legend` for further details. Further legend changes + :ref:`sphx_glr_tutorials_intermediate_legend_guide.py` for further details. Further legend changes include: * :func:`matplotlib.axes.Axes._get_legend_handles` now returns a generator @@ -206,7 +1280,7 @@ original location: * Clipping is now off by default on offset boxes. -* matplotlib now uses a less-aggressive call to ``gc.collect(1)`` when +* Matplotlib now uses a less-aggressive call to ``gc.collect(1)`` when closing figures to avoid major delays with large numbers of user objects in memory. @@ -320,7 +1394,7 @@ Code deprecation * The `ScalarMappable` class' `set_colorbar` is now deprecated. Instead, the :attr:`matplotlib.cm.ScalarMappable.colorbar` attribute should be - used. In previous matplotlib versions this attribute was an + used. In previous Matplotlib versions this attribute was an undocumented tuple of ``(colorbar_instance, colorbar_axes)`` but is now just ``colorbar_instance``. To get the colorbar axes it is possible to just use the @@ -427,7 +1501,7 @@ Configuration and rcParams * On Linux, the user-specific `matplotlibrc` configuration file is now located in `~/.config/matplotlib/matplotlibrc` to conform to the `XDG Base Directory Specification - `_. + `_. * The `font.*` rcParams now affect only text objects created after the rcParam has been set, and will not retroactively affect already @@ -506,7 +1580,7 @@ Changes in 1.2.x 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 + 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 @@ -736,7 +1810,7 @@ Changes beyond 0.99.x 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 @@ -761,7 +1835,7 @@ Changes in 0.99 * 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. + required, that should be done before passing it to Matplotlib. Changes for 0.98.x ================== @@ -898,7 +1972,7 @@ Changes for 0.98.0 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 +* 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. @@ -1054,7 +2128,7 @@ The :class:`Polar` class has moved to :mod:`matplotlib.projections.polar`. `Axes.toggle_log_lineary()` has been removed. :mod:`matplotlib.artist` -~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~ ============================================================ ============================================================ Old method New method @@ -1134,7 +2208,7 @@ Old method New method ============================================================ ============================================================ :class:`~matplotlib.backend_bases.RendererBase` -``````````````````````````````````````````````` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New methods: @@ -1143,7 +2217,7 @@ New methods: * :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, @@ -1305,7 +2379,7 @@ Changes for 0.90.1 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 + easier to add axis info functionality (e.g., 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 @@ -1339,7 +2413,7 @@ Changes for 0.90.1 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 + 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 @@ -1790,7 +2864,7 @@ Changes for 0.71 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) + versions with an a* prefix, e.g., (amin, amax, asum) Changes for 0.70 ================ @@ -1810,7 +2884,7 @@ 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 + have code you are porting which called, e.g., figmanager.add_axes, you can now simply do figmanager.canvas.figure.add_axes. Changes for 0.65 @@ -1937,7 +3011,7 @@ 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:: +available on PolyCollections, e.g., you can say:: c = scatter(blah, blah) c.set_linewidth(1.0) @@ -1955,7 +3029,7 @@ 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 +property, e.g., 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 @@ -2078,7 +3152,7 @@ Transformations 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 + rectangular coordinate system of the input, i.e., 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 -> @@ -2115,6 +3189,8 @@ Transformations transformations. +.. highlight:: none + Changes for 0.50 ================ @@ -2181,7 +3257,7 @@ Changes for 0.50 canvas.show() vbox.pack_start(canvas) - If you use the NavigationToolbar, this in now intialized with a + If you use the NavigationToolbar, this in now initialized 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. @@ -2215,7 +3291,7 @@ Changes for 0.42 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 + have changed, e.g., 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. @@ -2236,7 +3312,7 @@ Changes for 0.42 * 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 + the GUI window attribute, e.g., figManager.window for GTK and figManager.frame for wx Changes for 0.40 diff --git a/doc/api/api_changes/2017-08-27-TAC.rst b/doc/api/api_changes/2017-08-27-TAC.rst new file mode 100644 index 000000000000..82f709169eb8 --- /dev/null +++ b/doc/api/api_changes/2017-08-27-TAC.rst @@ -0,0 +1,22 @@ +Change to signatures of :meth:`~matplotlib.axes.Axes.bar` & :meth:`~matplotlib.axes.Axes.barh` +---------------------------------------------------------------------------------------------- + +For 2.0 the :ref:`default value of *align* ` changed to +``'center'``. However this caused the signature of +:meth:`~matplotlib.axes.Axes.bar` and +:meth:`~matplotlib.axes.Axes.barh` to be misleading as the first parameters were +still *left* and *bottom* respectively:: + + bar(left, height, *, align='center', **kwargs) + barh(bottom, width, *, align='center', **kwargs) + +despite behaving as the center in both cases. The methods now take ``*args, **kwargs`` +is input and are documented to have the primary signatures of:: + + bar(x, height, *, align='center', **kwargs) + barh(y, width, *, align='center', **kwargs) + +Passing *left* and *bottom* as keyword arguments to +:meth:`~matplotlib.axes.Axes.bar` and +:meth:`~matplotlib.axes.Axes.barh` respectively will warn. +Support will be removed in Matplotlib 3.0. diff --git a/doc/api/api_changes/2017-08-29-AL-getset_axes.rst b/doc/api/api_changes/2017-08-29-AL-getset_axes.rst new file mode 100644 index 000000000000..3f459de9fed3 --- /dev/null +++ b/doc/api/api_changes/2017-08-29-AL-getset_axes.rst @@ -0,0 +1,4 @@ +Removal of deprecated methods +````````````````````````````` +The deprecated `Artist.get_axes` and `Artist.set_axes` methods have been +removed diff --git a/doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst b/doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst new file mode 100644 index 000000000000..e7f8d4fe1407 --- /dev/null +++ b/doc/api/api_changes/2017-30-08_AFV_deprecation_of_axes_collision.rst @@ -0,0 +1,16 @@ +Deprecation of axes collision +----------------------------- + +Adding an axes instance to a figure by using the same arguments as for +a previous axes instance currently reuses the earlier instance. This +behavior has been deprecated in Matplotlib 2.1. In a future version, a +*new* instance will always be created and returned. Meanwhile, in such +a situation, a deprecation warning is raised by +:class:`~matplotlib.figure.AxesStack`. + +This warning can be suppressed, and the future behavior ensured, by passing +a *unique* label to each axes instance. See the docstring of +:meth:`~matplotlib.figure.Figure.add_axes` for more information. + +Additional details on the rationale behind this deprecation can be found +in :issue:`7377` and :issue:`9024`. diff --git a/doc/api/api_changes/README.rst b/doc/api/api_changes/README.rst new file mode 100644 index 000000000000..f59c3cb6edc4 --- /dev/null +++ b/doc/api/api_changes/README.rst @@ -0,0 +1,12 @@ +For changes which require an entry in `api_changes.rst` please create +a file in this folder with the name :file:`YYYY-MM-DD-[initials].rst` +(ex :file:`2014-07-31-TAC.rst`) with contents following the form: :: + + Brief description of change + --------------------------- + + Long description of change, justification, and work-arounds to + maintain old behavior (if any). + + +If you need more heading levels, please use ``~~~~`` and ``++++``. diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst index 8680be5b9f73..ccd738cd4798 100644 --- a/doc/api/artist_api.rst +++ b/doc/api/artist_api.rst @@ -1,50 +1,205 @@ .. _artist-api: -******* -artists -******* +=================== + ``artist`` Module +=================== + +.. inheritance-diagram:: matplotlib.axes._axes.Axes matplotlib.axes._base._AxesBase matplotlib.axis.Axis matplotlib.axis.Tick matplotlib.axis.XAxis matplotlib.axis.XTick matplotlib.axis.YAxis matplotlib.axis.YTick matplotlib.collections.AsteriskPolygonCollection matplotlib.collections.BrokenBarHCollection matplotlib.collections.CircleCollection matplotlib.collections.Collection matplotlib.collections.EllipseCollection matplotlib.collections.EventCollection matplotlib.collections.LineCollection matplotlib.collections.PatchCollection matplotlib.collections.PathCollection matplotlib.collections.PolyCollection matplotlib.collections.QuadMesh matplotlib.collections.RegularPolyCollection matplotlib.collections.StarPolygonCollection matplotlib.collections.TriMesh matplotlib.collections._CollectionWithSizes matplotlib.contour.ClabelText matplotlib.figure.Figure matplotlib.image.AxesImage matplotlib.image.BboxImage matplotlib.image.FigureImage matplotlib.image.NonUniformImage matplotlib.image.PcolorImage matplotlib.image._ImageBase matplotlib.legend.Legend matplotlib.lines.Line2D matplotlib.offsetbox.AnchoredOffsetbox matplotlib.offsetbox.AnchoredText matplotlib.offsetbox.AnnotationBbox matplotlib.offsetbox.AuxTransformBox matplotlib.offsetbox.DrawingArea matplotlib.offsetbox.HPacker matplotlib.offsetbox.OffsetBox matplotlib.offsetbox.OffsetImage matplotlib.offsetbox.PackerBase matplotlib.offsetbox.PaddedBox matplotlib.offsetbox.TextArea matplotlib.offsetbox.VPacker matplotlib.patches.Arc matplotlib.patches.Arrow matplotlib.patches.Circle matplotlib.patches.CirclePolygon matplotlib.patches.ConnectionPatch matplotlib.patches.Ellipse matplotlib.patches.FancyArrow matplotlib.patches.FancyArrowPatch matplotlib.patches.FancyBboxPatch matplotlib.patches.Patch matplotlib.patches.PathPatch matplotlib.patches.Polygon matplotlib.patches.Rectangle matplotlib.patches.RegularPolygon matplotlib.patches.Shadow matplotlib.patches.Wedge matplotlib.patches.YAArrow matplotlib.projections.geo.AitoffAxes matplotlib.projections.geo.GeoAxes matplotlib.projections.geo.HammerAxes matplotlib.projections.geo.LambertAxes matplotlib.projections.geo.MollweideAxes matplotlib.projections.polar.PolarAxes matplotlib.quiver.Barbs matplotlib.quiver.Quiver matplotlib.quiver.QuiverKey matplotlib.spines.Spine matplotlib.table.Cell matplotlib.table.CustomCell matplotlib.table.Table matplotlib.text.Annotation matplotlib.text.Text matplotlib.text.TextWithDash + :parts: 1 + :private-bases: -.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text matplotlib.offsetbox - :parts: 2 -:mod:`matplotlib.artist` -======================== .. automodule:: matplotlib.artist - :members: - :undoc-members: - :show-inheritance: + :no-members: + :no-undoc-members: + + +``Artist`` class +================ + +.. autoclass:: Artist + :no-members: + :no-undoc-members: + +Interactive +----------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.add_callback + Artist.format_cursor_data + Artist.get_contains + Artist.get_cursor_data + Artist.get_picker + Artist.hitlist + Artist.mouseover + Artist.pchanged + Artist.pick + Artist.pickable + Artist.remove_callback + Artist.set_contains + Artist.set_picker + Artist.contains + + +Margins and Autoscaling +----------------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.sticky_edges + +Clipping +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.get_clip_box + Artist.get_clip_on + Artist.get_clip_path + Artist.set_clip_box + Artist.set_clip_on + Artist.set_clip_path + +Bulk Properties +--------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.update + Artist.update_from + Artist.properties + Artist.set + + +Drawing +------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.draw + Artist.get_animated + Artist.set_animated + + Artist.get_agg_filter + + Artist.get_alpha + Artist.get_snap + Artist.get_visible + Artist.get_zorder + Artist.set_agg_filter + Artist.set_alpha + + Artist.set_sketch_params + Artist.set_snap + Artist.get_rasterized + Artist.get_sketch_params + Artist.set_path_effects + Artist.set_rasterized + Artist.zorder + Artist.set_visible + Artist.set_zorder + Artist.get_window_extent + Artist.get_path_effects + Artist.get_transformed_clip_path_and_affine + + + +Figure and Axes +--------------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.remove + + Artist.axes + + Artist.set_figure + Artist.get_figure + Artist.is_figure_set + +Children +-------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.get_children + Artist.findobj + + +Transform +--------- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + + Artist.set_transform + Artist.get_transform + Artist.is_transform_set + + + +Units +----- + +.. autosummary:: + :toctree: _as_gen + :nosignatures: + Artist.convert_xunits + Artist.convert_yunits + Artist.have_units -:mod:`matplotlib.lines` -======================= +Metadata +-------- -.. automodule:: matplotlib.lines - :members: - :undoc-members: - :show-inheritance: +.. autosummary:: + :toctree: _as_gen + :nosignatures: -:mod:`matplotlib.patches` -========================= + Artist.get_gid + Artist.get_label + Artist.set_gid + Artist.set_label + Artist.get_url + Artist.set_url + Artist.aname -.. automodule:: matplotlib.patches - :members: - :undoc-members: - :show-inheritance: +Stale +----- -:mod:`matplotlib.text` -====================== +.. autosummary:: + :toctree: _as_gen + :nosignatures: -.. automodule:: matplotlib.text - :members: - :undoc-members: - :show-inheritance: + Artist.stale +Functions +========= -:mod:`matplotlib.offsetbox` -=========================== +.. autosummary:: + :toctree: _as_gen + :nosignatures: -.. automodule:: matplotlib.offsetbox - :members: - :undoc-members: - :show-inheritance: + allow_rasterization + get + getp + setp + kwdoc + ArtistInspector diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst index 38791e242cd8..8bea5b8aaf0b 100644 --- a/doc/api/axes_api.rst +++ b/doc/api/axes_api.rst @@ -1,12 +1,678 @@ -**** -axes -**** +================ + ``Axes`` class +================ +.. currentmodule:: matplotlib.axes +.. autoclass:: Axes + :no-members: + :no-undoc-members: -:mod:`matplotlib.axes` -====================== +.. contents:: Table of Contents + :depth: 2 + :local: + :backlinks: entry -.. autoclass:: matplotlib.axes.Axes - :members: - :undoc-members: - :inherited-members: + +Plotting +======== + +Basic +----- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.plot + Axes.errorbar + Axes.scatter + + Axes.plot_date + Axes.step + + Axes.loglog + Axes.semilogx + Axes.semilogy + + Axes.fill_between + Axes.fill_betweenx + + Axes.bar + Axes.barh + + Axes.stem + Axes.eventplot + + Axes.pie + + Axes.stackplot + + + Axes.broken_barh + Axes.vlines + Axes.hlines + Axes.fill + +Spans +----- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.axhline + Axes.axhspan + Axes.axvline + Axes.axvspan + +Spectral +-------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.acorr + Axes.angle_spectrum + Axes.cohere + Axes.csd + Axes.magnitude_spectrum + Axes.phase_spectrum + Axes.psd + Axes.specgram + Axes.xcorr + +Statistics +---------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.boxplot + Axes.violinplot + + Axes.violin + Axes.bxp + +Binned +------ + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.hexbin + Axes.hist + Axes.hist2d + +Contours +-------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.clabel + Axes.contour + Axes.contourf + +Array +----- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.imshow + Axes.matshow + Axes.pcolor + Axes.pcolorfast + Axes.pcolormesh + Axes.spy + +Unstructured Triangles +---------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.tripcolor + Axes.triplot + Axes.tricontour + Axes.tricontourf + + +Text and Annotations +-------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.annotate + Axes.text + Axes.table + Axes.arrow + + +Fields +------ + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.barbs + Axes.quiver + Axes.quiverkey + Axes.streamplot + + +Clearing +======== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.cla + Axes.clear + + + +Appearance +========== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Axes.axis + + Axes.set_axis_off + Axes.set_axis_on + Axes.set_frame_on + Axes.get_frame_on + + Axes.set_axisbelow + Axes.get_axisbelow + + Axes.grid + + Axes.get_axis_bgcolor + Axes.get_facecolor + Axes.get_fc + + Axes.set_facecolor + Axes.set_fc + Axes.set_axis_bgcolor + + + +Property cycle +============== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.set_prop_cycle + Axes.set_color_cycle + + +Axis / limits +============= + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Axes.get_yaxis + Axes.get_xaxis + + + +Axis Limits and direction +------------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.invert_xaxis + Axes.invert_yaxis + Axes.xaxis_inverted + Axes.yaxis_inverted + + Axes.set_xlim + Axes.set_ylim + Axes.get_ylim + Axes.get_xlim + + Axes.update_datalim + Axes.update_datalim_bounds + Axes.update_datalim_numerix + + Axes.set_ybound + Axes.set_xbound + Axes.get_ybound + Axes.get_xbound + +Axis Labels, title, and legend +------------------------------ + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.get_xlabel + Axes.get_ylabel + + Axes.set_xlabel + Axes.set_ylabel + + Axes.set_title + Axes.get_title + Axes.legend + Axes.get_legend + Axes.get_legend_handles_labels + + +Axis scales +----------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.set_xscale + Axes.get_xscale + + Axes.get_yscale + Axes.set_yscale + + + +Autoscaling and margins +----------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.use_sticky_edges + + Axes.margins + Axes.set_xmargin + Axes.set_ymargin + + Axes.relim + + Axes.autoscale + Axes.autoscale_view + + Axes.get_autoscale_on + Axes.set_autoscale_on + + Axes.get_autoscalex_on + Axes.set_autoscalex_on + + Axes.get_autoscaley_on + Axes.set_autoscaley_on + + +Aspect ratio +------------ + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.apply_aspect + Axes.get_aspect + Axes.set_aspect + + Axes.get_adjustable + Axes.set_adjustable + + +Ticks and tick labels +--------------------- + + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.xaxis_date + Axes.yaxis_date + + Axes.get_xmajorticklabels + Axes.get_xminorticklabels + Axes.get_xticklabels + Axes.get_xticklines + Axes.get_xticks + + Axes.get_ymajorticklabels + Axes.get_yminorticklabels + Axes.get_yticklabels + Axes.get_yticklines + Axes.get_yticks + + Axes.minorticks_off + Axes.minorticks_on + + Axes.set_xticklabels + Axes.set_xticks + Axes.set_yticklabels + Axes.set_yticks + + Axes.get_xgridlines + Axes.get_ygridlines + + + Axes.ticklabel_format + Axes.tick_params + + Axes.locator_params + + + +Units +===== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.convert_xunits + Axes.convert_yunits + Axes.have_units + + +Adding Artists +============== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.add_artist + Axes.add_collection + Axes.add_container + Axes.add_image + Axes.add_line + Axes.add_patch + Axes.add_table + + +Twinning +======== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.twinx + Axes.twiny + + Axes.get_shared_x_axes + Axes.get_shared_y_axes + + +Axes Position +============= +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.get_anchor + Axes.set_anchor + + Axes.get_axes_locator + Axes.set_axes_locator + + Axes.reset_position + + Axes.get_position + Axes.set_position + + +Async/Event based +================= + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.stale + Axes.pchanged + Axes.add_callback + Axes.remove_callback + + +Interactive +=========== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Axes.can_pan + Axes.can_zoom + + Axes.get_navigate + Axes.set_navigate + Axes.get_navigate_mode + Axes.set_navigate_mode + + Axes.start_pan + Axes.drag_pan + Axes.end_pan + + Axes.format_coord + Axes.format_cursor_data + Axes.format_xdata + Axes.format_ydata + + Axes.hitlist + Axes.mouseover + Axes.in_axes + + Axes.pick + Axes.pickable + Axes.get_picker + Axes.set_picker + + Axes.set_contains + Axes.get_contains + + Axes.contains + Axes.contains_point + + Axes.get_cursor_data + Axes.get_cursor_props + Axes.set_cursor_props + +Children +======== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.get_children + Axes.get_images + Axes.get_lines + Axes.findobj + + +Drawing +======= + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.draw + Axes.draw_artist + Axes.redraw_in_frame + Axes.get_renderer_cache + + Axes.get_rasterization_zorder + Axes.set_rasterization_zorder + + Axes.get_window_extent + Axes.get_tightbbox + + +Bulk property manipulation +========================== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.set + Axes.update + Axes.properties + Axes.update_from + + +General Artist Properties +========================= + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.set_agg_filter + Axes.set_alpha + Axes.set_animated + Axes.set_clip_box + Axes.set_clip_on + Axes.set_clip_path + Axes.set_gid + Axes.set_label + Axes.set_path_effects + Axes.set_rasterized + Axes.set_sketch_params + Axes.set_snap + Axes.set_transform + Axes.set_url + Axes.set_visible + Axes.set_zorder + + Axes.get_agg_filter + Axes.get_alpha + Axes.get_animated + Axes.get_clip_box + Axes.get_clip_on + Axes.get_clip_path + Axes.get_gid + Axes.get_label + Axes.get_path_effects + Axes.get_rasterized + Axes.get_sketch_params + Axes.get_snap + Axes.get_transform + Axes.get_url + Axes.get_visible + Axes.get_zorder + + Axes.axes + Axes.set_figure + Axes.get_figure + +Artist Methods +============== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.is_figure_set + Axes.remove + Axes.is_transform_set + + +Projection +========== + +Methods used by `~matplotlib.axis.Axis` that must be overridden for +non-rectilinear Axes. + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.name + Axes.get_xaxis_transform + Axes.get_yaxis_transform + Axes.get_data_ratio + Axes.get_data_ratio_log + + Axes.get_xaxis_text1_transform + Axes.get_xaxis_text2_transform + Axes.get_yaxis_text1_transform + Axes.get_yaxis_text2_transform + + +Other +===== + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axes.zorder + Axes.aname + Axes.get_default_bbox_extra_artists + Axes.get_transformed_clip_path_and_affine + Axes.has_data + Axes.hold + Axes.ishold + + +Inheritance +=========== +.. inheritance-diagram:: matplotlib.axes.Axes + :private-bases: diff --git a/doc/api/axis_api.rst b/doc/api/axis_api.rst index 426f0c873dfb..86552c812708 100644 --- a/doc/api/axis_api.rst +++ b/doc/api/axis_api.rst @@ -1,12 +1,888 @@ -**** -axis -**** +=================== + axis and tick API +=================== - -:mod:`matplotlib.axis` -====================== +.. contents:: Table of Contents + :depth: 3 + :local: + :backlinks: entry .. automodule:: matplotlib.axis - :members: - :undoc-members: - :show-inheritance: + :no-members: + :no-undoc-members: + +Inheritance +=========== + +.. inheritance-diagram:: Tick Ticker XAxis YAxis XTick YTick + :private-bases: + + +``Axis`` objects +================ + +.. autoclass:: Axis + :no-members: + :no-undoc-members: +.. autoclass:: XAxis + :no-members: + :no-undoc-members: +.. autoclass:: YAxis + :no-members: + :no-undoc-members: +.. autoclass:: Ticker + :no-members: + :no-undoc-members: + + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.cla + Axis.get_scale + + +Formatters and Locators +----------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.get_major_formatter + Axis.get_major_locator + Axis.get_minor_formatter + Axis.get_minor_locator + Axis.set_major_formatter + Axis.set_major_locator + Axis.set_minor_formatter + Axis.set_minor_locator + + +Axis Label +---------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.set_label_coords + Axis.set_label_position + Axis.set_label_text + Axis.get_label_position + Axis.get_label_text + +Ticks, tick labels and Offset text +---------------------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.get_major_ticks + Axis.get_majorticklabels + Axis.get_majorticklines + Axis.get_majorticklocs + Axis.get_minor_ticks + Axis.get_minorticklabels + Axis.get_minorticklines + Axis.get_minorticklocs + + Axis.get_offset_text + + Axis.get_tick_padding + Axis.get_ticklabels + Axis.get_ticklines + Axis.get_ticklocs + + Axis.get_gridlines + Axis.grid + + Axis.iter_ticks + Axis.set_tick_params + + Axis.axis_date + + +Data and view intervals +----------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.get_data_interval + Axis.get_view_interval + Axis.set_data_interval + Axis.set_view_interval + +Rendering helpers +----------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.get_minpos + Axis.get_tick_space + Axis.get_ticklabel_extents + Axis.get_tightbbox + + +Interactive +----------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Axis.get_pickradius + Axis.set_pickradius + + +Units +----- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.convert_units + Axis.set_units + Axis.get_units + Axis.update_units + + +Incremental navigation +---------------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.pan + Axis.zoom + + +YAxis Specific +-------------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + YAxis.axis_name + YAxis.get_text_widths + YAxis.get_ticks_position + YAxis.set_offset_position + YAxis.set_ticks_position + YAxis.tick_left + YAxis.tick_right + + +XAxis Specific +-------------- +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + XAxis.axis_name + XAxis.get_text_heights + XAxis.get_ticks_position + XAxis.set_ticks_position + XAxis.tick_bottom + XAxis.tick_top + + +Other +----- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Axis.OFFSETTEXTPAD + + Axis.limit_range_for_scale + Axis.reset_ticks + Axis.set_default_intervals + Axis.get_smart_bounds + Axis.set_smart_bounds + +Discouraged +----------- + +These methods implicitly use `~matplotlib.ticker.FixedLocator` and +`~matplotlib.ticker.FixedFormatter`. They can be convenient, but if +not used together may de-couple your tick labels from your data. + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + Axis.set_ticklabels + Axis.set_ticks + + + +``Tick`` objects +================ + +.. autoclass:: Tick + :no-members: + :no-undoc-members: +.. autoclass:: XTick + :no-members: + :no-undoc-members: +.. autoclass:: YTick + :no-members: + :no-undoc-members: + + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Tick.apply_tickdir + Tick.get_loc + Tick.get_pad + Tick.get_pad_pixels + Tick.get_tick_padding + Tick.get_tickdir + Tick.get_view_interval + Tick.set_label1 + Tick.set_label2 + Tick.set_pad + Tick.update_position + + +Common and inherited methods +============================ + +``XTick`` +--------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + XTick.apply_tickdir + XTick.get_loc + XTick.get_pad + XTick.get_pad_pixels + XTick.get_tick_padding + XTick.get_tickdir + XTick.get_view_interval + XTick.set_label1 + XTick.set_label2 + XTick.set_pad + XTick.update_position + + + +YTick +----- + + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + YTick.apply_tickdir + YTick.get_loc + YTick.get_pad + YTick.get_pad_pixels + YTick.get_tick_padding + YTick.get_tickdir + YTick.get_view_interval + YTick.set_label1 + YTick.set_label2 + YTick.set_pad + YTick.update_position + +YAxis +----- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + + YAxis.OFFSETTEXTPAD + YAxis.axis_date + YAxis.cla + YAxis.convert_units + YAxis.get_data_interval + YAxis.get_gridlines + YAxis.get_label_position + YAxis.get_label_text + YAxis.get_major_formatter + YAxis.get_major_locator + YAxis.get_major_ticks + YAxis.get_majorticklabels + YAxis.get_majorticklines + YAxis.get_majorticklocs + YAxis.get_minor_formatter + YAxis.get_minor_locator + YAxis.get_minor_ticks + YAxis.get_minorticklabels + YAxis.get_minorticklines + YAxis.get_minorticklocs + YAxis.get_minpos + YAxis.get_offset_text + YAxis.get_pickradius + YAxis.get_scale + YAxis.get_smart_bounds + YAxis.get_tick_padding + YAxis.get_tick_space + YAxis.get_ticklabel_extents + YAxis.get_ticklabels + YAxis.get_ticklines + YAxis.get_ticklocs + YAxis.get_tightbbox + YAxis.get_units + YAxis.get_view_interval + YAxis.grid + YAxis.iter_ticks + YAxis.limit_range_for_scale + YAxis.pan + YAxis.reset_ticks + YAxis.set_data_interval + YAxis.set_default_intervals + YAxis.set_label_coords + YAxis.set_label_position + YAxis.set_label_text + YAxis.set_major_formatter + YAxis.set_major_locator + YAxis.set_minor_formatter + YAxis.set_minor_locator + YAxis.set_pickradius + YAxis.set_smart_bounds + YAxis.set_tick_params + YAxis.set_ticklabels + YAxis.set_ticks + YAxis.set_units + YAxis.set_view_interval + YAxis.update_units + YAxis.zoom + +``YAxis`` +--------- + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + XAxis.OFFSETTEXTPAD + XAxis.axis_date + XAxis.cla + XAxis.convert_units + XAxis.get_data_interval + XAxis.get_gridlines + XAxis.get_label_position + XAxis.get_label_text + XAxis.get_major_formatter + XAxis.get_major_locator + XAxis.get_major_ticks + XAxis.get_majorticklabels + XAxis.get_majorticklines + XAxis.get_majorticklocs + XAxis.get_minor_formatter + XAxis.get_minor_locator + XAxis.get_minor_ticks + XAxis.get_minorticklabels + XAxis.get_minorticklines + XAxis.get_minorticklocs + XAxis.get_minpos + XAxis.get_offset_text + XAxis.get_pickradius + XAxis.get_scale + XAxis.get_smart_bounds + XAxis.get_tick_padding + XAxis.get_tick_space + XAxis.get_ticklabel_extents + XAxis.get_ticklabels + XAxis.get_ticklines + XAxis.get_ticklocs + XAxis.get_tightbbox + XAxis.get_units + XAxis.get_view_interval + XAxis.grid + XAxis.iter_ticks + XAxis.limit_range_for_scale + XAxis.pan + XAxis.reset_ticks + XAxis.set_data_interval + XAxis.set_default_intervals + XAxis.set_label_coords + XAxis.set_label_position + XAxis.set_label_text + XAxis.set_major_formatter + XAxis.set_major_locator + XAxis.set_minor_formatter + XAxis.set_minor_locator + XAxis.set_pickradius + XAxis.set_smart_bounds + XAxis.set_tick_params + XAxis.set_ticklabels + XAxis.set_ticks + XAxis.set_units + XAxis.set_view_interval + XAxis.update_units + XAxis.zoom + + + +Inherited from artist +--------------------- + +Ticks +~~~~~ + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Tick.add_callback + Tick.aname + Tick.axes + Tick.contains + Tick.convert_xunits + Tick.convert_yunits + Tick.draw + Tick.findobj + Tick.format_cursor_data + Tick.get_agg_filter + Tick.get_alpha + Tick.get_animated + Tick.get_children + Tick.get_clip_box + Tick.get_clip_on + Tick.get_clip_path + Tick.get_contains + Tick.get_cursor_data + Tick.get_figure + Tick.get_gid + Tick.get_label + Tick.get_path_effects + Tick.get_picker + Tick.get_rasterized + Tick.get_sketch_params + Tick.get_snap + Tick.get_transform + Tick.get_transformed_clip_path_and_affine + Tick.get_url + Tick.get_visible + Tick.get_window_extent + Tick.get_zorder + Tick.have_units + Tick.hitlist + Tick.is_figure_set + Tick.is_transform_set + Tick.mouseover + Tick.pchanged + Tick.pick + Tick.pickable + Tick.properties + Tick.remove + Tick.remove_callback + Tick.set + Tick.set_agg_filter + Tick.set_alpha + Tick.set_animated + Tick.set_clip_box + Tick.set_clip_on + Tick.set_clip_path + Tick.set_contains + Tick.set_figure + Tick.set_gid + Tick.set_label + Tick.set_path_effects + Tick.set_picker + Tick.set_rasterized + Tick.set_sketch_params + Tick.set_snap + Tick.set_transform + Tick.set_url + Tick.set_visible + Tick.set_zorder + Tick.stale + Tick.update + Tick.update_from + Tick.zorder + + XTick.add_callback + XTick.aname + XTick.axes + XTick.contains + XTick.convert_xunits + XTick.convert_yunits + XTick.draw + XTick.findobj + XTick.format_cursor_data + XTick.get_agg_filter + XTick.get_alpha + XTick.get_animated + XTick.get_children + XTick.get_clip_box + XTick.get_clip_on + XTick.get_clip_path + XTick.get_contains + XTick.get_cursor_data + XTick.get_figure + XTick.get_gid + XTick.get_label + XTick.get_path_effects + XTick.get_picker + XTick.get_rasterized + XTick.get_sketch_params + XTick.get_snap + XTick.get_transform + XTick.get_transformed_clip_path_and_affine + XTick.get_url + XTick.get_visible + XTick.get_window_extent + XTick.get_zorder + XTick.have_units + XTick.hitlist + XTick.is_figure_set + XTick.is_transform_set + XTick.mouseover + XTick.pchanged + XTick.pick + XTick.pickable + XTick.properties + XTick.remove + XTick.remove_callback + XTick.set + XTick.set_agg_filter + XTick.set_alpha + XTick.set_animated + XTick.set_clip_box + XTick.set_clip_on + XTick.set_clip_path + XTick.set_contains + XTick.set_figure + XTick.set_gid + XTick.set_label + XTick.set_path_effects + XTick.set_picker + XTick.set_rasterized + XTick.set_sketch_params + XTick.set_snap + XTick.set_transform + XTick.set_url + XTick.set_visible + XTick.set_zorder + XTick.stale + XTick.update + XTick.update_from + XTick.zorder + + YTick.add_callback + YTick.aname + YTick.axes + YTick.contains + YTick.convert_xunits + YTick.convert_yunits + YTick.draw + YTick.findobj + YTick.format_cursor_data + YTick.get_agg_filter + YTick.get_alpha + YTick.get_animated + YTick.get_children + YTick.get_clip_box + YTick.get_clip_on + YTick.get_clip_path + YTick.get_contains + YTick.get_cursor_data + YTick.get_figure + YTick.get_gid + YTick.get_label + YTick.get_path_effects + YTick.get_picker + YTick.get_rasterized + YTick.get_sketch_params + YTick.get_snap + YTick.get_transform + YTick.get_transformed_clip_path_and_affine + YTick.get_url + YTick.get_visible + YTick.get_window_extent + YTick.get_zorder + YTick.have_units + YTick.hitlist + YTick.is_figure_set + YTick.is_transform_set + YTick.mouseover + YTick.pchanged + YTick.pick + YTick.pickable + YTick.properties + YTick.remove + YTick.remove_callback + YTick.set + YTick.set_agg_filter + YTick.set_alpha + YTick.set_animated + YTick.set_clip_box + YTick.set_clip_on + YTick.set_clip_path + YTick.set_contains + YTick.set_figure + YTick.set_gid + YTick.set_label + YTick.set_path_effects + YTick.set_picker + YTick.set_rasterized + YTick.set_sketch_params + YTick.set_snap + YTick.set_transform + YTick.set_url + YTick.set_visible + YTick.set_zorder + YTick.stale + YTick.update + YTick.update_from + YTick.zorder + + +Axis +~~~~ + +.. autosummary:: + :toctree: _as_gen + :template: autosummary.rst + :nosignatures: + + + Axis.add_callback + Axis.aname + Axis.axes + Axis.contains + Axis.convert_xunits + Axis.convert_yunits + Axis.draw + Axis.findobj + Axis.format_cursor_data + Axis.get_agg_filter + Axis.get_alpha + Axis.get_animated + Axis.get_children + Axis.get_clip_box + Axis.get_clip_on + Axis.get_clip_path + Axis.get_contains + Axis.get_cursor_data + Axis.get_figure + Axis.get_gid + Axis.get_label + Axis.get_path_effects + Axis.get_picker + Axis.get_rasterized + Axis.get_sketch_params + Axis.get_snap + Axis.get_transform + Axis.get_transformed_clip_path_and_affine + Axis.get_url + Axis.get_visible + Axis.get_window_extent + Axis.get_zorder + Axis.have_units + Axis.hitlist + Axis.is_figure_set + Axis.is_transform_set + Axis.mouseover + Axis.pchanged + Axis.pick + Axis.pickable + Axis.properties + Axis.remove + Axis.remove_callback + Axis.set + Axis.set_agg_filter + Axis.set_alpha + Axis.set_animated + Axis.set_clip_box + Axis.set_clip_on + Axis.set_clip_path + Axis.set_contains + Axis.set_figure + Axis.set_gid + Axis.set_label + Axis.set_path_effects + Axis.set_picker + Axis.set_rasterized + Axis.set_sketch_params + Axis.set_snap + Axis.set_transform + Axis.set_url + Axis.set_visible + Axis.set_zorder + Axis.stale + Axis.update + Axis.update_from + Axis.zorder + + XAxis.add_callback + XAxis.aname + XAxis.axes + XAxis.contains + XAxis.convert_xunits + XAxis.convert_yunits + XAxis.draw + XAxis.findobj + XAxis.format_cursor_data + XAxis.get_agg_filter + XAxis.get_alpha + XAxis.get_animated + XAxis.get_children + XAxis.get_clip_box + XAxis.get_clip_on + XAxis.get_clip_path + XAxis.get_contains + XAxis.get_cursor_data + XAxis.get_figure + XAxis.get_gid + XAxis.get_label + XAxis.get_path_effects + XAxis.get_picker + XAxis.get_rasterized + XAxis.get_sketch_params + XAxis.get_snap + XAxis.get_transform + XAxis.get_transformed_clip_path_and_affine + XAxis.get_url + XAxis.get_visible + XAxis.get_window_extent + XAxis.get_zorder + XAxis.have_units + XAxis.hitlist + XAxis.is_figure_set + XAxis.is_transform_set + XAxis.mouseover + XAxis.pchanged + XAxis.pick + XAxis.pickable + XAxis.properties + XAxis.remove + XAxis.remove_callback + XAxis.set + XAxis.set_agg_filter + XAxis.set_alpha + XAxis.set_animated + XAxis.set_clip_box + XAxis.set_clip_on + XAxis.set_clip_path + XAxis.set_contains + XAxis.set_figure + XAxis.set_gid + XAxis.set_label + XAxis.set_path_effects + XAxis.set_picker + XAxis.set_rasterized + XAxis.set_sketch_params + XAxis.set_snap + XAxis.set_transform + XAxis.set_url + XAxis.set_visible + XAxis.set_zorder + XAxis.stale + XAxis.update + XAxis.update_from + XAxis.zorder + + YAxis.add_callback + YAxis.aname + YAxis.axes + YAxis.contains + YAxis.convert_xunits + YAxis.convert_yunits + YAxis.draw + YAxis.findobj + YAxis.format_cursor_data + YAxis.get_agg_filter + YAxis.get_alpha + YAxis.get_animated + YAxis.get_children + YAxis.get_clip_box + YAxis.get_clip_on + YAxis.get_clip_path + YAxis.get_contains + YAxis.get_cursor_data + YAxis.get_figure + YAxis.get_gid + YAxis.get_label + YAxis.get_path_effects + YAxis.get_picker + YAxis.get_rasterized + YAxis.get_sketch_params + YAxis.get_snap + YAxis.get_transform + YAxis.get_transformed_clip_path_and_affine + YAxis.get_url + YAxis.get_visible + YAxis.get_window_extent + YAxis.get_zorder + YAxis.have_units + YAxis.hitlist + YAxis.is_figure_set + YAxis.is_transform_set + YAxis.mouseover + YAxis.pchanged + YAxis.pick + YAxis.pickable + YAxis.properties + YAxis.remove + YAxis.remove_callback + YAxis.set + YAxis.set_agg_filter + YAxis.set_alpha + YAxis.set_animated + YAxis.set_clip_box + YAxis.set_clip_on + YAxis.set_clip_path + YAxis.set_contains + YAxis.set_figure + YAxis.set_gid + YAxis.set_label + YAxis.set_path_effects + YAxis.set_picker + YAxis.set_rasterized + YAxis.set_sketch_params + YAxis.set_snap + YAxis.set_transform + YAxis.set_url + YAxis.set_visible + YAxis.set_zorder + YAxis.stale + YAxis.update + YAxis.update_from + YAxis.zorder diff --git a/doc/api/backend_managers_api.rst b/doc/api/backend_managers_api.rst new file mode 100644 index 000000000000..86d1c383b966 --- /dev/null +++ b/doc/api/backend_managers_api.rst @@ -0,0 +1,8 @@ + +:mod:`matplotlib.backend_managers` +=================================== + +.. automodule:: matplotlib.backend_managers + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/backend_mixed_api.rst b/doc/api/backend_mixed_api.rst new file mode 100644 index 000000000000..9c55e4abaa7f --- /dev/null +++ b/doc/api/backend_mixed_api.rst @@ -0,0 +1,7 @@ + +:mod:`matplotlib.backends.backend_mixed` +======================================== + +.. automodule:: matplotlib.backends.backend_mixed + :members: + :show-inheritance: diff --git a/doc/api/backend_qt5agg_api.rst b/doc/api/backend_qt5agg_api.rst new file mode 100644 index 000000000000..58e5353a32a9 --- /dev/null +++ b/doc/api/backend_qt5agg_api.rst @@ -0,0 +1,9 @@ + +:mod:`matplotlib.backends.backend_qt5agg` +========================================= + +.. automodule:: matplotlib.backends.backend_qt5agg + :members: + :undoc-members: + :show-inheritance: + diff --git a/doc/api/backend_svg_api.rst b/doc/api/backend_svg_api.rst new file mode 100644 index 000000000000..399042482ea8 --- /dev/null +++ b/doc/api/backend_svg_api.rst @@ -0,0 +1,7 @@ + +:mod:`matplotlib.backends.backend_svg` +====================================== + +.. automodule:: matplotlib.backends.backend_svg + :members: + :show-inheritance: diff --git a/doc/api/backend_tools_api.rst b/doc/api/backend_tools_api.rst new file mode 100644 index 000000000000..32babd5844b0 --- /dev/null +++ b/doc/api/backend_tools_api.rst @@ -0,0 +1,8 @@ + +:mod:`matplotlib.backend_tools` +================================ + +.. automodule:: matplotlib.backend_tools + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/collections_api.rst b/doc/api/collections_api.rst index a62dbc0136cf..166dc3690c08 100644 --- a/doc/api/collections_api.rst +++ b/doc/api/collections_api.rst @@ -4,6 +4,7 @@ collections .. inheritance-diagram:: matplotlib.collections :parts: 2 + :private-bases: :mod:`matplotlib.collections` ============================= diff --git a/doc/api/colors_api.rst b/doc/api/colors_api.rst index bd577af02ed4..2789e4361370 100644 --- a/doc/api/colors_api.rst +++ b/doc/api/colors_api.rst @@ -9,7 +9,45 @@ For a visual representation of the matplotlib colormaps, see the :mod:`matplotlib.colors` ======================== +.. currentmodule:: matplotlib.colors + .. automodule:: matplotlib.colors - :members: - :undoc-members: - :show-inheritance: + :no-members: + :no-inherited-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + BoundaryNorm + Colormap + LightSource + LinearSegmentedColormap + ListedColormap + LogNorm + NoNorm + Normalize + PowerNorm + SymLogNorm + +Functions +--------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + from_levels_and_colors + hsv_to_rgb + rgb_to_hsv + to_hex + to_rgb + to_rgba + to_rgba_array + is_color_like + makeMappingArray + get_named_colors_mapping + diff --git a/doc/api/container_api.rst b/doc/api/container_api.rst new file mode 100644 index 000000000000..3b765f1fb022 --- /dev/null +++ b/doc/api/container_api.rst @@ -0,0 +1,11 @@ +********* +container +********* + +:mod:`matplotlib.container` +=========================== + +.. automodule:: matplotlib.container + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/contour_api.rst b/doc/api/contour_api.rst new file mode 100644 index 000000000000..60a68e453863 --- /dev/null +++ b/doc/api/contour_api.rst @@ -0,0 +1,13 @@ + +******* +contour +******* + + +:mod:`matplotlib.contour` +========================= + +.. automodule:: matplotlib.contour + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/dviread.rst b/doc/api/dviread.rst index edad6c919862..ceee143b6080 100644 --- a/doc/api/dviread.rst +++ b/doc/api/dviread.rst @@ -1,3 +1,6 @@ +**************** +dviread +**************** :mod:`matplotlib.dviread` ========================= @@ -5,4 +8,9 @@ .. automodule:: matplotlib.dviread :members: :undoc-members: + :exclude-members: Dvi + :show-inheritance: + +.. autoclass:: matplotlib.dviread.Dvi + :members: __iter__,close :show-inheritance: diff --git a/doc/api/figure_api.rst b/doc/api/figure_api.rst index 27e86a1fee14..779f4ad1c1c4 100644 --- a/doc/api/figure_api.rst +++ b/doc/api/figure_api.rst @@ -6,7 +6,29 @@ figure :mod:`matplotlib.figure` ======================== +.. currentmodule:: matplotlib.figure + .. automodule:: matplotlib.figure - :members: - :undoc-members: - :show-inheritance: + :no-members: + :no-inherited-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + AxesStack + Figure + SubplotParams + +Functions +--------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + figaspect + \ No newline at end of file diff --git a/doc/api/gridspec_api.rst b/doc/api/gridspec_api.rst index d4771f02ebdd..133ffed6ac35 100644 --- a/doc/api/gridspec_api.rst +++ b/doc/api/gridspec_api.rst @@ -2,11 +2,23 @@ gridspec ******** - :mod:`matplotlib.gridspec` ========================== +.. currentmodule:: matplotlib.gridspec + .. automodule:: matplotlib.gridspec - :members: - :undoc-members: - :show-inheritance: + :no-members: + :no-inherited-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + GridSpec + SubplotSpec + GridSpecBase + GridSpecFromSubplotSpec diff --git a/doc/api/image_api.rst b/doc/api/image_api.rst new file mode 100644 index 000000000000..15afe2e8a1b6 --- /dev/null +++ b/doc/api/image_api.rst @@ -0,0 +1,12 @@ +***** +image +***** + + +:mod:`matplotlib.image` +======================= + +.. automodule:: matplotlib.image + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/index.rst b/doc/api/index.rst index bf651a17d6b0..30668cdfdddd 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -26,22 +26,53 @@ collections_api.rst colorbar_api.rst colors_api.rst + contour_api.rst + container_api.rst dates_api.rst + dviread.rst figure_api.rst finance_api.rst font_manager_api.rst gridspec_api.rst + image_api.rst legend_api.rst + lines_api.rst markers_api.rst mathtext_api.rst mlab_api.rst + offsetbox_api.rst + patches_api.rst path_api.rst patheffects_api.rst - pyplot_api.rst + projections_api.rst + rcsetup_api.rst sankey_api.rst + scale_api.rst spines_api.rst + style_api.rst + text_api.rst ticker_api.rst tight_layout_api.rst + transformations.rst tri_api.rst + type1font.rst units_api.rst widgets_api.rst + +.. currentmodule:: matplotlib + +.. autosummary:: + :toctree: _as_gen + :template: autofunctions.rst + + pyplot + + +Toolkits +-------- + +.. toctree:: + :maxdepth: 1 + + toolkits/axes_grid.rst + toolkits/mplot3d.rst diff --git a/doc/api/index_backend_api.rst b/doc/api/index_backend_api.rst index 6dbccb231280..8588628c7c01 100644 --- a/doc/api/index_backend_api.rst +++ b/doc/api/index_backend_api.rst @@ -5,10 +5,15 @@ backends .. toctree:: backend_bases_api.rst + backend_managers_api.rst + backend_mixed_api.rst + backend_tools_api.rst backend_gtkagg_api.rst backend_qt4agg_api.rst + backend_qt5agg_api.rst backend_wxagg_api.rst backend_pdf_api.rst + backend_svg_api.rst .. backend_webagg.rst dviread.rst type1font.rst diff --git a/doc/api/legend_api.rst b/doc/api/legend_api.rst index a72da7b84a61..9893ae31dc78 100644 --- a/doc/api/legend_api.rst +++ b/doc/api/legend_api.rst @@ -1,6 +1,6 @@ -****** -Legend -****** +************************* +legend and legend_handler +************************* :mod:`matplotlib.legend` diff --git a/doc/api/lines_api.rst b/doc/api/lines_api.rst new file mode 100644 index 000000000000..01cd114e64c8 --- /dev/null +++ b/doc/api/lines_api.rst @@ -0,0 +1,33 @@ +***** +lines +***** + + +:mod:`matplotlib.lines` +======================== + +.. currentmodule:: matplotlib.lines + +.. automodule:: matplotlib.lines + :no-members: + :no-inherited-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + Line2D + VertexSelector + +Functions +--------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + segment_hits + \ No newline at end of file diff --git a/doc/api/markers_api.rst b/doc/api/markers_api.rst index 11e35f98638e..1b52bbacf57f 100644 --- a/doc/api/markers_api.rst +++ b/doc/api/markers_api.rst @@ -1,12 +1,22 @@ ******* -Markers +markers ******* :mod:`matplotlib.markers` ========================= +.. currentmodule:: matplotlib.markers + .. automodule:: matplotlib.markers - :members: - :undoc-members: - :show-inheritance: + :no-members: + :no-inherited-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + MarkerStyle diff --git a/doc/api/matplotlib_configuration_api.rst b/doc/api/matplotlib_configuration_api.rst index 9f0ad3678ffb..26ce3ac57edf 100644 --- a/doc/api/matplotlib_configuration_api.rst +++ b/doc/api/matplotlib_configuration_api.rst @@ -12,21 +12,15 @@ The top level :mod:`matplotlib` module An instance of :class:`RcParams` for handling default matplotlib values. -.. autofunction:: rc - -.. autofunction::rcdefaults - -.. autofunction::rc_file +.. autofunction:: rc_context -.. autofunction::rc_context - -.. autofunction:: matplotlib_fname +.. autofunction:: rc -.. autofunction::rc_file_defaults +.. autofunction:: rc_file -.. autofunction::interactive +.. autofunction:: rcdefaults -.. autofunction::is_interactive +.. autofunction:: rc_file_defaults .. autoclass:: RcParams @@ -34,4 +28,8 @@ The top level :mod:`matplotlib` module .. autofunction:: rc_params_from_file -.. autoclass:: rc_context +.. autofunction:: matplotlib_fname + +.. autofunction:: interactive + +.. autofunction:: is_interactive diff --git a/doc/api/offsetbox_api.rst b/doc/api/offsetbox_api.rst new file mode 100644 index 000000000000..1ed7e55504db --- /dev/null +++ b/doc/api/offsetbox_api.rst @@ -0,0 +1,12 @@ +********* +offsetbox +********* + + +:mod:`matplotlib.offsetbox` +=========================== + +.. automodule:: matplotlib.offsetbox + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/patches_api.rst b/doc/api/patches_api.rst new file mode 100644 index 000000000000..167e7a42c871 --- /dev/null +++ b/doc/api/patches_api.rst @@ -0,0 +1,52 @@ +******* +patches +******* + + +:mod:`matplotlib.patches` +========================= + +.. currentmodule:: matplotlib.patches + +.. automodule:: matplotlib.patches + :no-members: + :no-inherited-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + Arc + Arrow + ArrowStyle + BoxStyle + Circle + CirclePolygon + ConnectionPatch + ConnectionStyle + Ellipse + FancyArrow + FancyArrowPatch + FancyBboxPatch + Patch + PathPatch + Polygon + Rectangle + RegularPolygon + Shadow + Wedge + YAArrow + +Functions +--------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autosummary.rst + + bbox_artist + draw_bbox + diff --git a/doc/api/projections_api.rst b/doc/api/projections_api.rst new file mode 100644 index 000000000000..bf4bbd8c31a8 --- /dev/null +++ b/doc/api/projections_api.rst @@ -0,0 +1,19 @@ +*********** +projections +*********** + + +:mod:`matplotlib.projections` +============================= + +.. automodule:: matplotlib.projections + :members: + :show-inheritance: + + +:mod:`matplotlib.projections.polar` +=================================== + +.. automodule:: matplotlib.projections.polar + :members: + :show-inheritance: diff --git a/doc/api/pyplot_api.rst b/doc/api/pyplot_api.rst deleted file mode 100644 index 94e3baac26f0..000000000000 --- a/doc/api/pyplot_api.rst +++ /dev/null @@ -1,13 +0,0 @@ -****** -pyplot -****** - - -:mod:`matplotlib.pyplot` -======================== - -.. automodule:: matplotlib.pyplot - :members: - :undoc-members: - :show-inheritance: - :exclude-members: plotting, colormaps diff --git a/doc/api/pyplot_summary.rst b/doc/api/pyplot_summary.rst index 7236fa864ccc..db513d8c2660 100644 --- a/doc/api/pyplot_summary.rst +++ b/doc/api/pyplot_summary.rst @@ -1,8 +1,43 @@ -Plotting commands summary -========================= +Below we describe several common approaches to plotting with Matplotlib. + +.. contents:: + +The Pyplot API +-------------- + +The :mod:`matplotlib.pyplot` module contains functions that allow you to generate +many kinds of plots quickly. For examples that showcase the use +of the :mod:`matplotlib.pyplot` module, see the +:ref:`sphx_glr_tutorials_introductory_pyplot.py` +or the :ref:`pyplots_examples`. We also recommend that you look into +the object-oriented approach to plotting, described below. .. currentmodule:: matplotlib.pyplot .. autofunction:: plotting +The Object-Oriented API +----------------------- + +Most of these functions also exist as methods in the +:class:`matplotlib.axes.Axes` class. You can use them with the +"Object Oriented" approach to Matplotlib. + +While it is easy to quickly generate plots with the +:mod:`matplotlib.pyplot` module, +we recommend using the object-oriented approach for more control +and customization of your plots. See the methods in the +:meth:`matplotlib.axes.Axes` class for many of the same plotting functions. +For examples of the OO approach to Matplotlib, see the +:ref:`API Examples`. + +Colors in Matplotlib +-------------------- + +There are many colormaps you can use to map data onto color values. +Below we list several ways in which color can be utilized in Matplotlib. + +For a more in-depth look at colormaps, see the +:ref:`sphx_glr_tutorials_colors_colormaps.py` tutorial. + .. autofunction:: colormaps diff --git a/doc/api/rcsetup_api.rst b/doc/api/rcsetup_api.rst new file mode 100644 index 000000000000..b0c30d8a6e8e --- /dev/null +++ b/doc/api/rcsetup_api.rst @@ -0,0 +1,12 @@ +******* +rcsetup +******* + + +:mod:`matplotlib.rcsetup` +========================= + +.. automodule:: matplotlib.rcsetup + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/scale_api.rst b/doc/api/scale_api.rst new file mode 100644 index 000000000000..07778d04856b --- /dev/null +++ b/doc/api/scale_api.rst @@ -0,0 +1,12 @@ +***** +scale +***** + + +:mod:`matplotlib.scale` +======================= + +.. automodule:: matplotlib.scale + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/style_api.rst b/doc/api/style_api.rst new file mode 100644 index 000000000000..10576f4559d6 --- /dev/null +++ b/doc/api/style_api.rst @@ -0,0 +1,21 @@ +***** +style +***** + + +:mod:`matplotlib.style` +======================= + +.. automodule:: matplotlib.style + :members: + :undoc-members: + :show-inheritance: + :imported-members: + +.. data:: matplotlib.style.library + + Dictionary of available styles + +.. data:: matplotlib.style.available + + List of available styles diff --git a/doc/api/text_api.rst b/doc/api/text_api.rst new file mode 100644 index 000000000000..19ec2f8d833c --- /dev/null +++ b/doc/api/text_api.rst @@ -0,0 +1,12 @@ +**** +text +**** + + +:mod:`matplotlib.text` +======================= + +.. automodule:: matplotlib.text + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/ticker_api.rst b/doc/api/ticker_api.rst index 12214161c330..dae66cf07394 100644 --- a/doc/api/ticker_api.rst +++ b/doc/api/ticker_api.rst @@ -4,7 +4,7 @@ ticker :mod:`matplotlib.ticker` -========================== +======================== .. automodule:: matplotlib.ticker :members: diff --git a/doc/api/toolkits/axes_grid.rst b/doc/api/toolkits/axes_grid.rst new file mode 100644 index 000000000000..ed8692fcc016 --- /dev/null +++ b/doc/api/toolkits/axes_grid.rst @@ -0,0 +1,28 @@ +.. _axes_grid-api-index: + +#################################### +The Matplotlib axes_grid Toolkit API +#################################### + +:Release: |version| +:Date: |today| + +.. currentmodule:: mpl_toolkits + +Axes Grid +--------- +.. note:: + + There is an older version of the AxesGrid toolkit, ``axes_grid`` (instead of + ``axes_grid1``). The old version had a single namespace for all axes_grid + objects, and in the new version this toolkit was broken + into the two modules below. For the documentation on ``axes_grid``, + see the `previous version of the docs + `_. + +.. autosummary:: + :toctree: ../_as_gen + :template: automodule.rst + + axes_grid1 + axisartist diff --git a/doc/api/toolkits/mplot3d.rst b/doc/api/toolkits/mplot3d.rst new file mode 100644 index 000000000000..f66b833ac51b --- /dev/null +++ b/doc/api/toolkits/mplot3d.rst @@ -0,0 +1,124 @@ +.. _toolkit_mplot3d-api: + +*********** +mplot3d API +*********** + +.. contents:: + :backlinks: none + +.. currentmodule:: mpl_toolkits.mplot3d + +.. _toolkit_mplot3d-axesapi: + +:mod:`~mpl_toolkits.mplot3d.axes3d` +=================================== + +.. note:: + Significant effort went into bringing axes3d to feature-parity with + regular axes objects for version 1.1.0. However, more work remains. + Please report any functions that do not behave as expected as a bug. + In addition, help and patches would be greatly appreciated! + +.. autosummary:: + :toctree: ../_as_gen + :template: autosummary.rst + + axes3d.Axes3D + + +.. _toolkit_mplot3d-axisapi: + +:mod:`~mpl_toolkits.mplot3d.axis3d` +=================================== + +.. note:: + See :attr:`mpl_toolkits.mplot3d.axis3d._axinfo` for a dictionary containing + constants that may be modified for controlling the look and feel + of mplot3d axes (e.g., label spacing, font colors and panel colors). + Historically, axis3d has suffered from having hard-coded constants + that precluded user adjustments, and this dictionary was implemented + in version 1.1 as a stop-gap measure. + + +.. autosummary:: + :toctree: ../_as_gen + :template: autosummary.rst + + axis3d.Axis + + +.. _toolkit_mplot3d-artapi: + +:mod:`~mpl_toolkits.mplot3d.art3d` +================================== + +.. autosummary:: + :toctree: ../_as_gen + :template: autosummary.rst + + art3d.Line3D + art3d.Line3DCollection + art3d.Patch3D + art3d.Patch3DCollection + art3d.Path3DCollection + art3d.PathPatch3D + art3d.Poly3DCollection + art3d.Text3D + + +Art3D Utility Functions +======================= + +.. autosummary:: + :toctree: ../_as_gen + :template: autosummary.rst + + art3d.get_colors + art3d.get_dir_vector + art3d.get_patch_verts + art3d.iscolor + art3d.juggle_axes + art3d.line_2d_to_3d + art3d.line_collection_2d_to_3d + art3d.norm_angle + art3d.norm_text_angle + art3d.patch_2d_to_3d + art3d.patch_collection_2d_to_3d + art3d.path_to_3d_segment + art3d.path_to_3d_segment_with_codes + art3d.pathpatch_2d_to_3d + art3d.paths_to_3d_segments + art3d.paths_to_3d_segments_with_codes + art3d.poly_collection_2d_to_3d + art3d.rotate_axes + art3d.text_2d_to_3d + art3d.zalpha + +.. _toolkit_mplot3d-projapi: + +:mod:`~mpl_toolkits.mplot3d.proj3d` +=================================== + +.. autosummary:: + :toctree: ../_as_gen + :template: autosummary.rst + + proj3d.inv_transform + proj3d.line2d + proj3d.line2d_dist + proj3d.line2d_seg_dist + proj3d.mod + proj3d.persp_transformation + proj3d.proj_points + proj3d.proj_trans_clip_points + proj3d.proj_trans_points + proj3d.proj_transform + proj3d.proj_transform_clip + proj3d.proj_transform_vec + proj3d.proj_transform_vec_clip + proj3d.rot_x + proj3d.transform + proj3d.vec_pad_ones + proj3d.view_transformation + proj3d.world_transformation diff --git a/doc/devel/transformations.rst b/doc/api/transformations.rst similarity index 100% rename from doc/devel/transformations.rst rename to doc/api/transformations.rst diff --git a/doc/api/type1font.rst b/doc/api/type1font.rst index 2422038835d0..bd4501bbd91b 100644 --- a/doc/api/type1font.rst +++ b/doc/api/type1font.rst @@ -1,3 +1,6 @@ +**************** +type1font +**************** :mod:`matplotlib.type1font` =========================== diff --git a/doc/conf.py b/doc/conf.py index bf15c3faf325..818238642257 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,6 +14,9 @@ import os import sys import sphinx +import six +from glob import glob +from sphinx_gallery.sorting import ExplicitOrder # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -28,32 +31,111 @@ extensions = ['matplotlib.sphinxext.mathmpl', 'sphinxext.math_symbol_table', 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives', 'sphinx.ext.doctest', 'sphinx.ext.autosummary', + 'sphinx.ext.inheritance_diagram', 'sphinx.ext.intersphinx', + 'sphinx_gallery.gen_gallery', 'matplotlib.sphinxext.plot_directive', - 'sphinx.ext.inheritance_diagram', - 'sphinxext.gen_gallery', 'sphinxext.gen_rst', 'sphinxext.github', 'numpydoc'] - -# Use IPython's console highlighting by default +exclude_patterns = ['api/api_changes/*', 'users/whats_new/*'] + + +def _check_deps(): + names = ["colorspacious", + "IPython.sphinxext.ipython_console_highlighting", + "matplotlib", + "numpydoc", + "PIL.Image", + "scipy", + "sphinx_gallery"] + if sys.version_info < (3, 3): + names.append("mock") + missing = [] + for name in names: + try: + __import__(name) + except ImportError: + missing.append(name) + if missing: + raise ImportError( + "The following dependencies are missing to build the " + "documentation: {}".format(", ".join(missing))) + +_check_deps() + +import matplotlib try: - from IPython.sphinxext import ipython_console_highlighting + from unittest.mock import MagicMock except ImportError: - extensions.append('matplotlib.sphinxext.ipython_console_highlighting') -else: - print("Using IPython's ipython_console_highlighting directive") - extensions.append('IPython.sphinxext.ipython_console_highlighting') + from mock import MagicMock -try: - import numpydoc -except ImportError: - raise ImportError("No module named numpydoc - you need to install " - "numpydoc to build the documentation.") + +# Use IPython's console highlighting by default +extensions.extend(['IPython.sphinxext.ipython_console_highlighting', + 'IPython.sphinxext.ipython_directive']) + +if six.PY2: + from distutils.spawn import find_executable + has_dot = find_executable('dot') is not None +else: + from shutil import which # Python >= 3.3 + has_dot = which('dot') is not None +if not has_dot: + raise OSError( + "No binary named dot - you need to install the Graph Visualization " + "software (usually packaged as 'graphviz') to build the documentation") autosummary_generate = True autodoc_docstring_signature = True +autodoc_default_flags = ['members', 'undoc-members'] + +intersphinx_mapping = { + 'python': ('https://docs.python.org/', None), + 'numpy': ('https://docs.scipy.org/doc/numpy/', None), + 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None), + 'pandas': ('http://pandas.pydata.org/pandas-docs/stable', None) + } + +explicit_order_folders = [ + '../examples/api', + '../examples/pyplots', + '../examples/subplots_axes_and_figures', + '../examples/color', + '../examples/statistics', + '../examples/lines_bars_and_markers', + '../examples/images_contours_and_fields', + '../examples/shapes_and_collections', + '../examples/text_labels_and_annotations', + '../examples/pie_and_polar_charts', + '../examples/style_sheets', + '../examples/axes_grid', + '../examples/showcase', + '../tutorials/introductory', + '../tutorials/intermediate', + '../tutorials/advanced'] +for folder in sorted(glob('../examples/*') + glob('../tutorials/*')): + if not os.path.isdir(folder) or folder in explicit_order_folders: + continue + explicit_order_folders.append(folder) + +# Sphinx gallery configuration +sphinx_gallery_conf = { + 'examples_dirs': ['../examples', '../tutorials'], + 'filename_pattern': '^((?!sgskip).)*$', + 'gallery_dirs': ['gallery', 'tutorials'], + 'doc_module': ('matplotlib', 'mpl_toolkits'), + 'reference_url': { + 'matplotlib': None, + 'numpy': 'https://docs.scipy.org/doc/numpy', + 'scipy': 'https://docs.scipy.org/doc/scipy/reference', + }, + 'backreferences_dir': 'api/_as_gen', + 'subsection_order': ExplicitOrder(explicit_order_folders) +} + +plot_gallery = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -69,17 +151,14 @@ # General substitutions. project = 'Matplotlib' -copyright = '2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2014 The matplotlib development team' +copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, ' + 'Michael Droettboom and the Matplotlib development ' + 'team; 2012 - 2017 The Matplotlib development team') # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # # The short X.Y version. -try: - import matplotlib -except ImportError: - msg = "Error: matplotlib must be installed before building the documentation" - sys.exit(msg) version = matplotlib.__version__ # The full version, including alpha/beta/rc tags. @@ -113,34 +192,11 @@ # Plot directive configuration # ---------------------------- -plot_formats = [('png', 80), ('hires.png', 200), ('pdf', 50)] - -# Subdirectories in 'examples/' directory of package and titles for gallery -mpl_example_sections = ( - ('lines_bars_and_markers', 'Lines, bars, and markers'), - ('shapes_and_collections', 'Shapes and collections'), - ('statistics', 'Statistical plots'), - ('images_contours_and_fields', 'Images, contours, and fields'), - ('pie_and_polar_charts', 'Pie and polar charts'), - ('color', 'Color'), - ('text_labels_and_annotations', 'Text, labels, and annotations'), - ('ticks_and_spines', 'Ticks and spines'), - ('subplots_axes_and_figures', 'Subplots, axes, and figures'), - ('style_sheets', 'Style sheets'), - ('specialty_plots', 'Specialty plots'), - ('showcase', 'Showcase'), - ('api', 'API'), - ('pylab_examples', 'pylab examples'), - ('mplot3d', 'mplot3d toolkit'), - ('axes_grid', 'axes_grid toolkit'), - ('units', 'units'), - ('widgets', 'widgets'), - ) - +plot_formats = [('png', 100), ('pdf', 100)] # Github extension -github_project_url = "http://github.com/matplotlib/matplotlib/" +github_project_url = "https://github.com/matplotlib/matplotlib/" # Options for HTML output # ----------------------- @@ -183,14 +239,16 @@ #html_sidebars = {} # Custom sidebar templates, maps page names to templates. -html_sidebars = {'index': 'indexsidebar.html', - } - +html_sidebars = { + 'index': ['badgesidebar.html','donate_sidebar.html', + 'indexsidebar.html', 'searchbox.html'], + '**': ['badgesidebar.html', 'localtoc.html', + 'relations.html', 'sourcelink.html', 'searchbox.html'] +} # Additional templates that should be rendered to pages, maps page names to # template names. html_additional_pages = {'index': 'index.html', - 'gallery':'gallery.html', 'citing': 'citing.html'} # If false, no module index is generated. @@ -207,6 +265,8 @@ # Output file base name for HTML help builder. htmlhelp_basename = 'Matplotlibdoc' +# Path to favicon +html_favicon = '_static/favicon.ico' # Options for LaTeX output # ------------------------ @@ -214,16 +274,13 @@ # The paper size ('letter' or 'a4'). latex_paper_size = 'letter' -# The font size ('10pt', '11pt' or '12pt'). -latex_font_size = '11pt' - # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('contents', 'Matplotlib.tex', 'Matplotlib', - 'John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the ' - 'matplotlib development team', 'manual'), + ('contents', 'Matplotlib.tex', 'Matplotlib', + 'John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the ' + 'matplotlib development team', 'manual'), ] @@ -231,8 +288,9 @@ # the title page. latex_logo = None +latex_elements = {} # Additional stuff for the LaTeX preamble. -latex_preamble =r""" +latex_elements['preamble'] = r""" % In the parameters section, place a newline after the Parameters % header. (This is stolen directly from Numpy's conf.py, since it % affects Numpy-style docstrings). @@ -252,6 +310,7 @@ \usepackage{enumitem} \setlistdepth{2048} """ +latex_elements['pointsize'] = '11pt' # Documents to append as an appendix to all manuals. latex_appendices = [] @@ -259,7 +318,10 @@ # If false, no module index is generated. latex_use_modindex = True -latex_use_parts = True +if hasattr(sphinx, 'version_info') and sphinx.version_info[:2] >= (1, 4): + latex_toplevel_sectioning = 'part' +else: + latex_use_parts = True # Show both class-level docstring and __init__ docstring in class # documentation @@ -270,13 +332,151 @@ """ % matplotlib.__version__numpy__ texinfo_documents = [ - ("contents", 'matplotlib', 'Matplotlib Documentation', - 'John Hunter@*Darren Dale@*Eric Firing@*Michael Droettboom@*' - 'The matplotlib development team', - 'Matplotlib', "Python plotting package", 'Programming', - 1), + ("contents", 'matplotlib', 'Matplotlib Documentation', + 'John Hunter@*Darren Dale@*Eric Firing@*Michael Droettboom@*' + 'The matplotlib development team', + 'Matplotlib', "Python plotting package", 'Programming', + 1), ] -################# numpydoc config #################### +class MyWX(MagicMock): + class Panel(object): + pass + + class ToolBar(object): + pass + + class Frame(object): + pass + + VERSION_STRING = '2.8.12' + + +class MyPyQt4(MagicMock): + class QtGui(object): + # PyQt4.QtGui public classes. + # Generated with + # textwrap.fill([name for name in dir(PyQt4.QtGui) + # if isinstance(getattr(PyQt4.QtGui, name), type)]) + _QtGui_public_classes = """\ + Display QAbstractButton QAbstractGraphicsShapeItem + QAbstractItemDelegate QAbstractItemView QAbstractPrintDialog + QAbstractProxyModel QAbstractScrollArea QAbstractSlider + QAbstractSpinBox QAbstractTextDocumentLayout QAction QActionEvent + QActionGroup QApplication QBitmap QBoxLayout QBrush QButtonGroup + QCalendarWidget QCheckBox QClipboard QCloseEvent QColor QColorDialog + QColumnView QComboBox QCommandLinkButton QCommonStyle QCompleter + QConicalGradient QContextMenuEvent QCursor QDataWidgetMapper QDateEdit + QDateTimeEdit QDesktopServices QDesktopWidget QDial QDialog + QDialogButtonBox QDirModel QDockWidget QDoubleSpinBox QDoubleValidator + QDrag QDragEnterEvent QDragLeaveEvent QDragMoveEvent QDropEvent + QErrorMessage QFileDialog QFileIconProvider QFileOpenEvent + QFileSystemModel QFocusEvent QFocusFrame QFont QFontComboBox + QFontDatabase QFontDialog QFontInfo QFontMetrics QFontMetricsF + QFormLayout QFrame QGesture QGestureEvent QGestureRecognizer QGlyphRun + QGradient QGraphicsAnchor QGraphicsAnchorLayout QGraphicsBlurEffect + QGraphicsColorizeEffect QGraphicsDropShadowEffect QGraphicsEffect + QGraphicsEllipseItem QGraphicsGridLayout QGraphicsItem + QGraphicsItemAnimation QGraphicsItemGroup QGraphicsLayout + QGraphicsLayoutItem QGraphicsLineItem QGraphicsLinearLayout + QGraphicsObject QGraphicsOpacityEffect QGraphicsPathItem + QGraphicsPixmapItem QGraphicsPolygonItem QGraphicsProxyWidget + QGraphicsRectItem QGraphicsRotation QGraphicsScale QGraphicsScene + QGraphicsSceneContextMenuEvent QGraphicsSceneDragDropEvent + QGraphicsSceneEvent QGraphicsSceneHelpEvent QGraphicsSceneHoverEvent + QGraphicsSceneMouseEvent QGraphicsSceneMoveEvent + QGraphicsSceneResizeEvent QGraphicsSceneWheelEvent + QGraphicsSimpleTextItem QGraphicsTextItem QGraphicsTransform + QGraphicsView QGraphicsWidget QGridLayout QGroupBox QHBoxLayout + QHeaderView QHelpEvent QHideEvent QHoverEvent QIcon QIconDragEvent + QIconEngine QIconEngineV2 QIdentityProxyModel QImage QImageIOHandler + QImageReader QImageWriter QInputContext QInputContextFactory + QInputDialog QInputEvent QInputMethodEvent QIntValidator QItemDelegate + QItemEditorCreatorBase QItemEditorFactory QItemSelection + QItemSelectionModel QItemSelectionRange QKeyEvent QKeyEventTransition + QKeySequence QLCDNumber QLabel QLayout QLayoutItem QLineEdit + QLinearGradient QListView QListWidget QListWidgetItem QMainWindow + QMatrix QMatrix2x2 QMatrix2x3 QMatrix2x4 QMatrix3x2 QMatrix3x3 + QMatrix3x4 QMatrix4x2 QMatrix4x3 QMatrix4x4 QMdiArea QMdiSubWindow + QMenu QMenuBar QMessageBox QMimeSource QMouseEvent + QMouseEventTransition QMoveEvent QMovie QPageSetupDialog QPaintDevice + QPaintEngine QPaintEngineState QPaintEvent QPainter QPainterPath + QPainterPathStroker QPalette QPanGesture QPen QPicture QPictureIO + QPinchGesture QPixmap QPixmapCache QPlainTextDocumentLayout + QPlainTextEdit QPolygon QPolygonF QPrintDialog QPrintEngine + QPrintPreviewDialog QPrintPreviewWidget QPrinter QPrinterInfo + QProgressBar QProgressDialog QProxyModel QPushButton QPyTextObject + QQuaternion QRadialGradient QRadioButton QRawFont QRegExpValidator + QRegion QResizeEvent QRubberBand QScrollArea QScrollBar + QSessionManager QShortcut QShortcutEvent QShowEvent QSizeGrip + QSizePolicy QSlider QSortFilterProxyModel QSound QSpacerItem QSpinBox + QSplashScreen QSplitter QSplitterHandle QStackedLayout QStackedWidget + QStandardItem QStandardItemModel QStaticText QStatusBar + QStatusTipEvent QStringListModel QStyle QStyleFactory QStyleHintReturn + QStyleHintReturnMask QStyleHintReturnVariant QStyleOption + QStyleOptionButton QStyleOptionComboBox QStyleOptionComplex + QStyleOptionDockWidget QStyleOptionDockWidgetV2 QStyleOptionFocusRect + QStyleOptionFrame QStyleOptionFrameV2 QStyleOptionFrameV3 + QStyleOptionGraphicsItem QStyleOptionGroupBox QStyleOptionHeader + QStyleOptionMenuItem QStyleOptionProgressBar QStyleOptionProgressBarV2 + QStyleOptionRubberBand QStyleOptionSizeGrip QStyleOptionSlider + QStyleOptionSpinBox QStyleOptionTab QStyleOptionTabBarBase + QStyleOptionTabBarBaseV2 QStyleOptionTabV2 QStyleOptionTabV3 + QStyleOptionTabWidgetFrame QStyleOptionTabWidgetFrameV2 + QStyleOptionTitleBar QStyleOptionToolBar QStyleOptionToolBox + QStyleOptionToolBoxV2 QStyleOptionToolButton QStyleOptionViewItem + QStyleOptionViewItemV2 QStyleOptionViewItemV3 QStyleOptionViewItemV4 + QStylePainter QStyledItemDelegate QSwipeGesture QSyntaxHighlighter + QSystemTrayIcon QTabBar QTabWidget QTableView QTableWidget + QTableWidgetItem QTableWidgetSelectionRange QTabletEvent + QTapAndHoldGesture QTapGesture QTextBlock QTextBlockFormat + QTextBlockGroup QTextBlockUserData QTextBrowser QTextCharFormat + QTextCursor QTextDocument QTextDocumentFragment QTextDocumentWriter + QTextEdit QTextFormat QTextFragment QTextFrame QTextFrameFormat + QTextImageFormat QTextInlineObject QTextItem QTextLayout QTextLength + QTextLine QTextList QTextListFormat QTextObject QTextObjectInterface + QTextOption QTextTable QTextTableCell QTextTableCellFormat + QTextTableFormat QTimeEdit QToolBar QToolBox QToolButton QToolTip + QTouchEvent QTransform QTreeView QTreeWidget QTreeWidgetItem + QTreeWidgetItemIterator QUndoCommand QUndoGroup QUndoStack QUndoView + QVBoxLayout QValidator QVector2D QVector3D QVector4D QWhatsThis + QWhatsThisClickedEvent QWheelEvent QWidget QWidgetAction QWidgetItem + QWindowStateChangeEvent QWizard QWizardPage QWorkspace + QX11EmbedContainer QX11EmbedWidget QX11Info + """ + for _name in _QtGui_public_classes.split(): + locals()[_name] = type(_name, (), {}) + del _name + + +class MySip(MagicMock): + def getapi(*args): + return 1 + + +mockwxversion = MagicMock() +mockwx = MyWX() +mocksip = MySip() +mockpyqt4 = MyPyQt4() +sys.modules['wxversion'] = mockwxversion +sys.modules['wx'] = mockwx +sys.modules['sip'] = mocksip +sys.modules['PyQt4'] = mockpyqt4 + +# numpydoc config + numpydoc_show_class_members = False + +# Skip deprecated members + +def skip_deprecated(app, what, name, obj, skip, options): + if skip: + return skip + skipped = {"matplotlib.colors": ["ColorConverter", "hex2color", "rgb2hex"]} + skip_list = skipped.get(getattr(obj, "__module__", None)) + if skip_list is not None: + return getattr(obj, "__name__", None) in skip_list + +def setup(app): + app.connect('autodoc-skip-member', skip_deprecated) diff --git a/doc/contents.rst b/doc/contents.rst index 0765e13130f9..72612f7b7694 100644 --- a/doc/contents.rst +++ b/doc/contents.rst @@ -16,11 +16,11 @@ Overview users/index.rst faq/index.rst - resources/index.rst - devel/index.rst mpl_toolkits/index.rst + resources/index.rst + thirdpartypackages/index.rst api/index.rst - examples/index.rst + devel/index.rst glossary/index.rst .. htmlonly:: diff --git a/doc/devel/MEP/MEP08.rst b/doc/devel/MEP/MEP08.rst new file mode 100644 index 000000000000..072a279eacf9 --- /dev/null +++ b/doc/devel/MEP/MEP08.rst @@ -0,0 +1,58 @@ +============ + MEP8: PEP8 +============ + +.. contents:: + :local: + + +Status +====== + +**Discussion** + +Branches and Pull requests +========================== + +None so far. + +Abstract +======== + +The matplotlib codebase predates PEP8, and therefore is less than +consistent style-wise in some areas. Bringing the codebase into +compliance with PEP8 would go a long way to improving its legibility. + +Detailed description +==================== + +Some files use four space indentation, some use three. Some use +different levels in the same file. + +For the most part, class/function/variable naming follows PEP8, but it +wouldn't hurt to fix where necessary. + +Implementation +============== + +The implementation should be fairly mechanical: running the pep8 tool +over the code and fixing where appropriate. + +This should be merged in after the 2.0 release, since the changes will +likely make merging any pending pull requests more difficult. + +Additionally, and optionally, PEP8 compliance could be tracked by an +automated build system. + +Backward compatibility +====================== + +Public names of classes and functions that require change (there +shouldn't be many of these) should first be deprecated and then +removed in the next release cycle. + +Alternatives +============ + +PEP8 is a popular standard for Python code style, blessed by the +Python core developers, making any alternatives less desirable. diff --git a/doc/devel/MEP/MEP09.rst b/doc/devel/MEP/MEP09.rst new file mode 100644 index 000000000000..b7e0ca7a39b7 --- /dev/null +++ b/doc/devel/MEP/MEP09.rst @@ -0,0 +1,220 @@ +================================== + MEP9: Global interaction manager +================================== + +.. contents:: + :local: + +Add a global manager for all user interactivity with artists; make any +artist resizeable, moveable, highlightable, and selectable as desired +by the user. + +Status +====== +**Discussion** + +Branches and Pull requests +========================== +https://github.com/dhyams/matplotlib/tree/MEP9 + +Abstract +======== + +The goal is to be able to interact with matplotlib artists in a very +similar way as drawing programs do. When appropriate, the user should +be able to move, resize, or select an artist that is already on the +canvas. Of course, the script writer is ultimately in control of +whether an artist is able to be interacted with, or whether it is +static. + +This code to do this has already been privately implemented and +tested, and would need to be migrated from its current "mixin" +implementation, to a bona-fide part of matplotlib. + +The end result would be to have four new keywords available to +matplotlib.artist.Artist: _moveable_, _resizeable_, _selectable_, and +_highlightable_. Setting any one of these keywords to True would +activate interactivity for that artist. + +In effect, this MEP is a logical extension of event handling in +matplotlib; matplotlib already supports "low level" interactions like +left mouse presses, a key press, or similar. The MEP extends the +support to the logical level, where callbacks are performed on the +artists when certain interactive gestures from the user are detected. + +Detailed description +==================== + +This new functionality would be used to allow the end-user to better +interact with the graph. Many times, a graph is almost what the user +wants, but a small repositioning and/or resizing of components is +necessary. Rather than force the user to go back to the script to +trial-and-error the location, and simple drag and drop would be +appropriate. + +Also, this would better support applications that use matplotlib; +here, the end-user has no reasonable access or desire to edit the +underlying source in order to fine-tune a plot. Here, if matplotlib +offered the capability, one could move or resize artists on the canvas +to suit their needs. Also, the user should be able to highlight (with +a mouse over) an artist, and select it with a double-click, if the +application supports that sort of thing. In this MEP, we also want to +support the highlighting and selection natively; it is up to +application to handle what happens when the artist is selected. A +typical handling would be to display a dialog to edit the properties +of the artist. + +In the future, as well (this is not part of this MEP), matplotlib +could offer backend-specific property dialogs for each artist, which +are raised on artist selection. This MEP would be a necessary +stepping stone for that sort of capability. + +There are currently a few interactive capabilities in matplotlib +(e.g. legend.draggable()), but they tend to be scattered and are not +available for all artists. This MEP seeks to unify the interactive +interface and make it work for all artists. + +The current MEP also includes grab handles for resizing artists, and +appropriate boxes drawn when artists are moved or resized. + +Implementation +============== +* Add appropriate methods to the "tree" of artists so that the + interactivity manager has a consistent interface for the + interactivity manager to deal with. The proposed methods to add to + the artists, if they are to support interactivity, are: + + * get_pixel_position_ll(self): get the pixel position of the lower + left corner of the artist's bounding box + * get_pixel_size(self): get the size of the artist's bounding box, + in pixels + * set_pixel_position_and_size(self,x,y,dx,dy): set the new size of + the artist, such that it fits within the specified bounding box. + +* add capability to the backends to 1) provide cursors, since these + are needed for visual indication of moving/resizing, and 2) provide + a function that gets the current mouse position +* Implement the manager. This has already been done privately (by + dhyams) as a mixin, and has been tested quite a bit. The goal would + be to move the functionality of the manager into the artists so that + it is in matplotlib properly, and not as a "monkey patch" as I + currently have it coded. + + + +Current summary of the mixin +============================ + +(Note that this mixin is for now just private code, but can be added +to a branch obviously) + +InteractiveArtistMixin: + +Mixin class to make any generic object that is drawn on a matplotlib +canvas moveable and possibly resizeable. The Powerpoint model is +followed as closely as possible; not because I'm enamoured with +Powerpoint, but because that's what most people understand. An artist +can also be selectable, which means that the artist will receive the +on_activated() callback when double clicked. Finally, an artist can +be highlightable, which means that a highlight is drawn on the artist +whenever the mouse passes over. Typically, highlightable artists will +also be selectable, but that is left up to the user. So, basically +there are four attributes that can be set by the user on a per-artist +basis: + +* highlightable +* selectable +* moveable +* resizeable + +To be moveable (draggable) or resizeable, the object that is the +target of the mixin must support the following protocols: + +* get_pixel_position_ll(self) +* get_pixel_size(self) +* set_pixel_position_and_size(self,x,y,sx,sy) + +Note that nonresizeable objects are free to ignore the sx and sy +parameters. To be highlightable, the object that is the target of the +mixin must also support the following protocol: + +* get_highlight(self) + +Which returns a list of artists that will be used to draw the highlight. + +If the object that is the target of the mixin is not an matplotlib +artist, the following protocols must also be implemented. Doing so is +usually fairly trivial, as there has to be an artist *somewhere* that +is being drawn. Typically your object would just route these calls to +that artist. + +* get_figure(self) +* get_axes(self) +* contains(self,event) +* set_animated(self,flag) +* draw(self,renderer) +* get_visible(self) + +The following notifications are called on the artist, and the artist +can optionally implement these. + +* on_select_begin(self) +* on_select_end(self) +* on_drag_begin(self) +* on_drag_end(self) +* on_activated(self) +* on_highlight(self) +* on_right_click(self,event) +* on_left_click(self,event) +* on_middle_click(self,event) +* on_context_click(self,event) +* on_key_up(self,event) +* on_key_down(self,event) + +The following notifications are called on the canvas, if no +interactive artist handles the event: + +* on_press(self,event) +* on_left_click(self,event) +* on_middle_click(self,event) +* on_right_click(self,event) +* on_context_click(self,event) +* on_key_up(self,event) +* on_key_down(self,event) + +The following functions, if present, can be used to modify the +behavior of the interactive object: + +* press_filter(self,event) # determines if the object wants to have + the press event routed to it +* handle_unpicked_cursor() # can be used by the object to set a cursor + as the cursor passes over the object when it is unpicked. + +Supports multiple canvases, maintaining a drag lock, motion notifier, +and a global "enabled" flag per canvas. Supports fixed aspect ratio +resizings by holding the shift key during the resize. + +Known problems: + +* Zorder is not obeyed during the selection/drag operations. Because + of the blit technique used, I do not believe this can be fixed. The + only way I can think of is to search for all artists that have a + zorder greater then me, set them all to animated, and then redraw + them all on top during each drag refresh. This might be very slow; + need to try. +* the mixin only works for wx backends because of two things: 1) the + cursors are hardcoded, and 2) there is a call to + wx.GetMousePosition() Both of these shortcomings are reasonably + fixed by having each backend supply these things. + +Backward compatibility +====================== + +No problems with backward compatibility, although once this is in +place, it would be appropriate to obsolete some of the existing +interactive functions (like legend.draggable()) + +Alternatives +============ + +None that I know of. diff --git a/doc/devel/MEP/MEP10.rst b/doc/devel/MEP/MEP10.rst new file mode 100644 index 000000000000..dc00e0fb9c0b --- /dev/null +++ b/doc/devel/MEP/MEP10.rst @@ -0,0 +1,193 @@ +============================== + MEP10: Docstring consistency +============================== +.. contents:: + :local: + +Status +====== + +**Progress** + +Targeted for 1.3 + +Branches and Pull requests +========================== + +#1665 +#1757 +#1795 + +Abstract +======== + +matplotlib has a great deal of inconsistency between docstrings. This +not only makes the docs harder to read, but it is harder on +contributors, because they don't know which specifications to follow. +There should be a clear docstring convention that is followed +consistently. + +The organization of the API documentation is difficult to follow. +Some pages, such as pyplot and axes, are enormous and hard to browse. +There should instead be short summary tables that link to detailed +documentation. In addition, some of the docstrings themselves are +quite long and contain redundant information. + +Building the documentation takes a long time and uses a `make.py` +script rather than a Makefile. + +Detailed description +==================== + +There are number of new tools and conventions available since +matplotlib started using Sphinx that make life easier. The following +is a list of proposed changes to docstrings, most of which involve +these new features. + +Numpy docstring format +---------------------- + +`Numpy docstring format +`_: +This format divides the docstring into clear sections, each having +different parsing rules that make the docstring easy to read both as +raw text and as HTML. We could consider alternatives, or invent our +own, but this is a strong choice, as it's well used and understood in +the Numpy/Scipy community. + +Cross references +---------------- + +Most of the docstrings in matplotlib use explicit "roles" when linking +to other items, for example: ``:func:`myfunction```. As of Sphinx +0.4, there is a "default_role" that can be set to "obj", which will +polymorphically link to a Python object of any type. This allows one +to write ```myfunction``` instead. This makes docstrings much easier +to read and edit as raw text. Additionally, Sphinx allows for setting +a current module, so links like ```~matplotlib.axes.Axes.set_xlim``` +could be written as ```~axes.Axes.set_xlim```. + +Overriding signatures +--------------------- + +Many methods in matplotlib use the ``*args`` and ``**kwargs`` syntax +to dynamically handle the keyword arguments that are accepted by the +function, or to delegate on to another function. This, however, is +often not useful as a signature in the documentation. For this +reason, many matplotlib methods include something like:: + + def annotate(self, *args, **kwargs): + """ + Create an annotation: a piece of text referring to a data + point. + + Call signature:: + + annotate(s, xy, xytext=None, xycoords='data', + textcoords='data', arrowprops=None, **kwargs) + """ + +This can't be parsed by Sphinx, and is rather verbose in raw text. As +of Sphinx 1.1, if the `autodoc_docstring_signature` config value is +set to True, Sphinx will extract a replacement signature from the +first line of the docstring, allowing this:: + + def annotate(self, *args, **kwargs): + """ + annotate(s, xy, xytext=None, xycoords='data', + textcoords='data', arrowprops=None, **kwargs) + + Create an annotation: a piece of text referring to a data + point. + """ + +The explicit signature will replace the actual Python one in the +generated documentation. + +Linking rather than duplicating +------------------------------- + +Many of the docstrings include long lists of accepted keywords by +interpolating things into the docstring at load time. This makes the +docstrings very long. Also, since these tables are the same across +many docstrings, it inserts a lot of redundant information in the docs +-- particularly a problem in the printed version. + +These tables should be moved to docstrings on functions whose only +purpose is for help. The docstrings that refer to these tables should +link to them, rather than including them verbatim. + +autosummary extension +--------------------- + +The Sphinx autosummary extension should be used to generate summary +tables, that link to separate pages of documentation. Some classes +that have many methods (e.g. `Axes.axes`) should be documented with +one method per page, whereas smaller classes should have all of their +methods together. + +Examples linking to relevant documentation +------------------------------------------ + +The examples, while helpful at illustrating how to use a feature, do +not link back to the relevant docstrings. This could be addressed by +adding module-level docstrings to the examples, and then including +that docstring in the parsed content on the example page. These +docstrings could easily include references to any other part of the +documentation. + +Documentation using help() vs a browser +--------------------------------------- + +Using Sphinx markup in the source allows for good-looking docs in your +browser, but the markup also makes the raw text returned using help() +look terrible. One of the aims of improving the docstrings should be +to make both methods of accessing the docs look good. + +Implementation +============== + +1. The numpydoc extensions should be turned on for matplotlib. There + is an important question as to whether these should be included in + the matplotlib source tree, or used as a dependency. Installing + Numpy is not sufficient to get the numpydoc extensions -- it's a + separate install procedure. In any case, to the extent that they + require customization for our needs, we should endeavor to submit + those changes upstream and not fork them. + +2. Manually go through all of the docstrings and update them to the + new format and conventions. Updating the cross references (from + ```:func:`myfunc``` to ```func```) may be able to be + semi-automated. This is a lot of busy work, and perhaps this labor + should be divided on a per-module basis so no single developer is + over-burdened by it. + +3. Reorganize the API docs using autosummary and `sphinx-autogen`. + This should hopefully have minimal impact on the narrative + documentation. + +4. Modify the example page generator (`gen_rst.py`) so that it + extracts the module docstring from the example and includes it in a + non-literal part of the example page. + +5. Use `sphinx-quickstart` to generate a new-style Sphinx Makefile. + The following features in the current `make.py` will have to be + addressed in some other way: + + - Copying of some static content + + - Specifying a "small" build (only low-resolution PNG files for examples) + +Steps 1, 2, and 3 are interdependent. 4 and 5 may be done +independently, though 5 has some dependency on 3. + +Backward compatibility +====================== + +As this mainly involves docstrings, there should be minimal impact on +backward compatibility. + +Alternatives +============ + +None yet discussed. diff --git a/doc/devel/MEP/MEP11.rst b/doc/devel/MEP/MEP11.rst new file mode 100644 index 000000000000..4a76d56be792 --- /dev/null +++ b/doc/devel/MEP/MEP11.rst @@ -0,0 +1,170 @@ +================================= + MEP11: Third-party dependencies +================================= + +.. contents:: + :local: + +This MEP attempts to improve the way in which third-party dependencies +in matplotlib are handled. + +Status +====== + +**Completed** -- needs to be merged + +Branches and Pull requests +========================== + +#1157: Use automatic dependency resolution + +#1290: Debundle pyparsing + +#1261: Update six to 1.2 + +Abstract +======== + +One of the goals of matplotlib has been to keep it as easy to install +as possible. To that end, some third-party dependencies are included +in the source tree and, under certain circumstances, installed +alongside matplotlib. This MEP aims to resolve some problems with +that approach, bring some consistency, while continuing to make +installation convenient. + +At the time that was initially done, `setuptools`, `easy_install` and +`PyPI` were not mature enough to be relied on. However, at present, +we should be able to safely leverage the "modern" versions of those +tools, `distribute` and `pip`. + +While matplotlib has dependencies on both Python libraries and C/C++ +libraries, this MEP addresses only the Python libraries so as to not +confuse the issue. C libraries represent a larger and mostly +orthogonal set of problems. + +Detailed description +==================== + +matplotlib depends on the following third-party Python libraries: + + - Numpy + - dateutil (pure Python) + - pytz (pure Python) + - six -- required by dateutil (pure Python) + - pyparsing (pure Python) + - PIL (optional) + - GUI frameworks: pygtk, gobject, tkinter, PySide, PyQt4, wx (all + optional, but one is required for an interactive GUI) + +Current behavior +---------------- + +When installing from source, a `git` checkout or `pip`: + + - `setup.py` attempts to `import numpy`. If this fails, the + installation fails. + + - For each of `dateutil`, `pytz` and `six`, `setup.py` attempts to + import them (from the top-level namespace). If that fails, + matplotlib installs its local copy of the library into the + top-level namespace. + + - `pyparsing` is always installed inside of the matplotlib + namespace. + +This behavior is most surprising when used with `pip`, because no +`pip` dependency resolution is performed, even though it is likely to +work for all of these packages. + +The fact that `pyparsing` is installed in the matplotlib namespace has +reportedly (#1290) confused some users into thinking it is a +matplotlib-related module and import it from there rather than the +top-level. + +When installing using the Windows installer, `dateutil`, `pytz` and +`six` are installed at the top-level *always*, potentially overwriting +already installed copies of those libraries. + +TODO: Describe behavior with the OS-X installer. + +When installing using a package manager (Debian, RedHat, MacPorts +etc.), this behavior actually does the right thing, and there are no +special patches in the matplotlib packages to deal with the fact that +we handle `dateutil`, `pytz` and `six` in this way. However, care +should be taken that whatever approach we move to continues to work in +that context. + +Maintaining these packages in the matplotlib tree and making sure they +are up-to-date is a maintenance burden. Advanced new features that +may require a third-party pure Python library have a higher barrier to +inclusion because of this burden. + + +Desired behavior +---------------- + +Third-party dependencies are downloaded and installed from their +canonical locations by leveraging `pip`, `distribute` and `PyPI`. + +`dateutil`, `pytz`, and `pyparsing` should be made into optional +dependencies -- though obviously some features would fail if they +aren't installed. This will allow the user to decide whether they +want to bother installing a particular feature. + +Implementation +============== + +For installing from source, and assuming the user has all of the +C-level compilers and dependencies, this can be accomplished fairly +easily using `distribute` and following the instructions `here +`_. The only anticipated +change to the matplotlib library code will be to import `pyparsing` +from the top-level namespace rather than from within matplotlib. Note +that `distribute` will also allow us to remove the direct dependency +on `six`, since it is, strictly speaking, only a direct dependency of +`dateutil`. + +For binary installations, there are a number of alternatives (here +ordered from best/hardest to worst/easiest): + + 1. The distutils wininst installer allows a post-install script to + run. It might be possible to get this script to run `pip` to + install the other dependencies. (See `this thread + `_ + for someone who has trod that ground before). + + 2. Continue to ship `dateutil`, `pytz`, `six` and `pyparsing` in + our installer, but use the post-install-script to install them + *only* if they can not already be found. + + 3. Move all of these packages inside a (new) `matplotlib.extern` + namespace so it is clear for outside users that these are + external packages. Add some conditional imports in the core + matplotlib codebase so `dateutil` (at the top-level) is tried + first, and failing that `matplotlib.extern.dateutil` is used. + +2 and 3 are undesirable as they still require maintaining copies of +these packages in our tree -- and this is exacerbated by the fact that +they are used less -- only in the binary installers. None of these 3 +approaches address Numpy, which will still have to be manually +installed using an installer. + +TODO: How does this relate to the Mac OS-X installer? + +Backward compatibility +====================== + +At present, matplotlib can be installed from source on a machine +without the third party dependencies and without an internet +connection. After this change, an internet connection (and a working +PyPI) will be required to install matplotlib for the first time. +(Subsequent matplotlib updates or development work will run without +accessing the network). + +Alternatives +============ + +Distributing binary `eggs` doesn't feel like a usable solution. That +requires getting `easy_install` installed first, and Windows users +generally prefer the well known `.exe` or `.msi` installer that works +out of the box. diff --git a/doc/devel/MEP/MEP12.rst b/doc/devel/MEP/MEP12.rst new file mode 100644 index 000000000000..5f0356f98672 --- /dev/null +++ b/doc/devel/MEP/MEP12.rst @@ -0,0 +1,197 @@ +===================================== + MEP12: Improve Gallery and Examples +===================================== +.. contents:: + :local: + + +Status +====== + +**Progress** + +Initial changes added in 1.3. Conversion of the gallery is on-going. +29 September 2015 - The last `pylab_examples` where `pylab` is imported has been converted over to use `matplotlib pyplot` and `numpy`. + +Branches and Pull requests +========================== + +#1623, #1924, #2181 + +PR `#2474 _ +demonstrates a single example being cleaned up and moved to the +appropriate section. + +Abstract +======== + +Reorganizing the matplotlib plot gallery would greatly simplify +navigation of the gallery. In addition, examples should be cleaned-up +and simplified for clarity. + + +Detailed description +==================== + +The matplotlib gallery was recently set up to split examples up into +sections. As discussed in that PR [1]_, the current example sections +(``api``, ``pylab_examples``) aren't terribly useful to users: New +sections in the gallery would help users find relevant examples. + +These sections would also guide a cleanup of the examples: Initially, +all the current examples would remain and be listed under their +current directories. Over time, these examples could be cleaned up +and moved into one of the new sections. + +This process allows users to easily identify examples that need to be +cleaned up; i.e. anything in the ``api`` and ``pylab_examples`` +directories. + + +Implementation +============== + +1. Create new gallery sections. [Done] +2. Clean up examples and move them to the new gallery sections (over the course + of many PRs and with the help of many users/developers). [In progress] + +Gallery sections +---------------- + +The naming of sections is critical and will guide the clean-up +effort. The current sections are: + +* Lines, bars, and markers (more-or-less 1D data) +* Shapes and collections +* Statistical plots +* Images, contours, and fields +* Pie and polar charts: Round things +* Color +* Text, labels, and annotations +* Ticks and spines +* Subplots, axes, and figures +* Specialty plots (e.g., sankey, radar, tornado) +* Showcase (plots with tweaks to make them publication-quality) +* separate sections for toolboxes (already exists: 'mplot3d', + 'axes_grid', 'units', 'widgets') + +These names are certainly up for debate. As these sections grow, we +should reevaluate them and split them up as necessary. + + +Clean up guidelines +------------------- + +The current examples in the ``api`` and ``pylab_examples`` sections of +the gallery would remain in those directories until they are cleaned +up. After clean-up, they would be moved to one of the new gallery +sections described above. "Clean-up" should involve: + +* `sphinx-gallery docstrings `_: + a title and a description of the example formatted as follows, at the top of + the example:: + + """ + =============================== + Colormaps alter your perception + =============================== + + Here I plot the function + + .. math:: f(x, y) = \sin(x) + \cos(y) + + with different colormaps. Look at how colormaps alter your perception! + """ + + +* PEP8_ clean-ups (running `flake8 + `_, or a similar checker, is + highly recommended) +* Commented-out code should be removed. +* Replace uses of ``pylab`` interface with ``pyplot`` (+ ``numpy``, + etc.). See `c25ef1e + `_ +* Remove shebang line, e.g.: + + #!/usr/bin/env python + +* Use consistent imports. In particular: + + import numpy as np + + import matplotlib.pyplot as plt + + Avoid importing specific functions from these modules (e.g. ``from + numpy import sin``) + +* Each example should focus on a specific feature (excluding + ``showcase`` examples, which will show more "polished" + plots). Tweaking unrelated to that feature should be removed. See + `f7b2217 + `_, + `e57b5fc + `_, + and `1458aa8 + `_ + +Use of ``pylab`` should be demonstrated/discussed on a dedicated help +page instead of the gallery examples. + +**Note:** When moving an existing example, you should search for +references to that example. For example, the API documentation for +`axes.py` and `pyplot.py` may use these examples to generate +plots. Use your favorite search tool (e.g., grep, ack, `grin +`_, `pss +`_) to search the matplotlib +package. See `2dc9a46 +`_ +and `aa6b410 +`_ + + +Additional suggestions +~~~~~~~~~~~~~~~~~~~~~~ + +* Provide links (both ways) between examples and API docs for the + methods/objects used. (issue `#2222 + `_) +* Use ``plt.subplots`` (note trailing "s") in preference over + ``plt.subplot``. +* Rename the example to clarify it's purpose. For example, the most + basic demo of ``imshow`` might be ``imshow_demo.py``, and one + demonstrating different interpolation settings would be + ``imshow_demo_interpolation.py`` (*not* ``imshow_demo2.py``). +* Split up examples that try to do too much. See `5099675 + `_ + and `fc2ab07 + `_ +* Delete examples that don't show anything new. +* Some examples exercise esoteric features for unit testing. These + tweaks should be moved out of the gallery to an example in the + ``unit`` directory located in the root directory of the package. +* Add plot titles to clarify intent of the example. See `bd2b13c + `_ + + +Backward compatibility +====================== + +The website for each Matplotlib version is readily accessible, so +users who want to refer to old examples can still do so. + + +Alternatives +============ + +Tags +---- + +Tagging examples will also help users search the example gallery. Although tags +would be a big win for users with specific goals, the plot gallery will remain +the entry point to these examples, and sections could really help users +navigate the gallery. Thus, tags are complementary to this reorganization. + + +.. _PEP8: https://www.python.org/dev/peps/pep-0008/ + +.. [1] https://github.com/matplotlib/matplotlib/pull/714 diff --git a/doc/devel/MEP/MEP13.rst b/doc/devel/MEP/MEP13.rst new file mode 100644 index 000000000000..db2f8b17772a --- /dev/null +++ b/doc/devel/MEP/MEP13.rst @@ -0,0 +1,199 @@ +================================= +MEP13: Use properties for Artists +================================= + +.. contents:: + :local: + +Status +====== + +- **Discussion** + +Branches and Pull requests +========================== + +None + +Abstract +======== + +Wrap all of the matplotlib getter and setter methods with python +`properties +`_, allowing +them to be read and written like class attributes. + +Detailed description +==================== + +Currently matplotlib uses getter and setter functions (usually +prefixed with get\_ and set\_, respectively) for reading and writing +data related to classes. However, since 2.6 python supports +properties, which allow such setter and getter functions to be +accessed as though they were attributes. This proposal would +implement all existing setter and getter methods as properties. + +Implementation +============== + +1. All existing getter and setter methods will need to have two + aliases, one with the get\_ or set\_ prefix and one without. + Getter methods that currently lack prefixes should be recording in + a text file. +2. Classes should be reorganized so setter and getter methods are + sequential in the code, with getter methods first. +3. Getter and setter methods the provide additional optional optional + arguments should have those arguments accessible in another manner, + either as additional getter or setter methods or attributes of + other classes. If those classes are not accessible, getters for + them should be added. +4. Property decorators will be added to the setter and getter methods + without the prefix. Those with the prefix will be marked as + deprecated. +5. Docstrings will need to be rewritten so the getter with the prefix + has the current docstring and the getter without the prefix has a + generic docstring appropriate for an attribute. +6. Automatic alias generation will need to be modified so it will also + create aliases for the properties. +7. All instances of getter and setter method calls will need to be + changed to attribute access. +8. All setter and getter aliases with prefixes will be removed + +The following steps can be done simultaneously: 1, 2, and 3; 4 and 5; +6 and 7. + +Only the following steps must be done in the same release: 4, 5, +and 6. All other changes can be done in separate releases. 8 should +be done several major releases after everything else. + +Backward compatibility +====================== + +All existing getter methods that do not have a prefix (such as get\_) +will need to be changed from function calls to attribute access. In +most cases this will only require removing the parenthesis. + +setter and getter methods that have additional optional arguments will +need to have those arguments implemented in another way, either as a +separate property in the same class or as attributes or properties of +another class. + +Cases where the setter returns a value will need to be changed to +using the setter followed by the getter. + +Cases where there are set_ATTR_on() and set_ATTR_off() methods will be +changed to ATTR_on properties. + +Examples +======== + +axes.Axes.set_axis_off/set_axis_on +---------------------------------- + +Current implementation: :: + + axes.Axes.set_axis_off() + axes.Axes.set_axis_on() + +New implementation: :: + + True = axes.Axes.axis_on + False = axes.Axes.axis_on + axes.Axes.axis_on = True + axes.Axes.axis_on = False + +axes.Axes.get_xlim/set_xlim and get_autoscalex_on/set_autoscalex_on +------------------------------------------------------------------- + +Current implementation: :: + + [left, right] = axes.Axes.get_xlim() + auto = axes.Axes.get_autoscalex_on() + + [left, right] = axes.Axes.set_xlim(left=left, right=right, emit=emit, auto=auto) + [left, right] = axes.Axes.set_xlim(left=left, right=None, emit=emit, auto=auto) + [left, right] = axes.Axes.set_xlim(left=None, right=right, emit=emit, auto=auto) + [left, right] = axes.Axes.set_xlim(left=left, emit=emit, auto=auto) + [left, right] = axes.Axes.set_xlim(right=right, emit=emit, auto=auto) + + axes.Axes.set_autoscalex_on(auto) + +New implementation: :: + + [left, right] = axes.Axes.axes_xlim + auto = axes.Axes.autoscalex_on + + axes.Axes.axes_xlim = [left, right] + axes.Axes.axes_xlim = [left, None] + axes.Axes.axes_xlim = [None, right] + axes.Axes.axes_xlim[0] = left + axes.Axes.axes_xlim[1] = right + + axes.Axes.autoscalex_on = auto + + axes.Axes.emit_xlim = emit + +axes.Axes.get_title/set_title +----------------------------- + +Current implementation: :: + + string = axes.Axes.get_title() + axes.Axes.set_title(string, fontdict=fontdict, **kwargs) + +New implementation: :: + + string = axes.Axes.title + string = axes.Axes.title_text.text + + text.Text = axes.Axes.title_text + text.Text. = attribute + text.Text.fontdict = fontdict + + axes.Axes.title = string + axes.Axes.title = text.Text + axes.Axes.title_text = string + axes.Axes.title_text = text.Text + +axes.Axes.get_xticklabels/set_xticklabels +----------------------------------------- + +Current implementation: :: + + [text.Text] = axes.Axes.get_xticklabels() + [text.Text] = axes.Axes.get_xticklabels(minor=False) + [text.Text] = axes.Axes.get_xticklabels(minor=True) + [text.Text] = axes.Axes.([string], fontdict=None, **kwargs) + [text.Text] = axes.Axes.([string], fontdict=None, minor=False, **kwargs) + [text.Text] = axes.Axes.([string], fontdict=None, minor=True, **kwargs) + +New implementation: :: + + [text.Text] = axes.Axes.xticklabels + [text.Text] = axes.Axes.xminorticklabels + axes.Axes.xticklabels = [string] + axes.Axes.xminorticklabels = [string] + axes.Axes.xticklabels = [text.Text] + axes.Axes.xminorticklabels = [text.Text] + +Alternatives +============ + +Instead of using decorators, it is also possible to use the property +function. This would change the procedure so that all getter methods +that lack a prefix will need to be renamed or removed. This makes +handling docstrings more difficult and harder to read. + +It is not necessary to deprecate the setter and getter methods, but +leaving them in will complicate the code. + +This could also serve as an opportunity to rewrite or even remove +automatic alias generation. + +Another alternate proposal: + +Convert ``set_xlim``, ``set_xlabel``, ``set_title``, etc. to ``xlim``, +``xlabel``, ``title``,... to make the transition from ``plt`` +functions to ``axes`` methods significantly simpler. These would still +be methods, not properties, but it's still a great usability +enhancement while retaining the interface. diff --git a/doc/devel/MEP/MEP14.rst b/doc/devel/MEP/MEP14.rst new file mode 100644 index 000000000000..b40a3f5e0f62 --- /dev/null +++ b/doc/devel/MEP/MEP14.rst @@ -0,0 +1,421 @@ +==================== +MEP14: Text handling +==================== + +.. contents:: + :local: + + +Status +====== + +- **Discussion** + +Branches and Pull requests +========================== + +Issue #253 demonstrates a bug where using the bounding box rather than +the advance width of text results in misaligned text. This is a minor +point in the grand scheme of things, but it should be addressed as +part of this MEP. + +Abstract +======== + +By reorganizing how text is handled, this MEP aims to: + +- improve support for Unicode and non-ltr languages +- improve text layout (especially multi-line text) +- allow support for more fonts, especially non-Apple-format TrueType + fonts and OpenType fonts. +- make the font configuration easier and more transparent + +Detailed description +==================== + +**Text layout** + +At present, matplotlib has two different ways to render text: +"built-in" (based on FreeType and our own Python code), and "usetex" +(based on calling out to a TeX installation). Adjunct to the +"built-in" renderer there is also the Python-based "mathtext" system +for rendering mathematical equations using a subset of the TeX +language without having a TeX installation available. Support for +these two engines in strewn about many source files, including every +backend, where one finds clauses like :: + + if rcParams['text.usetex']: # do one thing else: # do another + +Adding a third text rendering approach (more on that later) would +require editing all of these places as well, and therefore doesn't +scale. + +Instead, this MEP proposes adding a concept of "text engines", where +the user could select one of many different approaches for rendering +text. The implementations of each of these would be localized to +their own set of modules, and not have little pieces around the whole +source tree. + +Why add more text rendering engines? The "built-in" text rendering +has a number of shortcomings. + +- It only handles right-to-left languages, and doesn't handle many + special features of Unicode, such as combining diacriticals. +- The multiline support is imperfect and only supports manual + line-breaking -- it can not break up a paragraph into lines of a + certain length. +- It also does not handle inline formatting changes in order to + support something like Markdown, reStructuredText or HTML. (Though + rich-text formatting is contemplated in this MEP, since we want to + make sure this design allows it, the specifics of a rich-text + formatting implementation is outside of the scope of this MEP.) + +Supporting these things is difficult, and is the "full-time job" of a +number of other projects: + + - `pango `_/`harfbuzz + `_ + - `QtTextLayout + `_ + - `Microsoft DirectWrite + `_ + - `Apple Core Text + `_ + +Of the above options, it should be noted that `harfbuzz` is designed +from the start as a cross platform option with minimal dependencies, +so therefore is a good candidate for a single option to support. + +Additionally, for supporting rich text, we could consider using +`WebKit `_, and possibly whether than +represents a good single cross-platform option. Again, however, rich +text formatting is outside of the scope of this project. + +Rather than trying to reinvent the wheel and add these features to +matplotlib's "built-in" text renderer, we should provide a way to +leverage these projects to get more powerful text layout. The +"built-in" renderer will still need to exist for reasons of ease of +installation, but its feature set will be more limited compared to the +others. [TODO: This MEP should clearly decide what those limited +features are, and fix any bugs to bring the implementation into a +state of working correctly in all cases that we want it to work. I +know @leejjoon has some thoughts on this.] + +**Font selection** + +Going from an abstract description of a font to a file on disk is the +task of the font selection algorithm -- it turns out to be much more +complicated than it seems at first. + +The "built-in" and "usetex" renderers have very different ways of +handling font selection, given their different technologies. TeX +requires the installation of TeX-specific font packages, for example, +and can not use TrueType fonts directly. Unfortunately, despite the +different semantics for font selection, the same set of font +properties are used for each. This is true of both the +`FontProperties` class and the font-related `rcParams` (which +basically share the same code underneath). Instead, we should define +a core set of font selection parameters that will work across all text +engines, and have engine-specific configuration to allow the user to +do engine-specific things when required. For example, it is possible +to directly select a font by name in the "built-in" using +`font.family`, but the same is not possible with "usetex". It may be +possible to make it easier to use TrueType fonts by using XeTeX, but +users will still want to use the traditional metafonts through TeX +font packages. So the issue still stands that different text engines +will need engine-specific configuration, and it should be more obvious +to the user which configuration will work across text engines and +which are engine-specific. + +Note that even excluding "usetex", there are different ways to find +fonts. The default is to use the font list cache in `font_manager.py` +which matches fonts using our own algorithm based on the `CSS font +matching algorithm `_. +It doesn't always do the same thing as the native font selection +algorithms on Linux (`fontconfig +`_), Mac and +Windows, and it doesn't always find all of the fonts on the system +that the OS would normally pick up. However, it is cross-platform, +and always finds the fonts that ship with matplotlib. The Cairo and +MacOSX backends (and presumably a future HTML5-based backend) +currently bypass this mechanism and use the OS-native ones. The same +is true when not embedding fonts in SVG, PS or PDF files and opening +them in a third-party viewer. A downside there is that (at least with +Cairo, need to confirm with MacOSX) they don't always find the fonts +we ship with matplotlib. (It may be possible to add the fonts to +their search path, though, or we may need to find a way to install our +fonts to a location the OS expects to find them). + +There are also special modes in the PS and PDF to only use the core +fonts that are always available to those formats. There, the font +lookup mechanism must only match against those fonts. It is unclear +whether the OS-native font lookup systems can handle this case. + +There is also experimental support for using `fontconfig +`_ for font +selection in matplotlib, turned off by default. fontconfig is the +native font selection algorithm on Linux, but is also cross platform +and works well on the other platforms (though obviously is an +additional dependency there). + +Many of the text layout libraries proposed above (pango, QtTextLayout, +DirectWrite and CoreText etc.) insist on using the font selection +library from their own ecosystem. + +All of the above seems to suggest that we should move away from our +self-written font selection algorithm and use the native APIs where +possible. That's what Cairo and MacOSX backends already want to use, +and it will be a requirement of any complex text layout library. On +Linux, we already have the bones of a `fontconfig` implementation +(which could also be accessed through pango). On Windows and Mac we +may need to write custom wrappers. The nice thing is that the API for +font lookup is relatively small, and essentially consist of "given a +dictionary of font properties, give me a matching font file". + +**Font subsetting** + +Font subsetting is currently handled using ttconv. ttconv was a +standalone commandline utility for converting TrueType fonts to +subsetted Type 3 fonts (among other features) written in 1995, which +matplotlib (well, I) forked in order to make it work as a library. It +only handles Apple-style TrueType fonts, not ones with the Microsoft +(or other vendor) encodings. It doesn't handle OpenType fonts at all. +This means that even though the STIX fonts come as .otf files, we have +to convert them to .ttf files to ship them with matplotlib. The Linux +packagers hate this -- they'd rather just depend on the upstream STIX +fonts. ttconv has also been shown to have a few bugs that have been +difficult to fix over time. + +Instead, we should be able to use FreeType to get the font outlines +and write our own code (probably in Python) to output subsetted fonts +(Type 3 on PS and PDF and SVGFonts or paths on SVG). Freetype, as a +popular and well-maintained project, handles a wide variety of fonts +in the wild. This would remove a lot of custom C code, and remove +some code duplication between backends. + +Note that subsetting fonts this way, while the easiest route, does +lose the hinting in the font, so we will need to continue, as we do +now, provide a way to embed the entire font in the file where +possible. + +Alternative font subsetting options include using the subsetting +built-in to Cairo (not clear if it can be used without the rest of +Cairo), or using `fontforge` (which is a heavy and not terribly +cross-platform dependency). + +**Freetype wrappers** + +Our FreeType wrapper could really use a reworking. It defines its own +image buffer class (when a Numpy array would be easier). While +FreeType can handle a huge diversity of font files, there are +limitations to our wrapper that make it much harder to support +non-Apple-vendor TrueType files, and certain features of OpenType +files. (See #2088 for a terrible result of this, just to support the +fonts that ship with Windows 7 and 8). I think a fresh rewrite of +this wrapper would go a long way. + +**Text anchoring and alignment and rotation** + +The handling of baselines was changed in 1.3.0 such that the backends +are now given the location of the baseline of the text, not the bottom +of the text. This is probably the correct behavior, and the MEP +refactoring should also follow this convention. + +In order to support alignment on multi-line text, it should be the +responsibility of the (proposed) text engine to handle text alignment. +For a given chunk of text, each engine calculates a bounding box for +that text and the offset of the anchor point within that box. +Therefore, if the va of a block was "top", the anchor point would be +at the top of the box. + +Rotating of text should always be around the anchor point. I'm not +sure that lines up with current behavior in matplotlib, but it seems +like the sanest/least surprising choice. [This could be revisited +once we have something working]. Rotation of text should not be +handled by the text engine -- that should be handled by a layer +between the text engine and the rendering backend so it can be handled +in a uniform way. [I don't see any advantage to rotation being +handled by the text engines individually...] + +There are other problems with text alignment and anchoring that should +be resolved as part of this work. [TODO: enumerate these]. + +**Other minor problems to fix** + +The mathtext code has backend-specific code -- it should instead +provide its output as just another text engine. However, it's still +desirable to have mathtext layout inserted as part of a larger layout +performed by another text engine, so it should be possible to do this. +It's an open question whether embedding the text layout of an +arbitrary text engine in another should be possible. + +The text mode is currently set by a global rcParam ("text.usetex") so +it's either all on or all off. We should continue to have a global +rcParam to choose the text engine ("text.layout_engine"), but it +should under the hood be an overridable property on the `Text` object, +so the same figure can combine the results of multiple text layout +engines if necessary. + + +Implementation +============== + +A concept of a "text engine" will be introduced. Each text engine +will implement a number of abstract classes. The `TextFont` interface +will represent text for a given set of font properties. It isn't +necessarily limited to a single font file -- if the layout engine +supports rich text, it may handle a number of font files in a family. +Given a `TextFont` instance, the user can get a `TextLayout` instance, +which represents the layout for a given string of text in a given +font. From a `TextLayout`, an iterator over `TextSpans` is returned +so the engine can output raw editable text using as few spans as +possible. If the engine would rather get individual characters, they +can be obtained from the `TextSpan` instance:: + + + class TextFont(TextFontBase): + def __init__(self, font_properties): + """ + Create a new object for rendering text using the given font properties. + """ + pass + + def get_layout(self, s, ha, va): + """ + Get the TextLayout for the given string in the given font and + the horizontal (left, center, right) and verticalalignment (top, + center, baseline, bottom) + """ + pass + + class TextLayout(TextLayoutBase): + def get_metrics(self): + """ + Return the bounding box of the layout, anchored at (0, 0). + """ + pass + + def get_spans(self): + """ + Returns an iterator over the spans of different in the layout. + This is useful for backends that want to editable raw text as + individual lines. For rich text where the font may change, + each span of different font type will have its own span. + """ + pass + + def get_image(self): + """ + Returns a rasterized image of the text. Useful for raster backends, + like Agg. + + In all likelihood, this will be overridden in the backend, as it can + be created from get_layout(), but certain backends may want to + override it if their library provides it (as freetype does). + """ + pass + + def get_rectangles(self): + """ + Returns an iterator over the filled black rectangles in the layout. + Used by TeX and mathtext for drawing, for example, fraction lines. + """ + pass + + def get_path(self): + """ + Returns a single Path object of the entire layed out text. + + [Not strictly necessary, but might be useful for textpath + functionality] + """ + pass + + class TextSpan(TextSpanBase): + x, y # Position of the span -- relative to the text layout as a whole + # where (0, 0) is the anchor. y is the baseline of the span. + fontfile # The font file to use for the span + text # The text content of the span + + def get_path(self): + pass # See TextLayout.get_path + + def get_chars(self): + """ + Returns an iterator over the characters in the span. + """ + pass + + class TextChar(TextCharBase): + x, y # Position of the character -- relative to the text layout as + # a whole, where (0, 0) is the anchor. y is in the baseline + # of the character. + codepoint # The unicode code point of the character -- only for informational + # purposes, since the mapping of codepoint to glyph_id may have been + # handled in a complex way by the layout engine. This is an int + # to avoid problems on narrow Unicode builds. + glyph_id # The index of the glyph within the font + fontfile # The font file to use for the char + + def get_path(self): + """ + Get the path for the character. + """ + pass + + +Graphic backends that want to output subset of fonts would likely +build up a file-global dictionary of characters where the keys are +(fontname, glyph_id) and the values are the paths so that only one +copy of the path for each character will be stored in the file. + +Special casing: The "usetex" functionality currently is able to get +Postscript directly from TeX to insert directly in a Postscript file, +but for other backends, parses a DVI file and generates something more +abstract. For a case like this, `TextLayout` would implement +`get_spans` for most backends, but add `get_ps` for the Postscript +backend, which would look for the presence of this method and use it +if available, or fall back to `get_spans`. This kind of special +casing may also be necessary, for example, when the graphics backend +and text engine belong to the same ecosystem, e.g. Cairo and Pango, or +MacOSX and CoreText. + +There are three main pieces to the implementation: + +1) Rewriting the freetype wrapper, and removing ttconv. + + a) Once (1) is done, as a proof of concept, we can move to the + upstream STIX .otf fonts + + b) Add support for web fonts loaded from a remote URL. (Enabled by using freetype for font subsetting). + +2) Refactoring the existing "builtin" and "usetex" code into separate text engines and to follow the API outlined above. + +3) Implementing support for advanced text layout libraries. + + +(1) and (2) are fairly independent, though having (1) done first will +allow (2) to be simpler. (3) is dependent on (1) and (2), but even if +it doesn't get done (or is postponed), completing (1) and (2) will +make it easier to move forward with improving the "builtin" text +engine. + +Backward compatibility +====================== + +The layout of text with respect to its anchor and rotation will change +in hopefully small, but improved, ways. The layout of multiline text +will be much better, as it will respect horizontal alignment. The +layout of bidirectional text or other advanced Unicode features will +now work inherently, which may break some things if users are +currently using their own workarounds. + +Fonts will be selected differently. Hacks that used to sort of work +between the "builtin" and "usetex" text rendering engines may no +longer work. Fonts found by the OS that weren't previously found by +matplotlib may be selected. + +Alternatives +============ + +TBD diff --git a/doc/devel/MEP/MEP15.rst b/doc/devel/MEP/MEP15.rst new file mode 100644 index 000000000000..0fed93813528 --- /dev/null +++ b/doc/devel/MEP/MEP15.rst @@ -0,0 +1,55 @@ +========================================================================== + MEP15 - Fix axis autoscaling when limits are specified for one axis only +========================================================================== + +.. contents:: + :local: + +Status +====== + +**Discussion** + +Branches and Pull requests +========================== + +None so far. + +Abstract +======== + +When one axis of a 2-dimensional plot if overridden via `xlim` or `ylim`, +automatic scaling of the remaining axis should be based on the data that falls +within the specified limits of the first axis. + +Detailed description +==================== + +When axis limits for a 2-D plot are specified for one axis only (via `xlim` or +`ylim`), matplotlib currently does not currently rescale the other axis. The +result is that the displayed curves or symbols may be compressed into a tiny +portion of the available area, so that the final plot conveys much less +information than it would with appropriate axis scaling. + +The proposed change of behavior would make matplotlib choose the scale for the +remaining axis using only the data that falls within the limits for the axis +where limits were specified. + +Implementation +============== + +I don't know enough about the internals of matplotlib to be able to suggest an +implementation. + +Backward compatibility +====================== + +From the standpoint of software interfaces, there would be no break in +backward compatibility. Some outputs would be different, but if the user +truly desires the previous behavior, he/she can achieve this by overriding +the axis scaling for both axes. + +Alternatives +============ + +The only alternative that I can see is to maintain the status quo. diff --git a/doc/devel/MEP/MEP19.rst b/doc/devel/MEP/MEP19.rst new file mode 100644 index 000000000000..e96ebf74d8cd --- /dev/null +++ b/doc/devel/MEP/MEP19.rst @@ -0,0 +1,193 @@ +=============================== + MEP19: Continuous Integration +=============================== + +Status +====== + +**Discussion** + +Branches and Pull requests +========================== + +Abstract +======== + +matplotlib could benefit from better and more reliable continuous +integration, both for testing and building installers and +documentation. + +Detailed description +==================== + +Current state-of-the-art +------------------------ + +**Testing** + +matplotlib currently uses Travis-CI for automated tests. While +Travis-CI should be praised for how much it does as a free service, it +has a number of shortcomings: + +- It often fails due to network timeouts when installing dependencies. + +- It often fails for inexplicable reasons. + +- build or test products can only be saved from build off of branches + on the main repo, not pull requsts, so it is often difficult to + "post mortem" analyse what went wrong. This is particularly + frustrating when the failure can not be subsequently reproduced + locally. + +- It is not extremely fast. matplotlib's cpu and memory requirements + for testing are much higher than the average Python project. + +- It only tests on Ubuntu Linux, and we have only minimal control over + the specifics of the platform. It can be upgraded at any time + outside of our control, causing unexpected delays at times that may + not be convenient in our release schedule. + +On the plus side, Travis-CI's integration with github -- automatically +testing all pending pull requests -- is exceptional. + +**Builds** + +There is no centralized effort for automated binary builds for +matplotlib. However, the following disparate things are being done +[If the authors mentioned here could fill in detail, that would be +great!]: + +- @sandrotosi: builds Debian packages + +- @takluyver: Has automated Ubuntu builds on Launchpad + +- @cgohlke: Makes Windows builds (don't know how automated that is) + +- @r-owen: Makes OS-X builds (don't know how automated that is) + +**Documentation** + +Documentation of master is now built by travis and uploaded to http://matplotlib.org/devdocs/index.html + +@NelleV, I believe, generates the docs automatically and posts them on +the web to chart MEP10 progress. + +Peculiarities of matplotlib +--------------------------- + +matplotlib has complex requirements that make testing and building +more taxing than many other Python projects. + +- The CPU time to run the tests is quite high. It puts us beyond the + free accounts of many CI services (e.g. ShiningPanda) + +- It has a large number of dependencies, and testing the full matrix + of all combinations is impractical. We need to be clever about what + space we test and guarantee to support. + +Requirements +------------ + +This section outlines the requirements that we would like to have. + +#. Testing all pull requests by hooking into the Github API, as + Travis-CI does + +#. Testing on all major platforms: Linux, Mac OS-X, MS Windows (in + that order of priority, based on user survey) + +#. Retain the last n days worth of build and test products, to aid in + post-mortem debugging. + +#. Automated nightly binary builds, so that users can test the + bleeding edge without installing a complete compilation + environment. + +#. Automated benchmarking. It would be nice to have a standard + benchmark suite (separate from the tests) whose performance could + be tracked over time, in different backends and platforms. While + this is separate from building and testing, ideally it would run on + the same infrastructure. + +#. Automated nightly building and publishing of documentation (or as + part of testing, to ensure PRs don't introduce documentation bugs). + (This would not replace the static documentation for stable + releases as a default). + +#. The test systems should be managable by multiple developers, so + that no single person becomes a bottleneck. (Travis-CI's design + does this well -- storing build configuration in the git + repository, rather than elsewhere, is a very good design.) + +#. Make it easy to test a large but sparse matrix of different + versions of matplotlib's dependencies. The matplotlib user survey + provides some good data as to where to focus our efforts: + https://docs.google.com/spreadsheet/ccc?key=0AjrPjlTMRTwTdHpQS25pcTZIRWdqX0pNckNSU01sMHc#gid=0 + +#. Nice to have: A decentralized design so that those with more + obscure platforms can publish build results to a central dashboard. + +Implementation +============== + +This part is yet-to-be-written. + +However, ideally, the implementation would be a third-party service, +to avoid adding system administration to our already stretched time. +As we have some donated funds, this service may be a paid one if it +offers significant time-saving advantages over free offerings. + +Backward compatibility +====================== + +Backward compatibility is not a major concern for this MEP. We will +replace current tools and procedures with something better and throw +out the old. + +Alternatives +============ + + +Hangout Notes +============= + +CI Infrastructure +----------------- + +- We like Travis and it will probably remain part of our arsenal in + any event. The reliability issues are being looked into. + +- Enable Amazon S3 uploads of testing products on Travis. This will + help with post-mortem of failures (@mdboom is looking into this + now). + +- We want Mac coverage. The best bet is probably to push Travis to + enable it for our project by paying them for a Pro account (since + they don't otherwise allow testing on both Linux and Mac). + +- We want Windows coverage. Shining Panda is an option there. + +- Investigate finding or building a tool that would collect and + synthesize test results from a number of sources and post it to + Github using the Github API. This may be of general use to the + Scipy community. + +- For both Windows and Mac, we should document (or better yet, script) + the process of setting up the machine for a build, and how to build + binaries and installers. This may require getting information from + Russel Owen and Christoph Gohlke. This is a necessary step for + doing automated builds, but would also be valuable for a number of + other reasons. + +The test framework itself +------------------------- + +- We should investigate ways to make it take less time + + - Eliminating redundant tests, if possible + + - General performance improvements to matplotlib will help + +- We should be covering more things, particularly more backends + +- We should have more unit tests, fewer integration tests, if possible diff --git a/doc/devel/MEP/MEP21.rst b/doc/devel/MEP/MEP21.rst new file mode 100644 index 000000000000..84744e7d6706 --- /dev/null +++ b/doc/devel/MEP/MEP21.rst @@ -0,0 +1,62 @@ +============================== + MEP21: color and cm refactor +============================== + +.. contents:: + :local: + + +Status +====== + +- **Discussion**: This MEP has not commenced yet, but here are some + ongoing ideas which may become a part of this MEP: + + + +Branches and Pull requests +========================== + + + +Abstract +======== + + +* color + + * tidy up the namespace + * Define a "Color" class + * make it easy to convert from one color type to another ```hex -> + RGB```, ```RGB -> hex```, ```HSV -> RGB``` etc. + * improve the construction of a colormap - the dictionary approach + is archaic and overly complex (though incredibly powerful) + * make it possible to interpolate between two or more color types + in different modes, especially useful for construction of + colormaps in HSV space for instance + +* cm + + * rename the module to something more descriptive - mappables? + + +Overall, there are a lot of improvements that can be made with +matplotlib color handling - managing backwards compatibility will be +difficult as there are some badly named variables/modules which really +shouldn't exist - but a clear path and message for migration should be +available, with a large amount of focus on this in the API changes +documentation. + + +Detailed description +==================== + +Implementation +============== + + +Backward compatibility +====================== + +Alternatives +============ diff --git a/doc/devel/MEP/MEP22.rst b/doc/devel/MEP/MEP22.rst new file mode 100644 index 000000000000..a72ca0764e04 --- /dev/null +++ b/doc/devel/MEP/MEP22.rst @@ -0,0 +1,193 @@ +======================== + MEP22: Toolbar rewrite +======================== + +.. contents:: + :local: + +Status +====== +**Progress** + + +Branches and Pull requests +========================== + +Previous work + * https://github.com/matplotlib/matplotlib/pull/1849 + * https://github.com/matplotlib/matplotlib/pull/2557 + * https://github.com/matplotlib/matplotlib/pull/2465 + +Pull Requests: + * Removing the NavigationToolbar classes + https://github.com/matplotlib/matplotlib/pull/2740 **CLOSED** + * Keeping the NavigationToolbar classes https://github.com/matplotlib/matplotlib/pull/2759 **CLOSED** + * Navigation by events: https://github.com/matplotlib/matplotlib/pull/3652 + +Abstract +======== + +The main goal of this MEP is to make it easier to modify (add, change, +remove) the way the user interacts with the figures. + +The user interaction with the figure is deeply integrated within the +Canvas and Toolbar. Making extremely difficult to do any modification. + +This MEP proposes the separation of this interaction into Toolbar, +Navigation and Tools to provide independent access and +reconfiguration. + +This approach will make easier to create and share tools among +users. In the far future, we can even foresee a kind of Marketplace +for `Tools` where the most popular can be added into the main +distribution. + +Detailed description +==================== + +The reconfiguration of the Toolbar is complex, most of the time it +requires a custom backend. + +The creation of custom Tools sometimes interferes with the Toolbar, as +example see https://github.com/matplotlib/matplotlib/issues/2694 also +the shortcuts are hardcoded and again not easily modifiable +https://github.com/matplotlib/matplotlib/issues/2699 + +The proposed solution is to take the actions out of the `Toolbar` and +the shortcuts out of the `Canvas`. This actions and shortcuts will be +in the form of `Tools`. + +A new class `Navigation` will be the bridge between the events from +the `Canvas` and `Toolbar` and redirect them to the appropiate `Tool`. + +At the end the user interaction will be divided into three classes: + + * NavigationBase: This class is instantiated for each FigureManager + and connect the all user interactions with the Tools + * ToolbarBase: This existing class is relegated only as a GUI access + to Tools. + * ToolBase: Is the basic definition of Tools. + + +Implementation +============== + +ToolBase(object) +---------------- + +Tools can have a graphical representation as the `SubplotTool` or not even be present in the Toolbar as `Quit` + +The `ToolBase` has the following class attributes for configuration at definition time + + * keymap = None: Key(s) to be used to trigger the tool + * description = '': Small description of the tool + * image = None: Image that is used in the toolbar + +The following instance attributes are set at instantiation: + * name + * navigation + +**Methods** + * trigger(self, event): This is the main method of the Tool, it is called when the Tool is triggered by: + * Toolbar button click + * keypress associated with the Tool Keymap + * Call to navigation.trigger_tool(name) + * set_figure(self, figure): Set the figure and navigation attributes + * ``destroy(self, *args)``: Destroy the `Tool` graphical interface (if exists) + +**Available Tools** + * ToolQuit + * ToolEnableAllNavigation + * ToolEnableNavigation + * ToolToggleGrid + * ToolToggleFullScreen + * ToolToggleYScale + * ToolToggleXScale + * ToolHome + * ToolBack + * ToolForward + * SaveFigureBase + * ConfigureSubplotsBase + + +ToolToggleBase(ToolBase) +------------------------ + +The `ToolToggleBase` has the following class attributes for +configuration at definition time + + * radio_group = None: Attribute to group 'radio' like tools (mutually + exclusive) + * cursor = None: Cursor to use when the tool is active + +The **Toggleable** Tools, can capture keypress, mouse moves, and mouse +button press + +It defines the following methods + * enable(self, event): Called by `ToolToggleBase.trigger` method + * disable(self, event): Called when the tool is untoggled + * toggled : **Property** True or False + +**Available Tools** + * ToolZoom + * ToolPan + +NavigationBase +-------------- + +Defines the following attributes + * canvas: + * keypresslock: Lock to know if the `canvas` key_press_event` is + available and process it + * messagelock: Lock to know if the message is available to write + +Public methods for **User use**: + * nav_connect(self, s, func): Connect to to navigation for events + * nav_disconnect(self, cid): Disconnect from navigation event + * message_event(self, message, sender=None): Emit a + tool_message_event event + * active_toggle(self): **Property** The currently toggled tools or + None + * get_tool_keymap(self, name): Return a list of keys that are + associated with the tool + * set_tool_keymap(self, name, ``*keys``): Set the keys for the given tool + * remove_tool(self, name): Removes tool from the navigation control. + * add_tools(self, tools): Add multiple tools to `Navigation` + * add_tool(self, name, tool, group=None, position=None): Add a tool + to the Navigation + * tool_trigger_event(self, name, sender=None, canvasevent=None, + data=None): Trigger a tool and fire the event + + * tools(self) **Property**: Return a dict with available tools with + corresponding keymaps, descriptions and objects + * get_tool(self, name): Return the tool object + + + +ToolbarBase +----------- + +Methods for **Backend implementation** + * add_toolitem(self, name, group, position, image, description, + toggle): Add a toolitem to the toolbar. This method is a callback + from `tool_added_event` (emited by navigation) + * set_message(self, s): Display a message on toolbar or in status bar + * toggle_toolitem(self, name): Toggle the toolitem without firing + event. + * remove_toolitem(self, name): Remove a toolitem from the `Toolbar` + + +Backward compatibility +====================== + +For backward compatibility added a 'navigation' key to +`rcsetup.validate_toolbar`, that is used for Navigation classes +instantiation instead of the NavigationToolbar classes + +With this parameter, it makes it transparent to anyone using the +existing backends. + +[@pelson comment: This also gives us an opportunity to avoid needing +to implement all of this in the same PR - some backends can +potentially exist without the new functionality for a short while (but +it must be done at some point).] diff --git a/doc/devel/MEP/MEP23.rst b/doc/devel/MEP/MEP23.rst new file mode 100644 index 000000000000..ae51294f017a --- /dev/null +++ b/doc/devel/MEP/MEP23.rst @@ -0,0 +1,116 @@ +======================================== + MEP23: Multiple Figures per GUI window +======================================== + +.. contents:: + :local: + + + +Status +====== + +**Discussion** + +Branches and Pull requests +========================== + +**Previous work** +- https://github.com/matplotlib/matplotlib/pull/2465 **To-delete** + + +Abstract +======== + +Add the possibility to have multiple figures grouped under the same +`FigureManager` + +Detailed description +==================== + +Under the current structure, every canvas has its own window. + +This is and may continue to be the desired method of operation for +most use cases. + +Sometimes when there are too many figures open at the same time, it is +desirable to be able to group these under the same window +[see](https://github.com/matplotlib/matplotlib/issues/2194). + +The proposed solution modifies `FigureManagerBase` to contain and +manage more than one `canvas`. The settings parameter +`rcParams['backend.multifigure']` control when the **MultiFigure** +behaviour is desired. + +**Note** + +It is important to note, that the proposed solution, assumes that the +[MEP22](https://github.com/matplotlib/matplotlib/wiki/Mep22) is +already in place. This is simply because the actual implementation of +the `Toolbar` makes it pretty hard to switch between canvases. + +Implementation +============== + +The first implementation will be done in `GTK3` using a Notebook as +canvas container. + +`FigureManagerBase` +------------------- + +will add the following new methods + +* `add_canvas`: To add a canvas to an existing `FigureManager` object +* `remove_canvas`: To remove a canvas from a `FigureManager` object, + if it is the last one, it will be destroyed +* `move_canvas`: To move a canvas from one `FigureManager` to another. +* `set_canvas_title`: To change the title associated with a specific + canvas container +* `get_canvas_title`: To get the title associated with a specific + canvas container +* `get_active_canvas`: To get the canvas that is in the foreground and + is subject to the gui events. There is no `set_active_canvas` + because the active canvas, is defined when `show` is called on a + `Canvas` object. + +`new_figure_manager` +-------------------- + +To control which `FigureManager` will contain the new figures, an +extra optional parameter `figuremanager` will be added, this parameter +value will be passed to `new_figure_manager_given_figure` + +`new_figure_manager_given_figure` +--------------------------------- + +* If `figuremanager` parameter is give, this `FigureManager` object + will be used instead of creating a new one. +* If `rcParams['backend.multifigure'] == True`: The last + `FigureManager` object will be used instead of creating a new one. + +`NavigationBase` +---------------- + +Modifies the `NavigationBase` to keep a list of canvases, directing +the actions to the active one + +Backward compatibility +====================== + +For the **MultiFigure** properties to be visible, the user has to +activate them directly setting `rcParams['backend.multifigure'] = +True` + +It should be backwards compatible for backends that adhere to the +current `FigureManagerBase` structure even if they have not +implemented the **MultiFigure** magic yet. + + +Alternatives +============ + +Insted of modifing the `FigureManagerBase` it could be possible to add +a parallel class, that handles the cases where +`rcParams['backend.multifigure'] = True`. This will warranty that +there won't be any problems with custom made backends, but also makes +bigger the code, and more things to mantain. diff --git a/doc/devel/MEP/MEP24.rst b/doc/devel/MEP/MEP24.rst new file mode 100644 index 000000000000..89132cc7cd0e --- /dev/null +++ b/doc/devel/MEP/MEP24.rst @@ -0,0 +1,51 @@ +======================================= + MEP24: negative radius in polar plots +======================================= + +.. contents:: + :local: + + + +Status +====== +*Discussion* + +Branches and Pull requests +========================== + +None + +Abstract +======== + +It is clear that polar plots need to be able to gracefully handle +negative r values (not by clipping or reflection). + +Detailed description +==================== + +One obvious application that we should support is bB plots (see +https://github.com/matplotlib/matplotlib/issues/1730#issuecomment-40815837), +but this seems more generally useful (for example growth rate as a +function of angle). The assumption in the current code (as I +understand it) is that the center of the graph is `r==0`, however it +would be good to be able to set the center to be at any `r` (with any +value less than the off set clipped). + +Implementation +============== + + +Related Issues +============== +#1730, #1603, #2203, #2133 + + + +Backward compatibility +====================== + + +Alternatives +============ diff --git a/doc/devel/MEP/MEP25.rst b/doc/devel/MEP/MEP25.rst new file mode 100644 index 000000000000..f4974bd3055f --- /dev/null +++ b/doc/devel/MEP/MEP25.rst @@ -0,0 +1,166 @@ + +MEP25: Serialization +==================== +.. contents:: + :local: + +Status +------ + +**Discussion** + +Branches and Pull requests +-------------------------- + +* development branches: + +* related pull requests: + +Abstract +-------- + +This MEP aims at adding a serializable ``Controller`` objects to act +as an ``Artist`` managers. Users would then communicate changes to an +``Artist`` via a ``Controller``. In this way, functionality of the +``Controller`` objects may be added incrementally since each +``Artist`` is still responsible for drawing everything. The goal is to +create an API that is usable both by graphing libraries requiring +high-level descriptions of figures and libraries requiring low-level +interpretations. + +Detailed description +-------------------- + +Matplotlib is a core plotting engine with an API that many users +already understand. It's difficult/impossible for other graphing +libraries to (1) get a complete figure description, (2) output raw +data from the figure object as the user has provided it, (3) +understand the semantics of the figure objects without heuristics, +and (4) give matplotlib a complete figure description to visualize. In +addition, because an ``Artist`` has no conception of its own semantics +within the figure, it's difficult to interact with them in a natural +way. + +In this sense, matplotlib will adopt a standard +Model-View-Controller (MVC) framework. The *Model* will be the user +defined data, style, and semantics. The *Views* are the ensemble of +each individual ``Artist``, which are responsible for producing the +final image based on the *model*. The *Controller* will be the +``Controller`` object managing its set of ``Artist`` objects. + +The ``Controller`` must be able to export the information that it's +carrying about the figure on command, perhaps via a ``to_json`` method +or similar. Because it would be extremely extraneous to duplicate all +of the information in the model with the controller, only +user-specified information (data + style) are explicitly kept. If a +user wants more information (defaults) from the view/model, it should +be able to query for it. + +- This might be annoying to do, non-specified kwargs are pulled from + the rcParams object which is in turn created from reading a user + specified file and can be dynamically changed at run time. I + suppose we could keep a dict of default defaults and compare against + that. Not clear how this will interact with the style sheet + [[MEP26]] - @tacaswell + +Additional Notes: + +* The `raw data` does not necessarily need to be a ``list``, + ``ndarray``, etc. Rather, it can more abstractly just have a method + to yield data when needed. + +* Because the ``Controller`` will contain extra information that users + may not want to keep around, it should *not* be created by + default. You should be able to both (a) instantiate a ``Controller`` + with a figure and (b) build a figure with a ``Controller``. + +Use Cases: + +* Export all necessary informat +* Serializing a matplotlib figure, saving it, and being able to rerun later. +* Any other source sending an appropriately formatted representation to matplotlib to open + +Examples +-------- +Here are some examples of what the controllers should be able to do. + +1. Instantiate a matplotlib figure from a serialized representation (e.g., JSON): :: + + import json + from matplotlib.controllers import Controller + with open('my_figure') as f: + o = json.load(f) + c = Controller(o) + fig = c.figure + +2. Manage artists from the controller (e.g., Line2D): :: + + # not really sure how this should look + c.axes[0].lines[0].color = 'b' + # ? + +3. Export serializable figure representation: :: + + o = c.to_json() + # or... we should be able to throw a figure object in there too + o = Controller.to_json(mpl_fig) + +Implementation +-------------- + +1. Create base ``Controller`` objects that are able to manage + ``Artist`` objects (e.g., ``Hist``) + + Comments: + + * initialization should happen via unpacking ``**``, so we need a + copy of call signature parameter for the ``Artist`` we're + ultimately trying to control. Unfortunate hard-coded + repetition... + * should the additional ``**kwargs`` accepted by each ``Artist`` + be tracked at the ``Controller`` + * how does a ``Controller`` know which artist belongs where? E.g., + do we need to pass ``axes`` references? + + Progress: + + * A simple NB demonstrating some functionality for + ``Line2DController`` objects: + https://nbviewer.jupyter.org/gist/theengineear/f0aa8d79f64325e767c0 + +2. Write in protocols for the ``Controller`` to *update* the model. + + Comments: + + * how should containers be dealt with? E.g., what happens to old + patches when we re-bin a histogram? + * in the link from (1), the old line is completely destroyed and + redrawn, what if something is referencing it? + +3. Create method by which a json object can be assembled from the + ``Controllers`` +4. Deal with serializing the unserializable aspects of a figure (e.g., + non-affine transforms?) +5. Be able to instantiate from a serialized representation +6. Reimplement the existing pyplot and Axes method, + e.g. ``pyplot.hist`` and ``Axes.hist`` in terms of the new + controller class. + +> @theengineer: in #2 above, what do you mean by *get updates* from +each ``Artist``? + +^ Yup. The ``Controller`` *shouldn't* need to get updated. This just +happens in #3. Delete comments when you see this. + +Backward compatibility +---------------------- + +* pickling will change +* non-affine transformations will require a defined pickling method + +Alternatives +------------ + +PR #3150 suggested adding semantics by parasitically attaching extra +containers to axes objects. This is a more complete solution with what +should be a more developed/flexible/powerful framework. diff --git a/doc/devel/MEP/MEP26.rst b/doc/devel/MEP/MEP26.rst new file mode 100644 index 000000000000..c282735d8a46 --- /dev/null +++ b/doc/devel/MEP/MEP26.rst @@ -0,0 +1,232 @@ +======================= + MEP26: Artist styling +======================= + +.. contents:: + :local: + + +Status +====== + +**Proposed** + +Branches and Pull requests +========================== + +Abstract +======== + +This MEP proposes a new stylesheet implementation to allow more +comprehensive and dynamic styling of artists. + +The current version of matplotlib (1.4.0) allows stylesheets based on +the rcParams syntax to be applied before creation of a plot. The +methodology below proposes a new syntax, based on CSS, which would +allow styling of individual artists and properties, which can be +applied dynamically to existing objects. + +This is related to (and makes steps toward) the overall goal of moving +to a DOM/tree-like architecture. + + +Detailed description +==================== + +Currently, the look and appearance of existing artist objects (figure, +axes, Line2D etc...) can only be updated via `set_` and `get_` methods +on the artist object, which is quite laborious, especially if no +reference to the artist(s) has been stored. The new style sheets +introduced in 1.4 allow styling before a plot is created, but do not +offer any means to dynamically update plots or distinguish between +artists of the same type (i.e. to specifiy the `line color` and `line +style` separately for differing `Line2D` objects). + +The initial development should concentrate on allowing styling of +artist primitives (those `artists` that do not contain other +`artists`), and further development could expand the CSS syntax rules +and parser to allow more complex styling. See the appendix for a list +of primitives. + +The new methodology would require development of a number of steps: + +- A new stylesheet syntax (likely based on CSS) to allow selection of + artists by type, class, id etc... +- A mechanism by which to parse a stylesheet into a tree +- A mechanism by which to translate the parse-tree into something + which can be used to update the properties of relevant + artists. Ideally this would implement a method by which to traverse + the artists in a tree-like structure. +- A mechanism by which to generate a stylesheet from existing artist + properties. This would be useful to allow a user to export a + stylesheet from an existing figure (where the appearance may have + been set using the matplotlib API)... + +Implementation +============== + +It will be easiest to allow a '3rd party' to modify/set the style of +an artist if the 'style' is created as a separate class and store +against the artist as a property. The `GraphicsContext` class already +provides a the basis of a `Style` class and an artists `draw` method can +be refactored to use the `Style` class rather than setting up it's own +`GraphicsContext` and transferring it's style-related properties to +it. A minimal example of how this could be implemented is shown here: +https://github.com/JamesRamm/mpl_experiment + +IMO, this will also make the API and code base much neater as +individual get/set methods for artist style properties are now +redundant... Indirectly related would be a general drive to replace +get/set methods with properties. Implementing the style class with +properties would be a big stride toward this... + +For initial development, I suggest developing a syntax based on a much +(much much) simplified version of CSS. I am in favour of dubbing this +Artist Style Sheets :+1: : + +BNF Grammar +----------- + +I propose a very simple syntax to implement initially (like a proof of +concept), which can be expanded upon in the future. The BNF form of +the syntax is given below and then explained :: + + RuleSet ::= SelectorSequence "{"Declaration"}" + + SelectorSequence :: = Selector {"," Selector} + + Declaration ::= propName":" propValue";" + + Selector ::= ArtistIdent{"#"Ident} + + propName ::= Ident + + propValue ::= Ident | Number | Colour | "None" + +`ArtistIdent`, `Ident`, `Number` and `Colour` are tokens (the basic +building blocks of the expression) which are defined by regular +expressions. + +Syntax +------ + +A CSS stylesheet consists of a series of **rule sets** in hierarchical +order (rules are applied from top to bottom). Each rule follows the +syntax :: + + selector {attribute: value;} + +Each rule can have any number of `attribute`: `value` pairs, and a +stylesheet can have any number of rules. + +The initial syntax is designed only for `artist` primitives. It does +not address the question of how to set properties on `container` types +(whose properties may themselves be `artists` with settable +properties), however, a future solution to this could simply be nested +`RuleSet` s + +Selectors +~~~~~~~~~ + + +Selectors define the object to which the attribute updates should be +applied. As a starting point, I propose just 2 selectors to use in +initial development: + + + +Artist Type Selector + + +Select an `artist` by it's type. E.g `Line2D` or `Text`:: + + Line2D {attribute: value} + +The regex for matching the artist type selector (`ArtistIdent` in the BNF grammar) would be:: + + ArtistIdent = r'(?P\bLine2D\b|\bText\b|\bAxesImage\b|\bFigureImage\b|\bPatch\b)' + +GID selector +~~~~~~~~~~~~ + +Select an `artist` by its `gid`:: + + Line2D#myGID {attribute: value} + +A `gid` can be any string, so the regex could be as follows:: + + Ident = r'(?P[a-zA-Z_][a-zA-Z_0-9]*)' + + +The above selectors roughly correspond to their CSS counterparts +(http://www.w3.org/TR/CSS21/selector.html) + +Attributes and values +~~~~~~~~~~~~~~~~~~~~~ + +- `Attributes` are any valid (settable) property for the `artist` in question. +- `Values` are any valid value for the property (Usually a string, or number). + +Parsing +------- + +Parsing would consist of breaking the stylesheet into tokens (the +python cookbook gives a nice tokenizing recipe on page 66), applying +the syntax rules and constructing a `Tree`. This requires defining the +grammar of the stylesheet (again, we can borrow from CSS) and writing +a parser. Happily, there is a recipe for this in the python cookbook +aswell. + + +Visitor pattern for matplotlib figure +------------------------------------- + +In order to apply the stylesheet rules to the relevant artists, we +need to 'visit' each artist in a figure and apply the relevant rule. +Here is a visitor class (again, thanks to python cookbook), where each +`node` would be an artist in the figure. A `visit_` method would need +to be implemented for each mpl artist, to handle the different +properties for each :: + + class Visitor: + def visit(self, node): + name = 'visit_' + type(node).__name__ + meth = getattr(self, name, None) + if meth is None: + raise NotImplementedError + return meth(node) + +An `evaluator` class would then take the stylesheet rules and +implement the visitor on each one of them. + + + +Backward compatibility +====================== + +Implementing a separate `Style` class would break backward +compatibility as many get/set methods on an artist would become +redundant. While it would be possible to alter these methods to hook +into the `Style` class (stored as a property against the artist), I +would be in favor of simply removing them to both neaten/simplify the +codebase and to provide a simple, uncluttered API... + +Alternatives +============ + +No alternatives, but some of the ground covered here overlaps with +MEP25, which may assist in this development + +Appendix +======== + +Matplotlib primitives +--------------------- + +This will form the initial selectors which stylesheets can use. + +* Line2D +* Text +* AxesImage +* FigureImage +* Patch diff --git a/doc/devel/MEP/MEP27.rst b/doc/devel/MEP/MEP27.rst new file mode 100644 index 000000000000..57b0540a4c91 --- /dev/null +++ b/doc/devel/MEP/MEP27.rst @@ -0,0 +1,223 @@ +====================================== + MEP27: decouple pyplot from backends +====================================== + +.. contents:: + :local: + + +Status +====== +**Discussion** + +Branches and Pull requests +========================== +Main PR (including GTK3): ++ https://github.com/matplotlib/matplotlib/pull/4143 + +Backend specific branch diffs: ++ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-tkagg ++ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-qt ++ https://github.com/OceanWolf/matplotlib/compare/backend-refactor...backend-refactor-wx + +Abstract +======== + +This MEP refactors the backends to give a more structured and +consistent API, removing generic code and consolidate existing code. +To do this we propose splitting: + +1. ``FigureManagerBase`` and its derived classes into the core + functionality class ``FigureManager`` and a backend specific class + ``WindowBase`` and +2. ``ShowBase`` and its derived classes into ``Gcf.show_all`` and ``MainLoopBase``. + +Detailed description +==================== + +This MEP aims to consolidate the backends API into one single uniform +API, removing generic code out of the backend (which includes +``_pylab_helpers`` and ``Gcf``), and push code to a more appropriate +level in matplotlib. With this we automatically remove +inconsistencies that appear in the backends, such as +``FigureManagerBase.resize(w, h)`` which sometimes sets the canvas, +and other times set the entire window to the dimensions given, +depending on the backend. + +Two main places for generic code appear in the classes derived from +``FigureManagerBase`` and ``ShowBase``. + +1. ``FigureManagerBase`` has **three** jobs at the moment: + + 1. The documentation describes it as a *``Helper class for pyplot + mode, wraps everything up into a neat bundle''* + 2. But it doesn't just wrap the canvas and toolbar, it also does + all of the windowing tasks itself. The conflation of these two + tasks gets seen the best in the following line: ```python + self.set_window_title("Figure %d" % num) ``` This combines + backend specific code ``self.set_window_title(title)`` with + matplotlib generic code ``title = "Figure %d" % num``. + + 3. Currently the backend specific subclass of ``FigureManager`` + decides when to end the mainloop. This also seems very wrong + as the figure should have no control over the other figures. + + +2. ``ShowBase`` has two jobs: + + 1. It has the job of going through all figure managers registered + in ``_pylab_helpers.Gcf`` and telling them to show themselves. + 2. And secondly it has the job of performing the backend specific + ``mainloop`` to block the main programme and thus keep the + figures from dying. + +Implementation +============== + +The description of this MEP gives us most of the solution: + +1. To remove the windowing aspect out of ``FigureManagerBase`` letting + it simply wrap this new class along with the other backend classes. + Create a new ``WindowBase`` class that can handle this + functionality, with pass-through methods (:arrow_right:) to + ``WindowBase``. Classes that subclass ``WindowBase`` should also + subclass the GUI specific window class to ensure backward + compatibility (``manager.window == manager.window``). +2. Refactor the mainloop of ``ShowBase`` into ``MainLoopBase``, which + encapsulates the end of the loop as well. We give an instance of + ``MainLoop`` to ``FigureManager`` as a key unlock the exit method + (requiring all keys returned before the loop can die). Note this + opens the possibility for multiple backends to run concurrently. +3. Now that ``FigureManagerBase`` has no backend specifics in it, to + rename it to ``FigureManager``, and move to a new file + ``backend_managers.py`` noting that: + + 1. This allows us to break up the conversion of backends into + separate PRs as we can keep the existing ``FigureManagerBase`` + class and its dependencies intact. + 2. and this also anticipates MEP22 where the new + ``NavigationBase`` has morphed into a backend independent + ``ToolManager``. + ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|FigureManagerBase(canvas, num) |FigureManager(figure, num) |``WindowBase(title)``|Notes | +| | | | | ++======================================+==============================+=====================+================================+ +|show | |show | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|destroy |calls destroy on all |destroy | | +| |components | | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|full_screen_toggle |handles logic |set_fullscreen | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|resize | |resize | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|key_press |key_press | | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|show_popup |show_poup | |Not used anywhere in mpl, and | +| | | |does nothing. | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|get_window_title | |get_window_title | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +|set_window_title | |set_window_title | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +| |_get_toolbar | |A common method to all | +| | | |subclasses of FigureManagerBase | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +| | |set_default_size | | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ +| | |add_element_to_window| | ++--------------------------------------+------------------------------+---------------------+--------------------------------+ + + ++----------+------------+-------------+ +|ShowBase |MainLoopBase|Notes | ++==========+============+=============+ +|mainloop |begin | | ++----------+------------+-------------+ +| |end |Gets called | +| | |automagically| +| | |when no more | +| | |instances of | +| | |the subclass | +| | |exist | ++----------+------------+-------------+ +|__call__ | |Method moved | +| | |to | +| | |Gcf.show_all | ++----------+------------+-------------+ + +Future compatibility +==================== + +As eluded to above when discussing MEP 22, this refactor makes it easy +to add in new generic features. At the moment, MEP 22 has to make +ugly hacks to each class extending from ``FigureManagerBase``. With +this code, this only needs to get made in the single ``FigureManager`` +class. This also makes the later deprecation of +``NavigationToolbar2`` very straightforward, only needing to touch the +single ``FigureManager`` class + +MEP 23 makes for another use case where this refactored code will come +in very handy. + +Backward compatibility +====================== + +As we leave all backend code intact, only adding missing methods to +existing classes, this should work seamlessly for all use cases. The +only difference will lie for backends that used +``FigureManager.resize`` to resize the canvas and not the window, due +to the standardisation of the API. + +I would envision that the classes made obsolete by this refactor get +deprecated and removed on the same timetable as +``NavigationToolbar2``, also note that the change in call signature to +the ``FigureCanvasWx`` constructor, while backward compatible, I think +the old (imho ugly style) signature should get deprecated and removed +in the same manner as everything else. + ++-------------------------+-------------------------+-------------------------+ +|backend |manager.resize(w,h) |Extra | ++=========================+=========================+=========================+ +|gtk3 |window | | ++-------------------------+-------------------------+-------------------------+ +|Tk |canvas | | ++-------------------------+-------------------------+-------------------------+ +|Qt |window | | ++-------------------------+-------------------------+-------------------------+ +|Wx |canvas |FigureManagerWx had | +| | |``frame`` as an alias to | +| | |window, so this also | +| | |breaks BC. | ++-------------------------+-------------------------+-------------------------+ + + +Alternatives +============ + +If there were any alternative solutions to solving the same problem, +they should be discussed here, along with a justification for the +chosen approach. + +Questions +========= + +Mdehoon: Can you elaborate on how to run multiple backends +concurrently? + +OceanWolf: @mdehoon, as I say, not for this MEP, but I see this MEP +opens it up as a future possibility. Basically the ``MainLoopBase`` +class acts a per backend Gcf, in this MEP it tracks the number of +figures open per backend, and manages the mainloops for those +backends. It closes the backend specific mainloop when it detects +that no figures remain open for that backend. Because of this I +imagine that with only a small amount of tweaking that we can do +full-multi-backend matplotlib. No idea yet why one would want to, but +I leave the possibility there in MainLoopBase. With all the +backend-code specifics refactored out of ``FigureManager`` also aids +in this, one manager to rule them (the backends) all. + +Mdehoon: @OceanWolf, OK, thanks for the explanation. Having a uniform +API for the backends is very important for the maintainability of +matplotlib. I think this MEP is a step in the right direction. diff --git a/doc/devel/MEP/MEP28.rst b/doc/devel/MEP/MEP28.rst new file mode 100644 index 000000000000..691ee7b437b3 --- /dev/null +++ b/doc/devel/MEP/MEP28.rst @@ -0,0 +1,373 @@ +============================================= + MEP28: Remove Complexity from Axes.boxplot +============================================= + +.. contents:: + :local: + + +Status +====== +**Discussion** + +Branches and Pull requests +========================== + +The following lists any open PRs or branches related to this MEP: + +#. Deprecate redundant statistical kwargs in ``Axes.boxplot``: https://github.com/phobson/matplotlib/tree/MEP28-initial-deprecations +#. Deprecate redundant style options in ``Axes.boxplot``: https://github.com/phobson/matplotlib/tree/MEP28-initial-deprecations +#. Deprecate passings 2D numpy arrays as input: None +#. Add pre- & post-processing options to ``cbook.boxplot_stats``: https://github.com/phobson/matplotlib/tree/boxplot-stat-transforms +#. Exposing ``cbook.boxplot_stats`` through ``Axes.boxplot`` kwargs: None +#. Remove redundant statistical kwargs in ``Axes.boxplot``: None +#. Remove redundant style options in ``Axes.boxplot``: None +#. Remaining items that arise through discussion: None + +Abstract +======== + +Over the past few releases, the ``Axes.boxplot`` method has grown in +complexity to support fully customizable artist styling and statistical +computation. This lead to ``Axes.boxplot`` being split off into multiple +parts. The statistics needed to draw a boxplot are computed in +``cbook.boxplot_stats``, while the actual artists are drawn by ``Axes.bxp``. +The original method, ``Axes.boxplot`` remains as the most public API that +handles passing the user-supplied data to ``cbook.boxplot_stats``, feeding +the results to ``Axes.bxp``, and pre-processing style information for +each facet of the boxplot plots. + +This MEP will outline a path forward to rollback the added complexity +and simplify the API while maintaining reasonable backwards +compatibility. + +Detailed description +==================== + +Currently, the ``Axes.boxplot`` method accepts parameters that allow the +users to specify medians and confidence intervals for each box that +will be drawn in the plot. These were provided so that avdanced users +could provide statistics computed in a different fashion that the simple +method provided by matplotlib. However, handling this input requires +complex logic to make sure that the forms of the data structure match what +needs to be drawn. At the moment, that logic contains 9 separate if/else +statements nested up to 5 levels deep with a for loop, and may raise up to 2 errors. +These parameters were added prior to the creation of the ``Axes.bxp`` method, +which draws boxplots from a list of dictionaries containing the relevant +statistics. Matplotlib also provides a function that computes these +statistics via ``cbook.boxplot_stats``. Note that advanced users can now +either a) write their own function to compute the stats required by +``Axes.bxp``, or b) modify the output returned by ``cbook.boxplots_stats`` +to fully customize the position of the artists of the plots. With this +flexibility, the parameters to manually specify only the medians and their +confidences intervals remain for backwards compatibility. + +Around the same time that the two roles of ``Axes.boxplot`` were split into +``cbook.boxplot_stats`` for computation and ``Axes.bxp`` for drawing, both +``Axes.boxplot`` and ``Axes.bxp`` were written to accept parameters that +individually toggle the drawing of all components of the boxplots, and +parameters that individually configure the style of those artists. However, +to maintain backwards compatibility, the ``sym`` parameter (previously used +to specify the symbol of the fliers) was retained. This parameter itself +requires fairly complex logic to reconcile the ``sym`` parameters with the +newer ``flierprops`` parameter at the default style specified by ``matplotlibrc``. + +This MEP seeks to dramatically simplify the creation of boxplots for +novice and advanced users alike. Importantly, the changes proposed here +will also be available to downstream packages like seaborn, as seaborn +smartly allows users to pass arbitrary dictionaries of parameters through +the seaborn API to the underlying matplotlib functions. + +This will be achieved in the following way: + + 1. ``cbook.boxplot_stats`` will be modified to allow pre- and post- + computation transformation functions to be passed in (e.g., ``np.log`` + and ``np.exp`` for lognormally distributed data) + 2. ``Axes.boxplot`` will be modified to also accept and naïvely pass them + to ``cbook.boxplots_stats`` (Alt: pass the stat function and a dict + of its optional parameters). + 3. Outdated parameters from ``Axes.boxplot`` will be deprecated and + later removed. + +Importance +---------- + +Since the limits of the whiskers are computed arithmetically, there +is an implicit assumption of normality in box and whisker plots. +This primarily affects which data points are classified as outliers. + +Allowing transformations to the data and the results used to draw +boxplots will allow users to opt-out of that assumption if the +data are known to not fit a normal distribution. + +Below is an example of how ``Axes.boxplot`` classifies outliers of lognormal +data differently depending one these types of transforms. + +.. plot:: + :include-source: true + + import numpy as np + import matplotlib.pyplot as plt + from matplotlib import cbook + np.random.seed(0) + + fig, ax = plt.subplots(figsize=(4, 6)) + ax.set_yscale('log') + data = np.random.lognormal(-1.75, 2.75, size=37) + + stats = cbook.boxplot_stats(data, labels=['arithmetic']) + logstats = cbook.boxplot_stats(np.log(data), labels=['log-transformed']) + + for lsdict in logstats: + for key, value in lsdict.items(): + if key != 'label': + lsdict[key] = np.exp(value) + + stats.extend(logstats) + ax.bxp(stats) + fig.show() + +Implementation +============== + +Passing transform functions to ``cbook.boxplots_stats`` +------------------------------------------------------- + +This MEP proposes that two parameters (e.g., ``transform_in`` and +``transform_out`` be added to the cookbook function that computes the +statistics for the boxplot function. These will be optional keyword-only +arguments and can easily be set to ``lambda x: x`` as a no-op when omitted +by the user. The ``transform_in`` function will be applied to the data +as the ``boxplot_stats`` function loops through each subset of the data +passed to it. After the list of statistics dictionaries are computed the +``transform_out`` function is applied to each value in the dictionaries. + +These transformations can then be added to the call signature of +``Axes.boxplot`` with little impact to that method's complexity. This is +because they can be directly passed to ``cbook.boxplot_stats``. +Alternatively, ``Axes.boxplot`` could be modified to accept an optional +statistical function kwarg and a dictionary of parameters to be direcly +passed to it. + +At this point in the implementation users and external libraries like +seaborn would have complete control via the ``Axes.boxplot`` method. More +importantly, at the very least, seaborn would require no changes to its +API to allow users to take advantage of these new options. + +Simplifications to the ``Axes.boxplot`` API and other functions +--------------------------------------------------------------- + +Simplifying the boxplot method consists primarily of deprecating and then +removing the redundant parameters. Optionally, a next step would include +rectifying minor terminological inconsistencies between ``Axes.boxplot`` +and ``Axes.bxp``. + +The parameters to be deprecated and removed include: + + 1. ``usermedians`` - processed by 10 SLOC, 3 ``if`` blocks, a ``for`` loop + 2. ``conf_intervals`` - handled by 15 SLOC, 6 ``if`` blocks, a ``for`` loop + 3. ``sym`` - processed by 12 SLOC, 4 ``if`` blocks + +Removing the ``sym`` option allows all code in handling the remaining +styling parameters to be moved to ``Axes.bxp``. This doesn't remove +any complexity, but does reinforce the single responsibility principle +among ``Axes.bxp``, ``cbook.boxplot_stats``, and ``Axes.boxplot``. + +Additionally, the ``notch`` parameter could be renamed ``shownotches`` +to be consistent with ``Axes.bxp``. This kind of cleanup could be taken +a step further and the ``whis``, ``bootstrap``, ``autorange`` could +be rolled into the kwargs passed to the new ``statfxn`` parameter. + +Backward compatibility +====================== + +Implementation of this MEP would eventually result in the backwards +incompatible deprecation and then removal of the keyword parameters +``usermedians``, ``conf_intervals``, and ``sym``. Cursory searches on +GitHub indicated that ``usermedians``, ``conf_intervals`` are used by +few users, who all seem to have a very strong knowledge of matplotlib. +A robust deprecation cycle should provide sufficient time for these +users to migrate to a new API. + +Deprecation of ``sym`` however, may have a much broader reach into +the matplotlib userbase. + +Schedule +-------- +An accelerated timeline could look like the following: + +#. v2.0.1 add transforms to ``cbook.boxplots_stats``, expose in ``Axes.boxplot`` +#. v2.1.0 Initial Deprecations , and using 2D numpy arrays as input + + a. Using 2D numpy arrays as input. The semantics around 2D arrays are generally confusing. + b. ``usermedians``, ``conf_intervals``, ``sym`` parameters + +#. v2.2.0 + + a. remove ``usermedians``, ``conf_intervals``, ``sym`` parameters + b. deprecate ``notch`` in favor of ``shownotches`` to be consistent with + other parameters and ``Axes.bxp`` + +#. v2.3.0 + a. remove ``notch`` parameter + b. move all style and artist toggling logic to ``Axes.bxp`` such ``Axes.boxplot`` + is little more than a broker between ``Axes.bxp`` and ``cbook.boxplots_stats`` + + +Anticipated Impacts to Users +---------------------------- + +As described above deprecating ``usermedians`` and ``conf_intervals`` +will likely impact few users. Those who will be impacted are almost +certainly advanced users who will be able to adapt to the change. + +Deprecating the ``sym`` option may import more users and effort should +be taken to collect community feedback on this. + +Anticipated Impacts to Downstream Libraries +------------------------------------------- + +The source code (GitHub master as of 2016-10-17) was inspected for +seaborn and python-ggplot to see if these changes would impact their +use. None of the parameters nominated for removal in this MEP are used by +seaborn. The seaborn APIs that use matplotlib's boxplot function allow +user's to pass arbitrary ``**kwargs`` through to matplotlib's API. Thus +seaborn users with modern matplotlib installations will be able to take +full advantage of any new features added as a result of this MEP. + +Python-ggplot has implemented its own function to draw boxplots. Therefore, +no impact can come to it as a result of implementing this MEP. + +Alternatives +============ + +Variations on the theme +----------------------- + +This MEP can be divided into a few loosely coupled components: + +#. Allowing pre- and post-computation tranformation function in ``cbook.boxplot_stats`` +#. Exposing that transformation in the ``Axes.boxplot`` API +#. Removing redundant statistical options in ``Axes.boxplot`` +#. Shifting all styling parameter processing from ``Axes.boxplot`` to ``Axes.bxp``. + +With this approach, #2 depends and #1, and #4 depends on #3. + +There are two possible approaches to #2. The first and most direct would +be to mirror the new ``transform_in`` and ``tranform_out`` parameters of +``cbook.boxplot_stats`` in ``Axes.boxplot`` and pass them directly. + +The second approach would be to add ``statfxn`` and ``statfxn_args`` +parameters to ``Axes.boxplot``. Under this implementation, the default +value of ``statfxn`` would be ``cbook.boxplot_stats``, but users could +pass their own function. Then ``transform_in`` and ``tranform_out`` would +then be passed as elements of the ``statfxn_args`` parameter. + +.. code:: python + + def boxplot_stats(data, ..., transform_in=None, transform_out=None): + if transform_in is None: + transform_in = lambda x: x + + if transform_out is None: + transform_out = lambda x: x + + output = [] + for _d in data: + d = transform_in(_d) + stat_dict = do_stats(d) + for key, value in stat_dict.item(): + if key != 'label': + stat_dict[key] = transform_out(value) + output.append(d) + return output + + + class Axes(...): + def boxplot_option1(data, ..., transform_in=None, transform_out=None): + stats = cbook.boxplot_stats(data, ..., + transform_in=transform_in, + transform_out=transform_out) + return self.bxp(stats, ...) + + def boxplot_option2(data, ..., statfxn=None, **statopts): + if statfxn is None: + statfxn = boxplot_stats + stats = statfxn(data, **statopts) + return self.bxp(stats, ...) + +Both cases would allow users to do the following: + +.. code:: python + + fig, ax1 = plt.subplots() + artists1 = ax1.boxplot_optionX(data, transform_in=np.log, + transform_out=np.exp) + + +But Option Two lets a user write a completely custom stat function +(e.g., ``my_box_stats``) with fancy BCA confidence intervals and the +whiskers set differently depending on some attribute of the data. + +This is available under the current API: + +.. code:: python + + fig, ax1 = plt.subplots() + my_stats = my_box_stats(data, bootstrap_method='BCA', + whisker_method='dynamic') + ax1.bxp(my_stats) + +And would be more concise with Option Two + +.. code:: python + + fig, ax = plt.subplots() + statopts = dict(transform_in=np.log, transform_out=np.exp) + ax.boxplot(data, ..., **statopts) + +Users could also pass their own function to compute the stats: + +.. code:: python + + fig, ax1 = plt.subplots() + ax1.boxplot(data, statfxn=my_box_stats, bootstrap_method='BCA', + whisker_method='dynamic') + +From the examples above, Option Two seems to have only marginal benifit, +but in the context of downstream libraries like seaborn, its advantage +is more apparent as the following would be possible without any patches +to seaborn: + +.. code:: python + + import seaborn + tips = seaborn.load_data('tips') + g = seaborn.factorplot(x="day", y="total_bill", hue="sex", data=tips, + kind='box', palette="PRGn", shownotches=True, + statfxn=my_box_stats, bootstrap_method='BCA', + whisker_method='dynamic') + +This type of flexibility was the intention behind splitting the overall +boxplot API in the current three functions. In practice however, downstream +libraries like seaborn support versions of matplotlib dating back well +before the split. Thus, adding just a bit more flexibility to the +``Axes.boxplot`` could expose all the functionality to users of the +downstream libraries with modern matplotlib installation without intervention +from the downstream library maintainers. + +Doing less +---------- + +Another obvious alternative would be to omit the added pre- and post- +computation transform functionality in ``cbook.boxplot_stats`` and +``Axes.boxplot``, and simply remove the redundant statistical and style +parameters as described above. + +Doing nothing +------------- + +As with many things in life, doing nothing is an option here. This means +we simply advocate for users and downstream libraries to take advantage +of the split between ``cbook.boxplot_stats`` and ``Axes.bxp`` and let +them decide how to provide an interface to that. diff --git a/doc/devel/MEP/MEP29.rst b/doc/devel/MEP/MEP29.rst new file mode 100644 index 000000000000..9491838d45a1 --- /dev/null +++ b/doc/devel/MEP/MEP29.rst @@ -0,0 +1,82 @@ +========================= + MEP29: Text light markup +========================= + +.. contents:: + :local: + + +Status +====== + +Discussion + + +Branches and Pull requests +========================== + +None at the moment, proof of concept only. + +Abstract +======== + +This MEP proposes to add lightweight markup to the text artist. + +Detailed description +==================== + +Using different size/color/family in a text annotation is difficult because the +`text` method accepts argument for size/color/family/weight/etc. that are used +for the whole text. But, if one wants, for example, to have different colors, +one has to look at the gallery where one such example is provided: +http://matplotlib.org/examples/text_labels_and_annotations/rainbow_text.html + +This example takes a list of strings as well as a list of colors which makes it +cumbersome to use. An alternative would be to use a restricted set of pango-like markup (see https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) and to interpret this markup. + +Some markup examples:: + + Hello world!` + Hello world! + + +Implementation +============== + +A proof of concept is provided in `markup_example.py `_ but it currently only handles the horizontal direction. + +Improvements +------------ + +* This proof of concept uses regex to parse the text but it may be better + to use the html.parser from the standard library. + +* Computation of text fragment positions could benefit from the OffsetFrom + class. See for example item 5 in `Using Complex Coordinates with Annotations `_ + +Problems +-------- + +* One serious problem is how to deal with text having both latex and + html-like tags. For example, consider the follwing:: + + $Bold$ + + Recommendation would be to have mutual exclusion. + + +Backward compatibility +====================== + +None at the moment since it is only a proof of concept + + +Alternatives +============ + +As proposed by @anntzer, this could be also implemented as improvements to +mathtext. For example:: + + r"$\text{Hello \textbf{world}}$" + r"$\text{Hello \textcolor{blue}{world}}$" + r"$\text{Hello \textsf{\small world}}$" diff --git a/doc/devel/MEP/index.rst b/doc/devel/MEP/index.rst new file mode 100644 index 000000000000..9a8d55c7b72a --- /dev/null +++ b/doc/devel/MEP/index.rst @@ -0,0 +1,34 @@ +.. _MEP-index: + +################################ +Matplotlib Enhancement Proposals +################################ + +.. htmlonly:: + + :Release: |version| + :Date: |today| + +.. toctree:: + :maxdepth: 1 + + template + MEP08 + MEP09 + MEP10 + MEP11 + MEP12 + MEP13 + MEP14 + MEP15 + MEP19 + MEP21 + MEP22 + MEP23 + MEP24 + MEP25 + MEP26 + MEP27 + MEP28 + MEP29 + diff --git a/doc/devel/MEP/template.rst b/doc/devel/MEP/template.rst new file mode 100644 index 000000000000..fae4a5132275 --- /dev/null +++ b/doc/devel/MEP/template.rst @@ -0,0 +1,72 @@ +============== + MEP Template +============== + +.. contents:: + :local: + + +This MEP template is a guideline of the sections that a MEP should +contain. Extra sections may be added if appropriate, and unnecessary +sections may be noted as such. + +Status +====== + +MEPs go through a number of phases in their lifetime: + +- **Discussion**: The MEP is being actively discussed on the mailing + list and it is being improved by its author. The mailing list + discussion of the MEP should include the MEP number (MEPxxx) in the + subject line so they can be easily related to the MEP. + +- **Progress**: Consensus was reached on the mailing list and + implementation work has begun. + +- **Completed**: The implementation has been merged into master. + +- **Superseded**: This MEP has been abandoned in favor of another + approach. + +Branches and Pull requests +========================== + +All development branches containing work on this MEP should be linked to from here. + +All pull requests submitted relating to this MEP should be linked to +from here. (A MEP does not need to be implemented in a single pull +request if it makes sense to implement it in discrete phases). + +Abstract +======== + +The abstract should be a short description of what the MEP will achieve. + +Detailed description +==================== + +This section describes the need for the MEP. It should describe the +existing problem that it is trying to solve and why this MEP makes the +situation better. It should include examples of how the new +functionality would be used and perhaps some use cases. + +Implementation +============== + +This section lists the major steps required to implement the MEP. +Where possible, it should be noted where one step is dependent on +another, and which steps may be optionally omitted. Where it makes +sense, each step should include a link related pull requests as the +implementation progresses. + +Backward compatibility +====================== + +This section describes the ways in which the MEP breaks backward incompatibility. + +Alternatives +============ + +If there were any alternative solutions to solving the same problem, +they should be discussed here, along with a justification for the +chosen approach. diff --git a/doc/devel/README.txt b/doc/devel/README.txt new file mode 100644 index 000000000000..3fc074035aff --- /dev/null +++ b/doc/devel/README.txt @@ -0,0 +1,9 @@ +All documentation in the gitwash directory are automatically generated by running the gitwash_dumper.py +script in the project's root directory using the following parameters: + +python gitwash_dumper.py doc/devel Matplotlib --repo-name=matplotlib --github-user=matplotlib \ + --project-url=http://matplotlib.org \ + --project-ml-url=https://mail.python.org/mailman/listinfo/matplotlib-devel + +The script is hosted at https://raw.githubusercontent.com/matthew-brett/gitwash/master/gitwash_dumper.py. +For more information please visit https://github.com/matthew-brett/gitwash \ No newline at end of file diff --git a/doc/devel/add_new_projection.rst b/doc/devel/add_new_projection.rst index 3ec636a82356..9ef7c8f27ac0 100644 --- a/doc/devel/add_new_projection.rst +++ b/doc/devel/add_new_projection.rst @@ -1,8 +1,8 @@ .. _adding-new-scales: -*********************************************** -Adding new scales and projections to matplotlib -*********************************************** +========================================================= +Developer's guide for creating scales and transformations +========================================================= .. ::author Michael Droettboom @@ -130,23 +130,6 @@ interest. API documentation ================= -matplotlib.scale ----------------- - -.. automodule:: matplotlib.scale - :members: - :show-inheritance: - -matplotlib.projections ----------------------- - -.. automodule:: matplotlib.projections - :members: - :show-inheritance: - -matplotlib.projections.polar -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: matplotlib.projections.polar - :members: - :show-inheritance: +* :mod:`matplotlib.scale` +* :mod:`matplotlib.projections` +* :mod:`matplotlib.projections.polar` diff --git a/doc/devel/coding_guide.rst b/doc/devel/coding_guide.rst index cd12a126942a..15cdac438583 100644 --- a/doc/devel/coding_guide.rst +++ b/doc/devel/coding_guide.rst @@ -1,64 +1,24 @@ -.. _coding-guide: +.. _reviewers-guide: -************ -Coding guide -************ +******************** +Reviewers guideline +******************** .. _pull-request-checklist: Pull request checklist ====================== -This checklist should be consulted when creating pull requests to make -sure they are complete before merging. These are not intended to be -rigidly followed---it's just an attempt to list in one place all of -the items that are necessary for a good pull request. Of course, some -items will not always apply. - Branch selection ---------------- * In general, simple bugfixes that are unlikely to introduce new bugs of their own should be merged onto the maintenance branch. New features, or anything that changes the API, should be made against - master. The rules are fuzzy here -- when in doubt, try to get some - consensus. - - * Once changes are merged into the maintenance branch, they should - be merged into master. - -Style ------ - -* Formatting should follow `PEP8 - `_. Exceptions to these - rules are acceptable if it makes the code objectively more readable. - - - You should consider installing/enabling automatic PEP8 checking in your - editor. Part of the test suite is checking PEP8 compliance, things - go smoother if the code is mostly PEP8 compliant to begin with. - -* No tabs (only spaces). No trailing whitespace. - - - Configuring your editor to remove these things upon saving will - save a lot of trouble. + master. The rules are fuzzy here -- when in doubt, target master. -* Import the following modules using the standard scipy conventions:: - - import numpy as np - import numpy.ma as ma - import matplotlib as mpl - from matplotlib import pyplot as plt - import matplotlib.cbook as cbook - import matplotlib.collections as mcol - import matplotlib.patches as mpatches - -* See below for additional points about - :ref:`keyword-argument-processing`, if code in your pull request - does that. - -* Adding a new pyplot function involves generating code. See - :ref:`new-pyplot-function` for more information. +* Once changes are merged into the maintenance branch, they should + be merged into master. Documentation ------------- @@ -66,254 +26,92 @@ Documentation * Every new feature should be documented. If it's a new module, don't forget to add a new rst file to the API docs. -* Docstrings should be in `numpydoc format - `_. - Don't be thrown off by the fact that many of the existing docstrings - are not in that format; we are working to standardize on - `numpydoc`. - - Docstrings should look like (at a minimum):: - - def foo(bar, baz=None): - """ - This is a prose description of foo and all the great - things it does. - - Parameters - ---------- - bar : (type of bar) - A description of bar - - baz : (type of baz), optional - A description of baz - - Returns - ------- - foobar : (type of foobar) - A description of foobar - foobaz : (type of foobaz) - A description of foobaz - """ - # some very clever code - return foobar, foobaz - - -* Each high-level plotting function should have a simple example in +* Each high-level plotting function should have a small example in the `Example` section of the docstring. This should be as simple as possible to demonstrate the method. More complex examples should go - in the `examples` tree. + in the `examples` section of the documentation. * Build the docs and make sure all formatting warnings are addressed. * See :ref:`documenting-matplotlib` for our documentation style guide. -* If your changes are non-trivial, please make an entry in the - :file:`CHANGELOG`. - * If your change is a major new feature, add an entry to :file:`doc/users/whats_new.rst`. * If you change the API in a backward-incompatible way, please document it in :file:`doc/api/api_changes.rst`. -Testing -------- - -Using the test framework is discussed in detail in the section -:ref:`testing`. - -* If the PR is a bugfix, add a test that fails prior to the change and - passes with the change. Include any relevant issue numbers in the - docstring of the test. - -* If this is a new feature, add a test that exercises as much of the - new feature as possible. (The `--with-coverage` option may be - useful here). +PR Review guidelines +==================== -* Make sure the Travis tests are passing before merging. +* If you have commit rights, then you are trusted to use them. Please + help review and merge PRs! - - The Travis tests automatically test on all of the Python versions - matplotlib supports whenever a pull request is created or updated. - The `tox` support in matplotlib may be useful for testing locally. +* For code changes (anything in ``src`` or ``lib``) two developers + (those with commit rights) should review all pull requests. If you + are the first to review a PR and approve of the changes use the + github `'approve review' + `__ + tool to mark it as such. If you are a subsequent reviewer and you + approve, either merge (and backport if needed) or select ``'approve + review'``. -Installation ------------- + Ensure that all API changes are documented in + :file:`doc/api/api_changes` and significant new features have and + entry in :file:`doc/user/whats_new`. -* If you have added new files or directories, or reorganized existing - ones, make sure the new files included in the match patterns in - :file:`MANIFEST.in`, and/or in `package_data` in `setup.py`. +* Documentation and examples may be merged by the first reviewer. Use + the threshold "is this better than it was?" as the review criteria. -C/C++ extensions ----------------- - -* Extensions may be written in C or C++. - -* Code style should conform to PEP7 (understanding that PEP7 doesn't - address C++, but most of its admonitions still apply). - -* Interfacing with Python may be done either with the raw Python/C API - or Cython. Use of PyCXX is discouraged for new code. - -* Python/C interface code should be kept separate from the core C/C++ - code. The interface code should be named `FOO_wrap.cpp`. - -* Header file documentation (aka docstrings) should be in Numpydoc - format. We don't plan on using automated tools for these - docstrings, and the Numpydoc format is well understood in the - scientific Python community. - -Style guide -=========== - -.. _keyword-argument-processing: - -Keyword argument processing ---------------------------- - -Matplotlib makes extensive use of ``**kwargs`` for pass-through -customizations from one function to another. A typical example is in -:func:`matplotlib.pylab.text`. The definition of the pylab text -function is a simple pass-through to -:meth:`matplotlib.axes.Axes.text`:: - - # in pylab.py - def text(*args, **kwargs): - ret = gca().text(*args, **kwargs) - draw_if_interactive() - return ret - -:meth:`~matplotlib.axes.Axes.text` in simplified form looks like this, -i.e., it just passes all ``args`` and ``kwargs`` on to -:meth:`matplotlib.text.Text.__init__`:: - - # in axes.py - def text(self, x, y, s, fontdict=None, withdash=False, **kwargs): - t = Text(x=x, y=y, text=s, **kwargs) +* Make sure the Travis, Appvyor, and codecov tests are passing before + merging. -and :meth:`~matplotlib.text.Text.__init__` (again with liberties for -illustration) just passes them on to the -:meth:`matplotlib.artist.Artist.update` method:: + - Whenever a pull request is created or updated, Travis and Appveyor + automatically runs the test suite on all versions of Python + supported by Matplotlib. The `tox` support in Matplotlib may be + useful for testing locally. - # in text.py - def __init__(self, x=0, y=0, text='', **kwargs): - Artist.__init__(self) - self.update(kwargs) +* Do not self merge, except for 'small' patches to un-break the CI. -``update`` does the work looking for methods named like -``set_property`` if ``property`` is a keyword argument. I.e., no one -looks at the keywords, they just get passed through the API to the -artist constructor which looks for suitably named methods and calls -them with the value. +* Squashing is case-by-case. The balance is between burden on the + contributor, keeping a relatively clean history, and keeping a + history usable for bisecting. The only time we are really strict + about it is to eliminate binary files (ex multiple test image + re-generations) and to remove upstream merges. -As a general rule, the use of ``**kwargs`` should be reserved for -pass-through keyword arguments, as in the example above. If all the -keyword args are to be used in the function, and not passed -on, use the key/value keyword args in the function definition rather -than the ``**kwargs`` idiom. +* Be patient with contributors. -In some cases, you may want to consume some keys in the local -function, and let others pass through. You can ``pop`` the ones to be -used locally and pass on the rest. For example, in -:meth:`~matplotlib.axes.Axes.plot`, ``scalex`` and ``scaley`` are -local arguments and the rest are passed on as -:meth:`~matplotlib.lines.Line2D` keyword arguments:: +* Do not let perfect be the enemy of the good, particularly for + documentation or example PRs. If you find yourself making many + small suggestions, either open a PR against the original branch or + merge the PR and then open a new PR against upstream. - # in axes.py - def plot(self, *args, **kwargs): - scalex = kwargs.pop('scalex', True) - scaley = kwargs.pop('scaley', True) - if not self._hold: self.cla() - lines = [] - for line in self._get_lines(*args, **kwargs): - self.add_line(line) - lines.append(line) -Note: there is a use case when ``kwargs`` are meant to be used locally -in the function (not passed on), but you still need the ``**kwargs`` -idiom. That is when you want to use ``*args`` to allow variable -numbers of non-keyword args. In this case, python will not allow you -to use named keyword args after the ``*args`` usage, so you will be -forced to use ``**kwargs``. An example is -:meth:`matplotlib.contour.ContourLabeler.clabel`:: - - # in contour.py - def clabel(self, *args, **kwargs): - fontsize = kwargs.get('fontsize', None) - inline = kwargs.get('inline', 1) - self.fmt = kwargs.get('fmt', '%1.3f') - colors = kwargs.get('colors', None) - if len(args) == 0: - levels = self.levels - indices = range(len(self.levels)) - elif len(args) == 1: - ...etc... - -Hints -===== - -This section describes how to add certain kinds of new features to -matplotlib. - -.. _custom_backend: - -Developing a new backend ------------------------- - -If you are working on a custom backend, the *backend* setting in -:file:`matplotlibrc` (:ref:`customizing-matplotlib`) supports an -external backend via the ``module`` directive. if -:file:`my_backend.py` is a matplotlib backend in your -:envvar:`PYTHONPATH`, you can set use it on one of several ways - -* in matplotlibrc:: - - backend : module://my_backend - -* with the use directive is your script:: - - import matplotlib - matplotlib.use('module://my_backend') - -* from the command shell with the -d flag:: - - > python simple_plot.py -d module://my_backend - - -.. _sample-data: - -Writing examples ----------------- +Backports +========= -We have hundreds of examples in subdirectories of -:file:`matplotlib/examples`, and these are automatically generated -when the website is built to show up both in the `examples -<../examples/index.html>`_ and `gallery -<../gallery.html>`_ sections of the website. -Any sample data that the example uses should be kept small and -distributed with matplotlib in the -`lib/matplotlib/mpl-data/sample_data/` directory. Then in your -example code you can load it into a file handle with:: +When doing backports please include the branch you backported the +commit to along with the SHA in a comment on the original PR. - import matplotlib.cbook as cbook - fh = cbook.get_sample_data('mydata.dat') +We do a backport from master to v2.0.x assuming: -.. _new-pyplot-function: +* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo -Writing a new pyplot function ------------------------------ +* ``DANGER`` is a read/write remote branch of the matplotlib/matplotlib repo -A large portion of the pyplot interface is automatically generated by the -`boilerplate.py` script (in the root of the source tree). To add or remove -a plotting method from pyplot, edit the appropriate list in `boilerplate.py` -and then run the script which will update the content in -`lib/matplotlib/pyplot.py`. Both the changes in `boilerplate.py` and -`lib/matplotlib/pyplot.py` should be checked into the repository. +The ``TARGET_SHA`` is the hash of the merge commit you would like to +backport. This can be read off of the github PR page (in the UI with +the merge notification) or through the git CLI tools.:: -Note: boilerplate.py looks for changes in the installed version of matplotlib -and not the source tree. If you expect the pyplot.py file to show your new -changes, but they are missing, this might be the cause. + git fetch matplotlib + git checkout v2.0.x + git merge --ff-only matplotlib/v2.0.x + git cherry-pick -m 1 TARGET_SHA + git log --graph --decorate # to look at it + # local tests? (use your judgment) + git push DANGER v2.0.x + # leave a comment on PR noting sha of the resulting commit + # from the cherry-pick + branch it was moved to -Install your new files by running `python setup.py build` and `python setup.py -install` followed by `python boilerplate.py`. The new pyplot.py file should now -have the latest changes. +These commands work on git 2.7.1. diff --git a/doc/devel/color_changes.rst b/doc/devel/color_changes.rst new file mode 100644 index 000000000000..5bb13c37fc05 --- /dev/null +++ b/doc/devel/color_changes.rst @@ -0,0 +1,135 @@ +.. _color_changes: + +********************* +Default Color changes +********************* + +As discussed at length elsewhere [insert links], ``jet`` is an +empirically bad color map and should not be the default color map. +Due to the position that changing the appearance of the plot breaks +backward compatibility, this change has been put off for far longer +than it should have been. In addition to changing the default color +map we plan to take the chance to change the default color-cycle on +plots and to adopt a different color map for filled plots (``imshow``, +``pcolor``, ``contourf``, etc) and for scatter like plots. + + +Default Heat Map Colormap +------------------------- + +The choice of a new color map is fertile ground to bike-shedding ("No, +it should be _this_ color") so we have a proposed set criteria (via +Nathaniel Smith) to evaluate proposed color maps. + +- it should be a sequential colormap, because diverging colormaps are + really misleading unless you know where the "center" of the data is, + and for a default colormap we generally won't. + +- it should be perceptually uniform, i.e., human subjective judgments + of how far apart nearby colors are should correspond as linearly as + possible to the difference between the numerical values they + represent, at least locally. + +- it should have a perceptually uniform luminance ramp, i.e. if you + convert to greyscale it should still be uniform. This is useful both + in practical terms (greyscale printers are still a thing!) and + because luminance is a very strong and natural cue to magnitude. + +- it should also have some kind of variation in hue, because hue + variation is a really helpful additional cue to perception, having + two cues is better than one, and there's no reason not to do it. + +- the hue variation should be chosen to produce reasonable results + even for viewers with the more common types of + colorblindness. (Which rules out things like red-to-green.) + +- For bonus points, it would be nice to choose a hue ramp that still + works if you throw away the luminance variation, because then we + could use the version with varying luminance for 2d plots, and the + version with just hue variation for 3d plots. (In 3d plots you + really want to reserve the luminance channel for lighting/shading, + because your brain is *really* good at extracting 3d shape from + luminance variation. If the 3d surface itself has massively varying + luminance then this screws up the ability to see shape.) + +- Not infringe any existing IP + +Example script +++++++++++++++ + +Proposed Colormaps +++++++++++++++++++ + +Default Scatter Colormap +------------------------ + +For heat-map like applications it can be desirable to cover as much of +the luminence scale as possible, however when color mapping markers, +having markers too close to white can be a problem. For that reason +we propose using a different (but maybe related) color map to the +heat map for marker-based. The design parameters are the same as +above, only with a more limited luminence variation. + + +Example script +++++++++++++++ +:: + + import numpy as np + import matplotlib.pyplot as plt + + np.random.seed(1234) + + fig, (ax1, ax2) = plt.subplots(1, 2) + + N = 50 + x = np.random.rand(N) + y = np.random.rand(N) + colors = np.random.rand(N) + area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses + + ax1.scatter(x, y, s=area, c=colors, alpha=0.5) + + + X,Y = np.meshgrid(np.arange(0, 2*np.pi, .2), + np.arange(0, 2*np.pi, .2)) + U = np.cos(X) + V = np.sin(Y) + Q = ax2.quiver(X, Y, U, V, units='width') + qd = np.random.rand(np.prod(X.shape)) + Q.set_array(qd) + +Proposed Colormaps +++++++++++++++++++ + +Color Cycle / Qualitative color map +----------------------------------- + +When plotting lines it is frequently desirable to plot multiple lines +or artists which need to be distinguishable, but there is no inherent +ordering. + + +Example script +++++++++++++++ +:: + + import numpy as np + import matplotlib.pyplot as plt + + fig, (ax1, ax2) = plt.subplots(1, 2) + + x = np.linspace(0, 1, 10) + + for j in range(10): + ax1.plot(x, x * j) + + + th = np.linspace(0, 2*np.pi, 1024) + for j in np.linspace(0, np.pi, 10): + ax2.plot(th, np.sin(th + j)) + + ax2.set_xlim(0, 2*np.pi) + +Proposed Color cycle +++++++++++++++++++++ diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst new file mode 100644 index 000000000000..f29f624aa0fd --- /dev/null +++ b/doc/devel/contributing.rst @@ -0,0 +1,465 @@ +.. _contributing: + +============ +Contributing +============ + +This project is a community effort, and everyone is welcome to +contribute. + +The project is hosted on https://github.com/matplotlib/matplotlib + +Submitting a bug report +======================= + +If you find a bug in the code or documentation, do not hesitate to submit a +ticket to the +`Bug Tracker `_. You are also +welcome to post feature requests or pull requests. + +If you are reporting a bug, please do your best to include the following: + + 1. A short, top-level summary of the bug. In most cases, this should be 1-2 + sentences. + + 2. A short, self-contained code snippet to reproduce the bug, ideally allowing + a simple copy and paste to reproduce. Please do your best to reduce the code + snippet to the minimum required. + + 3. The actual outcome of the code snippet + + 4. The expected outcome of the code snippet + + 5. The Matplotlib version, Python version and platform that you are using. You + can grab the version with the following commands:: + + >>> import matplotlib + >>> matplotlib.__version__ + '1.5.3' + >>> import platform + >>> platform.python_version() + '2.7.12' + +We have preloaded the issue creation page with a Markdown template that you can +use to organize this information. + +Thank you for your help in keeping bug reports complete, targeted and descriptive. + +Retrieving and installing the latest version of the code +======================================================== + +When developing Matplotlib, sources must be downloaded, built, and installed into +a local environment on your machine. + +Follow the instructions detailed :ref:`here ` to set up your +environment to build Matplotlib from source. + +.. warning:: + + When working on Matplotlib sources, having multiple versions installed by + different methods into the same environment may not always work as expected. + +To work on Matplotlib sources, it is strongly recommended to set up an alternative +development environment, using the something like `virtual environments in python +`_, or a +`conda environment `_. + +If you choose to use an already existing environment, and not a clean virtual or +conda environment, uninstall the current version of Matplotlib in that enviroment +using the same method used to install it. + +If working on Matplotlib documentation only, the above steps are *not* absolutely +necessary. + +We use `Git `_ for version control and +`GitHub `_ for hosting our main repository. + +You can check out the latest sources with the command (see +:ref:`set-up-fork` for more details):: + + git clone https://github.com:matplotlib/matplotlib.git + +and navigate to the :file:`matplotlib` directory. If you have the proper privileges, +you can use ``git@`` instead of ``https://``, which works through the ssh protocol +and might be easier to use if you are using 2-factor authentication. + + +To make sure the tests run locally you must build against the correct version +of freetype. To configure the build system to fetch and build it either export +the env ``MPLLOCALFREETYPE`` as:: + + export MPLLOCALFREETYPE=1 + +or copy :file:`setup.cfg.template` to :file:`setup.cfg` and edit it to contain :: + + [test] + local_freetype = True + + +To install Matplotlib (and compile the c-extensions) run the following +command from the top-level directory :: + + pip install -v -e ./ + +This installs Matplotlib in 'editable/develop mode', i.e., builds +everything and places the correct link entries in the install +directory so that python will be able to import Matplotlib from the +source directory. Thus, any changes to the ``*.py`` files will be +reflected the next time you import the library. If you change the +c-extension source (which might happen if you change branches) you +will need to run:: + + python setup.py build + +or re-run ``pip install -v -e ./``. + + +Alternatively, if you do :: + + pip install -v ./ + +all of the files will be copied to the installation directory however, +you will have to rerun this command every time the source is changed. +Additionally you will need to copy :file:`setup.cfg.template` to +:file:`setup.cfg` and edit it to contain :: + + [test] + local_freetype = True + tests = True + +In either case you can then run the tests to check your work +environment is set up properly:: + + python tests.py + + +.. _pytest: http://doc.pytest.org/en/latest/ +.. _pep8: https://pep8.readthedocs.io/en/latest/ +.. _mock: https://docs.python.org/dev/library/unittest.mock.html +.. _Ghostscript: https://www.ghostscript.com/ +.. _Inkscape: https://inkscape.org> + +.. note:: + + **Additional dependencies for testing**: pytest_ (version 3.0 or later), + mock_ (if python < 3.3), Ghostscript_, Inkscape_ + +.. seealso:: + + * :ref:`testing` + + +Contributing code +================= + +How to contribute +----------------- + +The preferred way to contribute to Matplotlib is to fork the `main +repository `__ on GitHub, +then submit a "pull request" (PR): + + 1. `Create an account `_ on + GitHub if you do not already have one. + + 2. Fork the `project repository + `__: click on the 'Fork' button + near the top of the page. This creates a copy of the code under your + account on the GitHub server. + + 3. Clone this copy to your local disk:: + + $ git clone https://github.com:YourLogin/matplotlib.git + + 4. Create a branch to hold your changes:: + + $ git checkout -b my-feature origin/master + + and start making changes. Never work in the ``master`` branch! + + 5. Work on this copy, on your computer, using Git to do the version + control. When you're done editing e.g., ``lib/matplotlib/collections.py``, + do:: + + $ git add lib/matplotlib/collections.py + $ git commit + + to record your changes in Git, then push them to GitHub with:: + + $ git push -u origin my-feature + +Finally, go to the web page of your fork of the Matplotlib repo, +and click 'Pull request' to send your changes to the maintainers for review. +You may want to consider sending an email to the mailing list for more +visibility. + +.. seealso:: + + * `Git documentation `_ + * :ref:`development-workflow`. + * :ref:`using-git` + +Contributing pull requests +-------------------------- + +It is recommended to check that your contribution complies with the following +rules before submitting a pull request: + + * If your pull request addresses an issue, please use the title to describe + the issue and mention the issue number in the pull request description + to ensure a link is created to the original issue. + + * All public methods should have informative docstrings with sample + usage when appropriate. Use the + `numpy docstring standard `_ + + * Formatting should follow `PEP8 recommendation + `_. You should consider + installing/enabling automatic PEP8 checking in your editor. Part of the + test suite is checking PEP8 compliance, things go smoother if the code is + mostly PEP8 compliant to begin with. + + * Each high-level plotting function should have a simple example in + the ``Example`` section of the docstring. This should be as simple as + possible to demonstrate the method. More complex examples should go + in the ``examples`` tree. + + * Changes (both new features and bugfixes) should be tested. See + :ref:`testing` for more details. + + * Import the following modules using the standard scipy conventions:: + + import numpy as np + import numpy.ma as ma + import matplotlib as mpl + import matplotlib.pyplot as plt + import matplotlib.cbook as cbook + import matplotlib.patches as mpatches + + * If your change is a major new feature, add an entry to the ``What's new`` + section by adding a new file in ``doc/users/whats_new`` (see + :file:`doc/users/whats_new/README` for more information). + + * If you change the API in a backward-incompatible way, please + document it in `doc/api/api_changes`, by adding a new file describing your + changes (see :file:`doc/api/api_changes/README` for more information) + + * See below for additional points about + :ref:`keyword-argument-processing`, if code in your pull request + does that. + +In addition, you can check for common programming errors with the following +tools: + + * Code with a good unittest coverage (at least 70%, better 100%), check + with:: + + pip install coverage + python tests.py --with-coverage + + * No pyflakes warnings, check with:: + + pip install pyflakes + pyflakes path/to/module.py + +.. note:: + + The current state of the Matplotlib code base is not compliant with all + of those guidelines, but we expect that enforcing those constraints on all + new contributions will move the overall code base quality in the right + direction. + + +.. seealso:: + + * :ref:`coding_guidelines` + * :ref:`testing` + * :ref:`documenting-matplotlib` + + + +.. _new_contributors: + +Issues for New Contributors +--------------------------- + +New contributors should look for the following tags when looking for issues. +We strongly recommend that new contributors tackle +`new-contributor-friendly `_ +issues (easy, well documented issues, that do not require an understanding of +the different submodules of Matplotlib) and +`Easy-fix `_ +issues. This helps the contributor become familiar with the contribution +workflow, and for the core devs to become acquainted with the contributor; +besides which, we frequently underestimate how easy an issue is to solve! + +.. _other_ways_to_contribute: + +Other ways to contribute +========================= + + +Code is not the only way to contribute to Matplotlib. For instance, +documentation is also a very important part of the project and often doesn't +get as much attention as it deserves. If you find a typo in the documentation, +or have made improvements, do not hesitate to send an email to the mailing +list or submit a GitHub pull request. Full documentation can be found under +the doc/ directory. + +It also helps us if you spread the word: reference the project from your blog +and articles or link to it from your website! + +.. _coding_guidelines: + +Coding guidelines +================= + +New modules and files: installation +----------------------------------- + +* If you have added new files or directories, or reorganized existing + ones, make sure the new files are included in the match patterns in + :file:`MANIFEST.in`, and/or in `package_data` in `setup.py`. + +C/C++ extensions +---------------- + +* Extensions may be written in C or C++. + +* Code style should conform to PEP7 (understanding that PEP7 doesn't + address C++, but most of its admonitions still apply). + +* Python/C interface code should be kept separate from the core C/C++ + code. The interface code should be named `FOO_wrap.cpp` or + `FOO_wrapper.cpp`. + +* Header file documentation (aka docstrings) should be in Numpydoc + format. We don't plan on using automated tools for these + docstrings, and the Numpydoc format is well understood in the + scientific Python community. + +.. _keyword-argument-processing: + +Keyword argument processing +--------------------------- + +Matplotlib makes extensive use of ``**kwargs`` for pass-through +customizations from one function to another. A typical example is in +:func:`matplotlib.pyplot.text`. The definition of the pylab text +function is a simple pass-through to +:meth:`matplotlib.axes.Axes.text`:: + + # in pylab.py + def text(*args, **kwargs): + ret = gca().text(*args, **kwargs) + draw_if_interactive() + return ret + +:meth:`~matplotlib.axes.Axes.text` in simplified form looks like this, +i.e., it just passes all ``args`` and ``kwargs`` on to +:meth:`matplotlib.text.Text.__init__`:: + + # in axes/_axes.py + def text(self, x, y, s, fontdict=None, withdash=False, **kwargs): + t = Text(x=x, y=y, text=s, **kwargs) + +and :meth:`~matplotlib.text.Text.__init__` (again with liberties for +illustration) just passes them on to the +:meth:`matplotlib.artist.Artist.update` method:: + + # in text.py + def __init__(self, x=0, y=0, text='', **kwargs): + Artist.__init__(self) + self.update(kwargs) + +``update`` does the work looking for methods named like +``set_property`` if ``property`` is a keyword argument. i.e., no one +looks at the keywords, they just get passed through the API to the +artist constructor which looks for suitably named methods and calls +them with the value. + +As a general rule, the use of ``**kwargs`` should be reserved for +pass-through keyword arguments, as in the example above. If all the +keyword args are to be used in the function, and not passed +on, use the key/value keyword args in the function definition rather +than the ``**kwargs`` idiom. + +In some cases, you may want to consume some keys in the local +function, and let others pass through. You can ``pop`` the ones to be +used locally and pass on the rest. For example, in +:meth:`~matplotlib.axes.Axes.plot`, ``scalex`` and ``scaley`` are +local arguments and the rest are passed on as +:meth:`~matplotlib.lines.Line2D` keyword arguments:: + + # in axes/_axes.py + def plot(self, *args, **kwargs): + scalex = kwargs.pop('scalex', True) + scaley = kwargs.pop('scaley', True) + if not self._hold: self.cla() + lines = [] + for line in self._get_lines(*args, **kwargs): + self.add_line(line) + lines.append(line) + +Note: there is a use case when ``kwargs`` are meant to be used locally +in the function (not passed on), but you still need the ``**kwargs`` +idiom. That is when you want to use ``*args`` to allow variable +numbers of non-keyword args. In this case, python will not allow you +to use named keyword args after the ``*args`` usage, so you will be +forced to use ``**kwargs``. An example is +:meth:`matplotlib.contour.ContourLabeler.clabel`:: + + # in contour.py + def clabel(self, *args, **kwargs): + fontsize = kwargs.get('fontsize', None) + inline = kwargs.get('inline', 1) + self.fmt = kwargs.get('fmt', '%1.3f') + colors = kwargs.get('colors', None) + if len(args) == 0: + levels = self.levels + indices = range(len(self.levels)) + elif len(args) == 1: + ...etc... + +.. _custom_backend: + +Developing a new backend +------------------------ + +If you are working on a custom backend, the *backend* setting in +:file:`matplotlibrc` (:ref:`sphx_glr_tutorials_introductory_customizing.py`) supports an +external backend via the ``module`` directive. If +:file:`my_backend.py` is a Matplotlib backend in your +:envvar:`PYTHONPATH`, you can set it on one of several ways + +* in :file:`matplotlibrc`:: + + backend : module://my_backend + +* with the :envvar:`MPLBACKEND` environment variable:: + + > export MPLBACKEND="module://my_backend" + > python simple_plot.py + +* with the use directive in your script:: + + import matplotlib + matplotlib.use('module://my_backend') + +.. _sample-data: + +Writing examples +---------------- + +We have hundreds of examples in subdirectories of +:file:`matplotlib/examples`, and these are automatically generated +when the website is built to show up in the `examples +<../gallery/index.html>` section of the website. + +Any sample data that the example uses should be kept small and +distributed with Matplotlib in the +`lib/matplotlib/mpl-data/sample_data/` directory. Then in your +example code you can load it into a file handle with:: + + import matplotlib.cbook as cbook + fh = cbook.get_sample_data('mydata.dat') diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst index 27309e4b4e2c..cfb08a6d28ba 100644 --- a/doc/devel/documenting_mpl.rst +++ b/doc/devel/documenting_mpl.rst @@ -1,15 +1,54 @@ .. _documenting-matplotlib: -********************** -Documenting matplotlib -********************** +=========================================== +Developer's tips for documenting matplotlib +=========================================== Getting started =============== -The documentation for matplotlib is generated from ReStructured Text using the -Sphinx_ documentation generation tool. Sphinx-1.0 or later and numpydoc 0.4 or -later is required. +Installing dependencies +----------------------- + +The documentation for matplotlib is generated from reStructuredText using the +Sphinx_ documentation generation tool. There are several extra requirements that +are needed to build the documentation. They are listed in the file +`doc-requirements.txt `_ +as well as listed below: + +1. Sphinx-1.3 or later(Version 1.5.0 is not supported) +2. numpydoc 0.4 or later +3. IPython +4. Mock +5. colorspacious +6. pillow +7. graphviz + +.. note:: + + * You'll need a minimal working LaTeX distribution for many examples to run. + * `Graphviz `_ is not a python package, and needs + to be installed separately. + +General structure +----------------- + +All documentation is built from the :file:`doc/` directory. This directory contains both +``.rst`` files that contain pages in the documentation, directories that contain more +``.rst`` files, and configuration files for Sphinx_. + +.. note:: + + An exception to this are the directories :file:`gallery` and :file:`tutorials`, which + exist in the root directory. These contain Python files that are built by `Sphinx Gallery`_. + When the docs are built, directories of the same name will be generated inside of :file:`docs/`. + The generated directories :file:`docs/gallery` and :file:`docs/tutorials` can be safely deleted. + +The configuration file for Sphinx is :file:`doc/conf.py`. It controls which directories +Sphinx parses, how the docs are built, and how the extensions are used. + +Building the docs +----------------- The documentation sources are found in the :file:`doc/` directory in the trunk. To build the users guide in html format, cd into @@ -21,11 +60,19 @@ or:: ./make.py html -you can also pass a ``latex`` flag to make.py to build a pdf, or pass no -arguments to build everything. +There are many other flags you can pass to ``make.py``, and you can see the +full list inside that file. Here are two useful ones: + +* ``clean`` will delete the built Sphinx files. Use this command if you're getting strange + errors about missing paths or broken links, particularly if you move files around. +* ``latex`` builds a PDF of the documentation. -The output produced by Sphinx can be configured by editing the :file:`conf.py` -file located in the :file:`doc/`. +In addition, these are useful flags: + +* ``--help`` will (among other things) display the allowed commands for ``make.py``. +* ``--allowsphinxwarnings`` will allow the docs to continue building even if Sphinx + throws a warning. This is useful for debugging and spot-checking many warnings + at once. Organization of matplotlib's documentation @@ -86,21 +133,23 @@ function that takes a ``**kwargs``. The requirements are: 2. as automated as possible so that as properties change, the docs are updated automagically. -The functions :attr:`matplotlib.artist.kwdocd` and -:func:`matplotlib.artist.kwdoc` to facilitate this. They combine +The function :func:`matplotlib.artist.kwdoc` and the decorator +:func:`matplotlib.docstring.dedent_interpd` facilitate this. They combine python string interpolation in the docstring with the matplotlib artist introspection facility that underlies ``setp`` and ``getp``. -The ``kwdocd`` is a single dictionary that maps class name to a -docstring of ``kwargs``. Here is an example from +The ``kwdoc`` function gives the list of properties as a docstring. In order +to use this in another docstring, first update the +``matplotlib.docstring.interpd`` object, as seen in this example from :mod:`matplotlib.lines`:: # in lines.py - artist.kwdocd['Line2D'] = artist.kwdoc(Line2D) + docstring.interpd.update(Line2D=artist.kwdoc(Line2D)) Then in any function accepting :class:`~matplotlib.lines.Line2D` pass-through ``kwargs``, e.g., :meth:`matplotlib.axes.Axes.plot`:: # in axes.py + @docstring.dedent_interpd def plot(self, *args, **kwargs): """ Some stuff omitted @@ -114,7 +163,6 @@ pass-through ``kwargs``, e.g., :meth:`matplotlib.axes.Axes.plot`:: information """ pass - plot.__doc__ = cbook.dedent(plot.__doc__) % artist.kwdocd Note there is a problem for :class:`~matplotlib.artist.Artist` ``__init__`` methods, e.g., :meth:`matplotlib.patches.Patch.__init__`, @@ -123,7 +171,7 @@ work until the class is fully defined and we can't modify the ``Patch.__init__.__doc__`` docstring outside the class definition. There are some some manual hacks in this case, violating the "single entry point" requirement above -- see the -``artist.kwdocd['Patch']`` setting in :mod:`matplotlib.patches`. +``docstring.interpd.update`` calls in :mod:`matplotlib.patches`. .. _formatting-mpl-docs: @@ -254,11 +302,6 @@ working with Sphinx in general. Here are a few additional things to keep in mind * The autodoc extension will handle index entries for the API, but additional entries in the index_ need to be explicitly added. -.. _Sphinx: http://sphinx.pocoo.org -.. _documentation: http://sphinx.pocoo.org/contents.html -.. _`inline markup`: http://sphinx.pocoo.org/markup/inline.html -.. _index: http://sphinx.pocoo.org/markup/para.html#index-generating-markup - * Please limit the text width of docstrings to 70 characters. * Keyword arguments should be described using a definition list. @@ -280,7 +323,7 @@ script, this will be done automatically at build time to ensure that the code that is included runs and produces the advertised figure. The path should be relative to the ``doc`` directory. Any plots -specific to the documentation should be added to the ``doc/pyplots`` +specific to the documentation should be added to the ``doc/mpl_examples/pyplots`` directory and committed to git. Plots from the ``examples`` directory may be referenced through the symlink ``mpl_examples`` in the ``doc`` directory. e.g.:: @@ -309,7 +352,7 @@ git. Please also add a line to the README in doc/pyplots for any additional requirements necessary to generate a new figure. Once these steps have been taken, these figures can be included in the usual way:: - .. plot:: pyplots/tex_unicode_demo.py + .. plot:: mpl_examples/text_labels_and_annotations/tex_demo.py :include-source: Examples @@ -332,7 +375,7 @@ purposes, like hosting google docs or youtube videos. You can embed a matplotlib animation in the docs by first saving the animation as a movie using :meth:`matplotlib.animation.Animation.save`, and then uploading to `matplotlib's youtube -channel `_ and inserting the +channel `_ and inserting the embedding string youtube provides like:: .. raw:: html @@ -362,7 +405,7 @@ Referring to mpl documents In the documentation, you may want to include to a document in the matplotlib src, e.g., a license file or an image file from `mpl-data`, refer to it via a relative path from the document where the rst file -resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the +resides, e.g., in :file:`users/navigation_toolbar.rst`, we refer to the image icons with:: .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png @@ -392,7 +435,7 @@ So we can include plots from the examples dir using the symlink:: We used to use a symlink for :file:`mpl-data` too, but the distro -becomes very large on platforms that do not support links (eg the font +becomes very large on platforms that do not support links (e.g., the font files are duplicated and large) .. _internal-section-refs: @@ -401,7 +444,7 @@ Internal section references =========================== To maximize internal consistency in section labeling and references, -use hyphen separated, descriptive labels for section references, eg:: +use hyphen separated, descriptive labels for section references, e.g.,:: .. _howto-webapp: @@ -429,7 +472,7 @@ Section names, etc ================== For everything but top level chapters, please use ``Upper lower`` for -section titles, eg ``Possible hangups`` rather than ``Possible +section titles, e.g., ``Possible hangups`` rather than ``Possible Hangups`` Inheritance diagrams @@ -494,3 +537,9 @@ Some helpful functions:: Shift region to the right .. TODO: Add section about uploading docs + +.. _Sphinx: http://www.sphinx-doc.org +.. _documentation: http://www.sphinx-doc.org/contents.html +.. _`inline markup`: http://www.sphinx-doc.org/markup/inline.html +.. _index: http://www.sphinx-doc.org/markup/para.html#index-generating-markup +.. _`Sphinx Gallery`: https://sphinx-gallery.readthedocs.io/en/latest/ diff --git a/doc/devel/gitwash/branch_dropdown.png b/doc/devel/gitwash/branch_dropdown.png new file mode 100644 index 000000000000..1bb7a577732c Binary files /dev/null and b/doc/devel/gitwash/branch_dropdown.png differ diff --git a/doc/devel/gitwash/configure_git.rst b/doc/devel/gitwash/configure_git.rst index 70c6a5a37b63..3a172d5ba44d 100644 --- a/doc/devel/gitwash/configure_git.rst +++ b/doc/devel/gitwash/configure_git.rst @@ -1,3 +1,5 @@ +.. highlight:: bash + .. _configure-git: =============== @@ -9,9 +11,12 @@ Overview ======== -Your personal git_ configurations are saved in the ``.gitconfig`` file in +Your personal git configurations are saved in the ``.gitconfig`` file in your home directory. -Here is an example ``.gitconfig`` file:: + +Here is an example ``.gitconfig`` file: + +.. code-block:: none [user] name = Your Name @@ -20,8 +25,8 @@ Here is an example ``.gitconfig`` file:: [alias] ci = commit -a co = checkout - st = status -a - stat = status -a + st = status + stat = status br = branch wdiff = diff --color-words @@ -31,13 +36,6 @@ Here is an example ``.gitconfig`` file:: [merge] summary = true - [apply] - whitespace = fix - - [core] - autocrlf = input - - You can edit this file directly or you can use the ``git config --global`` command:: @@ -69,7 +67,9 @@ line:: git config --global user.email you@yourdomain.example.com This will write the settings into your git configuration file, which -should now contain a user section with your name and email:: +should now contain a user section with your name and email: + +.. code-block:: none [user] name = Your Name @@ -97,7 +97,9 @@ The following ``git config --global`` commands:: git config --global alias.wdiff "diff --color-words" will create an ``alias`` section in your ``.gitconfig`` file with contents -like this:: +like this: + +.. code-block:: none [alias] ci = commit -a @@ -117,7 +119,9 @@ You may also want to make sure that your editor of choice is used :: Merging ------- -To enforce summaries when doing merges (``~/.gitconfig`` file again):: +To enforce summaries when doing merges (``~/.gitconfig`` file again): + +.. code-block:: none [merge] log = true @@ -126,5 +130,43 @@ Or from the command line:: git config --global merge.log true +.. _fancy-log: + +Fancy log output +---------------- + +This is a very nice alias to get a fancy log output; it should go in the +``alias`` section of your ``.gitconfig`` file: + +.. code-block:: none + + lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative + +You use the alias with:: + + git lg + +and it gives graph / text output something like this (but with color!): + +.. code-block:: none + + * 6d8e1ee - (HEAD, origin/my-fancy-feature, my-fancy-feature) NF - a fancy file (45 minutes ago) [Matthew Brett] + * d304a73 - (origin/placeholder, placeholder) Merge pull request #48 from hhuuggoo/master (2 weeks ago) [Jonathan Terhorst] + |\ + | * 4aff2a8 - fixed bug 35, and added a test in test_bugfixes (2 weeks ago) [Hugo] + |/ + * a7ff2e5 - Added notes on discussion/proposal made during Data Array Summit. (2 weeks ago) [Corran Webster] + * 68f6752 - Initial implimentation of AxisIndexer - uses 'index_by' which needs to be changed to a call on an Axes object - this is all very sketchy right now. (2 weeks ago) [Corr + * 376adbd - Merge pull request #46 from terhorst/master (2 weeks ago) [Jonathan Terhorst] + |\ + | * b605216 - updated joshu example to current api (3 weeks ago) [Jonathan Terhorst] + | * 2e991e8 - add testing for outer ufunc (3 weeks ago) [Jonathan Terhorst] + | * 7beda5a - prevent axis from throwing an exception if testing equality with non-axis object (3 weeks ago) [Jonathan Terhorst] + | * 65af65e - convert unit testing code to assertions (3 weeks ago) [Jonathan Terhorst] + | * 956fbab - Merge remote-tracking branch 'upstream/master' (3 weeks ago) [Jonathan Terhorst] + | |\ + | |/ + +Thanks to Yury V. Zaytsev for posting it. .. include:: links.inc diff --git a/doc/devel/gitwash/development_workflow.rst b/doc/devel/gitwash/development_workflow.rst index 6bc15bc0125c..864165bcabe8 100644 --- a/doc/devel/gitwash/development_workflow.rst +++ b/doc/devel/gitwash/development_workflow.rst @@ -1,75 +1,104 @@ +.. highlight:: bash + .. _development-workflow: -==================== +#################### Development workflow -==================== +#################### -You've discovered a bug or something else you want to change -in matplotlib_ .. |emdash| excellent! +You already have your own forked copy of the `Matplotlib`_ repository, by +following :ref:`forking`. You have :ref:`set-up-fork`. You have configured +git by following :ref:`configure-git`. Now you are ready for some real work. -You've worked out a way to fix it |emdash| even better! +Workflow summary +================ -You want to tell us about it |emdash| best of all! +In what follows we'll refer to the upstream Matplotlib ``master`` branch, as +"trunk". -The easiest way to contribute to matplotlib_ is through github_. If -for some reason you don't want to use github, see -:ref:`making-patches` for instructions on how to email patches to the -mailing list. +* Don't use your ``master`` branch for anything. Consider deleting it. +* When you are starting a new set of changes, fetch any changes from trunk, + and start a new *feature branch* from that. +* Make a new branch for each separable set of changes |emdash| "one task, one + branch" (`ipython git workflow`_). +* Name your branch for the purpose of the changes - e.g. + ``bugfix-for-issue-14`` or ``refactor-database-code``. +* If you can possibly avoid it, avoid merging trunk or any other branches into + your feature branch while you are working. +* If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk` +* Ask on the `Matplotlib mailing list`_ if you get stuck. +* Ask for code review! -You already have your own forked copy of the matplotlib_ repository, by -following :ref:`forking`, :ref:`set-up-fork`, and you have configured -git_ by following :ref:`configure-git`. +This way of working helps to keep work well organized, with readable history. +This in turn makes it easier for project maintainers (that might be you) to see +what you've done, and why you did it. -Workflow summary -================ +See `linux git workflow`_ and `ipython git workflow`_ for some explanation. -* Keep your ``master`` branch clean of edits that have not been merged - to the main matplotlib_ development repo. Your ``master`` then will follow - the main matplotlib_ repository. -* Start a new *feature branch* for each set of edits that you do. -* Do not merge the ``master`` branch or maintenance tracking branches - into your feature branch. If you need to include commits from upstream - branches (either to pick up a bug fix or to resolve a conflict) please - *rebase* your branch on the upstream branch. -* Ask for review! +Consider deleting your master branch +==================================== -This way of working really helps to keep work well organized, and in -keeping history as clear as possible. +It may sound strange, but deleting your own ``master`` branch can help reduce +confusion about which branch you are on. See `deleting master on github`_ for +details. -See |emdash| for example |emdash| `linux git workflow`_. +.. _update-mirror-trunk: -Making a new feature branch -=========================== +Update the mirror of trunk +========================== -:: +First make sure you have done :ref:`linking-to-upstream`. - git checkout -b my-new-feature master +From time to time you should fetch the upstream (trunk) changes from github:: -This will create and immediately check out a feature branch based on -``master``. To create a feature branch based on a maintenance branch, -use:: + git fetch upstream - git fetch origin - git checkout -b my-new-feature origin/v1.0.x +This will pull down any commits you don't have, and set the remote branches to +point to the right commit. For example, 'trunk' is the branch referred to by +(remote/branchname) ``upstream/master`` - and if there have been commits since +you last checked, ``upstream/master`` will change after you do the fetch. -Generally, you will want to keep this also on your public github_ fork -of matplotlib_. To do this, you `git push`_ this new branch up to your github_ -repo. Generally (if you followed the instructions in these pages, and -by default), git will have a link to your github_ repo, called -``origin``. You push up to your own repo on github_ with:: +.. _make-feature-branch: + +Make a new feature branch +========================= + +When you are ready to make some changes to the code, you should start a new +branch. Branches that are for a collection of related edits are often called +'feature branches'. + +Making an new branch for each set of related changes will make it easier for +someone reviewing your branch to see what you are doing. + +Choose an informative name for the branch to remind yourself and the rest of us +what the changes in the branch are for. For example ``add-ability-to-fly``, or +``buxfix-for-issue-42``. + +:: + + # Update the mirror of trunk + git fetch upstream + # Make new feature branch starting at current trunk + git branch my-new-feature upstream/master + git checkout my-new-feature + +Generally, you will want to keep your feature branches on your public github_ +fork of `Matplotlib`_. To do this, you `git push`_ this new branch up to your +github repo. Generally (if you followed the instructions in these pages, and by +default), git will have a link to your github repo, called ``origin``. You push +up to your own repo on github with:: git push origin my-new-feature -You will need to use this exact command, rather than simply ``git -push`` every time you want to push changes on your feature branch to -your github_ repo. However, in git >1.7 you can set up a link by -using the ``--set-upstream`` option:: +In git >= 1.7 you can ensure that the link is correctly set by using the +``--set-upstream`` option:: git push --set-upstream origin my-new-feature -and then next time you need to push changes to your branch a simple -``git push`` will suffice. Note that ``git push`` pushes out all -branches that are linked to a remote branch. +From now on git will know that ``my-new-feature`` is related to the +``my-new-feature`` branch in the github repo. + +.. _edit-flow: The editing workflow ==================== @@ -89,19 +118,21 @@ In more detail #. Make some changes #. See which files have changed with ``git status`` (see `git status`_). - You'll see a listing like this one:: + You'll see a listing like this one: + + .. code-block:: none # On branch ny-new-feature # Changed but not updated: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # - # modified: README + # modified: README # # Untracked files: # (use "git add ..." to include in what will be committed) # - # INSTALL + # INSTALL no changes added to commit (use "git add" and/or "git commit -a") #. Check what the actual changes are with ``git diff`` (`git diff`_). @@ -114,167 +145,279 @@ In more detail faith |emdash| or see `why the -a flag?`_ |emdash| and the helpful use-case description in the `tangled working copy problem`_. The `git commit`_ manual page might also be useful. -#. To push the changes up to your forked repo on github_, do a ``git - push`` (see `git push`). +#. To push the changes up to your forked repo on github, do a ``git + push`` (see `git push`_). + +Ask for your changes to be reviewed or merged +============================================= -Asking for code review |emdash| open a Pull Request (PR) -======================================================== +When you are ready to ask for someone to review your code and consider a merge: -It's a good idea to consult the :ref:`pull-request-checklist` to make -sure your pull request is ready for merging. +#. Go to the URL of your forked repo, say + ``https://github.com/your-user-name/matplotlib``. +#. Use the 'Switch Branches' dropdown menu near the top left of the page to + select the branch with your changes: + .. image:: branch_dropdown.png -#. Go to your repo URL |emdash| e.g., - ``http://github.com/your-user-name/matplotlib``. +#. Click on the 'Pull request' button: -#. Select your feature branch from the drop down menu: + .. image:: pull_button.png -#. Click on the green button: + Enter a title for the set of changes, and some explanation of what you've + done. Say if there is anything you'd like particular attention for - like a + complicated change or some code you are not happy with. -#. Make sure that you are requesting a pull against the correct branch + If you don't think your request is ready to be merged, just say so in your + pull request message. This is still a good way of getting some preliminary + code review. -#. Enter a PR heading and description (if there is only one commit in - the PR github will automatically fill these fields for you). If - this PR is addressing a specific issue, please reference it by number - (ex #1325) which github will automatically make into links. +Some other things you might want to do +====================================== -#. Click 'Create Pull Request' button! +Delete a branch on github +------------------------- -#. Discussion of the change will take place in the pull request - thread. +:: + + git checkout master + # delete branch locally + git branch -D my-unwanted-branch + # delete branch on github + git push origin :my-unwanted-branch + +Note the colon ``:`` before ``my-unwanted-branch``. See also: +https://help.github.com/articles/pushing-to-a-remote/#deleting-a-remote-branch-or-tag + +Several people sharing a single repository +------------------------------------------ + +If you want to work on some stuff with other people, where you are all +committing into the same repository, or even the same branch, then just +share it via github. + +First fork Matplotlib into your account, as from :ref:`forking`. +Then, go to your forked repository github page, say +``https://github.com/your-user-name/matplotlib`` -Staying up to date with changes in the central repository -========================================================= +Click on the 'Admin' button, and add anyone else to the repo as a +collaborator: + + .. image:: pull_button.png + +Now all those people can do:: + + git clone https://gith hub.com:your-user-name/matplotlib.git + +Remember that links starting with ``https`` or ``git@`` are read-write, and that +``git@`` uses the ssh protocol; links starting with ``git://`` are read-only. + +Your collaborators can then commit directly into that repo with the +usual:: + + git commit -am 'ENH - much better code' + git push origin master # pushes directly into your repo + +Explore your repository +----------------------- + +To see a graphical representation of the repository branches and +commits:: -This updates your working copy from the upstream `matplotlib github`_ + gitk --all + +To see a linear list of commits for this branch:: + + git log + +You can also look at the `network graph visualizer`_ for your github repo. -Overview --------- +Finally the :ref:`fancy-log` ``lg`` alias will give you a reasonable text-based +graph of the repository. -:: +.. _rebase-on-trunk: - # go to your master branch - git checkout master - # pull changes from github - git fetch upstream - # merge from upstream - git merge --ff-only upstream/master +Rebasing on trunk +----------------- -In detail ---------- +Let's say you thought of some work you'd like to do. You +:ref:`update-mirror-trunk` and :ref:`make-feature-branch` called +``cool-feature``. At this stage trunk is at some commit, let's call it E. Now +you make some new commits on your ``cool-feature`` branch, let's call them A, B, +C. Maybe your changes take a while, or you come back to them after a while. In +the meantime, trunk has progressed from commit E to commit (say) G: -We suggest that you do this only for your ``master`` branch, and leave -your 'feature' branches unmerged, to keep their history as clean as -possible. This makes code review easier:: +.. code-block:: none - git checkout master + A---B---C cool-feature + / + D---E---F---G trunk -Make sure you have done :ref:`linking-to-upstream`. +At this stage you consider merging trunk into your feature branch, and you +remember that this here page sternly advises you not to do that, because the +history will get messy. Most of the time you can just ask for a review, and not +worry that trunk has got a little ahead. But sometimes, the changes in trunk +might affect your changes, and you need to harmonize them. In this situation +you may prefer to do a rebase. -Merge the upstream code into your current development by first pulling -the upstream repo to a copy on your local machine:: +rebase takes your changes (A, B, C) and replays them as if they had been made to +the current state of ``trunk``. In other words, in this case, it takes the +changes represented by A, B, C and replays them on top of G. After the rebase, +your history will look like this: - git fetch upstream +.. code-block:: none -then merging into your current branch:: + A'--B'--C' cool-feature + / + D---E---F---G trunk - git merge --ff-only upstream/master +See `rebase without tears`_ for more detail. -The ``--ff-only`` option guarantees that if you have mistakenly -committed code on your ``master`` branch, the merge fails at this point. -If you were to merge ``upstream/master`` to your ``master``, you -would start to diverge from the upstream. If this command fails, see -the section on accidents_. +To do a rebase on trunk:: -The letters 'ff' in ``--ff-only`` mean 'fast forward', which is a -special case of merge where git can simply update your branch to point -to the other branch and not do any actual merging of files. For -``master`` and other integration branches this is exactly what you -want. + # Update the mirror of trunk + git fetch upstream + # go to the feature branch + git checkout cool-feature + # make a backup in case you mess up + git branch tmp cool-feature + # rebase cool-feature onto trunk + git rebase --onto upstream/master upstream/master cool-feature -Other integration branches --------------------------- +In this situation, where you are already on branch ``cool-feature``, the last +command can be written more succinctly as:: -Some people like to keep separate local branches corresponding to the -maintenance branches on github. At the time of this writing, ``v1.0.x`` -is the active maintenance branch. If you have such a local branch, -treat is just as ``master``: don't commit on it, and before starting -new branches off of it, update it from upstream:: + git rebase upstream/master - git checkout v1.0.x - git fetch upstream - git merge --ff-only upstream/v1.0.x +When all looks good you can delete your backup branch:: -But you don't necessarily have to have such a branch. Instead, if you -are preparing a bugfix that applies to the maintenance branch, fetch -from upstream and base your bugfix on the remote branch:: + git branch -D tmp - git fetch upstream - git checkout -b my-bug-fix upstream/v1.0.x +If it doesn't look good you may need to have a look at +:ref:`recovering-from-mess-up`. -.. _accidents: +If you have made changes to files that have also changed in trunk, this may +generate merge conflicts that you need to resolve - see the `git rebase`_ man +page for some instructions at the end of the "Description" section. There is +some related help on merging in the git user manual - see `resolving a merge`_. -Recovering from accidental commits on master --------------------------------------------- +.. _recovering-from-mess-up: -If you have accidentally committed changes on ``master`` and -``git merge --ff-only`` fails, don't panic! First find out how much -you have diverged:: +Recovering from mess-ups +------------------------ - git diff upstream/master...master +Sometimes, you mess up merges or rebases. Luckily, in git it is +relatively straightforward to recover from such mistakes. -If you find that you want simply to get rid of the changes, reset -your ``master`` branch to the upstream version:: +If you mess up during a rebase:: - git reset --hard upstream/master + git rebase --abort -As you might surmise from the words 'reset' and 'hard', this command -actually causes your changes to the current branch to be lost, so -think twice. +If you notice you messed up after the rebase:: -If, on the other hand, you find that you want to preserve the changes, -create a feature branch for them:: + # reset branch back to the saved point + git reset --hard tmp - git checkout -b my-important-changes +If you forgot to make a backup branch:: -Now ``my-important-changes`` points to the branch that has your -changes, and you can safely reset ``master`` as above |emdash| but -make sure to reset the correct branch:: + # look at the reflog of the branch + git reflog show cool-feature - git checkout master - git reset --hard upstream/master + 8630830 cool-feature@{0}: commit: BUG: io: close file handles immediately + 278dd2a cool-feature@{1}: rebase finished: refs/heads/my-feature-branch onto 11ee694744f2552d + 26aa21a cool-feature@{2}: commit: BUG: lib: make seek_gzip_factory not leak gzip obj + ... + # reset the branch to where it was before the botched rebase + git reset --hard cool-feature@{2} -Deleting a branch on github_ -============================ +.. _rewriting-commit-history: -:: +Rewriting commit history +------------------------ - git checkout master - # delete branch locally - git branch -D my-unwanted-branch - # delete branch on github - git push origin :my-unwanted-branch +.. note:: -(Note the colon ``:`` before ``test-branch``. See also: -http://github.com/guides/remove-a-remote-branch + Do this only for your own feature branches. +There's an embarrassing typo in a commit you made? Or perhaps the you +made several false starts you would like the posterity not to see. -Exploring your repository -========================= +This can be done via *interactive rebasing*. -To see a graphical representation of the repository branches and -commits:: +Suppose that the commit history looks like this:: - gitk --all + git log --oneline + eadc391 Fix some remaining bugs + a815645 Modify it so that it works + 2dec1ac Fix a few bugs + disable + 13d7934 First implementation + 6ad92e5 * masked is now an instance of a new object, MaskedConstant + 29001ed Add pre-nep for a copule of structured_array_extensions. + ... -To see a linear list of commits for this branch:: +and ``6ad92e5`` is the last commit in the ``cool-feature`` branch. Suppose we +want to make the following changes: - git log +* Rewrite the commit message for ``13d7934`` to something more sensible. +* Combine the commits ``2dec1ac``, ``a815645``, ``eadc391`` into a single one. -You can also look at the `network graph visualizer`_ for your github_ -repo. +We do as follows:: + + # make a backup of the current state + git branch tmp HEAD + # interactive rebase + git rebase -i 6ad92e5 + +This will open an editor with the following text in it:: + + pick 13d7934 First implementation + pick 2dec1ac Fix a few bugs + disable + pick a815645 Modify it so that it works + pick eadc391 Fix some remaining bugs + + # Rebase 6ad92e5..eadc391 onto 6ad92e5 + # + # Commands: + # p, pick = use commit + # r, reword = use commit, but edit the commit message + # e, edit = use commit, but stop for amending + # s, squash = use commit, but meld into previous commit + # f, fixup = like "squash", but discard this commit's log message + # + # If you remove a line here THAT COMMIT WILL BE LOST. + # However, if you remove everything, the rebase will be aborted. + # + +To achieve what we want, we will make the following changes to it:: + + r 13d7934 First implementation + pick 2dec1ac Fix a few bugs + disable + f a815645 Modify it so that it works + f eadc391 Fix some remaining bugs + +This means that (i) we want to edit the commit message for +``13d7934``, and (ii) collapse the last three commits into one. Now we +save and quit the editor. + +Git will then immediately bring up an editor for editing the commit +message. After revising it, we get the output:: + + [detached HEAD 721fc64] FOO: First implementation + 2 files changed, 199 insertions(+), 66 deletions(-) + [detached HEAD 0f22701] Fix a few bugs + disable + 1 files changed, 79 insertions(+), 61 deletions(-) + Successfully rebased and updated refs/heads/my-feature-branch. + +and the history looks now like this:: + + 0f22701 Fix a few bugs + disable + 721fc64 ENH: Sophisticated feature + 6ad92e5 * masked is now an instance of a new object, MaskedConstant + +If it went wrong, recovery is again possible as explained :ref:`above +`. .. include:: links.inc diff --git a/doc/devel/gitwash/following_latest.rst b/doc/devel/gitwash/following_latest.rst index 4419abd82d69..03518ea52f44 100644 --- a/doc/devel/gitwash/following_latest.rst +++ b/doc/devel/gitwash/following_latest.rst @@ -1,3 +1,5 @@ +.. highlight:: bash + .. _following-latest: ============================= @@ -5,12 +7,12 @@ ============================= These are the instructions if you just want to follow the latest -*matplotlib* source, but you don't need to do any development for now. +*Matplotlib* source, but you don't need to do any development for now. The steps are: * :ref:`install-git` -* get local copy of the git repository from github_ +* get local copy of the `Matplotlib github`_ git repository * update local copy from time to time Get the local copy of the code diff --git a/doc/devel/gitwash/forking_hell.rst b/doc/devel/gitwash/forking_hell.rst index 261ae775d7dc..b79e13400a62 100644 --- a/doc/devel/gitwash/forking_hell.rst +++ b/doc/devel/gitwash/forking_hell.rst @@ -1,32 +1,34 @@ +.. highlight:: bash + .. _forking: -========================================== -Making your own copy (fork) of matplotlib -========================================== +====================================================== +Making your own copy (fork) of Matplotlib +====================================================== You need to do this only once. The instructions here are very similar -to the instructions at http://help.github.com/forking/ |emdash| please see +to the instructions at https://help.github.com/forking/ |emdash| please see that page for more detail. We're repeating some of it here just to give the -specifics for the matplotlib_ project, and to suggest some default names. +specifics for the `Matplotlib`_ project, and to suggest some default names. -Set up and configure a github_ account -====================================== +Set up and configure a github account +===================================== -If you don't have a github_ account, go to the github_ page, and make one. +If you don't have a github account, go to the github page, and make one. You then need to configure your account to allow write access |emdash| see the ``Generating SSH keys`` help on `github help`_. -Create your own forked copy of matplotlib_ -=========================================== +Create your own forked copy of `Matplotlib`_ +====================================================== -#. Log into your github_ account. -#. Go to the matplotlib_ github home at `matplotlib github`_. +#. Log into your github account. +#. Go to the `Matplotlib`_ github home at `Matplotlib github`_. #. Click on the *fork* button: .. image:: forking_button.png - Now, after a short pause you should find yourself at the home page - for your own forked copy of matplotlib_. + Now, after a short pause, you should find yourself at the home page for + your own forked copy of `Matplotlib`_. .. include:: links.inc diff --git a/doc/devel/gitwash/git_development.rst b/doc/devel/gitwash/git_development.rst index 3808ca9fa1c4..c5b910d86342 100644 --- a/doc/devel/gitwash/git_development.rst +++ b/doc/devel/gitwash/git_development.rst @@ -13,3 +13,4 @@ Contents: set_up_fork configure_git development_workflow + maintainer_workflow diff --git a/doc/devel/gitwash/git_install.rst b/doc/devel/gitwash/git_install.rst index a87224d4e412..66eca8c29bde 100644 --- a/doc/devel/gitwash/git_install.rst +++ b/doc/devel/gitwash/git_install.rst @@ -1,3 +1,5 @@ +.. highlight:: bash + .. _install-git: ============= @@ -8,8 +10,8 @@ Overview ======== ================ ============= -Debian / Ubuntu ``sudo apt-get install git-core`` -Fedora ``sudo yum install git-core`` +Debian / Ubuntu ``sudo apt-get install git`` +Fedora ``sudo yum install git`` Windows Download and install msysGit_ OS X Use the git-osx-installer_ ================ ============= @@ -17,10 +19,10 @@ OS X Use the git-osx-installer_ In detail ========= -See the git_ page for the most recent information. +See the git page for the most recent information. -Have a look at the github_ install help pages available from `github help`_ +Have a look at the github install help pages available from `github help`_ -There are good instructions here: http://book.git-scm.com/2_installing_git.html +There are good instructions here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git .. include:: links.inc diff --git a/doc/devel/gitwash/git_intro.rst b/doc/devel/gitwash/git_intro.rst index 786eb84d5bd3..1f89b7e9fb51 100644 --- a/doc/devel/gitwash/git_intro.rst +++ b/doc/devel/gitwash/git_intro.rst @@ -1,18 +1,20 @@ +.. highlight:: bash + ============== Introduction ============== -These pages describe a git_ and github_ workflow for the matplotlib_ +These pages describe a git_ and github_ workflow for the `Matplotlib`_ project. There are several different workflows here, for different ways of -working with *matplotlib*. +working with *Matplotlib*. -This is not a comprehensive git_ reference, it's just a workflow for our -own project. It's tailored to the github_ hosting service. You may well -find better or quicker ways of getting stuff done with git_, but these +This is not a comprehensive git reference, it's just a workflow for our +own project. It's tailored to the github hosting service. You may well +find better or quicker ways of getting stuff done with git, but these should get you started. -For general resources for learning git_ see :ref:`git-resources`. +For general resources for learning git, see :ref:`git-resources`. .. include:: links.inc diff --git a/doc/devel/gitwash/git_links.inc b/doc/devel/gitwash/git_links.inc index 5b769eccb6fb..abb60508b6a1 100644 --- a/doc/devel/gitwash/git_links.inc +++ b/doc/devel/gitwash/git_links.inc @@ -9,46 +9,51 @@ nipy, NIPY, Nipy, etc... .. git stuff -.. _git: http://git-scm.com/ -.. _github: http://github.com -.. _github help: http://help.github.com -.. _msysgit: http://code.google.com/p/msysgit/downloads/list -.. _git-osx-installer: http://code.google.com/p/git-osx-installer/downloads/list +.. _git: https://git-scm.com/ +.. _github: https://github.com +.. _github help: https://help.github.com +.. _msysgit: https://git-scm.com/download/win +.. _git-osx-installer: https://git-scm.com/download/mac .. _subversion: http://subversion.tigris.org/ -.. _git cheat sheet: http://github.com/guides/git-cheat-sheet -.. _pro git book: http://progit.org/ -.. _git svn crash course: http://git-scm.com/course/svn.html -.. _learn.github: http://learn.github.com/ -.. _network graph visualizer: http://github.com/blog/39-say-hello-to-the-network-graph-visualizer -.. _git user manual: http://schacon.github.com/git/user-manual.html -.. _git tutorial: http://schacon.github.com/git/gittutorial.html -.. _git community book: http://book.git-scm.com/ -.. _git ready: http://www.gitready.com/ -.. _git casts: http://www.gitcasts.com/ +.. _git cheat sheet: https://help.github.com/git-cheat-sheets/ +.. _pro git book: https://git-scm.com/book/en/v2 +.. _git svn crash course: https://git-scm.com/course/svn.html +.. _network graph visualizer: https://github.com/blog/39-say-hello-to-the-network-graph-visualizer +.. _git user manual: https://schacon.github.io/git/user-manual.html +.. _git tutorial: https://schacon.github.io/git/gittutorial.html +.. _git community book: https://git-scm.com/book/en/v2 +.. _git ready: http://gitready.com/ .. _Fernando's git page: http://www.fperez.org/py4science/git.html .. _git magic: http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html -.. _git concepts: http://www.eecs.harvard.edu/~cduan/technical/git/ -.. _git clone: http://schacon.github.com/git/git-clone.html -.. _git checkout: http://schacon.github.com/git/git-checkout.html -.. _git commit: http://schacon.github.com/git/git-commit.html -.. _git push: http://schacon.github.com/git/git-push.html -.. _git pull: http://schacon.github.com/git/git-pull.html -.. _git add: http://schacon.github.com/git/git-add.html -.. _git status: http://schacon.github.com/git/git-status.html -.. _git diff: http://schacon.github.com/git/git-diff.html -.. _git log: http://schacon.github.com/git/git-log.html -.. _git branch: http://schacon.github.com/git/git-branch.html -.. _git remote: http://schacon.github.com/git/git-remote.html -.. _git config: http://schacon.github.com/git/git-config.html -.. _why the -a flag?: http://www.gitready.com/beginner/2009/01/18/the-staging-area.html -.. _git staging area: http://www.gitready.com/beginner/2009/01/18/the-staging-area.html -.. _tangled working copy problem: http://tomayko.com/writings/the-thing-about-git -.. _git management: http://kerneltrap.org/Linux/Git_Management -.. _linux git workflow: http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html +.. _git concepts: https://www.sbf5.com/~cduan/technical/git/ +.. _git clone: https://schacon.github.io/git/git-clone.html +.. _git checkout: https://schacon.github.io/git/git-checkout.html +.. _git commit: https://schacon.github.io/git/git-commit.html +.. _git push: https://schacon.github.io/git/git-push.html +.. _git pull: https://schacon.github.io/git/git-pull.html +.. _git add: https://schacon.github.io/git/git-add.html +.. _git status: https://schacon.github.io/git/git-status.html +.. _git diff: https://schacon.github.io/git/git-diff.html +.. _git log: https://schacon.github.io/git/git-log.html +.. _git branch: https://schacon.github.io/git/git-branch.html +.. _git remote: https://schacon.github.io/git/git-remote.html +.. _git rebase: https://schacon.github.io/git/git-rebase.html +.. _git config: https://schacon.github.io/git/git-config.html +.. _why the -a flag?: http://gitready.com/beginner/2009/01/18/the-staging-area.html +.. _git staging area: http://gitready.com/beginner/2009/01/18/the-staging-area.html +.. _tangled working copy problem: http://2ndscale.com/rtomayko/2008/the-thing-about-git +.. _git management: https://web.archive.org/web/20090224195437/http://kerneltrap.org/Linux/Git_Management +.. _linux git workflow: https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html .. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html -.. _git foundation: http://matthew-brett.github.com/pydagogue/foundation.html +.. _git foundation: https://matthew-brett.github.io/pydagogue/foundation.html +.. _deleting master on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html +.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html +.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge +.. _ipython git workflow: https://mail.scipy.org/pipermail/ipython-dev/2010-October/006746.html .. other stuff -.. _python: http://www.python.org +.. _python: https://www.python.org .. |emdash| unicode:: U+02014 + +.. vim: ft=rst diff --git a/doc/devel/gitwash/git_resources.rst b/doc/devel/gitwash/git_resources.rst index e081328967a3..2787a575cc43 100644 --- a/doc/devel/gitwash/git_resources.rst +++ b/doc/devel/gitwash/git_resources.rst @@ -1,33 +1,33 @@ +.. highlight:: bash + .. _git-resources: -================ - git_ resources -================ +============= +git resources +============= Tutorials and summaries ======================= * `github help`_ has an excellent series of how-to guides. -* `learn.github`_ has an excellent series of tutorials * The `pro git book`_ is a good in-depth book on git. * A `git cheat sheet`_ is a page giving summaries of common commands. * The `git user manual`_ * The `git tutorial`_ * The `git community book`_ * `git ready`_ |emdash| a nice series of tutorials -* `git casts`_ |emdash| video snippets giving git how-tos. * `git magic`_ |emdash| extended introduction with intermediate detail * The `git parable`_ is an easy read explaining the concepts behind git. -* Our own `git foundation`_ expands on the `git parable`_. +* `git foundation`_ expands on the `git parable`_. * Fernando Perez' git page |emdash| `Fernando's git page`_ |emdash| many links and tips * A good but technical page on `git concepts`_ -* `git svn crash course`_: git_ for those of us used to subversion_ +* `git svn crash course`_: git for those of us used to subversion_ Advanced git workflow ===================== -There are many ways of working with git_; here are some posts on the +There are many ways of working with git; here are some posts on the rules of thumb that other projects have come up with: * Linus Torvalds on `git management`_ diff --git a/doc/devel/gitwash/index.rst b/doc/devel/gitwash/index.rst index c9567cc7e359..9ee965d626ff 100644 --- a/doc/devel/gitwash/index.rst +++ b/doc/devel/gitwash/index.rst @@ -1,7 +1,7 @@ .. _using-git: -Working with *matplotlib* source code -====================================== +Working with *Matplotlib* source code +================================================ Contents: @@ -11,6 +11,9 @@ Contents: git_intro git_install following_latest + patching git_development git_resources - patching + dot2_dot3 + + diff --git a/doc/devel/gitwash/known_projects.inc b/doc/devel/gitwash/known_projects.inc index afbc85844ea5..710abe08e477 100644 --- a/doc/devel/gitwash/known_projects.inc +++ b/doc/devel/gitwash/known_projects.inc @@ -1,41 +1,41 @@ .. Known projects .. PROJECTNAME placeholders -.. _PROJECTNAME: http://neuroimaging.scipy.org -.. _`PROJECTNAME github`: http://github.com/nipy -.. _`PROJECTNAME mailing list`: http://projects.scipy.org/mailman/listinfo/nipy-devel +.. _PROJECTNAME: http://nipy.org +.. _`PROJECTNAME github`: https://github.com/nipy +.. _`PROJECTNAME mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging .. numpy -.. _numpy: hhttp://numpy.scipy.org -.. _`numpy github`: http://github.com/numpy/numpy -.. _`numpy mailing list`: http://mail.scipy.org/mailman/listinfo/numpy-discussion +.. _numpy: http://www.numpy.org +.. _`numpy github`: https://github.com/numpy/numpy +.. _`numpy mailing list`: https://mail.scipy.org/mailman/listinfo/numpy-discussion .. scipy -.. _scipy: http://www.scipy.org -.. _`scipy github`: http://github.com/scipy/scipy -.. _`scipy mailing list`: http://mail.scipy.org/mailman/listinfo/scipy-dev +.. _scipy: https://www.scipy.org +.. _`scipy github`: https://github.com/scipy/scipy +.. _`scipy mailing list`: https://mail.scipy.org/mailman/listinfo/scipy-dev .. nipy -.. _nipy: http://nipy.org/nipy -.. _`nipy github`: http://github.com/nipy/nipy -.. _`nipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel +.. _nipy: http://nipy.org/nipy/ +.. _`nipy github`: https://github.com/nipy/nipy +.. _`nipy mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging .. ipython -.. _ipython: http://ipython.org -.. _`ipython github`: http://github.com/ipython/ipython -.. _`ipython mailing list`: http://mail.scipy.org/mailman/listinfo/IPython-dev +.. _ipython: https://ipython.org +.. _`ipython github`: https://github.com/ipython/ipython +.. _`ipython mailing list`: https://mail.scipy.org/mailman/listinfo/IPython-dev .. dipy -.. _dipy: http://nipy.org/dipy -.. _`dipy github`: http://github.com/Garyfallidis/dipy -.. _`dipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel +.. _dipy: http://nipy.org/dipy/ +.. _`dipy github`: https://github.com/Garyfallidis/dipy +.. _`dipy mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging .. nibabel -.. _nibabel: http://nipy.org/nibabel -.. _`nibabel github`: http://github.com/nipy/nibabel -.. _`nibabel mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel +.. _nibabel: http://nipy.org/nibabel/ +.. _`nibabel github`: https://github.com/nipy/nibabel +.. _`nibabel mailing list`: https://mail.python.org/mailman/listinfo/neuroimaging .. marsbar .. _marsbar: http://marsbar.sourceforge.net -.. _`marsbar github`: http://github.com/matthew-brett/marsbar +.. _`marsbar github`: https://github.com/matthew-brett/marsbar .. _`MarsBaR mailing list`: https://lists.sourceforge.net/lists/listinfo/marsbar-users diff --git a/doc/devel/gitwash/maintainer_workflow.rst b/doc/devel/gitwash/maintainer_workflow.rst new file mode 100644 index 000000000000..302f75241399 --- /dev/null +++ b/doc/devel/gitwash/maintainer_workflow.rst @@ -0,0 +1,98 @@ +.. highlight:: bash + +.. _maintainer-workflow: + +################### +Maintainer workflow +################### + +This page is for maintainers |emdash| those of us who merge our own or other +peoples' changes into the upstream repository. + +Being as how you're a maintainer, you are completely on top of the basic stuff +in :ref:`development-workflow`. + +The instructions in :ref:`linking-to-upstream` add a remote that has read-only +access to the upstream repo. Being a maintainer, you've got read-write access. + +It's good to have your upstream remote have a scary name, to remind you that +it's a read-write remote:: + + git remote add upstream-rw git@github.com:matplotlib/matplotlib.git + git fetch upstream-rw + +******************* +Integrating changes +******************* + +Let's say you have some changes that need to go into trunk +(``upstream-rw/master``). + +The changes are in some branch that you are currently on. For example, you are +looking at someone's changes like this:: + + git remote add someone git://github.com/someone/matplotlib.git + git fetch someone + git branch cool-feature --track someone/cool-feature + git checkout cool-feature + +So now you are on the branch with the changes to be incorporated upstream. The +rest of this section assumes you are on this branch. + +A few commits +============= + +If there are only a few commits, consider rebasing to upstream:: + + # Fetch upstream changes + git fetch upstream-rw + # rebase + git rebase upstream-rw/master + +Remember that, if you do a rebase, and push that, you'll have to close any +github pull requests manually, because github will not be able to detect the +changes have already been merged. + +A long series of commits +======================== + +If there are a longer series of related commits, consider a merge instead:: + + git fetch upstream-rw + git merge --no-ff upstream-rw/master + +The merge will be detected by github, and should close any related pull requests +automatically. + +Note the ``--no-ff`` above. This forces git to make a merge commit, rather than +doing a fast-forward, so that these set of commits branch off trunk then rejoin +the main history with a merge, rather than appearing to have been made directly +on top of trunk. + +Check the history +================= + +Now, in either case, you should check that the history is sensible and you have +the right commits:: + + git log --oneline --graph + git log -p upstream-rw/master.. + +The first line above just shows the history in a compact way, with a text +representation of the history graph. The second line shows the log of commits +excluding those that can be reached from trunk (``upstream-rw/master``), and +including those that can be reached from current HEAD (implied with the ``..`` +at the end). So, it shows the commits unique to this branch compared to trunk. +The ``-p`` option shows the diff for these commits in patch form. + +Push to trunk +============= + +:: + + git push upstream-rw my-new-feature:master + +This pushes the ``my-new-feature`` branch in this repository to the ``master`` +branch in the ``upstream-rw`` repository. + +.. include:: links.inc diff --git a/doc/devel/gitwash/patching.rst b/doc/devel/gitwash/patching.rst index fb42e1ef3af3..e7f852758477 100644 --- a/doc/devel/gitwash/patching.rst +++ b/doc/devel/gitwash/patching.rst @@ -1,7 +1,22 @@ +.. highlight:: bash + ================ Making a patch ================ +You've discovered a bug or something else you want to change +in `Matplotlib`_ .. |emdash| excellent! + +You've worked out a way to fix it |emdash| even better! + +You want to tell us about it |emdash| best of all! + +The easiest way is to make a *patch* or set of patches. Here +we explain how. Making a patch is the simplest and quickest, +but if you're going to be doing anything more than simple +quick things, please consider following the +:ref:`git-development` model instead. + .. _making-patches: Making patches @@ -31,20 +46,20 @@ Overview # make the patch files git format-patch -M -C master -Then, send the generated patch files to the `matplotlib +Then, send the generated patch files to the `Matplotlib mailing list`_ |emdash| where we will thank you warmly. In detail --------- -#. Tell git_ who you are so it can label the commits you've +#. Tell git who you are so it can label the commits you've made:: git config --global user.email you@yourdomain.example.com git config --global user.name "Your Name Comes Here" #. If you don't already have one, clone a copy of the - matplotlib_ repository:: + `Matplotlib`_ repository:: git clone git://github.com/matplotlib/matplotlib.git cd matplotlib @@ -82,16 +97,42 @@ In detail git format-patch -M -C master - You will now have several files named for the commits:: + You will now have several files named for the commits: + + .. code-block:: none 0001-BF-added-tests-for-Funny-bug.patch 0002-BF-added-fix-for-Funny-bug.patch - Send these files to the `matplotlib mailing list`_. + Send these files to the `Matplotlib mailing list`_. When you are done, to switch back to the main copy of the code, just return to the ``master`` branch:: git checkout master +Moving from patching to development +=================================== + +If you find you have done some patches, and you have one or +more feature branches, you will probably want to switch to +development mode. You can do this with the repository you +have. + +Fork the `Matplotlib`_ repository on github |emdash| :ref:`forking`. +Then:: + + # checkout and refresh master branch from main repo + git checkout master + git pull origin master + # rename pointer to main repository to 'upstream' + git remote rename origin upstream + # point your repo to default read / write to your fork on github + git remote add origin git@github.com:your-user-name/matplotlib.git + # push up any branches you've made and want to keep + git push origin the-fix-im-thinking-of + +Then you can, if you want, follow the +:ref:`development-workflow`. + .. include:: links.inc diff --git a/doc/devel/gitwash/pull_button.png b/doc/devel/gitwash/pull_button.png new file mode 100644 index 000000000000..e5031681b97b Binary files /dev/null and b/doc/devel/gitwash/pull_button.png differ diff --git a/doc/devel/gitwash/set_up_fork.rst b/doc/devel/gitwash/set_up_fork.rst index 0ebc5f32ced6..61e25a13be44 100644 --- a/doc/devel/gitwash/set_up_fork.rst +++ b/doc/devel/gitwash/set_up_fork.rst @@ -1,3 +1,5 @@ +.. highlight:: bash + .. _set-up-fork: ================== @@ -11,7 +13,7 @@ Overview :: - git clone git@github.com:your-user-name/matplotlib.git + git clone https://github.com:your-user-name/matplotlib.git cd matplotlib git remote add upstream git://github.com/matplotlib/matplotlib.git @@ -22,10 +24,12 @@ Clone your fork --------------- #. Clone your fork to the local computer with ``git clone - git@github.com:your-user-name/matplotlib.git`` + https://github.com:your-user-name/matplotlib.git`` #. Investigate. Change directory to your new repo: ``cd matplotlib``. Then ``git branch -a`` to show you all branches. You'll get something - like:: + like: + + .. code-block:: none * master remotes/origin/master @@ -33,9 +37,9 @@ Clone your fork This tells you that you are currently on the ``master`` branch, and that you also have a ``remote`` connection to ``origin/master``. What remote repository is ``remote/origin``? Try ``git remote -v`` to - see the URLs for the remote. They will point to your github_ fork. + see the URLs for the remote. They will point to your github fork. - Now you want to connect to the upstream `matplotlib github`_ repository, so + Now you want to connect to the upstream `Matplotlib github`_ repository, so you can merge in changes from trunk. .. _linking-to-upstream: @@ -49,24 +53,21 @@ Linking your repository to the upstream repo git remote add upstream git://github.com/matplotlib/matplotlib.git ``upstream`` here is just the arbitrary name we're using to refer to the -main matplotlib_ repository at `matplotlib github`_. +main `Matplotlib`_ repository at `Matplotlib github`_. -Note that we've used ``git://`` for the URL rather than ``git@``. The +Note that we've used ``git://`` for the URL rather than ``https://`` or ``git@``. The ``git://`` URL is read only. This means we that we can't accidentally (or deliberately) write to the upstream repo, and we are only going to use it to merge into our own code. -Note this command needs to be run on every clone of the repository -that you make. It is not tracked in your personal repository on -github_. - Just for your own satisfaction, show yourself that you now have a new -'remote', with ``git remote -v show``, giving you something like:: +'remote', with ``git remote -v show``, giving you something like: - upstream git://github.com/matplotlib/matplotlib.git (fetch) - upstream git://github.com/matplotlib/matplotlib.git (push) - origin git@github.com:your-user-name/matplotlib.git (fetch) - origin git@github.com:your-user-name/matplotlib.git (push) +.. code-block:: none -.. include:: links.inc + upstream git://github.com/matplotlib/matplotlib.git (fetch) + upstream git://github.com/matplotlib/matplotlib.git (push) + origin https://github.com:your-user-name/matplotlib.git (fetch) + origin https://github.com:your-user-name/matplotlib.git (push) +.. include:: links.inc diff --git a/doc/devel/gitwash/this_project.inc b/doc/devel/gitwash/this_project.inc index 011e1c3efe04..e8863d5f78f0 100644 --- a/doc/devel/gitwash/this_project.inc +++ b/doc/devel/gitwash/this_project.inc @@ -1,5 +1,5 @@ -.. matplotlib -.. _matplotlib: http://matplotlib.org -.. _`matplotlib github`: http://github.com/matplotlib/matplotlib +.. Matplotlib +.. _`Matplotlib`: http://matplotlib.org +.. _`Matplotlib github`: https://github.com/matplotlib/matplotlib -.. _`matplotlib mailing list`: https://lists.sourceforge.net/lists/listinfo/matplotlib-devel +.. _`Matplotlib mailing list`: https://mail.python.org/mailman/listinfo/matplotlib-devel diff --git a/doc/devel/index.rst b/doc/devel/index.rst index 5b3c01eebd5a..118f1f564db3 100644 --- a/doc/devel/index.rst +++ b/doc/devel/index.rst @@ -12,12 +12,18 @@ The Matplotlib Developers' Guide .. toctree:: :maxdepth: 2 - coding_guide.rst - portable_code.rst - license.rst - gitwash/index.rst + contributing.rst testing.rst documenting_mpl.rst - release_guide.rst - transformations.rst add_new_projection.rst + portable_code.rst + gitwash/index.rst + coding_guide.rst + release_guide.rst + MEP/index + +.. toctree:: + :hidden: + + license.rst + color_changes diff --git a/doc/devel/license.rst b/doc/devel/license.rst index aea9d7c4f4b7..0a2577e54ec0 100644 --- a/doc/devel/license.rst +++ b/doc/devel/license.rst @@ -6,7 +6,7 @@ Licenses Matplotlib only uses BSD compatible code. If you bring in code from another project make sure it has a PSF, BSD, MIT or compatible license (see the Open Source Initiative `licenses page -`_ for details on individual +`_ for details on individual licenses). If it doesn't, you may consider contacting the author and asking them to relicense it. GPL and LGPL code are not acceptable in the main code base, though we are considering an alternative way of @@ -14,7 +14,7 @@ distributing L/GPL code through an separate channel, possibly a toolkit. If you include code, make sure you include a copy of that code's license in the license directory if the code's license requires you to distribute the license with it. Non-BSD compatible licenses -are acceptable in matplotlib toolkits (eg basemap), but make sure you +are acceptable in matplotlib toolkits (e.g., basemap), but make sure you clearly state the licenses you are using. Why BSD compatible? @@ -28,7 +28,7 @@ most widely used license is the GPL, which in addition to granting you full rights to the source code including redistribution, carries with it an extra obligation. If you use GPL code in your own code, or link with it, your product must be released under a GPL compatible -license. I.e., you are required to give the source code to other +license. i.e., you are required to give the source code to other people and give them the right to redistribute it as well. Many of the most famous and widely used open source projects are released under the GPL, including linux, gcc, emacs and sage. @@ -57,7 +57,7 @@ compatible). Also, we wanted to attract as many users and developers as possible, and many software companies will not use GPL code in software they plan to distribute, even those that are highly committed to open source development, such as `enthought -`_, out of legitimate concern that use of the +`_, out of legitimate concern that use of the GPL will "infect" their code base by its viral nature. In effect, they want to retain the right to release some proprietary code. Companies and institutions who use matplotlib often make significant diff --git a/doc/devel/portable_code.rst b/doc/devel/portable_code.rst index a557905fa6dc..9274c181ac2b 100644 --- a/doc/devel/portable_code.rst +++ b/doc/devel/portable_code.rst @@ -1,5 +1,9 @@ -Writing code for Python 2 and 3 -------------------------------- + +.. _portable_code: + +===================================================== +Developer's tips for writing code for Python 2 and 3 +===================================================== As of matplotlib 1.4, the `six `_ library is used to support Python 2 and 3 from a single code base. diff --git a/doc/devel/release_guide.rst b/doc/devel/release_guide.rst index 88e0fc44dd5f..b26627633dd5 100644 --- a/doc/devel/release_guide.rst +++ b/doc/devel/release_guide.rst @@ -1,240 +1,276 @@ +.. highlight:: bash + .. _release-guide: -************************** -Doing a matplotlib release -************************** +=============== + Release Guide +=============== A guide for developers who are doing a matplotlib release. -* Edit :file:`__init__.py` and bump the version number +All Releases +============ .. _release-testing: Testing -======= +------- + +We use `travis-ci `__ for +continuous integration. When preparing for a release, the final +tagged commit should be tested locally before it is uploaded:: + + python tests.py --processes=8 --process-timeout=300 + +In addition the following two tests should be run and manually inspected:: -* Run all of the regression tests by running the `tests.py` script at - the root of the source tree. + python unit/memleak_hawaii3.py + pushd examples/tests/ + python backend_driver.py + popd -* Run :file:`unit/memleak_hawaii3.py` and make sure there are no - memory leaks -* try some GUI examples, eg :file:`simple_plot.py` with GTKAgg, TkAgg, etc... +.. _release_ghstats: -* remove font cache and tex cache from :file:`.matplotlib` and test - with and without cache on some example script +GitHub Stats +------------ -* Optionally, make sure :file:`examples/tests/backend_driver.py` runs - without errors and check the output of the PNG, PDF, PS and SVG - backends +We automatically extract GitHub issue, PRs, and authors from GitHub via the API:: -.. _release-branching: + python tools/github_stats.py --since-tag $TAG --project 'matplotlib/matplotlib' --links > doc/users/github_stats.rst -Branching -========= +Review and commit changes. Some issue/PR titles may not be valid rst (the most common issue is +``*`` which is interpreted as unclosed markup). -Once all the tests are passing and you are ready to do a release, you -need to create a release branch. These only need to be created when -the second part of the version number changes:: - git checkout -b v1.1.x - git push git@github.com:matplotlib/matplotlib.git v1.1.x +.. _release_chkdocs: -On the branch, do any additional testing you want to do, and then build -binaries and source distributions for testing as release candidates. +Check Docs +---------- -For each release candidate as well as for the final release version, -please `git tag` the commit you will use for packaging like so:: +Before tagging, update the what's new listing in :file:`doc/users/whats_new.rst` +by merging all files in :file:`doc/users/next_whats_new/` coherently. Also, +temporarily comment out the include and toctree glob; re-instate these after a +release. Finally, make sure that the docs build cleanly :: - git tag -a v1.1.0rc1 + pushd doc + python make.py html latex -n 16 + popd -The `-a` flag will allow you to write a message about the tag, and -affiliate your name with it. A reasonable tag message would be something -like ``v1.1.0 Release Candidate 1 (September 24, 2011)``. To tag a -release after the fact, just track down the commit hash, and:: +After the docs are built, check that all of the links, internal and external, are still +valid. We use ``linkchecker`` for this, which has not been ported to python3 yet. You will +need to create a python2 environment with ``requests==2.9.0`` and linkchecker :: - git tag -a v1.0.1rc1 a9f3f3a50745 + conda create -p /tmp/lnkchk python=2 requests==2.9.0 + source activate /tmp/lnkchk + pip install linkchecker + pushd doc/build/html + linkchecker index.html --check-extern -Tags allow developers to quickly checkout different releases by name, -and also provides source download via zip and tarball on github. +Address any issues which may arise. The internal links are checked on travis, this should only +flag failed external links. -Then push the tags to the main repository:: +.. _release_tag: - git push upstream v1.0.1rc1 +Create release commit and tag +----------------------------- -.. _release-packaging: +To create the tag, first create an empty commit with a very terse set of the release notes +in the commit message :: -Packaging -========= + git commit --allow-empty -* Make sure the :file:`MANIFEST.in` is up to date and remove - :file:`MANIFEST` so it will be rebuilt by MANIFEST.in +and then create a signed, annotated tag with the same text in the body +message :: -* run `git clean` in the mpl git directory before building the sdist + git tag -a -s v2.0.0 -* unpack the sdist and make sure you can build from that directory +which will prompt you for your gpg key password and an annotation. +For pre releases it is important to follow :pep:`440` so that the +build artifacts will sort correctly in pypi. Finally, push the tag to GitHub :: -* Use :file:`setup.cfg` to set the default backends. For windows and - OSX, the default backend should be TkAgg. You should also turn on - or off any platform specific build options you need. Importantly, - you also need to make sure that you delete the :file:`build` dir - after any changes to :file:`setup.cfg` before rebuilding since cruft - in the :file:`build` dir can get carried along. + git push -t DANGER v2.0.0 -* On windows, unix2dos the rc file. +Congratulations, the scariest part is done! -* We have a Makefile for the OS X builds in the mpl source dir - :file:`release/osx`, so use this to prepare the OS X releases. +To prevent issues with any down-stream builders which download the +tarball from GitHub it is important to move all branches away from the commit +with the tag [#]_:: -* We have a Makefile for the win32 mingw builds in the mpl source dir - :file:`release/win32` which you can use this to prepare the windows - releases. + git commit --allow-empty + git push DANGER master -Posting files -============= -Our current method is for the release manager to collect all of the -binaries from the platform builders and post the files online on -Sourceforge. It is also possible that those building the binaries -could upload to directly to Sourceforge. We also post a source -tarball to PyPI, since ``pip`` no longer trusts files downloaded from -other sites. +.. [#] The tarball that is provided by GitHub is produced using `git + archive `__. We use + `versioneer `__ + which uses a format string in + :file:`lib/matplotlib/_version.py` to have ``git`` insert a + list of references to exported commit (see + :file:`.gitattributes` for the configuration). This string is + then used by ``versioneer`` to produce the correct version, + based on the git tag, when users install from the tarball. + However, if there is a branch pointed at the tagged commit, + then the branch name will also be included in the tarball. + When the branch eventually moves, anyone how checked the hash + of the tarball before the branch moved will have an incorrect + hash. -There are many ways to upload files to Sourceforge (`scp`, `rsync`, -`sftp`, and a web interface) described in `Sourceforge Release File -System documentation -`_. -Below, we will use `sftp`. + To generate the file that GitHub does use :: -1. Create a directory containing all of the release files and `cd` to it. + git archive v2.0.0 -o matplotlib-2.0.0.tar.gz --prefix=matplotlib-2.0.0/ -2. `sftp` to Sourceforge:: - sftp USERNAME@frs.sourceforge.net:/home/frs/project/matplotlib/matplotlib +If this is a final release, also create a 'doc' branch (this is not +done for pre-releases):: -3. Make a new directory for the release and move to it:: + git branch v2.0.0-doc + git push DANGER v2.0.0-doc - mkdir matplotlib-1.1.0rc1 - cd matplotlib-1.1.0rc1 +and if this is a major or minor release, also create a bug-fix branch (a +micro release will be cut off of this branch):: -4. Upload all of the files in the current directory on your local machine:: + git branch v2.0.x + git push DANGER v2.0.x - put * -If this release is a final release, the default download for the -matplotlib project should also be updated. Login to Sourceforge and -visit the `matplotlib files page -`_. -Navigate to the tarball of the release you just updated, click on -"Details" icon (it looks like a lower case ``i``), and make it the -default download for all platforms. -There is a list of direct links to downloads on matplotlib's main -website. This needs to be manually generated and updated every time -new files are posted. +.. _release_DOI: -1. Clone the matplotlib documentation repository and `cd` into it:: +Release Management / DOI +------------------------ - git clone git@github.com:matplotlib/matplotlib.github.com.git - cd matplotlib.github.com +Via the GitHub UI (chase down link), turn the newly pushed tag into a +release. If this is a pre-release remember to mark it as such. -2. Update the list of downloads that you want to display by editing - the `downloads.txt` file. Generally, this should contain the last two - final releases and any active release candidates. +For final releases also get a DOI from `zenodo +`__ and edit :file:`doc/_templates/citing.html` +with DOI link and commit to the VER-doc branch and push to GitHub :: -3. Update the downloads webpage by running the `update_downloads.py` - script. This script requires `paramiko` (for `sftp` support) and - `jinja2` for templating. Both of these dependencies can be - installed using pip:: + git checkout v2.0.0-doc + emacs doc/_templates/citing.html + git push DANGER v2.0.0-doc:v2.0.0-doc - pip install paramiko - pip install jinja2 +.. _release_bld_bin: - Then update the download page:: +Building binaries +----------------- - ./update_downloads.py +We distribute mac, windows, and many linux wheels as well as a source +tarball via pypi. Before uploading anything, contact the various +builders. Mac and manylinux wheels are built on travis . You need to +edit the :file:`.travis.yml` file and push to master of `the build +project `__. - You will be prompted for your Sourceforge username and password. +Update the ``master`` branch (for pre-releases the ``devel`` branch) +of the `conda-forge feedstock +`__ via pull request. -4. Commit the changes and push them up to github:: +If this is a final release the following downstream packagers should be contacted: - git commit -m "Updating download list" - git push +- Debian +- Fedora +- Arch +- Gentoo +- Macports +- Homebrew +- Christoph Gohlke +- Continuum +- Enthought -Update PyPI -=========== +This can be done ahead of collecting all of the binaries and uploading to pypi. -Once the tarball has been posted on Sourceforge, you can register a -link to the new release on PyPI. This should only be done with final -(non-release-candidate) releases, since doing so will hide any -available stable releases. +.. _release_upload_bin: -You may need to set up your `.pypirc` file as described in the -`distutils register command documentation -`_. +make distribution and upload to pypi / SF +----------------------------------------- -Then updating the record on PyPI is as simple as:: +Once you have collected all of the wheels, generate the tarball :: - python setup.py register + git checkout v2.0.0 + git clean -xfd + python setup.py sdist -This will hide any previous releases automatically. +and copy all of the wheels into :file:`dist` directory. You should use +``twine`` to upload all of the files to pypi :: -Then, to upload the source tarball:: + twine upload -s dist/matplotlib*tar.gz + twine upload dist/*whl - rm -rf dist - python setup.py sdist upload +Congratulations, you have now done the second scariest part! + +Additionally, for a final release, upload all of the files to sourceforge. + +.. _release_docs: + +Build and Deploy Documentation +------------------------------ + +To build the documentation you must have the tagged version installed, but +build the docs from the ``ver-doc`` branch. An easy way to arrange this is:: + + pip install matplotlib + pip install -r doc-requirements.txt + git checkout v2.0.0-doc + git clean -xfd + cd doc + python make.py html latex -n 16 + +which will build both the html and pdf version of the documentation. -Documentation updates -===================== The built documentation exists in the `matplotlib.github.com -`_ repository. +`__ repository. Pushing changes to master automatically updates the website. The documentation is organized by version. At the root of the tree is always the documentation for the latest stable release. Under that, -there are directories containing the documentation for older versions -as well as the bleeding edge release version called `dev` (usually -based on what's on master in the github repository, but it may also -temporarily be a staging area for proposed changes). There is also a -symlink directory with the name of the most recently released version -that points to the root. With each new release, these directories may -need to be reorganized accordingly. Any time these version -directories are added or removed, the `versions.html` file (which -contains a list of the available documentation versions for the user) -must also be updated. +there are directories containing the documentation for older versions. +The documentation for current master are built on travis and push to +the `devdocs `__ repository. +These are available at `matplotlib.org/devdocs +`__. -To make sure everyone's hard work gets credited, regenerate the github -stats. `cd` into the tools directory and run:: +Assuming you have this repository checked out in the same directory as +matplotlib :: - python github_stats.py $TAG > ../doc/users/github_stats.rst + cd ../matplotlib.github.com + mkdir 2.0.0 + rsync -a ../matplotlib/doc/build/html/* 2.0.0 + cp ../matplotlib/doc/build/latex/Matplotlib.pdf 2.0.0 -where `$TAG` is the tag of the last major release. This will generate -stats for all work done since that release. +which will copy the built docs over. If this is a final release, also +replace the top-level docs :: -In the matplotlib source repository, build the documentation:: + rsync -a 2.0.0/* ./ - cd doc - python make.py html - python make.py latex +You will need to manually edit :file:`versions.html` to show the last +3 tagged versions. Now commit and push everything to GitHub :: -Then copy the build products into your local checkout of the -`matplotlib.github.com` repository (assuming here to be checked out in -`~/matplotlib.github.com`:: + git add * + git commit -a -m 'Updating docs for v2.0.0' + git push DANGER master - cp -r build/html/* ~/matplotlib.github.com - cp build/latex/Matplotlib.pdf ~/matplotlib.github.com +Congratulations you have now done the third scariest part! -Then, from the `matplotlib.github.com` directory, commit and push the -changes upstream:: +It typically takes about 5-10 minutes for GitHub to process the push +and update the live web page (remember to clear your browser cache). - git commit -m "Updating for v1.0.1" - git push upstream master Announcing -========== +---------- + +The final step is to announce the release to the world. A short +version of the release notes along with acknowledgments should be sent to + +- matplotlib-user@python.org +- matplotlib-devel@python.org +- matplotlib-announce@python.org + +For final releases announcements should also be sent to the +numpy/scipy/jupyter mailing lists and python-announce. -Announce the release on matplotlib-announce, matplotlib-users, and -matplotlib-devel. Final (non-release-candidate) versions should also -be announced on python-announce. Include a summary of highlights from -the CHANGELOG and/or post the whole CHANGELOG since the last release. +In addition, announcements should be made on social networks (twitter, +g+, FB). For major release, `NumFOCUS `__ +should be contacted for inclusion in their newsletter and maybe to +have something posted on their blog. diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst index f29d7be30175..7b71b22d7982 100644 --- a/doc/devel/testing.rst +++ b/doc/devel/testing.rst @@ -1,67 +1,122 @@ .. _testing: -Testing -======= - -Matplotlib has a testing infrastructure based on nose_, making it easy -to write new tests. The tests are in :mod:`matplotlib.tests`, and -customizations to the nose testing infrastructure are in -:mod:`matplotlib.testing`. (There is other old testing cruft around, -please ignore it while we consolidate our testing to these locations.) - -.. _nose: http://somethingaboutorange.com/mrl/projects/nose/ +============================ +Developer's tips for testing +============================ + +Matplotlib's testing infrastructure depends on pytest_. The tests are in +:file:`lib/matplotlib/tests`, and customizations to the pytest testing +infrastructure are in :mod:`matplotlib.testing`. + +.. _pytest: http://doc.pytest.org/en/latest/ +.. _mock: https://docs.python.org/3/library/unittest.mock.html> +.. _Ghostscript: https://www.ghostscript.com/ +.. _Inkscape: https://inkscape.org +.. _pytest-cov: https://pytest-cov.readthedocs.io/en/latest/ +.. _pytest-pep8: https://pypi.python.org/pypi/pytest-pep8 +.. _pytest-xdist: https://pypi.python.org/pypi/pytest-xdist +.. _pytest-timeout: https://pypi.python.org/pypi/pytest-timeout Requirements ------------ The following software is required to run the tests: - - nose_, version 1.0 or later + - pytest_, version 3.0.0 or later + - mock_, when running Python versions < 3.3 + - Ghostscript_ (to render PDF files) + - Inkscape_ (to render SVG files) + +Optionally you can install: + + - pytest-cov_ to collect coverage information + - pytest-pep8_ to test coding standards + - pytest-timeout_ to limit runtime in case of stuck tests + - pytest-xdist_ to run tests in parallel + + +Building matplotlib for image comparison tests +---------------------------------------------- + +matplotlib's test suite makes heavy use of image comparison tests, +meaning the result of a plot is compared against a known good result. +Unfortunately, different versions of FreeType produce differently +formed characters, causing these image comparisons to fail. To make +them reproducible, matplotlib can be built with a special local copy +of FreeType. This is recommended for all matplotlib developers. - - `Ghostscript `_ (to render PDF - files) +Add the following content to a ``setup.cfg`` file at the root of the +matplotlib source directory:: - - `Inkscape `_ (to render SVG files) + [test] + local_freetype = True + tests = True + +or by setting the ``MPLLOCALFREETYPE`` environmental variable to any true +value. Running the tests ----------------- -Running the tests is simple. Make sure you have nose installed and run -the script :file:`tests.py` in the root directory of the distribution. -The script can take any of the usual `nosetest arguments`_, such as +Running the tests is simple. Make sure you have pytest installed and run:: + + py.test + +or:: + + python tests.py + +in the root directory of the distribution. The script takes a set of +commands, such as: + +======================== =========== +``--pep8`` Perform pep8 checks (requires pytest-pep8_) +``-m "not network"`` Disable tests that require network access +======================== =========== -=================== =========== -``-v`` increase verbosity -``-d`` detailed error messages -``--with-coverage`` enable collecting coverage information -=================== =========== +Additional arguments are passed on to pytest. See the pytest documentation for +`supported arguments`_. Some of the more important ones are given here: -To run a single test from the command line, you can provide a -dot-separated path to the module followed by the function separated by -a colon, e.g., (this is assuming the test is installed):: +============================= =========== +``--verbose`` Be more verbose +``--n NUM`` Run tests in parallel over NUM + processes (requires pytest-xdist_) +``--timeout=SECONDS`` Set timeout for results from each test + process (requires pytest-timeout_) +``--capture=no`` or ``-s`` Do not capture stdout +============================= =========== - python tests.py matplotlib.tests.test_simplification:test_clipping +To run a single test from the command line, you can provide a file path, +optionally followed by the function separated by two colons, e.g., (tests do +not need to be installed, but Matplotlib should be):: -If you want to run the full test suite, but want to save wall time try running the -tests in parallel:: + py.test lib/matplotlib/tests/test_simplification.py::test_clipping - python ../matplotlib/tests.py -sv --processes=5 --process-timeout=300 +or, if tests are installed, a dot-separated path to the module, optionally +followed by the function separated by two colons, such as:: -as we do on Travis.ci. + py.test --pyargs matplotlib.tests.test_simplification::test_clipping +If you want to run the full test suite, but want to save wall time try +running the tests in parallel:: -An alternative implementation that does not look at command line -arguments works from within Python:: + py.test --verbose -n 5 + +Depending on your version of Python and pytest-xdist, you may need to set +``PYTHONHASHSEED`` to a fixed value when running in parallel:: + + PYTHONHASHSEED=0 py.test --verbose -n 5 + +An alternative implementation that does not look at command line arguments +and works from within Python is to run the tests from the Matplotlib library +function :func:`matplotlib.test`:: import matplotlib matplotlib.test() -.. _`nosetest arguments`: http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html +.. _supported arguments: http://doc.pytest.org/en/latest/usage.html -Running tests by any means other than `matplotlib.test()` -does not load the nose "knownfailureif" (Known failing tests) plugin, -causing known-failing tests to fail for real. Writing a simple test --------------------- @@ -69,31 +124,38 @@ Writing a simple test Many elements of Matplotlib can be tested using standard tests. For example, here is a test from :mod:`matplotlib.tests.test_basic`:: - from nose.tools import assert_equal - def test_simple(): """ very simple example test """ - assert_equal(1+1,2) + assert 1 + 1 == 2 -Nose determines which functions are tests by searching for functions -beginning with "test" in their name. +Pytest determines which functions are tests by searching for files whose names +begin with ``"test_"`` and then within those files for functions beginning with +``"test"`` or classes beginning with ``"Test"``. -If the test has side effects that need to be cleaned up, such as -creating figures using the pyplot interface, use the ``@cleanup`` -decorator:: +Some tests have internal side effects that need to be cleaned up after their +execution (such as created figures or modified rc params). The pytest fixture +:func:`~matplotlib.testing.conftest.mpl_test_settings` will automatically clean +these up; there is no need to do anything further. - from matplotlib.testing.decorators import cleanup +Random data in tests +-------------------- - @cleanup - def test_create_figure(): - """ - very simple example test that creates a figure using pyplot. - """ - fig = figure() - ... +Random data can is a very convenient way to generate data for examples, +however the randomness is problematic for testing (as the tests +must be deterministic!). To work around this set the seed in each test. +For numpy use:: + import numpy as np + np.random.seed(19680801) + +and Python's random number generator:: + + import random + random.seed(19680801) + +The seed is John Hunter's birthday. Writing an image comparison test -------------------------------- @@ -110,7 +172,8 @@ it:: from matplotlib.testing.decorators import image_comparison import matplotlib.pyplot as plt - @image_comparison(baseline_images=['spines_axes_positions']) + @image_comparison(baseline_images=['spines_axes_positions'], + extensions=['png']) def test_spines_axes_positions(): # SF bug 2852168 fig = plt.figure() @@ -128,23 +191,28 @@ it:: The first time this test is run, there will be no baseline image to compare against, so the test will fail. Copy the output images (in -this case `result_images/test_category/spines_axes_positions.*`) to +this case `result_images/test_category/spines_axes_positions.png`) to the correct subdirectory of `baseline_images` tree in the source directory (in this case -`lib/matplotlib/tests/baseline_images/test_category`). Note carefully -the `.*` at the end: this will copy only the images we need to include -in the `git` repository. The files ending in `_pdf.png` and -`_svg.png` are converted from the `pdf` and `svg` originals on the fly -and do not need to be in the respository. Put these new files under -source code revision control (with `git add`). When rerunning the -tests, they should now pass. +`lib/matplotlib/tests/baseline_images/test_category`). Put this new +file under source code revision control (with `git add`). When +rerunning the tests, they should now pass. + +The :func:`~matplotlib.testing.decorators.image_comparison` decorator +defaults to generating ``png``, ``pdf`` and ``svg`` output, but in +interest of keeping the size of the library from ballooning we should only +include the ``svg`` or ``pdf`` outputs if the test is explicitly exercising +a feature dependent on that backend. There are two optional keyword arguments to the `image_comparison` decorator: - - `extensions`: If you only wish to test some of the image formats - (rather than the default `png`, `svg` and `pdf` formats), pass a - list of the extensions to test. + - `extensions`: If you only wish to test additional image formats + (rather than just `png`), pass any additional file types in the + list of the extensions to test. When copying the new + baseline files be sure to only copy the output files, not their + conversions to ``png``. For example only copy the files + ending in ``pdf``, not in ``_pdf.png``. - `tol`: This is the image matching tolerance, the default `1e-3`. If some variation is expected in the image between runs, this @@ -153,24 +221,22 @@ decorator: Known failing tests ------------------- -If you're writing a test, you may mark it as a known failing test with -the :func:`~matplotlib.testing.decorators.knownfailureif` -decorator. This allows the test to be added to the test suite and run -on the buildbots without causing undue alarm. For example, although -the following test will fail, it is an expected failure:: +If you're writing a test, you may mark it as a known failing test with the +:func:`pytest.mark.xfail` decorator. This allows the test to be added to the +test suite and run on the buildbots without causing undue alarm. For example, +although the following test will fail, it is an expected failure:: - from nose.tools import assert_equal - from matplotlib.testing.decorators import knownfailureif + import pytest - @knownfailureif(True) + @pytest.mark.xfail def test_simple_fail(): '''very simple example test that should fail''' - assert_equal(1+1,3) + assert 1 + 1 == 3 -Note that the first argument to the -:func:`~matplotlib.testing.decorators.knownfailureif` decorator is a -fail condition, which can be a value such as True, False, or -'indeterminate', or may be a dynamically evaluated expression. +Note that the first argument to the :func:`~pytest.mark.xfail` decorator is a +fail condition, which can be a value such as True, False, or may be a +dynamically evaluated expression. If a condition is supplied, then a reason +must also be supplied with the ``reason='message'`` keyword argument. Creating a new module in matplotlib.tests ----------------------------------------- @@ -179,15 +245,10 @@ We try to keep the tests categorized by the primary module they are testing. For example, the tests related to the ``mathtext.py`` module are in ``test_mathtext.py``. -Let's say you've added a new module named ``whizbang.py`` and you want -to add tests for it in ``matplotlib.tests.test_whizbang``. To add -this module to the list of default tests, append its name to -``default_test_modules`` in :file:`lib/matplotlib/__init__.py`. - Using Travis CI --------------- -`Travis CI `_ is a hosted CI system "in the +`Travis CI `_ is a hosted CI system "in the cloud". Travis is configured to receive notifications of new commits to GitHub @@ -199,27 +260,28 @@ project. Travis CI is already enabled for the `main matplotlib GitHub repository `_ -- for example, see `its Travis page -`_. +`_. If you want to enable Travis CI for your personal matplotlib GitHub repo, simply enable the repo to use Travis CI in either the Travis CI UI or the GitHub UI (Admin | Service Hooks). For details, see `the Travis CI Getting Started page -`_. This +`_. This generally isn't necessary, since any pull request submitted against the main matplotlib repository will be tested. Once this is configured, you can see the Travis CI results at -http://travis-ci.org/#!/your_GitHub_user_name/matplotlib -- here's `an -example `_. +https://travis-ci.org/your_GitHub_user_name/matplotlib -- here's `an +example `_. Using tox --------- -`Tox `_ is a tool for running tests against +`Tox `_ is a tool for running +tests against multiple Python environments, including multiple versions of Python -(e.g., 2.6, 2.7, 3.2, etc.) and even different Python implementations +(e.g., 2.7, 3.4, 3.5) and even different Python implementations altogether (e.g., CPython, PyPy, Jython, etc.) Testing all versions of Python (2.6, 2.7, 3.*) requires @@ -255,4 +317,4 @@ edit this file if you want to add new environments to test (e.g., ``py33``) or if you want to tweak the dependencies or the way the tests are run. For more info on the ``tox.ini`` file, see the `Tox Configuration Specification -`_. +`_. diff --git a/doc/faq/environment_variables_faq.rst b/doc/faq/environment_variables_faq.rst index bcad4cb25635..14e931a6542d 100644 --- a/doc/faq/environment_variables_faq.rst +++ b/doc/faq/environment_variables_faq.rst @@ -25,10 +25,16 @@ Environment Variables This is the directory used to store user customizations to matplotlib, as well as some caches to improve performance. If :envvar:`MPLCONFIGDIR` is not - defined, :file:`{HOME}/.matplotlib` is used if it is writable. - Otherwise, the python standard library :func:`tempfile.gettmpdir` is - used to find a base directory in which the :file:`matplotlib` - subdirectory is created. + defined, :file:`{HOME}/.config/matplotlib` is generally used on unix-like + systems and :file:`{HOME}/.matplotlib` is used on other platforms, if they are + writable. Otherwise, the python standard library :func:`tempfile.gettempdir` + is used to find a base directory in which the :file:`matplotlib` subdirectory + is created. + +.. envvar:: MPLBACKEND + + This optional variable can be set to choose the matplotlib backend. See + :ref:`what-is-a-backend`. .. _setting-linux-osx-environment-variables: diff --git a/doc/faq/fig_map.png b/doc/faq/fig_map.png deleted file mode 100644 index 8af3500399fd..000000000000 Binary files a/doc/faq/fig_map.png and /dev/null differ diff --git a/doc/faq/howto_faq.rst b/doc/faq/howto_faq.rst index 983b2e5f840e..59467b67640a 100644 --- a/doc/faq/howto_faq.rst +++ b/doc/faq/howto_faq.rst @@ -14,15 +14,38 @@ How-To Plotting: howto =============== +.. _howto-datetime64: + +Plot `numpy.datetime64` values +------------------------------ + +For Matplotlib to plot dates (or any scalar with units) a converter +to float needs to be registered with the `matplolib.units` module. The +current best converters for `datetime64` values are in `pandas`. To enable the +converter, import it from pandas:: + + from pandas.tseries import converter as pdtc + pdtc.register() + +If you only want to use the `pandas` converter for `datetime64` values :: + + from pandas.tseries import converter as pdtc + import matplotlib.units as munits + import numpy as np + + munits.registry[np.datetime64] = pdtc.DatetimeConverter() + + + .. _howto-findobj: Find all objects in a figure of a certain type ---------------------------------------------- -Every matplotlib artist (see :ref:`artist-tutorial`) has a method +Every Matplotlib artist (see :ref:`sphx_glr_tutorials_intermediate_artists.py`) has a method called :meth:`~matplotlib.artist.Artist.findobj` that can be used to recursively search the artist for any artists it may contain that meet -some criteria (eg match all :class:`~matplotlib.lines.Line2D` +some criteria (e.g., match all :class:`~matplotlib.lines.Line2D` instances or match some arbitrary filter function). For example, the following snippet finds every object in the figure which has a `set_color` property and makes the object blue:: @@ -41,11 +64,13 @@ You can also filter on class instances:: .. _howto-supress_offset: + How to prevent ticklabels from having an offset ----------------------------------------------- The default formatter will use an offset to reduce the length of the ticklabels. To turn this feature off on a per-axis basis:: + ax.get_xaxis().get_major_formatter().set_useOffset(False) set the rcParam ``axes.formatter.useoffset``, or use a different @@ -61,7 +86,7 @@ The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument backgrounds transparent when saving, but will not affect the displayed image on the screen. -If you need finer grained control, eg you do not want full transparency +If you need finer grained control, e.g., you do not want full transparency or you want to affect the screen displayed version as well, you can set the alpha properties directly. The figure has a :class:`~matplotlib.patches.Rectangle` instance called *patch* @@ -129,7 +154,7 @@ labels:: ax = fig.add_subplot(111) You can control the defaults for these parameters in your -:file:`matplotlibrc` file; see :ref:`customizing-matplotlib`. For +:file:`matplotlibrc` file; see :ref:`sphx_glr_tutorials_introductory_customizing.py`. For example, to make the above setting permanent, you would set:: figure.subplot.bottom : 0.2 # the bottom of the subplots of the figure @@ -145,9 +170,11 @@ The other parameters you can configure are, with their defaults *top* = 0.9 the top of the subplots of the figure *wspace* = 0.2 - the amount of width reserved for blank space between subplots + the amount of width reserved for blank space between subplots, + expressed as a fraction of the average axis width *hspace* = 0.2 - the amount of height reserved for white space between subplots + the amount of height reserved for white space between subplots, + expressed as a fraction of the average axis height If you want additional control, you can create an :class:`~matplotlib.axes.Axes` using the @@ -158,7 +185,7 @@ specify the location explicitly:: ax = fig.add_axes([left, bottom, width, height]) where all values are in fractional (0 to 1) coordinates. See -:ref:`pylab_examples-axes_demo` for an example of placing axes manually. +:ref:`sphx_glr_gallery_subplots_axes_and_figures_axes_demo.py` for an example of placing axes manually. .. _howto-auto-adjust: @@ -168,7 +195,7 @@ Automatically make room for tick labels .. note:: This is now easier to handle than ever before. Calling :func:`~matplotlib.pyplot.tight_layout` can fix many common - layout issues. See the :ref:`plotting-guide-tight-layout`. + layout issues. See the :ref:`sphx_glr_tutorials_intermediate_tight_layout_guide.py`. The information below is kept here in case it is useful for other purposes. @@ -192,33 +219,50 @@ this chicken and egg problem is to wait until the figure is draw by connecting (:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`) to the "on_draw" signal (:class:`~matplotlib.backend_bases.DrawEvent`) and -get the window extent there, and then do something with it, eg move +get the window extent there, and then do something with it, e.g., move the left of the canvas over; see :ref:`event-handling-tutorial`. Here is an example that gets a bounding box in relative figure coordinates (0..1) of each of the labels and uses it to move the left of the subplots -over so that the tick labels fit in the figure +over so that the tick labels fit in the figure: + +.. figure:: ../gallery/pyplots/images/sphx_glr_auto_subplots_adjust_001.png + :target: ../gallery/pyplots/auto_subplots_adjust.html + :align: center + :scale: 50 -.. plot:: pyplots/auto_subplots_adjust.py - :include-source: + Auto Subplots Adjust .. _howto-ticks: -Configure the tick linewidths ------------------------------ +Configure the tick widths +------------------------- -In matplotlib, the ticks are *markers*. All -:class:`~matplotlib.lines.Line2D` objects support a line (solid, -dashed, etc) and a marker (circle, square, tick). The tick linewidth -is controlled by the "markeredgewidth" property:: +Wherever possible, it is recommended to use the :meth:`~Axes.tick_params` or +:meth:`~Axis.set_tick_params` methods to modify tick properties:: import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(111) + + fig, ax = plt.subplots() + ax.plot(range(10)) + + ax.tick_params(width=10) + + plt.show() + +For more control of tick properties that are not provided by the above methods, +it is important to know that in Matplotlib, the ticks are *markers*. All +:class:`~matplotlib.lines.Line2D` objects support a line (solid, dashed, etc) +and a marker (circle, square, tick). The tick width is controlled by the +``"markeredgewidth"`` property, so the above effect can also be achieved by:: + + import matplotlib.pyplot as plt + + fig, ax = plt.subplots() ax.plot(range(10)) for line in ax.get_xticklines() + ax.get_yticklines(): - line.set_markersize(10) + line.set_markeredgewidth(10) plt.show() @@ -236,24 +280,28 @@ Align my ylabels across multiple subplots If you have multiple subplots over one another, and the y data have different scales, you can often get ylabels that do not align vertically across the multiple subplots, which can be unattractive. -By default, matplotlib positions the x location of the ylabel so that +By default, Matplotlib positions the x location of the ylabel so that it does not overlap any of the y ticks. You can override this default behavior by specifying the coordinates of the label. The example below shows the default behavior in the left subplots, and the manual setting in the right subplots. -.. plot:: pyplots/align_ylabels.py - :include-source: +.. figure:: ../gallery/pyplots/images/sphx_glr_align_ylabels_001.png + :target: ../gallery/pyplots/align_ylabels.html + :align: center + :scale: 50 + + Align Ylabels .. _date-index-plots: Skip dates where there is no data --------------------------------- -When plotting time series, eg financial time series, one often wants -to leave out days on which there is no data, eg weekends. By passing +When plotting time series, e.g., financial time series, one often wants +to leave out days on which there is no data, e.g., weekends. By passing in dates on the x-xaxis, you get large horizontal gaps on periods when -there is not data. The solution is to pass in some proxy x-data, eg +there is not data. The solution is to pass in some proxy x-data, e.g., evenly sampled indices, and then use a custom formatter to format these as dates. The example below shows how to use an 'index formatter' to achieve the desired plot:: @@ -299,7 +347,7 @@ and patches, respectively:: .. htmlonly:: - See :ref:`pylab_examples-zorder_demo` for a complete example. + See :ref:`sphx_glr_gallery_misc_zorder_demo.py` for a complete example. You can also use the Axes property :meth:`~matplotlib.axes.Axes.set_axisbelow` to control whether the grid @@ -316,12 +364,10 @@ some ratio which controls the ratio:: ax = fig.add_subplot(111, aspect='equal') - - .. htmlonly:: - See :ref:`pylab_examples-equal_aspect_ratio` for a complete example. - + See :ref:`sphx_glr_gallery_subplots_axes_and_figures_axis_equal_demo.py` for a + complete example. .. _howto-twoscale: @@ -339,7 +385,7 @@ The approach uses :func:`~matplotlib.pyplot.twinx` (and its sister :func:`~matplotlib.pyplot.twiny`) to use *2 different axes*, turning the axes rectangular frame off on the 2nd axes to keep it from obscuring the first, and manually setting the tick locs and labels as -desired. You can use separate matplotlib.ticker formatters and +desired. You can use separate ``matplotlib.ticker`` formatters and locators as desired because the two axes are independent. .. plot:: @@ -364,7 +410,7 @@ locators as desired because the two axes are independent. .. htmlonly:: - See :ref:`api-two_scales` for a complete example + See :ref:`sphx_glr_gallery_api_two_scales.py` for a complete example .. _howto-batch: @@ -385,6 +431,7 @@ pyplot:: .. seealso:: + :ref:`howto-webapp` for information about running matplotlib inside of a web application. @@ -396,11 +443,11 @@ Use :func:`~matplotlib.pyplot.show` When you want to view your plots on your display, the user interface backend will need to start the GUI mainloop. This is what :func:`~matplotlib.pyplot.show` does. It tells -matplotlib to raise all of the figure windows created so far and start +Matplotlib to raise all of the figure windows created so far and start the mainloop. Because this mainloop is blocking by default (i.e., script execution is paused), you should only call this once per script, at the end. Script execution is resumed after the last window is closed. Therefore, if -you are using matplotlib to generate only images and do not want a user +you are using Matplotlib to generate only images and do not want a user interface window, you do not need to call ``show`` (see :ref:`howto-batch` and :ref:`what-is-a-backend`). @@ -414,7 +461,7 @@ and :ref:`what-is-a-backend`). Therefore, multiple calls to ``show`` are now allowed. Having ``show`` block further execution of the script or the python -interpreter depends on whether matplotlib is set for interactive mode +interpreter depends on whether Matplotlib is set for interactive mode or not. In non-interactive mode (the default setting), execution is paused until the last figure window is closed. In interactive mode, the execution is not paused, which allows you to create additional figures (but the script @@ -428,7 +475,7 @@ won't finish until the last figure window is closed). because it does not support non-interactive mode. -Because it is expensive to draw, you typically will not want matplotlib +Because it is expensive to draw, you typically will not want Matplotlib to redraw a figure many times in a script such as the following:: plot([1,2,3]) # draw here ? @@ -438,12 +485,12 @@ to redraw a figure many times in a script such as the following:: show() -However, it is *possible* to force matplotlib to draw after every command, +However, it is *possible* to force Matplotlib to draw after every command, which might be what you want when working interactively at the python console (see :ref:`mpl-shell`), but in a script you want to defer all drawing until the call to ``show``. This is especially important for complex figures that take some time to draw. -:func:`~matplotlib.pyplot.show` is designed to tell matplotlib that +:func:`~matplotlib.pyplot.show` is designed to tell Matplotlib that you're all done issuing commands and you want to draw the figure now. .. note:: @@ -475,6 +522,18 @@ though we have made significant progress towards supporting blocking events. able to create new figures and raise them in a subsequent call to ``show`` after closing the figures from a previous call to ``show``. +.. _howto-boxplot_violinplot: + +Interpreting box plots and violin plots +--------------------------------------- + +Tukey's `box plots `_ (Robert McGill, John W. Tukey and Wayne A. Larsen: "The American Statistician" Vol. 32, No. 1, Feb., 1978, pp. 12-16) are statistical plots that provide useful information about the data distribution such as skewness. However, bar plots with error bars are still the common standard in most scientific literature, and thus, the interpretation of box plots can be challenging for the unfamiliar reader. The figure below illustrates the different visual features of a box plot. + +.. figure:: ../_static/boxplot_explanation.png + +`Violin plots `_ are closely related to box plots but add useful information such as the distribution of the sample data (density trace). +Violin plots were added in Matplotlib 1.4. + .. _howto-contribute: @@ -486,9 +545,9 @@ Contributing: howto Request a new feature --------------------- -Is there a feature you wish matplotlib had? Then ask! The best +Is there a feature you wish Matplotlib had? Then ask! The best way to get started is to email the developer `mailing -list `_ for discussion. +list `_ for discussion. This is an open source project developed primarily in the contributors free time, so there is no guarantee that your feature will be added. The *best* way to get the feature @@ -499,7 +558,7 @@ you need added is to contribute it your self. Reporting a bug or submitting a patch ------------------------------------- -The development of matplotlib is organized through `github +The development of Matplotlib is organized through `github `_. If you would like to report a bug or submit a patch please use that interface. @@ -511,19 +570,19 @@ demonstrating what the bug is. Including a clear, easy to test example makes it easy for the developers to evaluate the bug. Expect that the bug reports will be a conversation. If you do not want to register with github, please email bug reports to the `mailing list -`_. +`_. -The easiest way to submit patches to matplotlib is through pull +The easiest way to submit patches to Matplotlib is through pull requests on github. Please see the :ref:`developers-guide-index` for the details. .. _how-to-contribute-docs: -Contribute to matplotlib documentation +Contribute to Matplotlib documentation -------------------------------------- -matplotlib is a big library, which is used in many ways, and the +Matplotlib is a big library, which is used in many ways, and the documentation has only scratched the surface of everything it can do. So far, the place most people have learned all these features are through studying the examples (:ref:`how-to-search-examples`), which is a @@ -531,32 +590,31 @@ recommended and great way to learn, but it would be nice to have more official narrative documentation guiding people through all the dark corners. This is where you come in. -There is a good chance you know more about matplotlib usage in some +There is a good chance you know more about Matplotlib usage in some areas, the stuff you do every day, than many of the core developers who wrote most of the documentation. Just pulled your hair out -compiling matplotlib for windows? Write a FAQ or a section for the +compiling Matplotlib for windows? Write a FAQ or a section for the :ref:`installing-faq` page. Are you a digital signal processing wizard? Write a tutorial on the signal analysis plotting functions like :func:`~matplotlib.pyplot.xcorr`, :func:`~matplotlib.pyplot.psd` and -:func:`~matplotlib.pyplot.specgram`. Do you use matplotlib with -`django `_ or other popular web +:func:`~matplotlib.pyplot.specgram`. Do you use Matplotlib with +`django `_ or other popular web application servers? Write a FAQ or tutorial and we'll find a place -for it in the :ref:`users-guide-index`. Bundle matplotlib in a +for it in the :ref:`users-guide-index`. Bundle Matplotlib in a `py2exe `_ app? ... I think you get the idea. -matplotlib is documented using the `sphinx -`_ extensions to restructured text +Matplotlib is documented using the `sphinx +`_ extensions to restructured text `(ReST) `_. sphinx is an extensible python framework for documentation projects which generates HTML and PDF, and is pretty easy to write; you can see the source for this document or any page on this site by clicking on the *Show Source* link -at the end of the page in the sidebar (or `here -<../_sources/faq/howto_faq.txt>`_ for this document). +at the end of the page in the sidebar. The sphinx website is a good resource for learning sphinx, but we have put together a cheat-sheet at :ref:`documenting-matplotlib` which -shows you how to get started, and outlines the matplotlib conventions -and extensions, eg for including plots directly from external code in +shows you how to get started, and outlines the Matplotlib conventions +and extensions, e.g., for including plots directly from external code in your documents. Once your documentation contributions are working (and hopefully @@ -574,17 +632,18 @@ Matplotlib in a web application server ====================================== Many users report initial problems trying to use maptlotlib in web -application servers, because by default matplotlib ships configured to +application servers, because by default Matplotlib ships configured to work with a graphical user interface which may require an X11 connection. Since many barebones application servers do not have X11 -enabled, you may get errors if you don't configure matplotlib for use +enabled, you may get errors if you don't configure Matplotlib for use in these environments. Most importantly, you need to decide what kinds of images you want to generate (PNG, PDF, SVG) and configure the appropriate default backend. For 99% of users, this will be the Agg -backend, which uses the C++ `antigrain `_ +backend, which uses the C++ +`antigrain `_ rendering engine to make nice PNGs. The Agg backend is also configured to recognize requests to generate other output formats -(PDF, PS, EPS, SVG). The easiest way to configure matplotlib to use +(PDF, PS, EPS, SVG). The easiest way to configure Matplotlib to use Agg is to call:: # do this before importing pylab or pyplot @@ -597,7 +656,7 @@ For more on configuring your backend, see Alternatively, you can avoid pylab/pyplot altogether, which will give you a little more control, by calling the API directly as shown in -:ref:`api-agg_oo`. +:ref:`sphx_glr_gallery_api_agg_oo_sgskip.py`. You can either generate hardcopy on the filesystem by calling savefig:: @@ -615,28 +674,29 @@ or by saving to a file handle:: import sys fig.savefig(sys.stdout) -Here is an example using `Pillow __. -First, the figure is saved to a StringIO object which is then fed to +Here is an example using `Pillow `_. +First, the figure is saved to a BytesIO object which is then fed to Pillow for further processing:: - import StringIO, Image - imgdata = StringIO.StringIO() + from io import BytesIO + from PIL import Image + imgdata = BytesIO() fig.savefig(imgdata, format='png') imgdata.seek(0) # rewind the data im = Image.open(imgdata) -matplotlib with apache +Matplotlib with apache ---------------------- TODO; see :ref:`how-to-contribute-docs`. -matplotlib with django +Matplotlib with django ---------------------- TODO; see :ref:`how-to-contribute-docs`. -matplotlib with zope +Matplotlib with zope -------------------- TODO; see :ref:`how-to-contribute-docs`. @@ -649,7 +709,7 @@ Clickable images for HTML Andrew Dalke of `Dalke Scientific `_ has written a nice `article `_ -on how to make html click maps with matplotlib agg PNGs. We would +on how to make html click maps with Matplotlib agg PNGs. We would also like to add this functionality to SVG. If you are interested in contributing to these efforts that would be great. @@ -659,7 +719,7 @@ contributing to these efforts that would be great. Search examples =============== -The nearly 300 code :ref:`examples-index` included with the matplotlib +The nearly 300 code :ref:`examples-index` included with the Matplotlib source distribution are full-text searchable from the :ref:`search` page, but sometimes when you search, you get a lot of results from the :ref:`api-index` or other documentation that you may not be interested @@ -676,7 +736,7 @@ ellipse, :ref:`search` for ``codex ellipse``. Cite Matplotlib =============== -If you want to refer to matplotlib in a publication, you can use +If you want to refer to Matplotlib in a publication, you can use "Matplotlib: A 2D Graphics Environment" by J. D. Hunter In Computing in Science & Engineering, Vol. 9, No. 3. (2007), pp. 90-95 (see `this reference page `_):: diff --git a/doc/faq/index.rst b/doc/faq/index.rst index b41610b05652..12feae4ed01c 100644 --- a/doc/faq/index.rst +++ b/doc/faq/index.rst @@ -15,8 +15,8 @@ The Matplotlib FAQ :maxdepth: 2 installing_faq.rst - usage_faq.rst howto_faq.rst troubleshooting_faq.rst environment_variables_faq.rst - + virtualenv_faq.rst + osx_framework.rst diff --git a/doc/faq/installing_faq.rst b/doc/faq/installing_faq.rst index 79698f640e39..a9ff1b68dd8d 100644 --- a/doc/faq/installing_faq.rst +++ b/doc/faq/installing_faq.rst @@ -4,11 +4,9 @@ Installation ************* - .. contents:: :backlinks: none - Report a compilation problem ============================ @@ -25,9 +23,10 @@ complexities. Open up a UNIX shell or a DOS command prompt and cd into a directory containing a minimal example in a file. Something like :file:`simple_plot.py` for example:: - from pylab import * - plot([1,2,3]) - show() + import matplotlib.pyplot as plt + fig, ax = plt.subplots() + ax.plot([1,2,3]) + plt.show() and run it with:: @@ -35,7 +34,7 @@ and run it with:: This will give you additional information about which backends matplotlib is loading, version information, and more. At this point you might want to make -sure you understand matplotlib's :ref:`configuration ` +sure you understand matplotlib's :ref:`configuration ` process, governed by the :file:`matplotlibrc` configuration file which contains instructions within and the concept of the matplotlib backend. @@ -54,31 +53,6 @@ matplotlib was originally installed on your system. Follow the steps below that goes with your original installation method to cleanly remove matplotlib from your system. -Easy Install ------------- - -1. Delete the caches from your :ref:`.matplotlib configuration directory - `. - -2. Run:: - - easy_install -m matplotlib - - -3. Delete any .egg files or directories from your :ref:`installation - directory `. - - - -Windows installer ------------------ - -1. Delete the caches from your :ref:`.matplotlib configuration directory - `. - -2. Use :menuselection:`Start --> Control Panel` to start the :program:`Add and - Remove Software` utility. - Source install -------------- @@ -147,6 +121,8 @@ line script to the appropriate places. .. note:: Mac OSX users please see the :ref:`build_osx` guide. + Windows users please see the :ref:`build_windows` guide. + Then, if you want to update your matplotlib at any time, just do:: > git pull @@ -181,109 +157,197 @@ OS-X Notes Which python for OS X? ---------------------- -Apple ships OS X with its own python, but it is generally recommended -that users install an independent python system and use that -as the basis for installing libraries such as numpy and -matplotlib. By far the easiest method is to use one -of the excellent python software collections that are now -available: +Apple ships OS X with its own Python, in ``/usr/bin/python``, and its own copy +of matplotlib. Unfortunately, the way Apple currently installs its own copies +of numpy, scipy and matplotlib means that these packages are difficult to +upgrade (see `system python packages`_). For that reason we strongly suggest +that you install a fresh version of Python and use that as the basis for +installing libraries such as numpy and matplotlib. One convenient way to +install matplotlib with other useful Python software is to use one of the +excellent Python scientific software collections that are now available: + +.. _system python packages: + https://github.com/MacPython/wiki/wiki/Which-Python#system-python-and-extra-python-packages - Anaconda_ from `Continuum Analytics`_ - Canopy_ from Enthought_ -.. _Canopy: https://enthought.com/products/canopy/ -.. _Anaconda: https://store.continuum.io/cshop/anaconda/ -.. _Enthought: http://enthought.com -.. _Continuum Analytics: http://continuum.io +.. _Canopy: https://www.enthought.com/products/canopy/ +.. _Anaconda: https://www.continuum.io/downloads +.. _Enthought: https://www.enthought.com +.. _Continuum Analytics: https://www.continuum.io + +These collections include Python itself and a wide range of libraries; if you +need a library that is not available from the collection, you can install it +yourself using standard methods such as *pip*. Continuum and Enthought offer +their own installation support for these collections; see the Ananconda and +Canopy web pages for more information. + +Other options for a fresh Python install are the standard installer from +`python.org `_, or installing +Python using a general OSX package management system such as `homebrew +`_ or `macports `_. Power users on +OSX will likely want one of homebrew or macports on their system to install +open source software packages, but it is perfectly possible to use these +systems with another source for your Python binary, such as Anaconda, Canopy +or Python.org Python. -These collections include python itself and a wide range of -libraries; if you need a library that is not available from -the collection, you can install it yourself using standard -methods such as *pip*. +.. _install_osx_binaries: -If you choose not to use a collection, then you may use an -installer from `python.org -`_, or use a -general package management system such as `homebrew -`_ or `macports `_. -Whatever you choose, choose one and stick with it--don't try -to mix homebrew and macports, for example. You may, -however, use homebrew or macports for all your non-python -software, and still use Anaconda_ or Canopy_ for your python -system. +Installing OSX binary wheels +---------------------------- +If you are using recent Python from https://www.python.org, Macports or +Homebrew, then you can use the standard pip installer to install matplotlib +binaries in the form of wheels. +Python.org Python +^^^^^^^^^^^^^^^^^ -.. _install_osx_binaries: +Install pip following the `standard pip install instructions +`_. For the impatient, +open a new Terminal.app window and:: -Installing OSX binaries ------------------------ + curl -O https://bootstrap.pypa.io/get-pip.py + +Then (Python 2.7):: + + python get-pip.py + +or (Python 3):: + + python3 get-pip.py + +You can now install matplotlib and all its dependencies with:: + + pip install matplotlib + +Macports Python +^^^^^^^^^^^^^^^ + +For Python 2.7:: -If you want to install matplotlib from one of the binary installers we -build, you have two choices: a mpkg installer, which is a typical -Installer.app, or a binary OSX egg, which you can install via -setuptools' easy_install. + sudo port install py27-pip + sudo pip-2.7 install matplotlib + +For Python 3.4:: + + sudo port install py34-pip + sudo pip-3.4 install matplotlib + +Homebrew Python +^^^^^^^^^^^^^^^ + +For Python 2.7:: + + pip2 install matplotlib + +For Python 3.4:: + + pip3 install matplotlib + +You might also want to install IPython; we recommend you install IPython with +the IPython notebook option, like this: + +* Python.org Python: ``pip install ipython[notebook]`` +* Macports ``sudo pip-2.7 install ipython[notebook]`` or ``sudo pip-3.4 + install ipython[notebook]`` +* Homebrew ``pip2 install ipython[notebook]`` or ``pip3 install + ipython[notebook]`` + +Pip problems +^^^^^^^^^^^^ + +If you get errors with pip trying to run a compiler like ``gcc`` or ``clang``, +then the first thing to try is to `install xcode +`_ and +retry the install. If that does not work, then check +:ref:`reporting-problems`. + +Installing via OSX mpkg installer package +----------------------------------------- + +matplotlib also has a disk image (``.dmg``) installer, which contains a +typical Installer.app package to install matplotlib. You should use binary +wheels instead of the disk image installer if you can, because: + +* wheels work with Python.org Python, homebrew and macports, the disk image + installer only works with Python.org Python. +* The disk image installer doesn't check for recent versions of packages that + matplotlib depends on, and unconditionally installs the versions of + dependencies contained in the disk image installer. This can overwrite + packages that you have already installed, which might cause problems for + other packages, if you have a pre-existing Python.org setup on your + computer. + +If you still want to use the disk image installer, read on. .. note:: - Before installing any of the binary packages, be sure that all of the - packages were compiled for the same version of python. - Often, the download site for NumPy and matplotlib will display a - supposed 'current' version of the package, but you may need to choose - a different package from the full list that was built for your - combination of python and OSX. - -The mkpg installer will have a "zip" extension, and will have a name -like :file:`matplotlib-1.2.0-py2.7-macosx10.5_mpkg.zip`. -The name of the installer depends on which versions of python, matplotlib, -and OSX it was built for. You need to unzip this file using either the -"unzip" command, or simply double clicking on the it. Then when you -double-click on the resulting mpkd, which will have a name like -:file:`matplotlib-1.2.0-py2.7-macosx10.5.mpkg`, it will run the -Installer.app, prompt you for a password if you need system-wide -installation privileges, and install to a directory like -:file:`/Library/Python/2.7/site-packages/` (exact path depends on your -python version). This directory may not be in your python 'path' variable, -so you should test your installation with:: - - > python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__' - -If you get an error like:: + Before installing via the disk image installer, be sure that all of the + packages were compiled for the same version of python. Often, the download + site for NumPy and matplotlib will display a supposed 'current' version of + the package, but you may need to choose a different package from the full + list that was built for your combination of python and OSX. - Traceback (most recent call last): - File "", line 1, in - ImportError: No module named matplotlib +The disk image installer will have a ``.dmg`` extension, and will have a name +like :file:`matplotlib-1.4.0-py2.7-macosx10.6.dmg`. +The name of the installer depends on the versions of python and matplotlib it +was built for, and the version of OSX that the matching Python.org installer +was built for. For example, if the mathing Python.org Python installer was +built for OSX 10.6 or greater, the dmg file will end in ``-macosx10.6.dmg``. +You need to download this disk image file, open the disk image file by double +clicking, and find the new matplotlib disk image icon on your desktop. Double +click on that icon to show the contents of the image. Then double-click on +the ``.mpkg`` icon, which will have a name like +:file:`matplotlib-1.4.0-py2.7-macosx10.6.mpkg`, it will run the Installer.app, +prompt you for a password if you need system-wide installation privileges, and +install to a directory like +:file:`/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages` +(exact path depends on your Python version). -then you will need to set your PYTHONPATH, eg:: +Checking your installation +-------------------------- - export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH +The new version of matplotlib should now be on your Python "path". Check this +with one of these commands at the Terminal.app command line:: -See also ref:`environment-variables`. + python2.7 -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__' +(Python 2.7) or:: -Windows Notes -============= + python3.4 -c 'import matplotlib; print(matplotlib.__version__, matplotlib.__file__)' -Recommendation: use one of the excellent multi-platform -python collections which include python itself and a wide -range of libraries including matplotlib: +(Python 3.4). You should see something like this:: -- Anaconda_ from `Continuum Analytics`_ -- Canopy_ from Enthought_ + 1.4.0 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.pyc -A Windows-only alternative is: +where ``1.4.0`` is the matplotlib version you just installed, and the path +following depends on whether you are using Python.org Python, Homebrew or +Macports. If you see another version, or you get an error like this:: -- `python (x, y) `_ + Traceback (most recent call last): + File "", line 1, in + ImportError: No module named matplotlib + +then check that the Python binary is the one you expected by doing one of +these commands in Terminal.app:: -.. _windows-installers: + which python2.7 + +or:: -Binary installers for Windows ------------------------------ + which python3.4 -If you have already installed python, you can use one of the -matplotlib binary installers for windows -- you can get these from the -`download `_ site. -Choose the files that match your version of python (eg ``py2.7`` if -you installed Python 2.7) which have the ``exe`` extension. If you -haven't already installed python, you can get the official version -from the `python web site `_. +If you get the result ``/usr/bin/python2.7``, then you are getting the Python +installed with OSX, which is probably not what you want. Try closing and +restarting Terminal.app before running the check again. If that doesn't fix +the problem, depending on which Python you wanted to use, consider +reinstalling Python.org Python, or check your homebrew or macports setup. +Remember that the disk image installer only works for Python.org Python, and +will not get picked up by other Pythons. If all these fail, please let us +know: see :ref:`reporting-problems`. + +Windows Notes +============= +See :ref:`installing_windows`. diff --git a/doc/faq/osx_framework.rst b/doc/faq/osx_framework.rst new file mode 100644 index 000000000000..95585e79dd5e --- /dev/null +++ b/doc/faq/osx_framework.rst @@ -0,0 +1,146 @@ +.. _osxframework-faq: + +****************************** +Working with Matplotlib on OSX +****************************** + +.. contents:: + :backlinks: none + + +.. _osxframework_introduction: + +Introduction +============ + +On OSX, two different types of Python Builds exist: a regular build and a +framework build. In order to interact correctly with OSX through the native +GUI frameworks you need a framework build of Python. +At the time of writing the ``macosx`` and ``WXAgg`` backends require a +framework build to function correctly. This can result in issues for +a python installation not build as a framework and may also happen in +virtual envs and when using (Ana)Conda. +From Matplotlib 1.5 onwards the ``macosx`` backend +checks that a framework build is available and fails if a non framework +build is found. WX has a similar check build in. + +Without this check a partially functional figure is created. +Among the issues with it is that it is produced in the background and +cannot be put in front of any other window. Several solutions and work +arounds exist see below. + +Short version +============= + +VirtualEnv +---------- + +If you are on Python 3, use +`venv `_ +instead of `virtualenv `_:: + + python -m venv my-virtualenv + source my-virtualenv/bin/activate + +Otherwise you will need one of the workarounds below. + +Pyenv +----- + +If you are using pyenv and virtualenv you can enable your python version to be installed as a framework:: + + PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install x.x.x + +Conda +----- + +The default python provided in (Ana)Conda is not a framework +build. However, the Conda developers have made it easy to install +a framework build in both the main environment and in Conda envs. +To use this install python.app ``conda install python.app`` and +use ``pythonw`` rather than ``python`` + + +Long version +============ + +Unfortunately virtualenv creates a non +framework build even if created from a framework build of Python. +As documented above you can use venv as an alternative on Python 3. + +The issue has been reported on the virtualenv bug tracker `here +`__ and `here +`__ + +Until this is fixed, one of the following workarounds can be used: + +``PYTHONHOME`` Function +----------------------- + +The best known work around is to use the non +virtualenv python along with the PYTHONHOME environment variable. +This can be done by defining a function in your ``.bashrc`` using + +.. code:: bash + + function frameworkpython { + if [[ ! -z "$VIRTUAL_ENV" ]]; then + PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python "$@" + else + /usr/local/bin/python "$@" + fi + } + +This function can then be used in all of your virtualenvs without having to +fix every single one of them. + +With this in place you can run ``frameworkpython`` to get an interactive +framework build within the virtualenv. To run a script you can do +``frameworkpython test.py`` where ``test.py`` is a script that requires a +framework build. To run an interactive ``IPython`` session with the framework +build within the virtual environment you can do ``frameworkpython -m IPython`` + +``PYTHONHOME`` and Jupyter +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This approach can be followed even if using `Jupyter `_ +notebooks: you just need to setup a kernel with the suitable ``PYTHONHOME`` +definition. The `jupyter-virtualenv-osx `_ +script automates the creation of such a kernel. + + +``PYTHONHOME`` Script +^^^^^^^^^^^^^^^^^^^^^ + +An alternative work around borrowed from the `WX wiki +`_, is to use the non +virtualenv python along with the PYTHONHOME environment variable. This can be +implemented in a script as below. To use this modify ``PYVER`` and +``PATHTOPYTHON`` and put the script in the virtualenv bin directory i.e. +``PATHTOVENV/bin/frameworkpython`` + +.. code:: bash + + #!/bin/bash + + # what real Python executable to use + PYVER=2.7 + PATHTOPYTHON=/usr/local/bin/ + PYTHON=${PATHTOPYTHON}python${PYVER} + + # find the root of the virtualenv, it should be the parent of the dir this script is in + ENV=`$PYTHON -c "import os; print(os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..')))"` + + # now run Python with the virtualenv set as Python's HOME + export PYTHONHOME=$ENV + exec $PYTHON "$@" + +With this in place you can run ``frameworkpython`` as above but will need to add this script +to every virtualenv + +PythonW Compiler +^^^^^^^^^^^^^^^^ + +In addition +`virtualenv-pythonw-osx `_ +provides an alternative workaround which may be used to solve the issue. diff --git a/doc/faq/troubleshooting_faq.rst b/doc/faq/troubleshooting_faq.rst index f970012482f3..fe438bd1c69a 100644 --- a/doc/faq/troubleshooting_faq.rst +++ b/doc/faq/troubleshooting_faq.rst @@ -34,31 +34,45 @@ and printing the ``__file__`` attribute:: .. _locating-matplotlib-config-dir: -:file:`.matplotlib` directory location -====================================== +:file:`matplotlib` configuration and cache directory locations +============================================================== Each user has a matplotlib configuration directory which may contain a :ref:`matplotlibrc ` file. To -locate your :file:`.matplotlib/` directory, use +locate your :file:`matplotlib/` configuration directory, use :func:`matplotlib.get_configdir`:: >>> import matplotlib as mpl >>> mpl.get_configdir() - '/home/darren/.matplotlib' + '/home/darren/.config/matplotlib' On unix-like systems, this directory is generally located in your -:envvar:`HOME` directory. On windows, it is in your documents and -settings directory by default:: +:envvar:`HOME` directory under the :file:`.config/` directory. - >>> import matplotlib +In addition, users have a cache directory. On unix-like systems, this is +separate from the configuration directory by default. To locate your +:file:`.cache/` directory, use :func:`matplotlib.get_cachedir`:: + + >>> import matplotlib as mpl + >>> mpl.get_cachedir() + '/home/darren/.cache/matplotlib' + +On windows, both the config directory and the cache directory are +the same and are in your :file:`Documents and Settings` or :file:`Users` +directory by default:: + + >>> import matplotlib as mpl >>> mpl.get_configdir() 'C:\\Documents and Settings\\jdhunter\\.matplotlib' + >>> mpl.get_cachedir() + 'C:\\Documents and Settings\\jdhunter\\.matplotlib' If you would like to use a different configuration directory, you can do so by specifying the location in your :envvar:`MPLCONFIGDIR` environment variable -- see -:ref:`setting-linux-osx-environment-variables`. - +:ref:`setting-linux-osx-environment-variables`. Note that +:envvar:`MPLCONFIGDIR` sets the location of both the configuration +directory and the cache directory. .. _reporting-problems: @@ -78,7 +92,7 @@ There is a good chance your question has already been asked: If you are unable to find an answer to your question through search, please provide the following information in your e-mail to the `mailing list -`_: +`_: * your operating system; (Linux/UNIX users: post the output of ``uname -a``) @@ -87,15 +101,14 @@ please provide the following information in your e-mail to the python -c `import matplotlib; print matplotlib.__version__` * where you obtained matplotlib (e.g., your Linux distribution's - packages or the matplotlib Sourceforge site, or - Anaconda_ or - `Enthought Canopy `_). + packages, github, PyPi, or Anaconda_ or `Enthought Canopy + `_). -.. _Anaconda: https://store.continuum.io/cshop/anaconda/ +.. _Anaconda: https://www.continuum.io/downloads * any customizations to your ``matplotlibrc`` file (see - :ref:`customizing-matplotlib`). + :ref:`sphx_glr_tutorials_introductory_customizing.py`). * if the problem is reproducible, please try to provide a *minimal*, standalone Python script that demonstrates the problem. This is @@ -125,7 +138,7 @@ If you compiled matplotlib yourself, please also provide platform that are useful for the matplotlib developers to diagnose your problem. - * your compiler version -- eg, ``gcc --version`` + * your compiler version -- e.g., ``gcc --version`` Including this information in your first e-mail to the mailing list will save a lot of time. @@ -154,9 +167,9 @@ simple test script in debug mode:: and post :file:`build.out` and :file:`run.out` to the `matplotlib-devel -`_ +`_ mailing list (please do not post git problems to the `users list -`_). +`_). Of course, you will want to clearly describe your problem, what you are expecting and what you are getting, but often a clean build and diff --git a/doc/faq/usage_faq.rst b/doc/faq/usage_faq.rst deleted file mode 100644 index d6b95700a4d2..000000000000 --- a/doc/faq/usage_faq.rst +++ /dev/null @@ -1,549 +0,0 @@ -.. _usage-faq: - -*************** -Usage -*************** - -.. contents:: - :backlinks: none - - -.. _general_concepts: - -General Concepts -================ - -:mod:`matplotlib` has an extensive codebase that can be daunting to many -new users. However, most of matplotlib can be understood with a fairly -simple conceptual framework and knowledge of a few important points. - -Plotting requires action on a range of levels, from the most general -(e.g., 'contour this 2-D array') to the most specific (e.g., 'color -this screen pixel red'). The purpose of a plotting package is to assist -you in visualizing your data as easily as possible, with all the necessary -control -- that is, by using relatively high-level commands most of -the time, and still have the ability to use the low-level commands when -needed. - -Therefore, everything in matplotlib is organized in a hierarchy. At the top -of the hierarchy is the matplotlib "state-machine environment" which is -provided by the :mod:`matplotlib.pyplot` module. At this level, simple -functions are used to add plot elements (lines, images, text, etc.) to -the current axes in the current figure. - -.. note:: - Pyplot's state-machine environment behaves similarly to MATLAB and - should be most familiar to users with MATLAB experience. - -The next level down in the hierarchy is the first level of the object-oriented -interface, in which pyplot is used only for a few functions such as figure -creation, and the user explicitly creates and keeps track of the figure -and axes objects. At this level, the user uses pyplot to create figures, -and through those figures, one or more axes objects can be created. These -axes objects are then used for most plotting actions. - -For even more control -- which is essential for things like embedding -matplotlib plots in GUI applications -- the pyplot level may be dropped -completely, leaving a purely object-oriented approach. - -.. _figure_parts: - -Parts of a Figure -================= -.. image:: fig_map.png - -:class:`~matplotlib.figure.Figure` ----------------------------------- - -The **whole** figure (marked as the outer red box). The figure keeps -track of all the child :class:`~matplotlib.axes.Axes`, a smattering of -'special' artists (titles, figure legends, etc), and the **canvas**. -(Don't worry too much about the canvas, it is crucial as it is the -object that actually does the drawing to get you your plot, but as the -user it is more-or-less invisible to you). A figure can have any -number of :class:`~matplotlib.axes.Axes`, but to be useful should have -at least one. - -The easiest way to create a new figure is with pyplot:: - - fig = plt.figure() # an empty figure with no axes - fig, ax_lst = plt.subplots(2, 2) # a figure with a 2x2 grid of Axes - - -:class:`~matplotlib.axes.Axes` ------------------------------- - -This is what you think of as 'a plot', it is the region of the image -with the data space (marked as the inner blue box). A given figure -can contain many Axes, but a given :class:`~matplotlib.axes.Axes` -object can only be in one :class:`~matplotlib.figure.Figure`. The -Axes contains two (or three in the case of 3D) -:class:`~matplotlib.axis.Axis` objects (be aware of the difference -between **Axes** and **Axis**) which take care of the data limits (the -data limits can also be controlled via set via the -:meth:`~matplotlib.axes.Axes.set_xlim` and -:meth:`~matplotlib.axes.Axes.set_ylim` :class:`Axes` methods). Each -:class:`Axes` has a title (set via -:meth:`~matplotlib.axes.Axes.set_title`), an x-label (set via -:meth:`~matplotlib.axes.Axes.set_xlabel`), and a y-label set via -:meth:`~matplotlib.axes.Axes.set_ylabel`). - -The :class:`Axes` class and it's member functions are the primary entry -point to working with the OO interface. - -:class:`~matplotlib.axis.Axis` ------------------------------- - -These are the number-line-like objects (circled in green). They take -care of setting the graph limits and generating the ticks (the marks -on the axis) and ticklabels (strings labeling the ticks). The -location of the ticks is determined by a -:class:`~matplotlib.ticker.Locator` object and the ticklabel strings -are formatted by a :class:`~matplotlib.ticker.Formatter`. The -combination of the correct :class:`Locator` and :class:`Formatter` gives -very fine control over the tick locations and labels. - -:class:`~matplotlib.artist.Artist` ----------------------------------- - -Basically everything you can see on the figure is an artist (even the -:class:`Figure`, :class:`Axes`, and :class:`Axis` objects). This -includes :class:`Text` objects, :class:`Line2D` objects, -:class:`collection` objects, :class:`Patch` objects ... (you get the -idea). When the figure is rendered, all of the artists are drawn to -the **canvas**. Most Artists are tied to an Axes; such an Artist -cannot be shared by multiple Axes, or moved from one to another. - - -.. _pylab: - -Matplotlib, pyplot and pylab: how are they related? -==================================================== - -Matplotlib is the whole package; :mod:`matplotlib.pyplot` -is a module in matplotlib; and :mod:`pylab` is a module -that gets installed alongside :mod:`matplotlib`. - -Pyplot provides the state-machine interface to the underlying -object-oriented plotting library. The state-machine implicitly and -automatically creates figures and axes to achieve the desired -plot. For example:: - - - import matplotlib.pyplot as plt - import numpy as np - - x = np.linspace(0, 2, 100) - - plt.plot(x, x, label='linear') - plt.plot(x, x**2, label='quadratic') - plt.plot(x, x**3, label='cubic') - - plt.xlabel('x label') - plt.ylabel('y label') - - plt.title("Simple Plot") - - plt.legend() - - plt.show() - -The first call to ``plt.plot`` will automatically create the necessary -figure and axes to achieve the desired plot. Subsequent calls to -``plt.plot`` re-use the current axes and each add another line. -Setting the title, legend, and axis labels also automatically use the -current axes and set the title, create the legend, and label the axis -respectively. - -:mod:`pylab` is a convenience module that bulk imports -:mod:`matplotlib.pyplot` (for plotting) and :mod:`numpy` -(for mathematics and working with arrays) in a single name space. -Although many examples use :mod:`pylab`, it is no longer recommended. - -For non-interactive plotting it is suggested -to use pyplot to create the figures and then the OO interface for -plotting. - -.. _coding_styles: - -Coding Styles -================== - -When viewing this documentation and examples, you will find different -coding styles and usage patterns. These styles are perfectly valid -and have their pros and cons. Just about all of the examples can be -converted into another style and achieve the same results. -The only caveat is to avoid mixing the coding styles for your own code. - -.. note:: - Developers for matplotlib have to follow a specific style and guidelines. - See :ref:`developers-guide-index`. - -Of the different styles, there are two that are officially supported. -Therefore, these are the preferred ways to use matplotlib. - -For the pyplot style, the imports at the top of your -scripts will typically be:: - - import matplotlib.pyplot as plt - import numpy as np - -Then one calls, for example, np.arange, np.zeros, np.pi, plt.figure, -plt.plot, plt.show, etc. Use the pyplot interface -for creating figures, and then use the object methods for the rest:: - - import matplotlib.pyplot as plt - import numpy as np - x = np.arange(0, 10, 0.2) - y = np.sin(x) - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(x, y) - plt.show() - -So, why all the extra typing instead of the MATLAB-style (which relies -on global state and a flat namespace)? For very simple things like -this example, the only advantage is academic: the wordier styles are -more explicit, more clear as to where things come from and what is -going on. For more complicated applications, this explicitness and -clarity becomes increasingly valuable, and the richer and more -complete object-oriented interface will likely make the program easier -to write and maintain. - - -Typically one finds oneself making the same plots over and over -again, but with different data sets, which leads to needing to write -specialized functions to do the plotting. The recommended function -signature is something like: :: - - def my_plotter(ax, data1, data2, param_dict): - """ - A helper function to make a graph - - Parameters - ---------- - ax : Axes - The axes to draw to - - data1 : array - The x data - - data2 : array - The y data - - param_dict : dict - Dictionary of kwargs to pass to ax.plot - - Returns - ------- - out : list - list of artists added - """ - out = ax.plot(data1, data2, **param_dict) - return out - -which you would then use as:: - - fig, ax = plt.subplots(1, 1) - my_plotter(ax, data1, data2, {'marker':'x'}) - - -or if you wanted to have 2 sub-plots:: - - fig, (ax1, ax2) = plt.subplots(1, 2) - my_plotter(ax1, data1, data2, {'marker':'x'}) - my_plotter(ax2, data3, data4, {'marker':'o'}) - -Again, for these simple examples this style seems like overkill, however -once the graphs get slightly more complex it pays off. - -.. _what-is-a-backend: - -What is a backend? -================== - -A lot of documentation on the website and in the mailing lists refers -to the "backend" and many new users are confused by this term. -matplotlib targets many different use cases and output formats. Some -people use matplotlib interactively from the python shell and have -plotting windows pop up when they type commands. Some people embed -matplotlib into graphical user interfaces like wxpython or pygtk to -build rich applications. Others use matplotlib in batch scripts to -generate postscript images from some numerical simulations, and still -others in web application servers to dynamically serve up graphs. - -To support all of these use cases, matplotlib can target different -outputs, and each of these capabilities is called a backend; the -"frontend" is the user facing code, ie the plotting code, whereas the -"backend" does all the hard work behind-the-scenes to make the figure. -There are two types of backends: user interface backends (for use in -pygtk, wxpython, tkinter, qt4, or macosx; also referred to as -"interactive backends") and hardcopy backends to make image files -(PNG, SVG, PDF, PS; also referred to as "non-interactive backends"). - -There are a two primary ways to configure your backend. One is to set -the ``backend`` parameter in your ``matplotlibrc`` file (see -:ref:`customizing-matplotlib`):: - - backend : WXAgg # use wxpython with antigrain (agg) rendering - -The other is to use the matplotlib :func:`~matplotlib.use` directive:: - - import matplotlib - matplotlib.use('PS') # generate postscript output by default - -If you use the ``use`` directive, this must be done before importing -:mod:`matplotlib.pyplot` or :mod:`matplotlib.pylab`. - -.. note:: - Backend name specifications are not case-sensitive; e.g., 'GTKAgg' - and 'gtkagg' are equivalent. - -With a typical installation of matplotlib, such as from a -binary installer or a linux distribution package, a good default -backend will already be set, allowing both interactive work and -plotting from scripts, with output to the screen and/or to -a file, so at least initially you will not need to use either of the -two methods given above. - -If, however, you want to write graphical user interfaces, or a web -application server (:ref:`howto-webapp`), or need a better -understanding of what is going on, read on. To make things a little -more customizable for graphical user interfaces, matplotlib separates -the concept of the renderer (the thing that actually does the drawing) -from the canvas (the place where the drawing goes). The canonical -renderer for user interfaces is ``Agg`` which uses the `Anti-Grain -Geometry`_ C++ library to make a raster (pixel) image of the figure. -All of the user interfaces except ``macosx`` can be used with -agg rendering, eg -``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``TkAgg``. In -addition, some of the user interfaces support other rendering engines. -For example, with GTK, you can also select GDK rendering (backend -``GTK``) or Cairo rendering (backend ``GTKCairo``). - -For the rendering engines, one can also distinguish between `vector -`_ or `raster -`_ renderers. Vector -graphics languages issue drawing commands like "draw a line from this -point to this point" and hence are scale free, and raster backends -generate a pixel representation of the line whose accuracy depends on a -DPI setting. - -Here is a summary of the matplotlib renderers (there is an eponymous -backed for each; these are *non-interactive backends*, capable of -writing to a file): - -============= ============ ================================================ -Renderer Filetypes Description -============= ============ ================================================ -:term:`AGG` :term:`png` :term:`raster graphics` -- high quality images - using the `Anti-Grain Geometry`_ engine -PS :term:`ps` :term:`vector graphics` -- Postscript_ output - :term:`eps` -PDF :term:`pdf` :term:`vector graphics` -- - `Portable Document Format`_ -SVG :term:`svg` :term:`vector graphics` -- - `Scalable Vector Graphics`_ -:term:`Cairo` :term:`png` :term:`vector graphics` -- - :term:`ps` `Cairo graphics`_ - :term:`pdf` - :term:`svg` - ... -:term:`GDK` :term:`png` :term:`raster graphics` -- - :term:`jpg` the `Gimp Drawing Kit`_ - :term:`tiff` - ... -============= ============ ================================================ - -And here are the user interfaces and renderer combinations supported; -these are *interactive backends*, capable of displaying to the screen -and of using appropriate renderers from the table above to write to -a file: - -============ ================================================================ -Backend Description -============ ================================================================ -GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_) -GTK3Agg Agg rendering to a :term:`GTK` 3.x canvas (requires PyGObject_) -GTK GDK rendering to a :term:`GTK` 2.x canvas (not recommended) - (requires PyGTK_) -GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_ - and pycairo_) -GTK3Cairo Cairo rendering to a :term:`GTK` 3.x canvas (requires PyGObject_ - and pycairo_) -WXAgg Agg rendering to to a :term:`wxWidgets` canvas - (requires wxPython_) -WX Native :term:`wxWidgets` drawing to a :term:`wxWidgets` Canvas - (not recommended) (requires wxPython_) -TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_) -Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_) -macosx Cocoa rendering in OSX windows - (presently lacks blocking show() behavior when matplotlib - is in non-interactive mode) -============ ================================================================ - -.. _`Anti-Grain Geometry`: http://www.antigrain.com/ -.. _Postscript: http://en.wikipedia.org/wiki/PostScript -.. _`Portable Document Format`: http://en.wikipedia.org/wiki/Portable_Document_Format -.. _`Scalable Vector Graphics`: http://en.wikipedia.org/wiki/Scalable_Vector_Graphics -.. _`Cairo graphics`: http://en.wikipedia.org/wiki/Cairo_(graphics) -.. _`Gimp Drawing Kit`: http://en.wikipedia.org/wiki/GDK -.. _PyGTK: http://www.pygtk.org -.. _PyGObject: https://live.gnome.org/PyGObject -.. _pycairo: http://www.cairographics.org/pycairo/ -.. _wxPython: http://www.wxpython.org/ -.. _TkInter: http://wiki.python.org/moin/TkInter -.. _PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro - -How do I select PyQt4 or PySide? -======================================== - -You can choose either PyQt4 or PySide when using the `qt4` backend by setting -the appropriate value for `backend.qt4` in your :file:`matplotlibrc` file. The -default value is `PyQt4`. - -The setting in your :file:`matplotlibrc` file can be overridden by setting the -`QT_API` environment variable to either `pyqt` or `pyside` to use `PyQt4` or -`PySide`, respectively. - -Since the default value for the bindings to be used is `PyQt4`, -:mod:`matplotlib` first tries to import it, if the import fails, it tries to -import `PySide`. - -.. _interactive-mode: - -What is interactive mode? -=================================== - -Use of an interactive backend (see :ref:`what-is-a-backend`) -permits--but does not by itself require or ensure--plotting -to the screen. Whether and when plotting to the screen occurs, -and whether a script or shell session continues after a plot -is drawn on the screen, depends on the functions and methods -that are called, and on a state variable that determines whether -matplotlib is in "interactive mode". The default Boolean value is set -by the :file:`matplotlibrc` file, and may be customized like any other -configuration parameter (see :ref:`customizing-matplotlib`). It -may also be set via :func:`matplotlib.interactive`, and its -value may be queried via :func:`matplotlib.is_interactive`. Turning -interactive mode on and off in the middle of a stream of plotting -commands, whether in a script or in a shell, is rarely needed -and potentially confusing, so in the following we will assume all -plotting is done with interactive mode either on or off. - -.. note:: - Major changes related to interactivity, and in particular the - role and behavior of :func:`~matplotlib.pyplot.show`, were made in the - transition to matplotlib version 1.0, and bugs were fixed in - 1.0.1. Here we describe the version 1.0.1 behavior for the - primary interactive backends, with the partial exception of - *macosx*. - -Interactive mode may also be turned on via :func:`matplotlib.pyplot.ion`, -and turned off via :func:`matplotlib.pyplot.ioff`. - -.. note:: - Interactive mode works with suitable backends in ipython and in - the ordinary python shell, but it does *not* work in the IDLE IDE. - - -Interactive example --------------------- - -From an ordinary python prompt, or after invoking ipython with no options, -try this:: - - import matplotlib.pyplot as plt - plt.ion() - plt.plot([1.6, 2.7]) - -Assuming you are running version 1.0.1 or higher, and you have -an interactive backend installed and selected by default, you should -see a plot, and your terminal prompt should also be active; you -can type additional commands such as:: - - plt.title("interactive test") - plt.xlabel("index") - -and you will see the plot being updated after each line. This is -because you are in interactive mode *and* you are using pyplot -functions. Now try an alternative method of modifying the -plot. Get a -reference to the :class:`~matplotlib.axes.Axes` instance, and -call a method of that instance:: - - ax = plt.gca() - ax.plot([3.1, 2.2]) - -Nothing changed, because the Axes methods do not include an -automatic call to :func:`~matplotlib.pyplot.draw_if_interactive`; -that call is added by the pyplot functions. If you are using -methods, then when you want to update the plot on the screen, -you need to call :func:`~matplotlib.pyplot.draw`:: - - plt.draw() - -Now you should see the new line added to the plot. - -Non-interactive example ------------------------ - -Start a fresh session as in the previous example, but now -turn interactive mode off:: - - import matplotlib.pyplot as plt - plt.ioff() - plt.plot([1.6, 2.7]) - -Nothing happened--or at least nothing has shown up on the -screen (unless you are using *macosx* backend, which is -anomalous). To make the plot appear, you need to do this:: - - plt.show() - -Now you see the plot, but your terminal command line is -unresponsive; the :func:`show()` command *blocks* the input -of additional commands until you manually kill the plot -window. - -What good is this--being forced to use a blocking function? -Suppose you need a script that plots the contents of a file -to the screen. You want to look at that plot, and then end -the script. Without some blocking command such as show(), the -script would flash up the plot and then end immediately, -leaving nothing on the screen. - -In addition, non-interactive mode delays all drawing until -show() is called; this is more efficient than redrawing -the plot each time a line in the script adds a new feature. - -Prior to version 1.0, show() generally could not be called -more than once in a single script (although sometimes one -could get away with it); for version 1.0.1 and above, this -restriction is lifted, so one can write a script like this:: - - import numpy as np - import matplotlib.pyplot as plt - plt.ioff() - for i in range(3): - plt.plot(np.random.rand(10)) - plt.show() - -which makes three plots, one at a time. - -Summary -------- - -In interactive mode, pyplot functions automatically draw -to the screen. - -When plotting interactively, if using -object method calls in addition to pyplot functions, then -call :func:`~matplotlib.pyplot.draw` whenever you want to -refresh the plot. - -Use non-interactive mode in scripts in which you want to -generate one or more figures and display them before ending -or generating a new set of figures. In that case, use -:func:`~matplotlib.pyplot.show` to display the figure(s) and -to block execution until you have manually destroyed them. diff --git a/doc/faq/virtualenv_faq.rst b/doc/faq/virtualenv_faq.rst new file mode 100644 index 000000000000..37a60668d136 --- /dev/null +++ b/doc/faq/virtualenv_faq.rst @@ -0,0 +1,62 @@ +.. _virtualenv-faq: + +*********************************************** +Working with Matplotlib in Virtual environments +*********************************************** + +.. contents:: + :backlinks: none + + +.. _virtualenv_introduction: + +Introduction +============ + +When running :mod:`matplotlib` in a +`virtual environment `_ you may discover +a few issues. :mod:`matplotlib` itself has no issue with virtual environments. +However, the GUI frameworks that :mod:`matplotlib` uses for interactive +figures have some issues with virtual environments. Everything below assumes +some familiarity with the Matplotlib backends as found in :ref:`What is a +backend? `. + +If you only use the ``IPython/Jupyter Notebook``'s ``inline`` and ``notebook`` +backends and non interactive backends you should not have any issues and can +ignore everything below. + +If you are using Matplotlib on OSX you may also want to consider the +:ref:`OSX framework FAQ `. + +GUI Frameworks +============== + +Interactive Matplotlib relies heavily on the interaction with external GUI +frameworks. + +Most GUI frameworks are not pip installable. This makes it tricky to install +them within a virtual environment. This problem does not exist if you use Conda +environments where you can install all Conda supported GUI frameworks directly +into the environment. In regular virtualenv environment various workarounds +exist. Some of these are given here: + +* The ``TKAgg`` backend doesn't require any external dependencies and is + normally always available. +* The ``QT4`` framework ``PySide`` is pip installable. +* ``PYQT5`` is pip installable on Python 3.5. + +Other frameworks are harder to install into a virtual environment. There are at +least two possible ways to get access to these in a virtual environment. + +One often suggested solution is to use the ``--system-site-packages`` option +to virtualenv when creating an environment. This adds all system wide packages +to the virtual environment. However, this breaks the isolation between the +virtual environment and the system install. Among other issues it results in +hard to debug problems with system packages shadowing the environment packages. +If you use `virtualenvwrapper `_ +this can be toggled with the ``toggleglobalsitepackages`` command. + +Alternatively, you can manually symlink the GUI frameworks into the environment. +I.e. to use PyQt5, you should symlink ``PyQt5`` and ``sip`` from your system +site packages directory into the environment taking care that the environment +and the systemwide install use the same python version. diff --git a/doc/glossary/index.rst b/doc/glossary/index.rst index de17328cffca..a4713567726a 100644 --- a/doc/glossary/index.rst +++ b/doc/glossary/index.rst @@ -8,22 +8,22 @@ Glossary .. glossary:: AGG - The Anti-Grain Geometry (`Agg `_) rendering engine, capable of rendering + The Anti-Grain Geometry (`Agg `_) rendering engine, capable of rendering high-quality images Cairo - The `Cairo graphics `_ engine + The `Cairo graphics `_ engine dateutil - The `dateutil `_ library + The `dateutil `_ library provides extensions to the standard datetime module EPS - Encapsulated Postscript (`EPS `_) + Encapsulated Postscript (`EPS `_) - freetype - `freetype `_ is a font rasterization + FreeType + `FreeType `_ is a font rasterization library used by matplotlib which supports TrueType, Type 1, and OpenType fonts. @@ -32,32 +32,32 @@ Glossary The Gimp Drawing Kit for GTK+ GTK - The GIMP Toolkit (`GTK `_) graphical user interface library + The GIMP Toolkit (`GTK `_) graphical user interface library JPG The Joint Photographic Experts Group (`JPEG - `_) compression method and + `_) compression method and file format for photographic images numpy - `numpy `_ is the standard numerical + `numpy `_ is the standard numerical array library for python, the successor to Numeric and numarray. numpy provides fast operations for homogeneous data sets and common mathematical operations like correlations, standard deviation, fourier transforms, and convolutions. PDF - Adobe's Portable Document Format (`PDF `_) + Adobe's Portable Document Format (`PDF `_) PNG Portable Network Graphics (`PNG - `_), a raster graphics format + `_), a raster graphics format that employs lossless data compression which is more suitable for line art than the lossy jpg format. Unlike the gif format, png is not encumbered by requirements for a patent license. PS - Postscript (`PS `_) is a + Postscript (`PS `_) is a vector graphics ASCII text language widely used in printers and publishing. Postscript was developed by adobe systems and is starting to show its age: for example is does not have an alpha @@ -71,37 +71,42 @@ Glossary 'python-gtk2' pyqt - `pyqt `_ provides python + `pyqt `_ provides python wrappers for the :term:`Qt` widgets library and is required by - the matplotlib QtAgg and Qt4Agg backends. Widely used on linux + the matplotlib Qt5Agg and Qt4Agg backends. Widely used on linux and windows; many linux distributions package this as - 'python-qt3' or 'python-qt4'. + 'python-qt5' or 'python-qt4'. python - `python `_ is an object oriented interpreted + `python `_ is an object oriented interpreted language widely used for scripting, application development, web application servers, scientific computing and more. pytz - `pytz `_ provides the Olson tz + `pytz `_ provides the Olson tz database in Python. it allows accurate and cross platform timezone calculations and solves the issue of ambiguous times at the end of daylight savings Qt - `Qt `__ is a cross-platform + `Qt `__ is a cross-platform application framework for desktop and embedded development. Qt4 - `Qt4 `__ is the most recent - version of Qt cross-platform application framework for desktop - and embedded development. + `Qt4 `__ is the previous, + but most widely used, version of Qt cross-platform application + framework for desktop and embedded development. + + Qt5 + `Qt5 `__ is the current + version of Qt cross-platform application + framework for desktop and embedded development. raster graphics `Raster graphics - `_, or bitmaps, + `_, or bitmaps, represent an image as an array of pixels which is resolution dependent. Raster graphics are generally most practical for photo-realistic images, but do not scale easily without loss of @@ -109,12 +114,12 @@ Glossary SVG The Scalable Vector Graphics format (`SVG - `_). An XML based vector + `_). An XML based vector graphics format supported by many web browsers. TIFF Tagged Image File Format (`TIFF - `_) is a + `_) is a file format for storing images, including photographs and line art. @@ -126,7 +131,7 @@ Glossary vector graphics `vector graphics - `_ use geometrical + `_ use geometrical primitives based upon mathematical equations to represent images in computer graphics. Primitives can include points, lines, curves, and shapes or polygons. Vector graphics are scalable, @@ -136,7 +141,7 @@ Glossary typesetting and graphic design applications. wxpython - `wxpython `_ provides python wrappers + `wxpython `_ provides python wrappers for the :term:`wxWidgets` library for use with the WX and WXAgg backends. Widely used on linux, OS-X and windows, it is often packaged by linux distributions as 'python-wxgtk' diff --git a/doc/make.py b/doc/make.py index 80e09c758a56..c23335334d18 100755 --- a/doc/make.py +++ b/doc/make.py @@ -1,113 +1,20 @@ #!/usr/bin/env python +"""Wrapper script for calling Sphinx. """ from __future__ import print_function -import fileinput import glob import os import shutil import sys - -### Begin compatibility block for pre-v2.6: ### -# -# ignore_patterns and copytree funtions are copies of what is included -# in shutil.copytree of python v2.6 and later. -# -### When compatibility is no-longer needed, this block -### can be replaced with: -### -### from shutil import ignore_patterns, copytree -### -### or the "shutil." qualifier can be prepended to the function -### names where they are used. - -try: - WindowsError -except NameError: - WindowsError = None - -def ignore_patterns(*patterns): - """Function that can be used as copytree() ignore parameter. - - Patterns is a sequence of glob-style patterns - that are used to exclude files""" - import fnmatch - def _ignore_patterns(path, names): - ignored_names = [] - for pattern in patterns: - ignored_names.extend(fnmatch.filter(names, pattern)) - return set(ignored_names) - return _ignore_patterns - -def copytree(src, dst, symlinks=False, ignore=None): - """Recursively copy a directory tree using copy2(). - - The destination directory must not already exist. - If exception(s) occur, an Error is raised with a list of reasons. - - If the optional symlinks flag is true, symbolic links in the - source tree result in symbolic links in the destination tree; if - it is false, the contents of the files pointed to by symbolic - links are copied. - - The optional ignore argument is a callable. If given, it - is called with the `src` parameter, which is the directory - being visited by copytree(), and `names` which is the list of - `src` contents, as returned by os.listdir(): - - callable(src, names) -> ignored_names - - Since copytree() is called recursively, the callable will be - called once for each directory that is copied. It returns a - list of names relative to the `src` directory that should - not be copied. - - XXX Consider this example code rather than the ultimate tool. - - """ - from shutil import copy2, Error, copystat - names = os.listdir(src) - if ignore is not None: - ignored_names = ignore(src, names) - else: - ignored_names = set() - - os.makedirs(dst) - errors = [] - for name in names: - if name in ignored_names: - continue - srcname = os.path.join(src, name) - dstname = os.path.join(dst, name) - try: - if symlinks and os.path.islink(srcname): - linkto = os.readlink(srcname) - os.symlink(linkto, dstname) - elif os.path.isdir(srcname): - copytree(srcname, dstname, symlinks, ignore) - else: - # Will raise a SpecialFileError for unsupported file types - copy2(srcname, dstname) - # catch the Error from the recursive copytree so that we can - # continue with other files - except Error as err: - errors.extend(err.args[0]) - except EnvironmentError as why: - errors.append((srcname, dstname, str(why))) - try: - copystat(src, dst) - except OSError as why: - if WindowsError is not None and isinstance(why, WindowsError): - # Copying file access times may fail on Windows - pass - else: - errors.extend((src, dst, str(why))) - if errors: - raise Error(errors) - -### End compatibility block for pre-v2.6 ### +import re +import argparse +import subprocess +import matplotlib +import six def copy_if_out_of_date(original, derived): + """Copy file only if newer as target or if target does not exist. """ if (not os.path.exists(derived) or os.stat(derived).st_mtime < os.stat(original).st_mtime): try: @@ -120,7 +27,9 @@ def copy_if_out_of_date(original, derived): else: raise + def check_build(): + """Create target build directories if necessary. """ build_dirs = ['build', 'build/doctrees', 'build/html', 'build/latex', 'build/texinfo', '_static', '_templates'] for d in build_dirs: @@ -129,131 +38,195 @@ def check_build(): except OSError: pass + def doctest(): - os.system('sphinx-build -b doctest -d build/doctrees . build/doctest') + """Execute Sphinx 'doctest' target. """ + subprocess.call( + [sys.executable] + + '-msphinx -b doctest -d build/doctrees . build/doctest'.split()) + def linkcheck(): - os.system('sphinx-build -b linkcheck -d build/doctrees . build/linkcheck') + """Execute Sphinx 'linkcheck' target. """ + subprocess.call( + [sys.executable] + + '-msphinx -b linkcheck -d build/doctrees . build/linkcheck'.split()) + +DEPSY_PATH = "_static/depsy_badge.svg" +DEPSY_URL = "http://depsy.org/api/package/pypi/matplotlib/badge.svg" +DEPSY_DEFAULT = "_static/depsy_badge_default.svg" + -def html(): +def fetch_depsy_badge(): + """Fetches a static copy of the depsy badge. + + If there is any network error, use a static copy from git. + + This is to avoid a mixed-content warning when serving matplotlib.org + over https, see https://github.com/Impactstory/depsy/issues/77 + + The downside is that the badge only updates when the documentation + is rebuilt.""" + try: + request = six.moves.urllib.request.urlopen(DEPSY_URL) + try: + data = request.read().decode('utf-8') + with open(DEPSY_PATH, 'w') as output: + output.write(data) + finally: + request.close() + except six.moves.urllib.error.URLError: + shutil.copyfile(DEPSY_DEFAULT, DEPSY_PATH) + + +def html(buildername='html'): + """Build Sphinx 'html' target. """ check_build() - copy_if_out_of_date('../lib/matplotlib/mpl-data/matplotlibrc', '_static/matplotlibrc') + fetch_depsy_badge() + + rc = '../lib/matplotlib/mpl-data/matplotlibrc' + default_rc = os.path.join(matplotlib._get_data_path(), 'matplotlibrc') + if not os.path.exists(rc) and os.path.exists(default_rc): + rc = default_rc + copy_if_out_of_date(rc, '_static/matplotlibrc') + + options = ['-j{}'.format(n_proc), + '-b{}'.format(buildername), + '-dbuild/doctrees'] if small_docs: - options = "-D plot_formats=\"[('png', 80)]\"" - else: - options = '' - if os.system('sphinx-build %s -b html -d build/doctrees . build/html' % options): + options += ['-Dplot_formats=png:100'] + if warnings_as_errors: + options += ['-W'] + if subprocess.call( + [sys.executable, '-msphinx', '.', 'build/{}'.format(buildername)] + + options): raise SystemExit("Building HTML failed.") # Clean out PDF files from the _images directory - for filename in glob.glob('build/html/_images/*.pdf'): + for filename in glob.glob('build/%s/_images/*.pdf' % buildername): os.remove(filename) - shutil.copy('../CHANGELOG', 'build/html/_static/CHANGELOG') + +def htmlhelp(): + """Build Sphinx 'htmlhelp' target. """ + html(buildername='htmlhelp') + # remove scripts from index.html + with open('build/htmlhelp/index.html', 'r+') as fh: + content = fh.read() + fh.seek(0) + content = re.sub(r'', '', content, + flags=re.MULTILINE | re.DOTALL) + fh.write(content) + fh.truncate() + def latex(): + """Build Sphinx 'latex' target. """ check_build() - #figs() + # figs() if sys.platform != 'win32': # LaTeX format. - if os.system('sphinx-build -b latex -d build/doctrees . build/latex'): + if subprocess.call( + [sys.executable] + + '-msphinx -b latex -d build/doctrees . build/latex'.split()): raise SystemExit("Building LaTeX failed.") # Produce pdf. - os.chdir('build/latex') - # Call the makefile produced by sphinx... - if os.system('make'): - raise SystemExit("Rendering LaTeX failed.") - - os.chdir('../..') + if subprocess.call("make", cwd="build/latex"): + raise SystemExit("Rendering LaTeX failed with.") else: print('latex build has not been tested on windows') + def texinfo(): + """Build Sphinx 'texinfo' target. """ check_build() - #figs() + # figs() if sys.platform != 'win32': # Texinfo format. - if os.system( - 'sphinx-build -b texinfo -d build/doctrees . build/texinfo'): + if subprocess.call( + [sys.executable] + + '-msphinx -b texinfo -d build/doctrees . build/texinfo'.split()): raise SystemExit("Building Texinfo failed.") # Produce info file. - os.chdir('build/texinfo') - # Call the makefile produced by sphinx... - if os.system('make'): - raise SystemExit("Rendering Texinfo failed.") - - os.chdir('../..') + if subprocess.call("make", cwd="build/texinfo"): + raise SystemExit("Rendering Texinfo failed with.") else: print('texinfo build has not been tested on windows') + def clean(): + """Remove generated files. """ shutil.rmtree("build", ignore_errors=True) - shutil.rmtree("examples", ignore_errors=True) - for pattern in ['mpl_examples/api/*.png', - 'mpl_examples/pylab_examples/*.png', - 'mpl_examples/pylab_examples/*.pdf', - 'mpl_examples/units/*.png', - 'pyplots/tex_demo.png', - '_static/matplotlibrc', + shutil.rmtree("tutorials", ignore_errors=True) + shutil.rmtree("api/_as_gen", ignore_errors=True) + for pattern in ['_static/matplotlibrc', '_templates/gallery.html', 'users/installing.rst']: for filename in glob.glob(pattern): if os.path.exists(filename): os.remove(filename) -def all(): - #figs() + +def build_all(): + """Build Sphinx 'html' and 'latex' target. """ + # figs() html() latex() funcd = { - 'html' : html, - 'latex' : latex, - 'texinfo' : texinfo, - 'clean' : clean, - 'all' : all, - 'doctest' : doctest, + 'html': html, + 'htmlhelp': htmlhelp, + 'latex': latex, + 'texinfo': texinfo, + 'clean': clean, + 'all': build_all, + 'doctest': doctest, 'linkcheck': linkcheck, } small_docs = False +warnings_as_errors = True +n_proc = 1 # Change directory to the one containing this file current_dir = os.getcwd() os.chdir(os.path.dirname(os.path.join(current_dir, __file__))) -copy_if_out_of_date('../INSTALL', 'users/installing.rst') - -# Create the examples symlink, if it doesn't exist - -required_symlinks = [ - ('mpl_examples', '../examples/'), - ('mpl_toolkits/axes_grid/examples', '../../../examples/axes_grid/') - ] - -for link, target in required_symlinks: - if not os.path.exists(link): - if hasattr(os, 'symlink'): - os.symlink(target, link) - else: - shutil.copytree(os.path.join(link, '..', target), link) - -if len(sys.argv)>1: - if '--small' in sys.argv[1:]: - small_docs = True - sys.argv.remove('--small') - for arg in sys.argv[1:]: - func = funcd.get(arg) +copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst') + +parser = argparse.ArgumentParser(description='Build matplotlib docs') +parser.add_argument("cmd", help=("Command to execute. Can be multiple. " + "Valid options are: %s" % (funcd.keys())), nargs='*') +parser.add_argument("--small", + help="Smaller docs with only low res png figures", + action="store_true") +parser.add_argument("--allowsphinxwarnings", + help="Don't turn Sphinx warnings into errors", + action="store_true") +parser.add_argument("-n", + help="Number of parallel workers to use") + +args = parser.parse_args() +if args.small: + small_docs = True +if args.allowsphinxwarnings: + warnings_as_errors = False +if args.n is not None: + n_proc = int(args.n) + +_valid_commands = "Valid targets are: {}".format(", ".join(sorted(funcd))) +if args.cmd: + for command in args.cmd: + func = funcd.get(command) if func is None: - raise SystemExit('Do not know how to handle %s; valid args are %s'%( - arg, funcd.keys())) + raise SystemExit("Do not know how to handle {}. {}" + .format(command, _valid_commands)) func() else: - small_docs = False - all() + raise SystemExit(_valid_commands) os.chdir(current_dir) diff --git a/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst b/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst deleted file mode 100644 index fc090530e664..000000000000 --- a/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst +++ /dev/null @@ -1,18 +0,0 @@ - -:mod:`mpl_toolkits.axes_grid.axes_divider` -========================================== - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.Divider - :members: - :undoc-members: - - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesLocator - :members: - :undoc-members: - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.SubplotDivider - :members: - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesDivider - :members: diff --git a/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst b/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst deleted file mode 100644 index 15fa8bd2a2c1..000000000000 --- a/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst +++ /dev/null @@ -1,11 +0,0 @@ - -:mod:`mpl_toolkits.axes_grid.axes_grid` -======================================= - -.. autoclass:: mpl_toolkits.axes_grid.axes_grid.Grid - :members: - :undoc-members: - -.. autoclass:: mpl_toolkits.axes_grid.axes_grid.ImageGrid - :members: - :undoc-members: diff --git a/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst b/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst deleted file mode 100644 index 1238bfd903b2..000000000000 --- a/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst +++ /dev/null @@ -1,6 +0,0 @@ -:mod:`mpl_toolkits.axes_grid.axes_size` -======================================= - -.. automodule:: mpl_toolkits.axes_grid.axes_size - :members: Fixed, Scaled, AxesX, AxesY, MaxWidth, MaxHeight, Fraction, Padded, from_any - diff --git a/doc/mpl_toolkits/axes_grid/api/axis_artist_api.rst b/doc/mpl_toolkits/axes_grid/api/axis_artist_api.rst deleted file mode 100644 index f18a52daab65..000000000000 --- a/doc/mpl_toolkits/axes_grid/api/axis_artist_api.rst +++ /dev/null @@ -1,16 +0,0 @@ - -:mod:`mpl_toolkits.axes_grid.axis_artist` -========================================= - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisArtist - :members: - :undoc-members: - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.Ticks - :members: - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisLabel - :members: - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.TickLabels - :members: diff --git a/doc/mpl_toolkits/axes_grid/api/index.rst b/doc/mpl_toolkits/axes_grid/api/index.rst deleted file mode 100644 index 399548928147..000000000000 --- a/doc/mpl_toolkits/axes_grid/api/index.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _axes_grid-api-index: - -####################################### - The Matplotlib AxesGrid Toolkit API -####################################### - -:Release: |version| -:Date: |today| - -.. toctree:: - - axes_size_api.rst - axes_divider_api.rst - axes_grid_api.rst - axis_artist_api.rst diff --git a/doc/mpl_toolkits/axes_grid/examples b/doc/mpl_toolkits/axes_grid/examples deleted file mode 120000 index 69ba136bcc62..000000000000 --- a/doc/mpl_toolkits/axes_grid/examples +++ /dev/null @@ -1 +0,0 @@ -../../../examples/axes_grid/ \ No newline at end of file diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_of_inset_axes.py b/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_of_inset_axes.py deleted file mode 100644 index e4e708c6685a..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_of_inset_axes.py +++ /dev/null @@ -1,49 +0,0 @@ -import matplotlib.pyplot as plt - -from mpl_toolkits.axes_grid.inset_locator import inset_axes, zoomed_inset_axes -from mpl_toolkits.axes_grid.colorbar import colorbar - -def get_demo_image(): - from matplotlib.cbook import get_sample_data - import numpy as np - f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False) - z = np.load(f) - # z is a numpy array of 15x15 - return z, (-3,4,-4,3) - - -fig = plt.figure(1, [5,4]) -ax = fig.add_subplot(111) - -Z, extent = get_demo_image() - -ax.set(aspect=1, - xlim=(-15, 15), - ylim=(-20, 5)) - - -axins = zoomed_inset_axes(ax, 2, loc=2) # zoom = 6 -im = axins.imshow(Z, extent=extent, interpolation="nearest", - origin="lower") - -plt.xticks(visible=False) -plt.yticks(visible=False) - - -# colorbar -cax = inset_axes(axins, - width="5%", # width = 10% of parent_bbox width - height="100%", # height : 50% - loc=3, - bbox_to_anchor=(1.05, 0., 1, 1), - bbox_transform=axins.transAxes, - borderpad=0, - ) - - -colorbar(im, cax=cax) #, ticks=[1,2,3]) - - -plt.draw() -plt.show() - diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_with_axes_divider.py b/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_with_axes_divider.py deleted file mode 100644 index 3816f013fbdf..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_with_axes_divider.py +++ /dev/null @@ -1,25 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axes_divider import make_axes_locatable - -from mpl_toolkits.axes_grid.colorbar import colorbar -# from matplotlib.pyplot import colorbar - -fig = plt.figure(1, figsize=(6, 3)) -fig.subplots_adjust(wspace=0.5) - -ax1 = fig.add_subplot(121) -im1 = ax1.imshow([[1,2],[3,4]]) - -ax1_divider = make_axes_locatable(ax1) -cax1 = ax1_divider.append_axes("right", size="7%", pad="2%") -cb1 = colorbar(im1, cax=cax1) - -ax2 = fig.add_subplot(122) -im2 = ax2.imshow([[1,2],[3,4]]) - -ax2_divider = make_axes_locatable(ax2) -cax2 = ax2_divider.append_axes("top", size="7%", pad="2%") -cb2 = colorbar(im2, cax=cax2, orientation="horizontal") -cax2.xaxis.set_ticks_position("top") -plt.show() - diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_fixed_size_axes.py b/doc/mpl_toolkits/axes_grid/figures/demo_fixed_size_axes.py deleted file mode 100644 index 9c2b651e571c..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/demo_fixed_size_axes.py +++ /dev/null @@ -1,57 +0,0 @@ -import matplotlib.pyplot as plt - -from mpl_toolkits.axes_grid \ - import Divider, LocatableAxes, Size - -def demo_fixed_size_axes(): - - fig1 = plt.figure(1, (6, 6)) - - # The first items are for padding and the second items are for the axes. - # sizes are in inch. - h = [Size.Fixed(1.0), Size.Fixed(4.5)] - v = [Size.Fixed(0.7), Size.Fixed(5.)] - - divider = Divider(fig1, (0.0, 0.0, 1., 1.), h, v, aspect=False) - # the width and height of the rectangle is ignored. - - ax = LocatableAxes(fig1, divider.get_position()) - ax.set_axes_locator(divider.new_locator(nx=1, ny=1)) - - fig1.add_axes(ax) - - ax.plot([1,2,3]) - - - - -def demo_fixed_pad_axes(): - - fig = plt.figure(2, (6, 6)) - - # The first & third items are for padding and the second items are for the axes. - # sizes are in inch. - h = [Size.Fixed(1.0), Size.Scaled(1.), Size.Fixed(.2),] - v = [Size.Fixed(0.7), Size.Scaled(1.), Size.Fixed(.5),] - - divider = Divider(fig, (0.0, 0.0, 1., 1.), h, v, aspect=False) - # the width and height of the rectangle is ignored. - - ax = LocatableAxes(fig, divider.get_position()) - ax.set_axes_locator(divider.new_locator(nx=1, ny=1)) - - fig.add_axes(ax) - - ax.plot([1,2,3]) - - - - - - -if __name__ == "__main__": - demo_fixed_size_axes() - demo_fixed_pad_axes() - - plt.draw() - plt.show() diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_new_colorbar.py b/doc/mpl_toolkits/axes_grid/figures/demo_new_colorbar.py deleted file mode 100644 index 88a722ee2241..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/demo_new_colorbar.py +++ /dev/null @@ -1,21 +0,0 @@ -import matplotlib.pyplot as plt - -plt.rcParams["text.usetex"]=False - -fig = plt.figure(1, figsize=(6, 3)) - -ax1 = fig.add_subplot(121) -im1 = ax1.imshow([[1,2],[3,4]]) -cb1 = plt.colorbar(im1) -cb1.ax.set_yticks([1, 3]) -ax1.set_title("Original MPL's colorbar w/\nset_yticks([1,3])", size=10) - -from mpl_toolkits.axes_grid.colorbar import colorbar -ax2 = fig.add_subplot(122) -im2 = ax2.imshow([[1,2],[3,4]]) -cb2 = colorbar(im2) -cb2.ax.set_yticks([1, 3]) -ax2.set_title("AxesGrid's colorbar w/\nset_yticks([1,3])", size=10) - -plt.show() - diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_parasite_axes.py b/doc/mpl_toolkits/axes_grid/figures/demo_parasite_axes.py deleted file mode 100644 index a42c9b6493fc..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/demo_parasite_axes.py +++ /dev/null @@ -1,54 +0,0 @@ -from mpl_toolkits.axes_grid.parasite_axes import HostAxes, ParasiteAxes -import matplotlib.pyplot as plt - -if __name__ == "__main__": - fig = plt.figure(1) - - host = HostAxes(fig, [0.15, 0.1, 0.65, 0.8]) - par1 = ParasiteAxes(host, sharex=host) - par2 = ParasiteAxes(host, sharex=host) - host.parasites.append(par1) - host.parasites.append(par2) - - host.set_ylabel("Density") - host.set_xlabel("Distance") - - host.axis["right"].set_visible(False) - par1.axis["right"].set_visible(True) - par1.set_ylabel("Temperature") - - par1.axis["right"].major_ticklabels.set_visible(True) - par1.axis["right"].label.set_visible(True) - - par2.set_ylabel("Velocity") - offset = (60, 0) - new_axisline = par2._grid_helper.new_fixed_axis - par2.axis["right2"] = new_axisline(loc="right", - axes=par2, - offset=offset) - - - fig.add_axes(host) - - host.set_xlim(0, 2) - host.set_ylim(0, 2) - - host.set_xlabel("Distance") - host.set_ylabel("Density") - par1.set_ylabel("Temperature") - - p1, = host.plot([0, 1, 2], [0, 1, 2], label="Density") - p2, = par1.plot([0, 1, 2], [0, 3, 2], label="Temperature") - p3, = par2.plot([0, 1, 2], [50, 30, 15], label="Velocity") - - par1.set_ylim(0, 4) - par2.set_ylim(1, 65) - - host.legend() - - host.axis["left"].label.set_color(p1.get_color()) - par1.axis["right"].label.set_color(p2.get_color()) - par2.axis["right2"].label.set_color(p3.get_color()) - - plt.draw() - plt.show() diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_direction.py b/doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_direction.py deleted file mode 100644 index cd205991363a..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_direction.py +++ /dev/null @@ -1,52 +0,0 @@ - -import matplotlib.pyplot as plt -import mpl_toolkits.axes_grid.axislines as axislines - - -def setup_axes(fig, rect): - - ax = axislines.Subplot(fig, rect) - fig.add_subplot(ax) - - ax.set_yticks([0.2, 0.8]) - #ax.set_yticklabels(["short", "loooong"]) - ax.set_xticks([0.2, 0.8]) - #ax.set_xticklabels([r"$\frac{1}{2}\pi$", r"$\pi$"]) - - return ax - -fig = plt.figure(1, figsize=(6, 3)) -fig.subplots_adjust(bottom=0.2) - - - -ax = setup_axes(fig, 131) -for axis in ax.axis.values(): axis.major_ticks.set_tick_out(True) -#or you can simply do "ax.axis[:].major_ticks.set_tick_out(True)" - - - - -ax = setup_axes(fig, 132) -ax.axis["left"].set_axis_direction("right") -ax.axis["bottom"].set_axis_direction("top") -ax.axis["right"].set_axis_direction("left") -ax.axis["top"].set_axis_direction("bottom") - -#ax.axis["left"].major_ticklabels.set_pad(0) -#ax.axis["bottom"].major_ticklabels.set_pad(10) - - - -ax = setup_axes(fig, 133) -ax.axis["left"].set_axis_direction("right") -ax.axis[:].major_ticks.set_tick_out(True) - -ax.axis["left"].label.set_text("Long Label Left") -ax.axis["bottom"].label.set_text("Label Bottom") -ax.axis["right"].label.set_text("Long Label Right") -ax.axis["right"].label.set_visible(True) -ax.axis["left"].label.set_pad(0) -ax.axis["bottom"].label.set_pad(10) - -plt.show() diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py b/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py deleted file mode 100644 index 7b866c3c0581..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py +++ /dev/null @@ -1,29 +0,0 @@ -import mpl_toolkits.axes_grid.axes_size as Size -from mpl_toolkits.axes_grid import Divider -import matplotlib.pyplot as plt - -fig1 = plt.figure(1, (5.5, 4.)) - -# the rect parameter will be ignore as we will set axes_locator -rect = (0.1, 0.1, 0.8, 0.8) -ax = [fig1.add_axes(rect, label="%d"%i) for i in range(4)] - -horiz = [Size.Scaled(1.5), Size.Fixed(.5), Size.Scaled(1.), - Size.Scaled(.5)] - -vert = [Size.Scaled(1.), Size.Fixed(.5), Size.Scaled(1.5)] - -# divide the axes rectangle into grid whose size is specified by horiz * vert -divider = Divider(fig1, rect, horiz, vert, aspect=False) - -ax[0].set_axes_locator(divider.new_locator(nx=0, ny=0)) -ax[1].set_axes_locator(divider.new_locator(nx=0, ny=2)) -ax[2].set_axes_locator(divider.new_locator(nx=2, ny=2)) -ax[3].set_axes_locator(divider.new_locator(nx=2, nx1=4, ny=0)) - -for ax1 in ax: - plt.setp(ax1.get_xticklabels()+ax1.get_yticklabels(), - visible=False) - -plt.draw() -plt.show() diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py b/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py deleted file mode 100644 index 203bdd5068eb..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py +++ /dev/null @@ -1,38 +0,0 @@ -import mpl_toolkits.axes_grid.axes_size as Size -from mpl_toolkits.axes_grid import Divider -import matplotlib.pyplot as plt - - -fig1 = plt.figure(1, (5.5, 4)) - -# the rect parameter will be ignore as we will set axes_locator -rect = (0.1, 0.1, 0.8, 0.8) -ax = [fig1.add_axes(rect, label="%d"%i) for i in range(4)] - - -horiz = [Size.AxesX(ax[0]), Size.Fixed(.5), Size.AxesX(ax[1])] -vert = [Size.AxesY(ax[0]), Size.Fixed(.5), Size.AxesY(ax[2])] - -# divide the axes rectangle into grid whose size is specified by horiz * vert -divider = Divider(fig1, rect, horiz, vert, aspect=False) - - -ax[0].set_axes_locator(divider.new_locator(nx=0, ny=0)) -ax[1].set_axes_locator(divider.new_locator(nx=2, ny=0)) -ax[2].set_axes_locator(divider.new_locator(nx=0, ny=2)) -ax[3].set_axes_locator(divider.new_locator(nx=2, ny=2)) - -ax[0].set_xlim(0, 2) -ax[1].set_xlim(0, 1) - -ax[0].set_ylim(0, 1) -ax[2].set_ylim(0, 2) - -divider.set_aspect(1.) - -for ax1 in ax: - plt.setp(ax1.get_xticklabels()+ax1.get_yticklabels(), - visible=False) - -plt.draw() -plt.show() diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axisline2.py b/doc/mpl_toolkits/axes_grid/figures/simple_axisline2.py deleted file mode 100644 index 5440aec168a1..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/simple_axisline2.py +++ /dev/null @@ -1,24 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axislines import SubplotZero -import numpy as np - -fig = plt.figure(1, (4,3)) - -# a subplot with two additiona axis, "xzero" and "yzero". "xzero" is -# y=0 line, and "yzero" is x=0 line. -ax = SubplotZero(fig, 1, 1, 1) -fig.add_subplot(ax) - -# make xzero axis (horizontal axis line through y=0) visible. -ax.axis["xzero"].set_visible(True) -ax.axis["xzero"].label.set_text("Axis Zero") - -# make other axis (bottom, top, right) invisible. -for n in ["bottom", "top", "right"]: - ax.axis[n].set_visible(False) - -xx = np.arange(0, 2*np.pi, 0.01) -ax.plot(xx, np.sin(xx)) - -plt.show() - diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axisline3.py b/doc/mpl_toolkits/axes_grid/figures/simple_axisline3.py deleted file mode 100644 index 68d42677cd54..000000000000 --- a/doc/mpl_toolkits/axes_grid/figures/simple_axisline3.py +++ /dev/null @@ -1,13 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axislines import Subplot - -fig = plt.figure(1, (3,3)) - -ax = Subplot(fig, 111) -fig.add_subplot(ax) - -ax.axis["right"].set_visible(False) -ax.axis["top"].set_visible(False) - -plt.show() - diff --git a/doc/mpl_toolkits/axes_grid/index.rst b/doc/mpl_toolkits/axes_grid/index.rst deleted file mode 100644 index 90f223c8436a..000000000000 --- a/doc/mpl_toolkits/axes_grid/index.rst +++ /dev/null @@ -1,36 +0,0 @@ - -.. _toolkit_axesgrid-index: - -Matplotlib AxesGrid Toolkit -=========================== - -The matplotlib AxesGrid toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. While the aspect -parameter in matplotlib adjust the position of the single axes, -AxesGrid toolkit provides a framework to adjust the position of -multiple axes according to their aspects. - - -.. image:: ../../_static/demo_axes_grid.png - -.. note:: - AxesGrid toolkit has been a part of matplotlib since v - 0.99. Originally, the toolkit had a single namespace of - *axes_grid*. In more recent version (since svn r8226), the toolkit - has divided into two separate namespace (*axes_grid1* and *axisartist*). - While *axes_grid* namespace is maintained for the backward compatibility, - use of *axes_grid1* and *axisartist* is recommended. - -.. warning:: - *axes_grid* and *axisartist* (but not *axes_grid1*) uses - a custom Axes class (derived from the mpl's original Axes class). - As a side effect, some commands (mostly tick-related) do not work. - Use *axes_grid1* to avoid this, or see how things are different in - *axes_grid* and *axisartist* (LINK needed) - -.. toctree:: - :maxdepth: 2 - - users/overview.rst - users/index.rst - api/index.rst diff --git a/doc/mpl_toolkits/axes_grid/users/axes_divider.rst b/doc/mpl_toolkits/axes_grid/users/axes_divider.rst deleted file mode 100644 index fe0b782306c5..000000000000 --- a/doc/mpl_toolkits/axes_grid/users/axes_divider.rst +++ /dev/null @@ -1,93 +0,0 @@ -AxesDivider -=========== - -The axes_divider module provide helper classes to adjust the axes -positions of set of images in the drawing time. - -* :mod:`~mpl_toolkits.axes_grid.axes_size` provides a classes of - units that the size of each axes will be determined. For example, - you can specify a fixed size - -* :class:`~mpl_toolkits.axes_grid.axes_size.Divider` this is the class - that is used calculates the axes position. It divides the given - rectangular area into several areas. 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. - - -You first initialize the divider by specifying its grids, i.e., -horizontal and vertical. - -for example,:: - - rect = [0.2, 0.2, 0.6, 0.6] - horiz=[h0, h1, h2, h3] - vert=[v0, v1, v2] - divider = Divider(fig, rect, horiz, vert) - -where, rect is a bounds of the box that will be divided and h0,..h3, -v0,..v2 need to be an instance of classes in the -:mod:`~mpl_toolkits.axes_grid.axes_size`. They have *get_size* method -that returns a tuple of two floats. The first float is the relative -size, and the second float is the absolute size. Consider a following -grid. - -+-----+-----+-----+-----+ -| v0 | | | | -+-----+-----+-----+-----+ -| v1 | | | | -+-----+-----+-----+-----+ -|h0,v2| h1 | h2 | h3 | -+-----+-----+-----+-----+ - - -* v0 => 0, 2 -* v1 => 2, 0 -* v2 => 3, 0 - -The height of the bottom row is always 2 (axes_divider internally -assumes that the unit is inch). The first and the second rows with -height ratio of 2:3. For example, if the total height of the grid 6, -then the first and second row will each occupy 2/(2+3) and 3/(2+3) of -(6-1) inches. The widths of columns (horiz) will be similarly -determined. When aspect ratio is set, the total height (or width) will -be adjusted accordingly. - - -The :mod:`mpl_toolkits.axes_grid.axes_size` contains several classes -that can be used to set the horizontal and vertical configurations. For -example, for the vertical configuration above will be:: - - from mpl_toolkits.axes_grid.axes_size import Fixed, Scaled - vert = [Fixed(2), Scaled(2), Scaled(3)] - -After you set up the divider object, then you create a locator -instance which will be given to the axes.:: - - locator = divider.new_locator(nx=0, ny=1) - ax.set_axes_locator(locator) - -The return value of the new_locator method is a instance of the -AxesLocator class. It is a callable object that returns the -location and size of the cell at the first column and the second row. -You may create a locator that spans over multiple cells.:: - - locator = divider.new_locator(nx=0, nx=2, ny=1) - -The above locator, when called, will return the position and size of -the cells spanning the first and second column and the first row. You -may consider it as [0:2, 1]. - -See the example, - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider2.py - :include-source: - -You can adjust the size of the each axes according to their x or y -data limits (AxesX and AxesY), similar to the axes aspect parameter. - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider3.py - :include-source: - diff --git a/doc/mpl_toolkits/axes_grid/users/axisartist.rst b/doc/mpl_toolkits/axes_grid/users/axisartist.rst deleted file mode 100644 index 67cdf64ecfa1..000000000000 --- a/doc/mpl_toolkits/axes_grid/users/axisartist.rst +++ /dev/null @@ -1,457 +0,0 @@ -.. _axisartist-manual: - -==================== -AXISARTIST namespace -==================== - -The AxisArtist namespace includes a derived Axes implementation. The -biggest difference is that the artists responsible to draw axis line, -ticks, ticklabel and axis labels are separated out from the mpl's Axis -class, which are much more than artists in the original mpl. This -change was strongly motivated to support curvilinear grid. Here are a -few things that mpl_tootlkits.axisartist.Axes is different from original -Axes from mpl. - -* Axis elements (axis line(spine), ticks, ticklabel and axis labels) - are drawn by a AxisArtist instance. Unlike Axis, left, right, top - and bottom axis are drawn by separate artists. And each of them may - have different tick location and different tick labels. - -* gridlines are drawn by a Gridlines instance. The change was - motivated that in curvilinear coordinate, a gridline may not cross - axis-lines (i.e., no associated ticks). In the original Axes class, - gridlines are tied to ticks. - -* ticklines can be rotated if necessary (i.e, along the gridlines) - -In summary, all these changes was to support - -* a curvilinear grid. -* a floating axis - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py - - -*mpl_toolkits.axisartist.Axes* class defines a *axis* attribute, which -is a dictionary of AxisArtist instances. By default, the dictionary -has 4 AxisArtist instances, responsible for drawing of left, right, -bottom and top axis. - -xaxis and yaxis attributes are still available, however they are set -to not visible. As separate artists are used for rendering axis, some -axis-related method in mpl may have no effect. -In addition to AxisArtist instances, the mpl_toolkits.axisartist.Axes will -have *gridlines* attribute (Gridlines), which obviously draws grid -lines. - -In both AxisArtist and Gridlines, the calculation of tick and grid -location is delegated to an instance of GridHelper class. -mpl_toolkits.axisartist.Axes class uses GridHelperRectlinear as a grid -helper. The GridHelperRectlinear class is a wrapper around the *xaxis* -and *yaxis* of mpl's original Axes, and it was meant to work as the -way how mpl's original axes works. For example, tick location changes -using set_ticks method and etc. should work as expected. But change in -artist properties (e.g., color) will not work in general, although -some effort has been made so that some often-change attributes (color, -etc.) are respected. - - -AxisArtist -========== - -AxisArtist can be considered as a container artist with following -attributes which will draw ticks, labels, etc. - - * line - * major_ticks, major_ticklabels - * minor_ticks, minor_ticklabels - * offsetText - * label - - -line ----- - -Derived from Line2d class. Responsible for drawing a spinal(?) line. - -major_ticks, minor_ticks ------------------------- - -Derived from Line2d class. Note that ticks are markers. - - -major_ticklabels, minor_ticklabels ----------------------------------- - -Derived from Text. Note that it is not a list of Text artist, but a -single artist (similar to a collection). - -axislabel ---------- - -Derived from Text. - - -Default AxisArtists -------------------- - -By default, following for axis artists are defined.:: - - ax.axis["left"], ax.axis["bottom"], ax.axis["right"], ax.axis["top"] - -The ticklabels and axislabel of the top and the right axis are set to -not visible. - -For example, if you want to change the color attributes of -major_ticklabels of the bottom x-axis :: - - ax.axis["bottom"].major_ticklabels.set_color("b") - -Similarly, to make ticklabels invisible :: - - ax.axis["bottom"].major_ticklabels.set_visible(False) - -AxisAritst provides a helper method to control the visibility of ticks, -ticklabels, and label. To make ticklabel invisible, :: - - ax.axis["bottom"].toggle(ticklabels=False) - -To make all of ticks, ticklabels, and (axis) label invisible :: - - ax.axis["bottom"].toggle(all=False) - -To turn all off but ticks on :: - - ax.axis["bottom"].toggle(all=False, ticks=True) - -To turn all on but (axis) label off :: - - ax.axis["bottom"].toggle(all=True, label=False)) - - -ax.axis's __getitem__ method can take multiple axis names. For -example, to turn ticklabels of "top" and "right" axis on, :: - - ax.axis["top","right"].toggle(ticklabels=True)) - -Note that 'ax.axis["top","right"]' returns a simple proxy object that translate above code to something like below. :: - - for n in ["top","right"]: - ax.axis[n].toggle(ticklabels=True)) - -So, any return values in the for loop are ignored. And you should not -use it anything more than a simple method. - -Like the list indexing ":" means all items, i.e., :: - - ax.axis[:].major_ticks.set_color("r") - -changes tick color in all axis. - - -HowTo -===== - -1. Changing tick locations and label. - - Same as the original mpl's axes.:: - - ax.set_xticks([1,2,3]) - -2. Changing axis properties like color, etc. - - Change the properties of appropriate artists. For example, to change - the color of the ticklabels:: - - ax.axis["left"].major_ticklabels.set_color("r") - -3. To change the attributes of multiple axis:: - - ax.axis["left","bottom"].major_ticklabels.set_color("r") - - or to change the attributes of all axis:: - - ax.axis[:].major_ticklabels.set_color("r") - -4. To change the tick size (length), you need to use - axis.major_ticks.set_ticksize method. To change the direction of - the ticks (ticks are in opposite direction of ticklabels by - default), use axis.major_ticks.set_tick_out method. - - To change the pad between ticks and ticklabels, use - axis.major_ticklabels.set_pad method. - - To change the pad between ticklabels and axis label, - axis.label.set_pad method. - - -Rotation and Alignment of TickLabels -==================================== - -This is also quite different from the original mpl and can be -confusing. When you want to rotate the ticklabels, first consider -using "set_axis_direction" method. :: - - ax1.axis["left"].major_ticklabels.set_axis_direction("top") - ax1.axis["right"].label.set_axis_direction("left") - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction01.py - -The parameter for set_axis_direction is one of ["left", "right", -"bottom", "top"]. - -You must understand some underlying concept of directions. - - 1. There is a reference direction which is defined as the direction - of the axis line with increasing coordinate. For example, the - reference direction of the left x-axis is from bottom to top. - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py - - The direction, text angle, and alignments of the ticks, ticklabels and - axis-label is determined with respect to the reference direction - - 2. *ticklabel_direction* is either the right-hand side (+) of the - reference direction or the left-hand side (-). - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py - - 3. same for the *label_direction* - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py - - 4. ticks are by default drawn toward the opposite direction of the ticklabels. - - 5. text rotation of ticklabels and label is determined in reference - to the *ticklabel_direction* or *label_direction*, - respectively. The rotation of ticklabels and label is anchored. - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py - - -On the other hand, there is a concept of "axis_direction". This is a -default setting of above properties for each, "bottom", "left", "top", -and "right" axis. - - ========== =========== ========= ========== ========= ========== - ? ? left bottom right top - ---------- ----------- --------- ---------- --------- ---------- - axislabel direction '-' '+' '+' '-' - axislabel rotation 180 0 0 180 - axislabel va center top center bottom - axislabel ha right center right center - ticklabel direction '-' '+' '+' '-' - ticklabels rotation 90 0 -90 180 - ticklabel ha right center right center - ticklabel va center baseline center baseline - ========== =========== ========= ========== ========= ========== - - -And, 'set_axis_direction("top")' means to adjust the text rotation -etc, for settings suitable for "top" axis. The concept of axis -direction can be more clear with curved axis. - -.. plot:: mpl_toolkits/axes_grid/figures/demo_axis_direction.py - -The axis_direction can be adjusted in the AxisArtist level, or in the -level of its child arists, i.e., ticks, ticklabels, and axis-label. :: - - ax1.axis["left"].set_axis_direction("top") - -changes axis_direction of all the associated artist with the "left" -axis, while :: - - ax1.axis["left"].major_ticklabels.set_axis_direction("top") - -changes the axis_direction of only the major_ticklabels. Note that -set_axis_direction in the AxisArtist level changes the -ticklabel_direction and label_direction, while changing the -axis_direction of ticks, ticklabels, and axis-label does not affect -them. - - -If you want to make ticks outward and ticklabels inside the axes, -use invert_ticklabel_direction method. :: - - ax.axis[:].invert_ticklabel_direction() - -A related method is "set_tick_out". It makes ticks outward (as a -matter of fact, it makes ticks toward the opposite direction of the -default direction). :: - - ax.axis[:].major_ticks.set_tick_out(True) - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction03.py - - -So, in summary, - - * AxisArtist's methods - * set_axis_direction : "left", "right", "bottom", or "top" - * set_ticklabel_direction : "+" or "-" - * set_axislabel_direction : "+" or "-" - * invert_ticklabel_direction - * Ticks' methods (major_ticks and minor_ticks) - * set_tick_out : True or False - * set_ticksize : size in points - * TickLabels' methods (major_ticklabels and minor_ticklabels) - * set_axis_direction : "left", "right", "bottom", or "top" - * set_rotation : angle with respect to the reference direction - * set_ha and set_va : see below - * AxisLabels' methods (label) - * set_axis_direction : "left", "right", "bottom", or "top" - * set_rotation : angle with respect to the reference direction - * set_ha and set_va - - - -Adjusting ticklabels alignment ------------------------------- - -Alignment of TickLabels are treated specially. See below - -.. plot:: mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py - -Adjusting pad --------------- - -To change the pad between ticks and ticklabels :: - - ax.axis["left"].major_ticklabels.set_pad(10) - -Or ticklabels and axis-label :: - - ax.axis["left"].label.set_pad(10) - - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_pad.py - - -GridHelper -========== - -To actually define a curvilinear coordinate, you have to use your own -grid helper. A generalised version of grid helper class is supplied -and this class should suffice in most of cases. A user may provide -two functions which defines a transformation (and its inverse pair) -from the curved coordinate to (rectilinear) image coordinate. Note that -while ticks and grids are drawn for curved coordinate, the data -transform of the axes itself (ax.transData) is still rectilinear -(image) coordinate. :: - - - from mpl_toolkits.axisartist.grid_helper_curvelinear \ - import GridHelperCurveLinear - from mpl_toolkits.axisartist import Subplot - - # from curved coordinate to rectlinear coordinate. - def tr(x, y): - x, y = np.asarray(x), np.asarray(y) - return x, y-x - - # from rectlinear coordinate to curved coordinate. - def inv_tr(x,y): - x, y = np.asarray(x), np.asarray(y) - return x, y+x - - - grid_helper = GridHelperCurveLinear((tr, inv_tr)) - - ax1 = Subplot(fig, 1, 1, 1, grid_helper=grid_helper) - - fig.add_subplot(ax1) - - -You may use matplotlib's Transform instance instead (but a -inverse transformation must be defined). Often, coordinate range in a -curved coordinate system may have a limited range, or may have -cycles. In those cases, a more customized version of grid helper is -required. :: - - - import mpl_toolkits.axisartist.angle_helper as angle_helper - - # PolarAxes.PolarTransform takes radian. However, we want our coordinate - # system in degree - tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform() - - - # extreme finder : find a range of coordinate. - # 20, 20 : number of sampling points along x, y direction - # The first coordinate (longitude, but theta in polar) - # has a cycle of 360 degree. - # The second coordinate (latitude, but radius in polar) has a minimum of 0 - extreme_finder = angle_helper.ExtremeFinderCycle(20, 20, - lon_cycle = 360, - lat_cycle = None, - lon_minmax = None, - lat_minmax = (0, np.inf), - ) - - # Find a grid values appropriate for the coordinate (degree, - # minute, second). The argument is a approximate number of grids. - grid_locator1 = angle_helper.LocatorDMS(12) - - # And also uses an appropriate formatter. Note that,the - # acceptable Locator and Formatter class is a bit different than - # that of mpl's, and you cannot directly use mpl's Locator and - # Formatter here (but may be possible in the future). - tick_formatter1 = angle_helper.FormatterDMS() - - grid_helper = GridHelperCurveLinear(tr, - extreme_finder=extreme_finder, - grid_locator1=grid_locator1, - tick_formatter1=tick_formatter1 - ) - - -Again, the *transData* of the axes is still a rectilinear coordinate -(image coordinate). You may manually do conversion between two -coordinates, or you may use Parasite Axes for convenience.:: - - ax1 = SubplotHost(fig, 1, 2, 2, grid_helper=grid_helper) - - # A parasite axes with given transform - ax2 = ParasiteAxesAuxTrans(ax1, tr, "equal") - # note that ax2.transData == tr + ax1.transData - # Anthing you draw in ax2 will match the ticks and grids of ax1. - ax1.parasites.append(ax2) - - -.. plot:: mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py - - - -FloatingAxis -============ - -A floating axis is an axis one of whose data coordinate is fixed, i.e, -its location is not fixed in Axes coordinate but changes as axes data -limits changes. A floating axis can be created using -*new_floating_axis* method. However, it is your responsibility that -the resulting AxisArtist is properly added to the axes. A recommended -way is to add it as an item of Axes's axis attribute.:: - - # floating axis whose first (index starts from 0) coordinate - # (theta) is fixed at 60 - - ax1.axis["lat"] = axis = ax1.new_floating_axis(0, 60) - axis.label.set_text(r"$\theta = 60^{\circ}$") - axis.label.set_visible(True) - - -See the first example of this page. - -Current Limitations and TODO's -============================== - -The code need more refinement. Here is a incomplete list of issues and TODO's - -* No easy way to support a user customized tick location (for - curvilinear grid). A new Locator class needs to be created. - -* FloatingAxis may have coordinate limits, e.g., a floating axis of x - = 0, but y only spans from 0 to 1. - -* The location of axislabel of FloatingAxis needs to be optionally - given as a coordinate value. ex, a floating axis of x=0 with label at y=1 diff --git a/doc/mpl_toolkits/axes_grid/users/index.rst b/doc/mpl_toolkits/axes_grid/users/index.rst deleted file mode 100644 index 9ae9dbdd74bb..000000000000 --- a/doc/mpl_toolkits/axes_grid/users/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. _axes_grid_users-guide-index: - -################################################ - The Matplotlib AxesGrid Toolkit User's Guide -################################################ - -:Release: |version| -:Date: |today| - -.. toctree:: - - axes_divider.rst - axisartist.rst - diff --git a/doc/mpl_toolkits/axes_grid/users/overview.rst b/doc/mpl_toolkits/axes_grid/users/overview.rst deleted file mode 100644 index c9b70fcdca23..000000000000 --- a/doc/mpl_toolkits/axes_grid/users/overview.rst +++ /dev/null @@ -1,480 +0,0 @@ -============================ -Overview of AxesGrid toolkit -============================ - -What is AxesGrid toolkit? -========================= - -The matplotlib AxesGrid toolkit is a collection of helper classes, -mainly to ease displaying (multiple) images in matplotlib. - -.. contents:: - :depth: 1 - :local: - -.. note:: - AxesGrid toolkit has been a part of matplotlib since v - 0.99. Originally, the toolkit had a single namespace of - *axes_grid*. In more recent version (since svn r8226), the toolkit - has divided into two separate namespace (*axes_grid1* and *axisartist*). - While *axes_grid* namespace is maintained for the backward compatibility, - use of *axes_grid1* and *axisartist* is recommended. - -.. warning:: - *axes_grid* and *axisartist* (but not *axes_grid1*) uses - a custom Axes class (derived from the mpl's original Axes class). - As a side effect, some commands (mostly tick-related) do not work. - Use *axes_grid1* to avoid this, or see how things are different in - *axes_grid* and *axisartist* (LINK needed) - - -AxesGrid toolkit has two namespaces (*axes_grid1* and *axisartist*). -*axisartist* contains custom Axes class that is meant to support for -curvilinear grids (e.g., the world coordinate system in astronomy). -Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis -to draw ticks, ticklines and etc., Axes in axisartist uses special -artist (AxisArtist) which can handle tick, ticklines and etc. for -curved coordinate systems. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py - -Since it uses a special artists, some mpl commands that work on -Axes.xaxis and Axes.yaxis may not work. See LINK for more detail. - - -*axes_grid1* is a collection of helper classes to ease displaying -(multiple) images with matplotlib. In matplotlib, the axes location -(and size) is specified in the normalized figure coordinates, which -may not be ideal for displaying images that needs to have a given -aspect ratio. For example, it helps you to have a colorbar whose -height always matches that of the image. `ImageGrid`_, `RGB Axes`_ and -`AxesDivider`_ are helper classes that deals with adjusting the -location of (multiple) Axes. They provides a framework to adjust the -position of multiple axes at the drawing time. `ParasiteAxes`_ -provides twinx(or twiny)-like features so that you can plot different -data (e.g., different y-scale) in a same Axes. `AnchoredArtists`_ -includes custom artists which are placed at some anchored position, -like the legend. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py - - -AXES_GRID1 -========== - -ImageGrid ---------- - - -A class that creates a grid of Axes. In matplotlib, the axes location -(and size) is specified in the normalized figure coordinates. This may -not be ideal for images that needs to be displayed with a given aspect -ratio. For example, displaying images of a same size with some fixed -padding between them cannot be easily done in matplotlib. ImageGrid is -used in such case. - -.. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid.py - :include-source: - -* The position of each axes is determined at the drawing time (see - `AxesDivider`_), so that the size of the entire grid fits in the - given rectangle (like the aspect of axes). Note that in this example, - the paddings between axes are fixed even if you changes the figure - size. - -* axes in the same column has a same axes width (in figure - coordinate), and similarly, axes in the same row has a same - height. The widths (height) of the axes in the same row (column) are - scaled according to their view limits (xlim or ylim). - - .. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid2.py - :include-source: - -* xaxis are shared among axes in a same column. Similarly, yaxis are - shared among axes in a same row. Therefore, changing axis properties - (view limits, tick location, etc. either by plot commands or using - your mouse in interactive backends) of one axes will affect all - other shared axes. - - - -When initialized, ImageGrid creates given number (*ngrids* or *ncols* * -*nrows* if *ngrids* is None) of Axes instances. A sequence-like -interface is provided to access the individual Axes instances (e.g., -grid[0] is the first Axes in the grid. See below for the order of -axes). - - - -AxesGrid takes following arguments, - - - ============= ======== ================================================ - Name Default Description - ============= ======== ================================================ - fig - rect - nrows_ncols number of rows and cols. e.g., (2,2) - ngrids None number of grids. nrows x ncols if None - direction "row" increasing direction of axes number. [row|column] - axes_pad 0.02 pad between axes in inches - add_all True Add axes to figures if True - share_all False xaxis & yaxis of all axes are shared if True - aspect True aspect of axes - label_mode "L" location of tick labels thaw will be displayed. - "1" (only the lower left axes), - "L" (left most and bottom most axes), - or "all". - cbar_mode None [None|single|each] - cbar_location "right" [right|top] - cbar_pad None pad between image axes and colorbar axes - cbar_size "5%" size of the colorbar - axes_class None - ============= ======== ================================================ - - *rect* - specifies the location of the grid. You can either specify - coordinates of the rectangle to be used (e.g., (0.1, 0.1, 0.8, 0.8) - as in the Axes), or the subplot-like position (e.g., "121"). - - *direction* - means the increasing direction of the axes number. - - *aspect* - By default (False), widths and heights of axes in the grid are - scaled independently. If True, they are scaled according to their - data limits (similar to aspect parameter in mpl). - - *share_all* - if True, xaxis and yaxis of all axes are shared. - - *direction* - direction of increasing axes number. For "row", - - +---------+---------+ - | grid[0] | grid[1] | - +---------+---------+ - | grid[2] | grid[3] | - +---------+---------+ - - For "column", - - +---------+---------+ - | grid[0] | grid[2] | - +---------+---------+ - | grid[1] | grid[3] | - +---------+---------+ - -You can also create a colorbar (or colorbars). You can have colorbar -for each axes (cbar_mode="each"), or you can have a single colorbar -for the grid (cbar_mode="single"). The colorbar can be placed on your -right, or top. The axes for each colorbar is stored as a *cbar_axes* -attribute. - - - -The examples below show what you can do with AxesGrid. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py - - -AxesDivider ------------ - -Behind the scene, the ImageGrid class and the RGBAxes class utilize the -AxesDivider class, whose role is to calculate the location of the axes -at drawing time. While a more about the AxesDivider is (will be) -explained in (yet to be written) AxesDividerGuide, direct use of the -AxesDivider class will not be necessary for most users. The -axes_divider module provides a helper function make_axes_locatable, -which can be useful. It takes a existing axes instance and create a -divider for it. :: - - ax = subplot(1,1,1) - divider = make_axes_locatable(ax) - - - - -*make_axes_locatable* returns an instance of the AxesLocator class, -derived from the Locator. It provides *append_axes* method that -creates a new axes on the given side of ("top", "right", "bottom" and -"left") of the original axes. - - - -colorbar whose height (or width) in sync with the master axes -------------------------------------------------------------- - -.. plot:: mpl_toolkits/axes_grid/figures/simple_colorbar.py - :include-source: - - - - -scatter_hist.py with AxesDivider -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The "scatter_hist.py" example in mpl can be rewritten using -*make_axes_locatable*. :: - - axScatter = subplot(111) - axScatter.scatter(x, y) - axScatter.set_aspect(1.) - - # create new axes on the right and on the top of the current axes. - divider = make_axes_locatable(axScatter) - axHistx = divider.append_axes("top", size=1.2, pad=0.1, sharex=axScatter) - axHisty = divider.append_axes("right", size=1.2, pad=0.1, sharey=axScatter) - - # the scatter plot: - # histograms - bins = np.arange(-lim, lim + binwidth, binwidth) - axHistx.hist(x, bins=bins) - axHisty.hist(y, bins=bins, orientation='horizontal') - - -See the full source code below. - -.. plot:: mpl_toolkits/axes_grid/examples/scatter_hist.py - - -The scatter_hist using the AxesDivider has some advantage over the -original scatter_hist.py in mpl. For example, you can set the aspect -ratio of the scatter plot, even with the x-axis or y-axis is shared -accordingly. - - -ParasiteAxes ------------- - -The ParasiteAxes is an axes whose location is identical to its host -axes. The location is adjusted in the drawing time, thus it works even -if the host change its location (e.g., images). - -In most cases, you first create a host axes, which provides a few -method that can be used to create parasite axes. They are *twinx*, -*twiny* (which are similar to twinx and twiny in the matplotlib) and -*twin*. *twin* takes an arbitrary transformation that maps between the -data coordinates of the host axes and the parasite axes. *draw* -method of the parasite axes are never called. Instead, host axes -collects artists in parasite axes and draw them as if they belong to -the host axes, i.e., artists in parasite axes are merged to those of -the host axes and then drawn according to their zorder. The host and -parasite axes modifies some of the axes behavior. For example, color -cycle for plot lines are shared between host and parasites. Also, the -legend command in host, creates a legend that includes lines in the -parasite axes. To create a host axes, you may use *host_suplot* or -*host_axes* command. - - -Example 1. twinx -~~~~~~~~~~~~~~~~ - -.. plot:: mpl_toolkits/axes_grid/figures/parasite_simple.py - :include-source: - -Example 2. twin -~~~~~~~~~~~~~~~ - -*twin* without a transform argument treat the parasite axes to have a -same data transform as the host. This can be useful when you want the -top(or right)-axis to have different tick-locations, tick-labels, or -tick-formatter for bottom(or left)-axis. :: - - ax2 = ax.twin() # now, ax2 is responsible for "top" axis and "right" axis - ax2.set_xticks([0., .5*np.pi, np.pi, 1.5*np.pi, 2*np.pi]) - ax2.set_xticklabels(["0", r"$\frac{1}{2}\pi$", - r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"]) - - -.. plot:: mpl_toolkits/axes_grid/examples/simple_axisline4.py - - - -A more sophisticated example using twin. Note that if you change the -x-limit in the host axes, the x-limit of the parasite axes will change -accordingly. - - -.. plot:: mpl_toolkits/axes_grid/examples/parasite_simple2.py - - -AnchoredArtists ---------------- - -It's a collection of artists whose location is anchored to the (axes) -bbox, like the legend. It is derived from *OffsetBox* in mpl, and -artist need to be drawn in the canvas coordinate. But, there is a -limited support for an arbitrary transform. For example, the ellipse -in the example below will have width and height in the data -coordinate. - -.. plot:: mpl_toolkits/axes_grid/examples/simple_anchored_artists.py - :include-source: - - -InsetLocator ------------- - -:mod:`mpl_toolkits.axes_grid.inset_locator` provides helper classes -and functions to place your (inset) axes at the anchored position of -the parent axes, similarly to AnchoredArtist. - -Using :func:`mpl_toolkits.axes_grid.inset_locator.inset_axes`, you -can have inset axes whose size is either fixed, or a fixed proportion -of the parent axes. For example,:: - - inset_axes = inset_axes(parent_axes, - width="30%", # width = 30% of parent_bbox - height=1., # height : 1 inch - loc=3) - -creates an inset axes whose width is 30% of the parent axes and whose -height is fixed at 1 inch. - -You may creates your inset whose size is determined so that the data -scale of the inset axes to be that of the parent axes multiplied by -some factor. For example, :: - - inset_axes = zoomed_inset_axes(ax, - 0.5, # zoom = 0.5 - loc=1) - -creates an inset axes whose data scale is half of the parent axes. -Here is complete examples. - -.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo.py - -For example, :func:`zoomed_inset_axes` can be used when you want the -inset represents the zoom-up of the small portion in the parent axes. -And :mod:`~mpl_toolkits/axes_grid/inset_locator` provides a helper -function :func:`mark_inset` to mark the location of the area -represented by the inset axes. - -.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo2.py - :include-source: - - -RGB Axes -~~~~~~~~ - -RGBAxes is a helper class to conveniently show RGB composite -images. Like ImageGrid, the location of axes are adjusted so that the -area occupied by them fits in a given rectangle. Also, the xaxis and -yaxis of each axes are shared. :: - - from mpl_toolkits.axes_grid1.axes_rgb import RGBAxes - - fig = plt.figure(1) - ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8]) - - r, g, b = get_rgb() # r,g,b are 2-d images - ax.imshow_rgb(r, g, b, - origin="lower", interpolation="nearest") - - -.. plot:: mpl_toolkits/axes_grid/figures/simple_rgb.py - - -AXISARTIST -========== - - -AxisArtist ----------- - -AxisArtist module provides a custom (and very experimental) Axes -class, where each axis (left, right, top and bottom) have a separate -artist associated which is responsible to draw axis-line, ticks, -ticklabels, label. Also, you can create your own axis, which can pass -through a fixed position in the axes coordinate, or a fixed position -in the data coordinate (i.e., the axis floats around when viewlimit -changes). - -The axes class, by default, have its xaxis and yaxis invisible, and -has 4 additional artists which are responsible to draw axis in -"left","right","bottom" and "top". They are accessed as -ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a -dictionary that contains artists (note that ax.axis is still a -callable methods and it behaves as an original Axes.axis method in -mpl). - -To create an axes, :: - - import mpl_toolkits.axisartist as AA - fig = plt.figure(1) - ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8]) - fig.add_axes(ax) - -or to create a subplot :: - - ax = AA.Subplot(fig, 111) - fig.add_subplot(ax) - -For example, you can hide the right, and top axis by :: - - ax.axis["right"].set_visible(False) - ax.axis["top"].set_visible(False) - - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axisline3.py - - -It is also possible to add an extra axis. For example, you may have an -horizontal axis at y=0 (in data coordinate). :: - - ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axisartist1.py - :include-source: - - -Or a fixed axis with some offset :: - - # make new (right-side) yaxis, but wth some offset - ax.axis["right2"] = ax.new_fixed_axis(loc="right", - offset=(20, 0)) - - - -AxisArtist with ParasiteAxes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Most commands in the axes_grid1 toolkit can take a axes_class keyword -argument, and the commands creates an axes of the given class. For example, -to create a host subplot with axisartist.Axes, :: - - import mpl_tookits.axisartist as AA - from mpl_toolkits.axes_grid1 import host_subplot - - host = host_subplot(111, axes_class=AA.Axes) - - -Here is an example that uses parasiteAxes. - - -.. plot:: mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py - - - -Curvilinear Grid ----------------- - -The motivation behind the AxisArtist module is to support curvilinear grid -and ticks. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py - -See :ref:`axisartist-manual` for more details. - - -Floating Axes -------------- - -This also support a Floating Axes whose outer axis are defined as -floating axis. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axes.py - - diff --git a/doc/mpl_toolkits/axes_grid1/index.rst b/doc/mpl_toolkits/axes_grid1/index.rst new file mode 100644 index 000000000000..aacb1cc5b872 --- /dev/null +++ b/doc/mpl_toolkits/axes_grid1/index.rst @@ -0,0 +1,24 @@ + +.. _toolkit_axesgrid1-index: + +Matplotlib axes_grid1 Toolkit +============================= + +The matplotlib :class:`mpl_toolkits.axes_grid1` toolkit is a collection of +helper classes to ease displaying multiple images in matplotlib. While the +aspect parameter in matplotlib adjust the position of the single axes, +axesgrid1 toolkit provides a framework to adjust the position of +multiple axes according to their aspects. + +See :ref:`axes_grid1_users-guide-index` for a guide on the usage of axes_grid1. + + +.. image:: ../../_static/demo_axes_grid.png + +.. note:: + AxesGrid toolkit has been a part of matplotlib since v + 0.99. Originally, the toolkit had a single namespace of + *axes_grid*. In more recent version, the toolkit + has divided into two separate namespace (*axes_grid1* and *axisartist*). + While *axes_grid* namespace is maintained for the backward compatibility, + use of *axes_grid1* and *axisartist* is recommended. diff --git a/doc/mpl_toolkits/axisartist/index.rst b/doc/mpl_toolkits/axisartist/index.rst new file mode 100644 index 000000000000..2a46936f1381 --- /dev/null +++ b/doc/mpl_toolkits/axisartist/index.rst @@ -0,0 +1,13 @@ +.. _toolkit_axisartist-index: + +Matplotlib axisartist Toolkit +============================= + +The *axisartist* namespace includes a derived Axes implementation ( +:class:`mpl_toolkits.axisartist.Axes`). The +biggest difference is that the artists that are responsible for drawing +axis lines, ticks, ticklabels, and axis labels are separated out from the +mpl's Axis class. This change was strongly motivated to support curvilinear grid. + +You can find a tutorial describing usage of axisartist at +:ref:`axisartist_users-guide-index`. diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 87effe510692..285f9d49295a 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -1,153 +1,77 @@ .. _toolkits-index: -.. toctree:: - :hidden: - - axes_grid/index.rst - mplot3d/index.rst - +.. _toolkits: ######## Toolkits ######## -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. _toolkits: - -Toolkits are collections of application-specific functions that extend matplotlib. - -.. _toolkit_basemap: - -Basemap -======= -(*Not distributed with matplotlib*) - -Plots data on map projections, with continental and political -boundaries, see `basemap `_ -docs. - -.. image:: http://matplotlib.org/basemap/_images/contour1.png - :height: 400px - - - -Cartopy -======= -(*Not distributed with matplotlib*) - -An alternative mapping library written for matplotlib ``v1.2`` and beyond. -`Cartopy `_ builds on top of -matplotlib to provide object oriented map projection definitions and close -integration with Shapely for powerful yet easy-to-use vector data processing -tools. An example plot from the -`Cartopy gallery `_: -.. image:: http://scitools.org.uk/cartopy/docs/latest/_images/hurricane_katrina_01_00.png - :height: 400px +Toolkits are collections of application-specific functions that extend +Matplotlib. -.. _toolkit_gtk: -GTK Tools -========= - -mpl_toolkits.gtktools provides some utilities for working with GTK. -This toolkit ships with matplotlib, but requires `pygtk -`_. - - -.. _toolkit_excel: - -Excel Tools -=========== - -mpl_toolkits.exceltools provides some utilities for working with -Excel. This toolkit ships with matplotlib, but requires -`xlwt `_ - - -.. _toolkit_natgrid: +.. _toolkit_mplot3d: -Natgrid +mplot3d ======= -(*Not distributed with matplotlib*) -mpl_toolkits.natgrid is an interface to natgrid C library for gridding -irregularly spaced data. This requires a separate installation of the -natgrid toolkit from the sourceforge `download -`_ -page. +:mod:`mpl_toolkits.mplot3d` provides some basic 3D +plotting (scatter, surf, line, mesh) tools. Not the fastest or most feature +complete 3D library out there, but it ships with Matplotlib and thus may be a +lighter weight solution for some use cases. Check out the +:ref:`mplot3d tutorial ` for more +information. +.. figure:: ../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png + :target: ../gallery/mplot3d/contourf3d_2.html + :align: center + :scale: 50 -.. _toolkit_mplot3d: + Contourf3d 2 -mplot3d -======= +.. toctree:: + :maxdepth: 2 -:ref:`mpl_toolkits.mplot3d ` provides some basic 3D plotting (scatter, surf, -line, mesh) tools. Not the fastest or feature complete 3D library out -there, but ships with matplotlib and thus may be a lighter weight -solution for some use cases. + mplot3d/index.rst + mplot3d/faq.rst -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py +Links +----- +* mpl3d API: :ref:`toolkit_mplot3d-api` -.. _toolkit_axes_grid: +.. _toolkit_axes_grid1: -AxesGrid -======== +axes_grid1 +========== -The matplotlib :ref:`AxesGrid ` toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. The AxesGrid toolkit is -distributed with matplotlib source. +The :mod:`mpl_toolkits.axes_grid1` toolkit is a +collection of helper classes for displaying multiple axes in Matplotlib. .. image:: /_static/demo_axes_grid.png -.. _toolkit_mpldatacursor: - -MplDataCursor -============= -(*Not distributed with matplotlib*) - -`MplDataCursor `_ is a -toolkit written by Joe Kington to provide interactive "data cursors" -(clickable annotation boxes) for matplotlib. +.. toctree:: + :maxdepth: 2 -.. _prettyplotlib: + axes_grid1/index.rst -prettyplotlib -============= -`prettyplotlib `_ is an extension -to matplotlib which changes many of the defaults to make plots some -consider more attractive. -.. _hl_plotting: -################### -High-Level Plotting -################### +.. _toolkit_axisartist: -Several projects have started to provide a higher-level interface to -matplotlib. These are independent projects. +axisartist +========== -.. _seaborn: +The :mod:`mpl_toolkits.axisartist` toolkit contains +a custom Axes class that is meant to support curvilinear grids. -seaborn -======= -(*Not distributed with matplotlib*) +.. toctree:: + :maxdepth: 2 -`seaborn `_ is a high -level interface for drawing statistical graphics with matplotlib. It -aims to make visualization a central part of exploring and -understanding complex datasets. + axisartist/index.rst -.. _ggplot: -ggplot -====== -(*Not distributed with matplotlib*) +API +--- +* Axes Grid and Axis Artist API: :ref:`axes_grid-api-index` -`ggplot `_ is a port of the R ggplot2 -to python based on matplotlib. diff --git a/doc/mpl_toolkits/mplot3d/api.rst b/doc/mpl_toolkits/mplot3d/api.rst deleted file mode 100644 index 64217a482fe2..000000000000 --- a/doc/mpl_toolkits/mplot3d/api.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. _toolkit_mplot3d-api: - -*********** -mplot3d API -*********** -.. contents:: - :backlinks: none - -.. _toolkit_mplot3d-axesapi: - -:mod:`~mpl_toolkits.mplot3d.axes3d` -=================================== - -.. note:: - Significant effort went into bringing axes3d to feature-parity with - regular axes objects for version 1.1.0. However, more work remains. - Please report any functions that do not behave as expected as a bug. - In addition, help and patches would be greatly appreciated! - -.. automodule:: mpl_toolkits.mplot3d.axes3d - :members: - :undoc-members: - :show-inheritance: - - -.. _toolkit_mplot3d-axisapi: - -:mod:`~mpl_toolkits.mplot3d.axis3d` -=================================== - -.. note:: - Historically, axis3d has suffered from having hard-coded constants - controlling the look and feel of the 3D plot. This precluded user - level adjustments such as label spacing, font colors and panel colors. - For version 1.1.0, these constants have been consolidated into a single - private member dictionary, `self._axinfo`, for the axis object. This is - intended only as a stop-gap measure to allow user-level customization, - but it is not intended to be permanent. - -.. automodule:: mpl_toolkits.mplot3d.axis3d - :members: - :undoc-members: - :show-inheritance: - -.. _toolkit_mplot3d-artapi: - -:mod:`~mpl_toolkits.mplot3d.art3d` -================================== - -.. automodule:: mpl_toolkits.mplot3d.art3d - :members: - :undoc-members: - :show-inheritance: - -.. _toolkit_mplot3d-projapi: - -:mod:`~mpl_toolkits.mplot3d.proj3d` -=================================== - -.. automodule:: mpl_toolkits.mplot3d.proj3d - :members: - :undoc-members: - :show-inheritance: - diff --git a/doc/mpl_toolkits/mplot3d/index.rst b/doc/mpl_toolkits/mplot3d/index.rst index e5a7bed878be..22d2368912e9 100644 --- a/doc/mpl_toolkits/mplot3d/index.rst +++ b/doc/mpl_toolkits/mplot3d/index.rst @@ -11,6 +11,9 @@ The mplot3d toolkit adds simple 3D plotting capabilities to matplotlib by supplying an axes object that can create a 2D projection of a 3D scene. The resulting graph will have the same look and feel as regular 2D plots. +See the :ref:`mplot3d tutorial ` for +more information on how to use this toolkit. + .. image:: ../../_static/demo_mplot3d.png The interactive backends also provide the ability to rotate and zoom @@ -22,6 +25,4 @@ would use for regular 2D plots. .. toctree:: :maxdepth: 2 - tutorial.rst - api.rst faq.rst diff --git a/doc/mpl_toolkits/mplot3d/tutorial.rst b/doc/mpl_toolkits/mplot3d/tutorial.rst deleted file mode 100644 index b0cda8661968..000000000000 --- a/doc/mpl_toolkits/mplot3d/tutorial.rst +++ /dev/null @@ -1,150 +0,0 @@ -.. _toolkit_mplot3d-tutorial: -.. currentmodule:: mpl_toolkits.mplot3d - -**************** -mplot3d tutorial -**************** -.. contents:: - :backlinks: none - -.. _mplot3d_getting_started: - -Getting started -=============== -An Axes3D object is created just like any other axes using -the projection='3d' keyword. -Create a new :class:`matplotlib.figure.Figure` and -add a new axes to it of type :class:`~mpl_toolkits.mplot3d.Axes3D`:: - - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d import Axes3D - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - -.. versionadded:: 1.0.0 - This approach is the preferred method of creating a 3D axes. - -.. note:: - Prior to version 1.0.0, the method of creating a 3D axes was - different. For those using older versions of matplotlib, change - ``ax = fig.add_subplot(111, projection='3d')`` - to ``ax = Axes3D(fig)``. - -.. _plot3d: - -Line plots -==================== -.. automethod:: Axes3D.plot - -.. plot:: mpl_examples/mplot3d/lines3d_demo.py - -.. _scatter3d: - -Scatter plots -============= -.. automethod:: Axes3D.scatter - -.. plot:: mpl_examples/mplot3d/scatter3d_demo.py - -.. _wireframe: - -Wireframe plots -=============== -.. automethod:: Axes3D.plot_wireframe - -.. plot:: mpl_examples/mplot3d/wire3d_demo.py - -.. _surface: - -Surface plots -============= -.. automethod:: Axes3D.plot_surface - -.. plot:: mpl_examples/mplot3d/surface3d_demo.py -.. plot:: mpl_examples/mplot3d/surface3d_demo2.py -.. plot:: mpl_examples/mplot3d/surface3d_demo3.py - -.. _trisurface: - -Tri-Surface plots -================= -.. automethod:: Axes3D.plot_trisurf - -.. plot:: mpl_examples/mplot3d/trisurf3d_demo.py - - -.. _contour3d: - -Contour plots -============= -.. automethod:: Axes3D.contour - -.. plot:: mpl_examples/mplot3d/contour3d_demo.py -.. plot:: mpl_examples/mplot3d/contour3d_demo2.py -.. plot:: mpl_examples/mplot3d/contour3d_demo3.py - -.. _contourf3d: - -Filled contour plots -==================== -.. automethod:: Axes3D.contourf - -.. plot:: mpl_examples/mplot3d/contourf3d_demo.py -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py - -.. versionadded:: 1.1.0 - The feature demoed in the second contourf3d example was enabled as a - result of a bugfix for version 1.1.0. - -.. _polygon3d: - -Polygon plots -==================== -.. automethod:: Axes3D.add_collection3d - -.. plot:: mpl_examples/mplot3d/polys3d_demo.py - -.. _bar3d: - -Bar plots -==================== -.. automethod:: Axes3D.bar - -.. plot:: mpl_examples/mplot3d/bars3d_demo.py - -.. _quiver3d: - -Quiver -==================== -.. automethod:: Axes3D.quiver - -.. plot:: mpl_examples/mplot3d/quiver3d_demo.py - -.. _2dcollections3d: - -2D plots in 3D -==================== -.. plot:: mpl_examples/mplot3d/2dcollections3d_demo.py - -.. _text3d: - -Text -==================== -.. automethod:: Axes3D.text - -.. plot:: mpl_examples/mplot3d/text3d_demo.py - -.. _3dsubplots: - -Subplotting -==================== -Having multiple 3D plots in a single figure is the same -as it is for 2D plots. Also, you can have both 2D and 3D plots -in the same figure. - -.. versionadded:: 1.0.0 - Subplotting 3D plots was added in v1.0.0. Earlier version can not - do this. - -.. plot:: mpl_examples/mplot3d/subplot3d_demo.py -.. plot:: mpl_examples/mplot3d/mixed_subplots_demo.py diff --git a/doc/pyplots/README b/doc/pyplots/README deleted file mode 100644 index 464d7067e6fc..000000000000 --- a/doc/pyplots/README +++ /dev/null @@ -1,10 +0,0 @@ -Please add a line to this file for any additional requirements necessary to -generate a new figure. - -tex_demo.py and tex_unicode_demo.py: - latex - dvipng - - -plotmap.py: - basemap toolkit diff --git a/doc/pyplots/boxplot_demo.py b/doc/pyplots/boxplot_demo.py deleted file mode 100644 index b5b46f2f1eb9..000000000000 --- a/doc/pyplots/boxplot_demo.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python - -# -# Example boxplot code -# - -from pylab import * - -# fake up some data -spread= rand(50) * 100 -center = ones(25) * 50 -flier_high = rand(10) * 100 + 100 -flier_low = rand(10) * -100 -data =concatenate((spread, center, flier_high, flier_low), 0) - -# basic plot -boxplot(data) -#savefig('box1') - -# notched plot -figure() -boxplot(data,1) -#savefig('box2') - -# change outlier point symbols -figure() -boxplot(data,0,'gD') -#savefig('box3') - -# don't show outlier points -figure() -boxplot(data,0,'') -#savefig('box4') - -# horizontal boxes -figure() -boxplot(data,0,'rs',0) -#savefig('box5') - -# change whisker length -figure() -boxplot(data,0,'rs',0,0.75) -#savefig('box6') - -# fake up some more data -spread= rand(50) * 100 -center = ones(25) * 40 -flier_high = rand(10) * 100 + 100 -flier_low = rand(10) * -100 -d2 = concatenate( (spread, center, flier_high, flier_low), 0 ) -data.shape = (-1, 1) -d2.shape = (-1, 1) -#data = concatenate( (data, d2), 1 ) -# Making a 2-D array only works if all the columns are the -# same length. If they are not, then use a list instead. -# This is actually more efficient because boxplot converts -# a 2-D array into a list of vectors internally anyway. -data = [data, d2, d2[::2,0]] -# multiple box plots on one figure -figure() -boxplot(data) -#savefig('box7') - -show() - diff --git a/doc/pyplots/fig_axes_customize_simple.py b/doc/pyplots/fig_axes_customize_simple.py deleted file mode 100644 index 797cd3389a78..000000000000 --- a/doc/pyplots/fig_axes_customize_simple.py +++ /dev/null @@ -1,27 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# plt.figure creates a matplotlib.figure.Figure instance -fig = plt.figure() -rect = fig.patch # a rectangle instance -rect.set_facecolor('lightgoldenrodyellow') - -ax1 = fig.add_axes([0.1, 0.3, 0.4, 0.4]) -rect = ax1.patch -rect.set_facecolor('lightslategray') - - -for label in ax1.xaxis.get_ticklabels(): - # label is a Text instance - label.set_color('red') - label.set_rotation(45) - label.set_fontsize(16) - -for line in ax1.yaxis.get_ticklines(): - # line is a Line2D instance - line.set_color('green') - line.set_markersize(25) - line.set_markeredgewidth(3) - - - diff --git a/doc/pyplots/fig_axes_labels_simple.py b/doc/pyplots/fig_axes_labels_simple.py deleted file mode 100644 index 7fd2c53a4f2f..000000000000 --- a/doc/pyplots/fig_axes_labels_simple.py +++ /dev/null @@ -1,19 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -fig.subplots_adjust(top=0.8) -ax1 = fig.add_subplot(211) -ax1.set_ylabel('volts') -ax1.set_title('a sine wave') - -t = np.arange(0.0, 1.0, 0.01) -s = np.sin(2*np.pi*t) -line, = ax1.plot(t, s, color='blue', lw=2) - -ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3]) -n, bins, patches = ax2.hist(np.random.randn(1000), 50, - facecolor='yellow', edgecolor='yellow') -ax2.set_xlabel('time (s)') - - diff --git a/doc/pyplots/make.py b/doc/pyplots/make.py deleted file mode 100755 index cc58688aa66b..000000000000 --- a/doc/pyplots/make.py +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -import sys, os, glob -import matplotlib -import IPython.Shell -#matplotlib.rcdefaults() -matplotlib.use('Agg') - -mplshell = IPython.Shell.MatplotlibShell('mpl') - -formats = [('png', 100), - ('hires.png', 200), - ('pdf', 72)] - -def figs(): - print('making figs') - import matplotlib.pyplot as plt - for fname in glob.glob('*.py'): - if fname.split('/')[-1] == __file__.split('/')[-1]: continue - basename, ext = os.path.splitext(fname) - imagefiles = dict([('%s.%s'%(basename, format), dpi) - for format, dpi in formats]) - all_exists = True - for imagefile in imagefiles: - if not os.path.exists(imagefile): - all_exists = False - break - - if all_exists: - print(' already have %s'%fname) - else: - print(' building %s'%fname) - plt.close('all') # we need to clear between runs - mplshell.magic_run(basename) - for imagefile, dpi in imagefiles.iteritems(): - # todo: this will get called even if the run script - # fails and exits, thus creating a stub pdf and png - # iles preventing them from getting built successfully - # later - plt.savefig(imagefile, dpi=dpi) - print('all figures made') - - -def clean(): - patterns = (['#*', '*~', '*pyc'] + - ['*.%s' % format for format, dpi in formats]) - for pattern in patterns: - for fname in glob.glob(pattern): - os.remove(fname) - print('all clean') - - - -def all(): - figs() - -funcd = {'figs':figs, - 'clean':clean, - 'all':all, - } - -if len(sys.argv)>1: - for arg in sys.argv[1:]: - func = funcd.get(arg) - if func is None: - raise SystemExit('Do not know how to handle %s; valid args are'%( - arg, funcd.keys())) - func() -else: - all() - - - - diff --git a/doc/pyplots/plotmap.hires.png b/doc/pyplots/plotmap.hires.png deleted file mode 100644 index b1d0c35540a5..000000000000 Binary files a/doc/pyplots/plotmap.hires.png and /dev/null differ diff --git a/doc/pyplots/plotmap.pdf b/doc/pyplots/plotmap.pdf deleted file mode 100644 index ad51edbb7597..000000000000 Binary files a/doc/pyplots/plotmap.pdf and /dev/null differ diff --git a/doc/pyplots/plotmap.png b/doc/pyplots/plotmap.png deleted file mode 100644 index 5f33c425a335..000000000000 Binary files a/doc/pyplots/plotmap.png and /dev/null differ diff --git a/doc/pyplots/plotmap.py b/doc/pyplots/plotmap.py deleted file mode 100644 index 98a5d64bb135..000000000000 --- a/doc/pyplots/plotmap.py +++ /dev/null @@ -1,61 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -try: - from mpl_toolkits.basemap import Basemap - have_basemap = True -except ImportError: - have_basemap = False - - -def plotmap(): - # create figure - fig = plt.figure(figsize=(8,8)) - # set up orthographic map projection with - # perspective of satellite looking down at 50N, 100W. - # use low resolution coastlines. - map = Basemap(projection='ortho',lat_0=50,lon_0=-100,resolution='l') - # lat/lon coordinates of five cities. - lats=[40.02,32.73,38.55,48.25,17.29] - lons=[-105.16,-117.16,-77.00,-114.21,-88.10] - cities=['Boulder, CO','San Diego, CA', - 'Washington, DC','Whitefish, MT','Belize City, Belize'] - # compute the native map projection coordinates for cities. - xc,yc = map(lons,lats) - # make up some data on a regular lat/lon grid. - nlats = 73; nlons = 145; delta = 2.*np.pi/(nlons-1) - lats = (0.5*np.pi-delta*np.indices((nlats,nlons))[0,:,:]) - lons = (delta*np.indices((nlats,nlons))[1,:,:]) - wave = 0.75*(np.sin(2.*lats)**8*np.cos(4.*lons)) - mean = 0.5*np.cos(2.*lats)*((np.sin(2.*lats))**2 + 2.) - # compute native map projection coordinates of lat/lon grid. - # (convert lons and lats to degrees first) - x, y = map(lons*180./np.pi, lats*180./np.pi) - # draw map boundary - map.drawmapboundary(color="0.9") - # draw graticule (latitude and longitude grid lines) - map.drawmeridians(np.arange(0,360,30),color="0.9") - map.drawparallels(np.arange(-90,90,30),color="0.9") - # plot filled circles at the locations of the cities. - map.plot(xc,yc,'wo') - # plot the names of five cities. - for name,xpt,ypt in zip(cities,xc,yc): - plt.text(xpt+100000,ypt+100000,name,fontsize=9,color='w') - # contour data over the map. - cs = map.contour(x,y,wave+mean,15,linewidths=1.5) - # draw blue marble image in background. - # (downsample the image by 50% for speed) - map.bluemarble(scale=0.5) - -def plotempty(): - # create figure - fig = plt.figure(figsize=(8,8)) - fig.text(0.5, 0.5, "Sorry, could not import Basemap", - horizontalalignment='center') - -if have_basemap: - plotmap() -else: - plotempty() -plt.show() - diff --git a/doc/pyplots/pyplot_formatstr.py b/doc/pyplots/pyplot_formatstr.py deleted file mode 100644 index b7a7786a602e..000000000000 --- a/doc/pyplots/pyplot_formatstr.py +++ /dev/null @@ -1,4 +0,0 @@ -import matplotlib.pyplot as plt -plt.plot([1,2,3,4], [1,4,9,16], 'ro') -plt.axis([0, 6, 0, 20]) -plt.show() diff --git a/doc/pyplots/pyplot_simple.py b/doc/pyplots/pyplot_simple.py deleted file mode 100644 index 46b9f225a97e..000000000000 --- a/doc/pyplots/pyplot_simple.py +++ /dev/null @@ -1,4 +0,0 @@ -import matplotlib.pyplot as plt -plt.plot([1,2,3,4]) -plt.ylabel('some numbers') -plt.show() diff --git a/doc/pyplots/tex_demo.hires.png b/doc/pyplots/tex_demo.hires.png deleted file mode 100644 index 61bb11881553..000000000000 Binary files a/doc/pyplots/tex_demo.hires.png and /dev/null differ diff --git a/doc/pyplots/tex_demo.pdf b/doc/pyplots/tex_demo.pdf deleted file mode 100644 index 4462d92c99a9..000000000000 Binary files a/doc/pyplots/tex_demo.pdf and /dev/null differ diff --git a/doc/pyplots/tex_demo.py b/doc/pyplots/tex_demo.py deleted file mode 100644 index a5288d749d86..000000000000 --- a/doc/pyplots/tex_demo.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Demo of TeX rendering. - -You can use TeX to render all of your matplotlib text if the rc -parameter text.usetex is set. This works currently on the agg and ps -backends, and requires that you have tex and the other dependencies -described at http://matplotlib.sf.net/matplotlib.texmanager.html -properly installed on your system. The first time you run a script -you will see a lot of output from tex and associated tools. The next -time, the run may be silent, as a lot of the information is cached in -~/.tex.cache - -""" -import numpy as np -import matplotlib.pyplot as plt - - -# Example data -t = np.arange(0.0, 1.0 + 0.01, 0.01) -s = np.cos(4 * np.pi * t) + 2 - -plt.rc('text', usetex=True) -plt.rc('font', family='serif') -plt.plot(t, s) - -plt.xlabel(r'\textbf{time} (s)') -plt.ylabel(r'\textit{voltage} (mV)',fontsize=16) -plt.title(r"\TeX\ is Number " - r"$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", - fontsize=16, color='gray') -# Make room for the ridiculously large title. -plt.subplots_adjust(top=0.8) - -plt.savefig('tex_demo') -plt.show() diff --git a/doc/pyplots/tex_unicode_demo.hires.png b/doc/pyplots/tex_unicode_demo.hires.png deleted file mode 100644 index 52fc6b248bc6..000000000000 Binary files a/doc/pyplots/tex_unicode_demo.hires.png and /dev/null differ diff --git a/doc/pyplots/tex_unicode_demo.pdf b/doc/pyplots/tex_unicode_demo.pdf deleted file mode 100644 index c6e234d1d404..000000000000 Binary files a/doc/pyplots/tex_unicode_demo.pdf and /dev/null differ diff --git a/doc/pyplots/tex_unicode_demo.png b/doc/pyplots/tex_unicode_demo.png deleted file mode 100644 index db7e76dbebb3..000000000000 Binary files a/doc/pyplots/tex_unicode_demo.png and /dev/null differ diff --git a/doc/pyplots/whats_new_98_4_fill_between.py b/doc/pyplots/whats_new_98_4_fill_between.py deleted file mode 100644 index ea5f46d93dee..000000000000 --- a/doc/pyplots/whats_new_98_4_fill_between.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -import matplotlib.mlab as mlab -from pylab import figure, show -import numpy as np - -x = np.arange(0.0, 2, 0.01) -y1 = np.sin(2*np.pi*x) -y2 = 1.2*np.sin(4*np.pi*x) - -fig = figure() -ax = fig.add_subplot(111) -ax.plot(x, y1, x, y2, color='black') -ax.fill_between(x, y1, y2, where=y2>y1, facecolor='green') -ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red') -ax.set_title('fill between where') - -show() diff --git a/doc/pyplots/whats_new_99_mplot3d.py b/doc/pyplots/whats_new_99_mplot3d.py deleted file mode 100644 index d3e22c9b58e0..000000000000 --- a/doc/pyplots/whats_new_99_mplot3d.py +++ /dev/null @@ -1,17 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -from matplotlib import cm -import pylab -import random -import numpy as np - -fig = pylab.figure() -ax = Axes3D(fig) -X = np.arange(-5, 5, 0.25) -Y = np.arange(-5, 5, 0.25) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) -ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) - -pylab.show() - diff --git a/doc/resources/index.rst b/doc/resources/index.rst index 98dbd6f4599a..3b5107bcac61 100644 --- a/doc/resources/index.rst +++ b/doc/resources/index.rst @@ -5,45 +5,63 @@ ******************* -=================== - Books and Chapters -=================== +============================= + Books, Chapters and Articles +============================= -* `Matplotlib for Python Developers - `_ +* `Mastering matplotlib + `_ + by Duncan M. McGreggor + +* `Interactive Applications Using Matplotlib + `_ + by Benjamin Root + +* `Matplotlib for Python Developers + `_ by Sandro Tosi -* `Matplotlib chapter `_ - by John Hunter and Michael Droettboom in The Architecture of Open Source +* `Matplotlib chapter `_ + by John Hunter and Michael Droettboom in The Architecture of Open Source Applications -* `Graphics with Matplotlib - `_ +* `Graphics with Matplotlib + `_ by David J. Raymond +* `Ten Simple Rules for Better Figures + `_ + by Nicolas P. Rougier, Michael Droettboom and Philip E. Bourne + +* `Learning Scientific Programming with Python chapter 7 + `_ + by Christian Hill + ======= Videos ======= -* `Getting started with Matplotlib - `_ - by `unpingco `_ +* `Plotting with matplotlib `_ + by Mike Müller -* `Plotting with matplotlib `_ - by Mike Müller +* `Introduction to NumPy and Matplotlib + `_ by Eric Jones -* `Introduction to NumPy and Matplotlib - `_ by Eric Jones - -* `Anatomy of Matplotlib +* `Anatomy of Matplotlib `_ by Benjamin Root +* `Data Visualization Basics with Python (O'Reilly) + `_ + by Randal S. Olson + ========== Tutorials ========== -* `Matplotlib tutorial `_ +* `Matplotlib tutorial `_ by Nicolas P. Rougier - +* `Anatomy of Matplotlib - IPython Notebooks + `_ + by Benjamin Root diff --git a/doc/sphinxext/gen_gallery.py b/doc/sphinxext/gen_gallery.py deleted file mode 100644 index 05cba6858c9e..000000000000 --- a/doc/sphinxext/gen_gallery.py +++ /dev/null @@ -1,170 +0,0 @@ -# -*- coding: UTF-8 -*- -import os -import re -import glob -import warnings - -import sphinx.errors - -import matplotlib.image as image - - -exclude_example_sections = ['units'] -multiimage = re.compile('(.*?)(_\d\d){1,2}') - -# generate a thumbnail gallery of examples -gallery_template = """\ -{{% extends "layout.html" %}} -{{% set title = "Thumbnail gallery" %}} - - -{{% block body %}} - -

    Click on any image to see full size image and source code

    -
    - -
  • Gallery -
      - {toc} -
    -
  • - -{gallery} - -{{% endblock %}} -""" - -header_template = """\ -
    -

    - {title} -

    """ - -link_template = """\ -
    - {basename}
    -
    {title}
    -
    -""" - -toc_template = """\ -
  • {title}
  • """ - - -def make_thumbnail(args): - image.thumbnail(args[0], args[1], 0.3) - - -def out_of_date(original, derived): - return (not os.path.exists(derived) or - os.stat(derived).st_mtime < os.stat(original).st_mtime) - - -def gen_gallery(app, doctree): - if app.builder.name != 'html': - return - - outdir = app.builder.outdir - rootdir = 'plot_directive/mpl_examples' - - example_sections = list(app.builder.config.mpl_example_sections) - for i, (subdir, title) in enumerate(example_sections): - if subdir in exclude_example_sections: - example_sections.pop(i) - - # images we want to skip for the gallery because they are an unusual - # size that doesn't layout well in a table, or because they may be - # redundant with other images or uninteresting - skips = set([ - 'mathtext_examples', - 'matshow_02', - 'matshow_03', - 'matplotlib_icon', - ]) - - thumbnails = {} - rows = [] - toc_rows = [] - - for subdir, title in example_sections: - rows.append(header_template.format(title=title, section=subdir)) - toc_rows.append(toc_template.format(title=title, section=subdir)) - - origdir = os.path.join('build', rootdir, subdir) - thumbdir = os.path.join(outdir, rootdir, subdir, 'thumbnails') - if not os.path.exists(thumbdir): - os.makedirs(thumbdir) - - data = [] - - for filename in sorted(glob.glob(os.path.join(origdir, '*.png'))): - if filename.endswith("hires.png"): - continue - - path, filename = os.path.split(filename) - basename, ext = os.path.splitext(filename) - if basename in skips: - continue - - # Create thumbnails based on images in tmpdir, and place - # them within the build tree - orig_path = str(os.path.join(origdir, filename)) - thumb_path = str(os.path.join(thumbdir, filename)) - if out_of_date(orig_path, thumb_path) or True: - thumbnails[orig_path] = thumb_path - - m = multiimage.match(basename) - if m is not None: - basename = m.group(1) - - data.append((subdir, basename, - os.path.join(rootdir, subdir, 'thumbnails', filename))) - - for (subdir, basename, thumbfile) in data: - if thumbfile is not None: - link = 'examples/%s/%s.html'%(subdir, basename) - rows.append(link_template.format(link=link, - thumb=thumbfile, - basename=basename, - title=basename)) - - if len(data) == 0: - warnings.warn("No thumbnails were found in %s" % subdir) - - # Close out the
    opened up at the top of this loop - rows.append("
    ") - - content = gallery_template.format(toc='\n'.join(toc_rows), - gallery='\n'.join(rows)) - - # Only write out the file if the contents have actually changed. - # Otherwise, this triggers a full rebuild of the docs - - gallery_path = os.path.join(app.builder.srcdir, - '_templates', 'gallery.html') - if os.path.exists(gallery_path): - fh = open(gallery_path, 'r') - regenerate = fh.read() != content - fh.close() - else: - regenerate = True - - if regenerate: - fh = open(gallery_path, 'w') - fh.write(content) - fh.close() - - for key in app.builder.status_iterator( - iter(thumbnails.keys()), "generating thumbnails... ", - length=len(thumbnails)): - if out_of_date(key, thumbnails[key]): - image.thumbnail(key, thumbnails[key], 0.3) - - -def setup(app): - app.connect('env-updated', gen_gallery) - - try: # multiple plugins may use mpl_example_sections - app.add_config_value('mpl_example_sections', [], True) - except sphinx.errors.ExtensionError: - pass # mpl_example_sections already defined diff --git a/doc/sphinxext/gen_rst.py b/doc/sphinxext/gen_rst.py index 42598d2149f7..c4a07cd46695 100644 --- a/doc/sphinxext/gen_rst.py +++ b/doc/sphinxext/gen_rst.py @@ -51,8 +51,7 @@ def generate_example_rst(app): relpath = os.path.split(root)[-1] datad.setdefault(relpath, []).append((fullpath, fname, contents)) - subdirs = list(datad.keys()) - subdirs.sort() + subdirs = sorted(datad) fhindex = open(os.path.join(exampledir, 'index.rst'), 'w') fhindex.write("""\ @@ -169,3 +168,6 @@ def setup(app): app.add_config_value('mpl_example_sections', [], True) except sphinx.errors.ExtensionError: pass # mpl_example_sections already defined + + metadata = {'parallel_read_safe': True, 'parallel_write_safe': True} + return metadata diff --git a/doc/sphinxext/github.py b/doc/sphinxext/github.py index 519e146d198f..8f0ffc0d9782 100644 --- a/doc/sphinxext/github.py +++ b/doc/sphinxext/github.py @@ -143,7 +143,7 @@ def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]): def setup(app): """Install the plugin. - + :param app: Sphinx application context. """ app.info('Initializing GitHub plugin') @@ -152,4 +152,6 @@ def setup(app): app.add_role('ghuser', ghuser_role) app.add_role('ghcommit', ghcommit_role) app.add_config_value('github_project_url', None, 'env') - return + + metadata = {'parallel_read_safe': True, 'parallel_write_safe': True} + return metadata diff --git a/doc/sphinxext/math_symbol_table.py b/doc/sphinxext/math_symbol_table.py index 339d43c6f38a..cf8b82e290c5 100644 --- a/doc/sphinxext/math_symbol_table.py +++ b/doc/sphinxext/math_symbol_table.py @@ -106,14 +106,10 @@ def get_n(n, l): lines = [] for category, columns, syms in symbols: - syms = syms.split() - syms.sort() + syms = sorted(syms.split()) lines.append("**%s**" % category) lines.append('') - max_width = 0 - for sym in syms: - max_width = max(max_width, len(sym)) - max_width = max_width * 2 + 16 + max_width = max(map(len, syms)) * 2 + 16 header = " " + (('=' * max_width) + ' ') * columns format = '%%%ds' % max_width for chunk in get_n(20, get_n(columns, syms)): @@ -138,6 +134,9 @@ def setup(app): 'math_symbol_table', math_symbol_table_directive, False, (0, 1, 0)) + metadata = {'parallel_read_safe': True, 'parallel_write_safe': True} + return metadata + if __name__ == "__main__": # Do some verification of the tables from matplotlib import _mathtext_data diff --git a/doc/thirdpartypackages/index.rst b/doc/thirdpartypackages/index.rst new file mode 100644 index 000000000000..e056dbf111d3 --- /dev/null +++ b/doc/thirdpartypackages/index.rst @@ -0,0 +1,149 @@ +.. _thirdparty-index: + +******************** +Third party packages +******************** + +Several external packages that extend or build on Matplotlib functionality are +listed below. They are maintained and distributed separately from Matplotlib +and thus need to be installed individually. + +Please submit an issue or pull request on Github if you have created +a package that you would like to have included. We are also happy to +host third party packages within the `Matplotlib Github Organization +`_. + +Mapping toolkits +**************** + +Basemap +======= +`Basemap `_ plots data on map projections, with +continental and political boundaries. + +.. image:: /_static/basemap_contour1.png + :height: 400px + +Cartopy +======= +`Cartopy `_ builds on top +of Matplotlib to provide object oriented map projection definitions +and close integration with Shapely for powerful yet easy-to-use vector +data processing tools. An example plot from the `Cartopy gallery +`_: + +.. image:: /_static/cartopy_hurricane_katrina_01_00.png + :height: 400px + +Declarative libraries +********************* + +ggplot +====== +`ggplot `_ is a port of the R ggplot2 package +to python based on Matplotlib. + +.. image:: /_static/ggplot.png + :height: 195px + +holoviews +========= +`holoviews `_ makes it easier to visualize data +interactively, especially in a `Jupyter notebook `_, by +providing a set of declarative plotting objects that store your data and +associated metadata. Your data is then immediately visualizable alongside or +overlaid with other data, either statically or with automatically provided +widgets for parameter exploration. + +.. image:: /_static/holoviews.png + :height: 354px + +Specialty plots +*************** + +Matplotlib-Venn +=============== +`Matplotlib-Venn `_ provides a +set of functions for plotting 2- and 3-set area-weighted (or unweighted) Venn +diagrams. + +mpl-probscale +============= +`mpl-probscale `_ is a small extension +that allows Matplotlib users to specify probabilty scales. Simply importing the +``probscale`` module registers the scale with Matplotlib, making it accessible +via e.g., ``ax.set_xscale('prob')`` or ``plt.yscale('prob')``. + +.. image:: /_static/probscale_demo.png + +mplstereonet +============ +`mplstereonet `_ provides +stereonets for plotting and analyzing orientation data in Matplotlib. + +Natgrid +======= +`mpl_toolkits.natgrid `_ is an interface +to the natgrid C library for gridding irregularly spaced data. + +pyUpSet +======= +`pyUpSet `_ is a +static Python implementation of the `UpSet suite by Lex et al. +`_ to explore complex intersections of +sets and data frames. + +seaborn +======= +`seaborn `_ is a high level interface for drawing +statistical graphics with Matplotlib. It aims to make visualization a central +part of exploring and understanding complex datasets. + +.. image:: /_static/seaborn.png + :height: 157px + +Windrose +======== +`Windrose `_ is a Python Matplotlib, +Numpy library to manage wind data, draw windroses (also known as polar rose +plots), draw probability density functions and fit Weibull distributions. + +DeCiDa +====== + +`DeCiDa `_ is a library of functions +and classes for electron device characterization, electronic circuit design and +general data visualization and analysis. + +Interactivity +************* + +mplcursors +========== +`mplcursors `_ provides interactive data +cursors for Matplotlib. + +MplDataCursor +============= +`MplDataCursor `_ is a toolkit +written by Joe Kington to provide interactive "data cursors" (clickable +annotation boxes) for Matplotlib. + +Miscellaneous +************* + +adjustText +========== +`adjustText `_ is a small library for +automatically adjusting text position in Matplotlib plots to minimize overlaps +between them, specified points and other objects. + +.. image:: /_static/adjustText.png + +iTerm2 terminal backend +======================= +`matplotlib_iterm2 `_ is an +external Matplotlib backend using the iTerm2 nightly build inline image display +feature. + +.. image:: /_static/matplotlib_iterm2_demo.png diff --git a/doc/users/annotations_guide.rst b/doc/users/annotations_guide.rst deleted file mode 100644 index fa585eb9e30e..000000000000 --- a/doc/users/annotations_guide.rst +++ /dev/null @@ -1,417 +0,0 @@ -.. _plotting-guide-annotation: - -**************** -Annotating Axes -**************** - -Do not proceed unless you already have read :ref:`annotations-tutorial`, -:func:`~matplotlib.pyplot.text` and -:func:`~matplotlib.pyplot.annotate`! - - - - -Annotating with Text with Box -============================= - -Let's start with a simple example. - -.. plot:: users/plotting/examples/annotate_text_arrow.py - - -The :func:`~matplotlib.pyplot.text` function in the pyplot module (or -text method of the Axes class) takes bbox keyword argument, and when -given, a box around the text is drawn. :: - - bbox_props = dict(boxstyle="rarrow,pad=0.3", fc="cyan", ec="b", lw=2) - t = ax.text(0, 0, "Direction", ha="center", va="center", rotation=45, - size=15, - bbox=bbox_props) - - -The patch object associated with the text can be accessed by:: - - bb = t.get_bbox_patch() - -The return value is an instance of FancyBboxPatch and the patch -properties like facecolor, edgewidth, etc. can be accessed and -modified as usual. To change the shape of the box, use *set_boxstyle* -method. :: - - bb.set_boxstyle("rarrow", pad=0.6) - -The arguments are the name of the box style with its attributes as -keyword arguments. Currently, following box styles are implemented. - - ========== ============== ========================== - Class Name Attrs - ========== ============== ========================== - LArrow ``larrow`` pad=0.3 - RArrow ``rarrow`` pad=0.3 - Round ``round`` pad=0.3,rounding_size=None - Round4 ``round4`` pad=0.3,rounding_size=None - Roundtooth ``roundtooth`` pad=0.3,tooth_size=None - Sawtooth ``sawtooth`` pad=0.3,tooth_size=None - Square ``square`` pad=0.3 - ========== ============== ========================== - -.. plot:: mpl_examples/pylab_examples/fancybox_demo2.py - - -Note that the attributes arguments can be specified within the style -name with separating comma (this form can be used as "boxstyle" value -of bbox argument when initializing the text instance) :: - - bb.set_boxstyle("rarrow,pad=0.6") - - - - -Annotating with Arrow -===================== - -The :func:`~matplotlib.pyplot.annotate` function in the pyplot module -(or annotate method of the Axes class) is used to draw an arrow -connecting two points on the plot. :: - - ax.annotate("Annotation", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='offset points', - ) - -This annotates a point at ``xy`` in the given coordinate (``xycoords``) -with the text at ``xytext`` given in ``textcoords``. Often, the -annotated point is specified in the *data* coordinate and the annotating -text in *offset points*. -See :func:`~matplotlib.pyplot.annotate` for available coordinate systems. - -An arrow connecting two point (xy & xytext) can be optionally drawn by -specifying the ``arrowprops`` argument. To draw only an arrow, use -empty string as the first argument. :: - - ax.annotate("", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3"), - ) - -.. plot:: users/plotting/examples/annotate_simple01.py - -The arrow drawing takes a few steps. - -1. a connecting path between two points are created. This is - controlled by ``connectionstyle`` key value. - -2. If patch object is given (*patchA* & *patchB*), the path is clipped to - avoid the patch. - -3. The path is further shrunk by given amount of pixels (*shirnkA* - & *shrinkB*) - -4. The path is transmuted to arrow patch, which is controlled by the - ``arrowstyle`` key value. - - -.. plot:: users/plotting/examples/annotate_explain.py - - -The creation of the connecting path between two points is controlled by -``connectionstyle`` key and following styles are available. - - ========== ============================================= - Name Attrs - ========== ============================================= - ``angle`` angleA=90,angleB=0,rad=0.0 - ``angle3`` angleA=90,angleB=0 - ``arc`` angleA=0,angleB=0,armA=None,armB=None,rad=0.0 - ``arc3`` rad=0.0 - ``bar`` armA=0.0,armB=0.0,fraction=0.3,angle=None - ========== ============================================= - -Note that "3" in ``angle3`` and ``arc3`` is meant to indicate that the -resulting path is a quadratic spline segment (three control -points). As will be discussed below, some arrow style option only can -be used when the connecting path is a quadratic spline. - -The behavior of each connection style is (limitedly) demonstrated in the -example below. (Warning : The behavior of the ``bar`` style is currently not -well defined, it may be changed in the future). - -.. plot:: users/plotting/examples/connectionstyle_demo.py - - -The connecting path (after clipping and shrinking) is then mutated to -an arrow patch, according to the given ``arrowstyle``. - - ========== ============================================= - Name Attrs - ========== ============================================= - ``-`` None - ``->`` head_length=0.4,head_width=0.2 - ``-[`` widthB=1.0,lengthB=0.2,angleB=None - ``|-|`` widthA=1.0,widthB=1.0 - ``-|>`` head_length=0.4,head_width=0.2 - ``<-`` head_length=0.4,head_width=0.2 - ``<->`` head_length=0.4,head_width=0.2 - ``<|-`` head_length=0.4,head_width=0.2 - ``<|-|>`` head_length=0.4,head_width=0.2 - ``fancy`` head_length=0.4,head_width=0.4,tail_width=0.4 - ``simple`` head_length=0.5,head_width=0.5,tail_width=0.2 - ``wedge`` tail_width=0.3,shrink_factor=0.5 - ========== ============================================= - -.. plot:: mpl_examples/pylab_examples/fancyarrow_demo.py - -Some arrowstyles only work with connection style that generates a -quadratic-spline segment. They are ``fancy``, ``simple``, and ``wedge``. -For these arrow styles, you must use "angle3" or "arc3" connection -style. - -If the annotation string is given, the patchA is set to the bbox patch -of the text by default. - -.. plot:: users/plotting/examples/annotate_simple02.py - -As in the text command, a box around the text can be drawn using -the ``bbox`` argument. - -.. plot:: users/plotting/examples/annotate_simple03.py - -By default, the starting point is set to the center of the text -extent. This can be adjusted with ``relpos`` key value. The values -are normalized to the extent of the text. For example, (0,0) means -lower-left corner and (1,1) means top-right. - -.. plot:: users/plotting/examples/annotate_simple04.py - - -Placing Artist at the anchored location of the Axes -=================================================== - -There are class of artist that can be placed at the anchored location -of the Axes. A common example is the legend. This type of artists can -be created by using the OffsetBox class. A few predefined classes are -available in ``mpl_toolkits.axes_grid.anchored_artists``. :: - - from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - at = AnchoredText("Figure 1a", - prop=dict(size=8), frameon=True, - loc=2, - ) - at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") - ax.add_artist(at) - - -.. plot:: users/plotting/examples/anchored_box01.py - - -The *loc* keyword has same meaning as in the legend command. - -A simple application is when the size of the artist (or collection of -artists) is known in pixel size during the time of creation. For -example, If you want to draw a circle with fixed size of 20 pixel x 20 -pixel (radius = 10 pixel), you can utilize -``AnchoredDrawingArea``. The instance is created with a size of the -drawing area (in pixel). And user can add arbitrary artist to the -drawing area. Note that the extents of the artists that are added to -the drawing area has nothing to do with the placement of the drawing -area itself. The initial size only matters. :: - - from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea - - ada = AnchoredDrawingArea(20, 20, 0, 0, - loc=1, pad=0., frameon=False) - p1 = Circle((10, 10), 10) - ada.drawing_area.add_artist(p1) - p2 = Circle((30, 10), 5, fc="r") - ada.drawing_area.add_artist(p2) - -The artists that are added to the drawing area should not have -transform set (they will be overridden) and the dimension of those -artists are interpreted as a pixel coordinate, i.e., the radius of the -circles in above example are 10 pixel and 5 pixel, respectively. - -.. plot:: users/plotting/examples/anchored_box02.py - -Sometimes, you want to your artists scale with data coordinate (or -other coordinate than canvas pixel). You can use -``AnchoredAuxTransformBox`` class. This is similar to -``AnchoredDrawingArea`` except that the extent of the artist is -determined during the drawing time respecting the specified transform. :: - - from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox - - box = AnchoredAuxTransformBox(ax.transData, loc=2) - el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates! - box.drawing_area.add_artist(el) - -The ellipse in the above example will have width and height -corresponds to 0.1 and 0.4 in data coordinate and will be -automatically scaled when the view limits of the axes change. - -.. plot:: users/plotting/examples/anchored_box03.py - -As in the legend, the bbox_to_anchor argument can be set. Using the -HPacker and VPacker, you can have an arrangement(?) of artist as in the -legend (as a matter of fact, this is how the legend is created). - -.. plot:: users/plotting/examples/anchored_box04.py - -Note that unlike the legend, the ``bbox_transform`` is set -to IdentityTransform by default. - -Using Complex Coordinate with Annotation -======================================== - -The Annotation in matplotlib support several types of coordinate as -described in :ref:`annotations-tutorial`. For an advanced user who wants -more control, it supports a few other options. - - 1. :class:`~matplotlib.transforms.Transform` instance. For example, :: - - ax.annotate("Test", xy=(0.5, 0.5), xycoords=ax.transAxes) - - is identical to :: - - ax.annotate("Test", xy=(0.5, 0.5), xycoords="axes fraction") - - With this, you can annotate a point in other axes. :: - - ax1, ax2 = subplot(121), subplot(122) - ax2.annotate("Test", xy=(0.5, 0.5), xycoords=ax1.transData, - xytext=(0.5, 0.5), textcoords=ax2.transData, - arrowprops=dict(arrowstyle="->")) - - 2. :class:`~matplotlib.artist.Artist` instance. The xy value (or - xytext) is interpreted as a fractional coordinate of the bbox - (return value of *get_window_extent*) of the artist. :: - - an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) - an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, # (1,0.5) of the an1's bbox - xytext=(30,0), textcoords="offset points", - va="center", ha="left", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) - - .. plot:: users/plotting/examples/annotate_simple_coord01.py - - Note that it is your responsibility that the extent of the - coordinate artist (*an1* in above example) is determined before *an2* - gets drawn. In most cases, it means that an2 needs to be drawn - later than *an1*. - - - 3. A callable object that returns an instance of either - :class:`~matplotlib.transforms.BboxBase` or - :class:`~matplotlib.transforms.Transform`. If a transform is - returned, it is same as 1 and if bbox is returned, it is same - as 2. The callable object should take a single argument of - renderer instance. For example, following two commands give - identical results :: - - an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, - xytext=(30,0), textcoords="offset points") - an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1.get_window_extent, - xytext=(30,0), textcoords="offset points") - - - 4. A tuple of two coordinate specification. The first item is for - x-coordinate and the second is for y-coordinate. For example, :: - - annotate("Test", xy=(0.5, 1), xycoords=("data", "axes fraction")) - - 0.5 is in data coordinate, and 1 is in normalized axes coordinate. - You may use an artist or transform as with a tuple. For example, - - .. plot:: users/plotting/examples/annotate_simple_coord02.py - :include-source: - - - 5. Sometimes, you want your annotation with some "offset points", but - not from the annotated point but from other - point. :class:`~matplotlib.text.OffsetFrom` is a helper class for such - case. - - .. plot:: users/plotting/examples/annotate_simple_coord03.py - :include-source: - - You may take a look at this example :ref:`pylab_examples-annotation_demo3`. - -Using ConnectorPatch -==================== - -The ConnectorPatch is like an annotation without a text. While the -annotate function is recommended in most of situation, the -ConnectorPatch is useful when you want to connect points in different -axes. :: - - from matplotlib.patches import ConnectionPatch - xy = (0.2, 0.2) - con = ConnectionPatch(xyA=xy, xyB=xy, coordsA="data", coordsB="data", - axesA=ax1, axesB=ax2) - ax2.add_artist(con) - -The above code connects point xy in data coordinate of ``ax1`` to -point xy int data coordinate of ``ax2``. Here is a simple example. - -.. plot:: users/plotting/examples/connect_simple01.py - - -While the ConnectorPatch instance can be added to any axes, but you -may want it to be added to the axes in the latter (?) of the axes -drawing order to prevent overlap (?) by other axes. - - - - -Advanced Topics -*************** - -Zoom effect between Axes -======================== - -mpl_toolkits.axes_grid.inset_locator defines some patch classes useful -for interconnect two axes. Understanding the code requires some -knowledge of how mpl's transform works. But, utilizing it will be -straight forward. - - -.. plot:: mpl_examples/pylab_examples/axes_zoom_effect.py - - -Define Custom BoxStyle -====================== - -You can use a custom box style. The value for the ``boxstyle`` can be a -callable object in following forms.:: - - def __call__(self, x0, y0, width, height, mutation_size, - aspect_ratio=1.): - """ - Given the location and size of the box, return the path of - the box around it. - - - *x0*, *y0*, *width*, *height* : location and size of the box - - *mutation_size* : a reference scale for the mutation. - - *aspect_ratio* : aspect-ration for the mutation. - """ - path = ... - return path - -Here is a complete example. - -.. plot:: users/plotting/examples/custom_boxstyle01.py - -However, it is recommended that you derive from the -matplotlib.patches.BoxStyle._Base as demonstrated below. - -.. plot:: users/plotting/examples/custom_boxstyle02.py - :include-source: - - -Similarly, you can define custom ConnectionStyle and custom ArrowStyle. -See the source code of ``lib/matplotlib/patches.py`` and check -how each style class is defined. diff --git a/doc/users/annotations_intro.rst b/doc/users/annotations_intro.rst deleted file mode 100644 index 0b83e1523b3e..000000000000 --- a/doc/users/annotations_intro.rst +++ /dev/null @@ -1,87 +0,0 @@ -.. _annotations-tutorial: - -Annotating text -=============== - -For a more detailed introduction to annotations, see -:ref:`plotting-guide-annotation`. - -The uses of the basic :func:`~matplotlib.pyplot.text` command above -place text at an arbitrary position on the Axes. A common use case of -text is to annotate some feature of the plot, and the -:func:`~matplotlib.Axes.annotate` method provides helper functionality -to make annotations easy. In an annotation, there are two points to -consider: the location being annotated represented by the argument -``xy`` and the location of the text ``xytext``. Both of these -arguments are ``(x,y)`` tuples. - -.. plot:: pyplots/annotation_basic.py - :include-source: - - -In this example, both the ``xy`` (arrow tip) and ``xytext`` locations -(text location) are in data coordinates. There are a variety of other -coordinate systems one can choose -- you can specify the coordinate -system of ``xy`` and ``xytext`` with one of the following strings for -``xycoords`` and ``textcoords`` (default is 'data') - -==================== ==================================================== -argument coordinate system -==================== ==================================================== - 'figure points' points from the lower left corner of the figure - 'figure pixels' pixels from the lower left corner of the figure - 'figure fraction' 0,0 is lower left of figure and 1,1 is upper right - 'axes points' points from lower left corner of axes - 'axes pixels' pixels from lower left corner of axes - 'axes fraction' 0,0 is lower left of axes and 1,1 is upper right - 'data' use the axes data coordinate system -==================== ==================================================== - -For example to place the text coordinates in fractional axes -coordinates, one could do:: - - ax.annotate('local max', xy=(3, 1), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top', - ) - -For physical coordinate systems (points or pixels) the origin is the -(bottom, left) of the figure or axes. If the value is negative, -however, the origin is from the (right, top) of the figure or axes, -analogous to negative indexing of sequences. - -Optionally, you can specify arrow properties which draws an arrow -from the text to the annotated point by giving a dictionary of arrow -properties in the optional keyword argument ``arrowprops``. - - -==================== ===================================================== -``arrowprops`` key description -==================== ===================================================== -width the width of the arrow in points -frac the fraction of the arrow length occupied by the head -headwidth the width of the base of the arrow head in points -shrink move the tip and base some percent away from - the annotated point and text - -\*\*kwargs any key for :class:`matplotlib.patches.Polygon`, - e.g., ``facecolor`` -==================== ===================================================== - - -In the example below, the ``xy`` point is in native coordinates -(``xycoords`` defaults to 'data'). For a polar axes, this is in -(theta, radius) space. The text in this example is placed in the -fractional figure coordinate system. :class:`matplotlib.text.Text` -keyword args like ``horizontalalignment``, ``verticalalignment`` and -``fontsize are passed from the `~matplotlib.Axes.annotate` to the -``Text`` instance - -.. plot:: pyplots/annotation_polar.py - :include-source: - -For more on all the wild and wonderful things you can do with -annotations, including fancy arrows, see :ref:`plotting-guide-annotation` -and :ref:`pylab_examples-annotation_demo`. - diff --git a/doc/users/artists.rst b/doc/users/artists.rst deleted file mode 100644 index cff65522de08..000000000000 --- a/doc/users/artists.rst +++ /dev/null @@ -1,638 +0,0 @@ -.. _artist-tutorial: - -*************** -Artist tutorial -*************** - -There are three layers to the matplotlib API. The -:class:`matplotlib.backend_bases.FigureCanvas` is the area onto which -the figure is drawn, the :class:`matplotlib.backend_bases.Renderer` is -the object which knows how to draw on the -:class:`~matplotlib.backend_bases.FigureCanvas`, and the -:class:`matplotlib.artist.Artist` is the object that knows how to use -a renderer to paint onto the canvas. The -:class:`~matplotlib.backend_bases.FigureCanvas` and -:class:`~matplotlib.backend_bases.Renderer` handle all the details of -talking to user interface toolkits like `wxPython -`_ or drawing languages like PostScript®, and -the ``Artist`` handles all the high level constructs like representing -and laying out the figure, text, and lines. The typical user will -spend 95% of his time working with the ``Artists``. - -There are two types of ``Artists``: primitives and containers. The primitives -represent the standard graphical objects we want to paint onto our canvas: -:class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.patches.Rectangle`, -:class:`~matplotlib.text.Text`, :class:`~matplotlib.image.AxesImage`, etc., and -the containers are places to put them (:class:`~matplotlib.axis.Axis`, -:class:`~matplotlib.axes.Axes` and :class:`~matplotlib.figure.Figure`). The -standard use is to create a :class:`~matplotlib.figure.Figure` instance, use -the ``Figure`` to create one or more :class:`~matplotlib.axes.Axes` or -:class:`~matplotlib.axes.Subplot` instances, and use the ``Axes`` instance -helper methods to create the primitives. In the example below, we create a -``Figure`` instance using :func:`matplotlib.pyplot.figure`, which is a -convenience method for instantiating ``Figure`` instances and connecting them -with your user interface or drawing toolkit ``FigureCanvas``. As we will -discuss below, this is not necessary -- you can work directly with PostScript, -PDF Gtk+, or wxPython ``FigureCanvas`` instances, instantiate your ``Figures`` -directly and connect them yourselves -- but since we are focusing here on the -``Artist`` API we'll let :mod:`~matplotlib.pyplot` handle some of those details -for us:: - - import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(2,1,1) # two rows, one column, first plot - -The :class:`~matplotlib.axes.Axes` is probably the most important -class in the matplotlib API, and the one you will be working with most -of the time. This is because the ``Axes`` is the plotting area into -which most of the objects go, and the ``Axes`` has many special helper -methods (:meth:`~matplotlib.axes.Axes.plot`, -:meth:`~matplotlib.axes.Axes.text`, -:meth:`~matplotlib.axes.Axes.hist`, -:meth:`~matplotlib.axes.Axes.imshow`) to create the most common -graphics primitives (:class:`~matplotlib.lines.Line2D`, -:class:`~matplotlib.text.Text`, -:class:`~matplotlib.patches.Rectangle`, -:class:`~matplotlib.image.Image`, respectively). These helper methods -will take your data (e.g., ``numpy`` arrays and strings) and create -primitive ``Artist`` instances as needed (e.g., ``Line2D``), add them to -the relevant containers, and draw them when requested. Most of you -are probably familiar with the :class:`~matplotlib.axes.Subplot`, -which is just a special case of an ``Axes`` that lives on a regular -rows by columns grid of ``Subplot`` instances. If you want to create -an ``Axes`` at an arbitrary location, simply use the -:meth:`~matplotlib.figure.Figure.add_axes` method which takes a list -of ``[left, bottom, width, height]`` values in 0-1 relative figure -coordinates:: - - fig2 = plt.figure() - ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3]) - -Continuing with our example:: - - import numpy as np - t = np.arange(0.0, 1.0, 0.01) - s = np.sin(2*np.pi*t) - line, = ax.plot(t, s, color='blue', lw=2) - -In this example, ``ax`` is the ``Axes`` instance created by the -``fig.add_subplot`` call above (remember ``Subplot`` is just a -subclass of ``Axes``) and when you call ``ax.plot``, it creates a -``Line2D`` instance and adds it to the :attr:`Axes.lines -` list. In the interactive `ipython -`_ session below, you can see that the -``Axes.lines`` list is length one and contains the same line that was -returned by the ``line, = ax.plot...`` call: - -.. sourcecode:: ipython - - In [101]: ax.lines[0] - Out[101]: - - In [102]: line - Out[102]: - -If you make subsequent calls to ``ax.plot`` (and the hold state is "on" -which is the default) then additional lines will be added to the list. -You can remove lines later simply by calling the list methods; either -of these will work:: - - del ax.lines[0] - ax.lines.remove(line) # one or the other, not both! - -The Axes also has helper methods to configure and decorate the x-axis -and y-axis tick, tick labels and axis labels:: - - xtext = ax.set_xlabel('my xdata') # returns a Text instance - ytext = ax.set_ylabel('my xdata') - -When you call :meth:`ax.set_xlabel `, -it passes the information on the :class:`~matplotlib.text.Text` -instance of the :class:`~matplotlib.axis.XAxis`. Each ``Axes`` -instance contains an :class:`~matplotlib.axis.XAxis` and a -:class:`~matplotlib.axis.YAxis` instance, which handle the layout and -drawing of the ticks, tick labels and axis labels. - -.. I'm commenting this out, since the new Sphinx cross-references -.. sort of take care of this above - MGD - -.. Here are the most important matplotlib modules that contain the -.. classes referenced above - -.. =============== ================== -.. Artist Module -.. =============== ================== -.. Artist matplotlib.artist -.. Rectangle matplotlib.patches -.. Line2D matplotlib.lines -.. Axes matplotlib.axes -.. XAxis and YAxis matplotlib.axis -.. Figure matplotlib.figure -.. Text matplotlib.text -.. =============== ================== - -Try creating the figure below. - -.. plot:: pyplots/fig_axes_labels_simple.py - -.. _customizing-artists: - -Customizing your objects -======================== - -Every element in the figure is represented by a matplotlib -:class:`~matplotlib.artist.Artist`, and each has an extensive list of -properties to configure its appearance. The figure itself contains a -:class:`~matplotlib.patches.Rectangle` exactly the size of the figure, -which you can use to set the background color and transparency of the -figures. Likewise, each :class:`~matplotlib.axes.Axes` bounding box -(the standard white box with black edges in the typical matplotlib -plot, has a ``Rectangle`` instance that determines the color, -transparency, and other properties of the Axes. These instances are -stored as member variables :attr:`Figure.patch -` and :attr:`Axes.patch -` ("Patch" is a name inherited from -MATLAB, and is a 2D "patch" of color on the figure, e.g., rectangles, -circles and polygons). Every matplotlib ``Artist`` has the following -properties - -========== ====================================================================== -Property Description -========== ====================================================================== -alpha The transparency - a scalar from 0-1 -animated A boolean that is used to facilitate animated drawing -axes The axes that the Artist lives in, possibly None -clip_box The bounding box that clips the Artist -clip_on Whether clipping is enabled -clip_path The path the artist is clipped to -contains A picking function to test whether the artist contains the pick point -figure The figure instance the artist lives in, possibly None -label A text label (e.g., for auto-labeling) -picker A python object that controls object picking -transform The transformation -visible A boolean whether the artist should be drawn -zorder A number which determines the drawing order -========== ====================================================================== - -Each of the properties is accessed with an old-fashioned setter or -getter (yes we know this irritates Pythonistas and we plan to support -direct access via properties or traits but it hasn't been done yet). -For example, to multiply the current alpha by a half:: - - a = o.get_alpha() - o.set_alpha(0.5*a) - -If you want to set a number of properties at once, you can also use -the ``set`` method with keyword arguments. For example:: - - o.set(alpha=0.5, zorder=2) - -If you are working interactively at the python shell, a handy way to -inspect the ``Artist`` properties is to use the -:func:`matplotlib.artist.getp` function (simply -:func:`~matplotlib.pylab.getp` in pylab), which lists the properties -and their values. This works for classes derived from ``Artist`` as -well, e.g., ``Figure`` and ``Rectangle``. Here are the ``Figure`` rectangle -properties mentioned above: - -.. sourcecode:: ipython - - In [149]: matplotlib.artist.getp(fig.patch) - alpha = 1.0 - animated = False - antialiased or aa = True - axes = None - clip_box = None - clip_on = False - clip_path = None - contains = None - edgecolor or ec = w - facecolor or fc = 0.75 - figure = Figure(8.125x6.125) - fill = 1 - hatch = None - height = 1 - label = - linewidth or lw = 1.0 - picker = None - transform = - verts = ((0, 0), (0, 1), (1, 1), (1, 0)) - visible = True - width = 1 - window_extent = - x = 0 - y = 0 - zorder = 1 - -.. TODO: Update these URLs - -The docstrings for all of the classes also contain the ``Artist`` -properties, so you can consult the interactive "help" or the -:ref:`artist-api` for a listing of properties for a given object. - -.. _object-containers: - -Object containers -================= - - -Now that we know how to inspect and set the properties of a given -object we want to configure, we need to now how to get at that object. -As mentioned in the introduction, there are two kinds of objects: -primitives and containers. The primitives are usually the things you -want to configure (the font of a :class:`~matplotlib.text.Text` -instance, the width of a :class:`~matplotlib.lines.Line2D`) although -the containers also have some properties as well -- for example the -:class:`~matplotlib.axes.Axes` :class:`~matplotlib.artist.Artist` is a -container that contains many of the primitives in your plot, but it -also has properties like the ``xscale`` to control whether the xaxis -is 'linear' or 'log'. In this section we'll review where the various -container objects store the ``Artists`` that you want to get at. - -.. _figure-container: - -Figure container -================ - -The top level container ``Artist`` is the -:class:`matplotlib.figure.Figure`, and it contains everything in the -figure. The background of the figure is a -:class:`~matplotlib.patches.Rectangle` which is stored in -:attr:`Figure.patch `. As -you add subplots (:meth:`~matplotlib.figure.Figure.add_subplot`) and -axes (:meth:`~matplotlib.figure.Figure.add_axes`) to the figure -these will be appended to the :attr:`Figure.axes -`. These are also returned by the -methods that create them: - -.. sourcecode:: ipython - - In [156]: fig = plt.figure() - - In [157]: ax1 = fig.add_subplot(211) - - In [158]: ax2 = fig.add_axes([0.1, 0.1, 0.7, 0.3]) - - In [159]: ax1 - Out[159]: - - In [160]: print fig.axes - [, ] - -Because the figure maintains the concept of the "current axes" (see -:meth:`Figure.gca ` and -:meth:`Figure.sca `) to support the -pylab/pyplot state machine, you should not insert or remove axes -directly from the axes list, but rather use the -:meth:`~matplotlib.figure.Figure.add_subplot` and -:meth:`~matplotlib.figure.Figure.add_axes` methods to insert, and the -:meth:`~matplotlib.figure.Figure.delaxes` method to delete. You are -free however, to iterate over the list of axes or index into it to get -access to ``Axes`` instances you want to customize. Here is an -example which turns all the axes grids on:: - - for ax in fig.axes: - ax.grid(True) - - -The figure also has its own text, lines, patches and images, which you -can use to add primitives directly. The default coordinate system for -the ``Figure`` will simply be in pixels (which is not usually what you -want) but you can control this by setting the transform property of -the ``Artist`` you are adding to the figure. - -.. TODO: Is that still true? - -More useful is "figure coordinates" where (0, 0) is the bottom-left of -the figure and (1, 1) is the top-right of the figure which you can -obtain by setting the ``Artist`` transform to :attr:`fig.transFigure -`: - -.. sourcecode:: ipython - - In [191]: fig = plt.figure() - - In [192]: l1 = matplotlib.lines.Line2D([0, 1], [0, 1], - transform=fig.transFigure, figure=fig) - - In [193]: l2 = matplotlib.lines.Line2D([0, 1], [1, 0], - transform=fig.transFigure, figure=fig) - - In [194]: fig.lines.extend([l1, l2]) - - In [195]: fig.canvas.draw() - -.. plot:: pyplots/fig_x.py - - -Here is a summary of the Artists the figure contains - -.. TODO: Add xrefs to this table - -================ =============================================================== -Figure attribute Description -================ =============================================================== -axes A list of Axes instances (includes Subplot) -patch The Rectangle background -images A list of FigureImages patches - useful for raw pixel display -legends A list of Figure Legend instances (different from Axes.legends) -lines A list of Figure Line2D instances (rarely used, see Axes.lines) -patches A list of Figure patches (rarely used, see Axes.patches) -texts A list Figure Text instances -================ =============================================================== - -.. _axes-container: - -Axes container -============== - -The :class:`matplotlib.axes.Axes` is the center of the matplotlib -universe -- it contains the vast majority of all the ``Artists`` used -in a figure with many helper methods to create and add these -``Artists`` to itself, as well as helper methods to access and -customize the ``Artists`` it contains. Like the -:class:`~matplotlib.figure.Figure`, it contains a -:class:`~matplotlib.patches.Patch` -:attr:`~matplotlib.axes.Axes.patch` which is a -:class:`~matplotlib.patches.Rectangle` for Cartesian coordinates and a -:class:`~matplotlib.patches.Circle` for polar coordinates; this patch -determines the shape, background and border of the plotting region:: - - ax = fig.add_subplot(111) - rect = ax.patch # a Rectangle instance - rect.set_facecolor('green') - -When you call a plotting method, e.g., the canonical -:meth:`~matplotlib.axes.Axes.plot` and pass in arrays or lists of -values, the method will create a :meth:`matplotlib.lines.Line2D` -instance, update the line with all the ``Line2D`` properties passed as -keyword arguments, add the line to the :attr:`Axes.lines -` container, and returns it to you: - -.. sourcecode:: ipython - - In [213]: x, y = np.random.rand(2, 100) - - In [214]: line, = ax.plot(x, y, '-', color='blue', linewidth=2) - -``plot`` returns a list of lines because you can pass in multiple x, y -pairs to plot, and we are unpacking the first element of the length -one list into the line variable. The line has been added to the -``Axes.lines`` list: - -.. sourcecode:: ipython - - In [229]: print ax.lines - [] - -Similarly, methods that create patches, like -:meth:`~matplotlib.axes.Axes.bar` creates a list of rectangles, will -add the patches to the :attr:`Axes.patches -` list: - -.. sourcecode:: ipython - - In [233]: n, bins, rectangles = ax.hist(np.random.randn(1000), 50, facecolor='yellow') - - In [234]: rectangles - Out[234]: - - In [235]: print len(ax.patches) - -You should not add objects directly to the ``Axes.lines`` or -``Axes.patches`` lists unless you know exactly what you are doing, -because the ``Axes`` needs to do a few things when it creates and adds -an object. It sets the figure and axes property of the ``Artist``, as -well as the default ``Axes`` transformation (unless a transformation -is set). It also inspects the data contained in the ``Artist`` to -update the data structures controlling auto-scaling, so that the view -limits can be adjusted to contain the plotted data. You can, -nonetheless, create objects yourself and add them directly to the -``Axes`` using helper methods like -:meth:`~matplotlib.axes.Axes.add_line` and -:meth:`~matplotlib.axes.Axes.add_patch`. Here is an annotated -interactive session illustrating what is going on: - -.. sourcecode:: ipython - - In [261]: fig = plt.figure() - - In [262]: ax = fig.add_subplot(111) - - # create a rectangle instance - In [263]: rect = matplotlib.patches.Rectangle( (1,1), width=5, height=12) - - # by default the axes instance is None - In [264]: print rect.get_axes() - None - - # and the transformation instance is set to the "identity transform" - In [265]: print rect.get_transform() - - - # now we add the Rectangle to the Axes - In [266]: ax.add_patch(rect) - - # and notice that the ax.add_patch method has set the axes - # instance - In [267]: print rect.get_axes() - Axes(0.125,0.1;0.775x0.8) - - # and the transformation has been set too - In [268]: print rect.get_transform() - - - # the default axes transformation is ax.transData - In [269]: print ax.transData - - - # notice that the xlimits of the Axes have not been changed - In [270]: print ax.get_xlim() - (0.0, 1.0) - - # but the data limits have been updated to encompass the rectangle - In [271]: print ax.dataLim.bounds - (1.0, 1.0, 5.0, 12.0) - - # we can manually invoke the auto-scaling machinery - In [272]: ax.autoscale_view() - - # and now the xlim are updated to encompass the rectangle - In [273]: print ax.get_xlim() - (1.0, 6.0) - - # we have to manually force a figure draw - In [274]: ax.figure.canvas.draw() - - -There are many, many ``Axes`` helper methods for creating primitive -``Artists`` and adding them to their respective containers. The table -below summarizes a small sampling of them, the kinds of ``Artist`` they -create, and where they store them - -============================== ==================== ======================= -Helper method Artist Container -============================== ==================== ======================= -ax.annotate - text annotations Annotate ax.texts -ax.bar - bar charts Rectangle ax.patches -ax.errorbar - error bar plots Line2D and Rectangle ax.lines and ax.patches -ax.fill - shared area Polygon ax.patches -ax.hist - histograms Rectangle ax.patches -ax.imshow - image data AxesImage ax.images -ax.legend - axes legends Legend ax.legends -ax.plot - xy plots Line2D ax.lines -ax.scatter - scatter charts PolygonCollection ax.collections -ax.text - text Text ax.texts -============================== ==================== ======================= - - -In addition to all of these ``Artists``, the ``Axes`` contains two -important ``Artist`` containers: the :class:`~matplotlib.axis.XAxis` -and :class:`~matplotlib.axis.YAxis`, which handle the drawing of the -ticks and labels. These are stored as instance variables -:attr:`~matplotlib.axes.Axes.xaxis` and -:attr:`~matplotlib.axes.Axes.yaxis`. The ``XAxis`` and ``YAxis`` -containers will be detailed below, but note that the ``Axes`` contains -many helper methods which forward calls on to the -:class:`~matplotlib.axis.Axis` instances so you often do not need to -work with them directly unless you want to. For example, you can set -the font size of the ``XAxis`` ticklabels using the ``Axes`` helper -method:: - - for label in ax.get_xticklabels(): - label.set_color('orange') - -Below is a summary of the Artists that the Axes contains - -============== ====================================== -Axes attribute Description -============== ====================================== -artists A list of Artist instances -patch Rectangle instance for Axes background -collections A list of Collection instances -images A list of AxesImage -legends A list of Legend instances -lines A list of Line2D instances -patches A list of Patch instances -texts A list of Text instances -xaxis matplotlib.axis.XAxis instance -yaxis matplotlib.axis.YAxis instance -============== ====================================== - -.. _axis-container: - -Axis containers -=============== - -The :class:`matplotlib.axis.Axis` instances handle the drawing of the -tick lines, the grid lines, the tick labels and the axis label. You -can configure the left and right ticks separately for the y-axis, and -the upper and lower ticks separately for the x-axis. The ``Axis`` -also stores the data and view intervals used in auto-scaling, panning -and zooming, as well as the :class:`~matplotlib.ticker.Locator` and -:class:`~matplotlib.ticker.Formatter` instances which control where -the ticks are placed and how they are represented as strings. - -Each ``Axis`` object contains a :attr:`~matplotlib.axis.Axis.label` attribute -(this is what :mod:`~matplotlib.pylab` modifies in calls to -:func:`~matplotlib.pylab.xlabel` and :func:`~matplotlib.pylab.ylabel`) as well -as a list of major and minor ticks. The ticks are -:class:`~matplotlib.axis.XTick` and :class:`~matplotlib.axis.YTick` instances, -which contain the actual line and text primitives that render the ticks and -ticklabels. Because the ticks are dynamically created as needed (e.g., when -panning and zooming), you should access the lists of major and minor ticks -through their accessor methods :meth:`~matplotlib.axis.Axis.get_major_ticks` -and :meth:`~matplotlib.axis.Axis.get_minor_ticks`. Although the ticks contain -all the primitives and will be covered below, the ``Axis`` methods contain -accessor methods to return the tick lines, tick labels, tick locations etc.: - -.. sourcecode:: ipython - - In [285]: axis = ax.xaxis - - In [286]: axis.get_ticklocs() - Out[286]: array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.]) - - In [287]: axis.get_ticklabels() - Out[287]: - - # note there are twice as many ticklines as labels because by - # default there are tick lines at the top and bottom but only tick - # labels below the xaxis; this can be customized - In [288]: axis.get_ticklines() - Out[288]: - - # by default you get the major ticks back - In [291]: axis.get_ticklines() - Out[291]: - - # but you can also ask for the minor ticks - In [292]: axis.get_ticklines(minor=True) - Out[292]: - -Here is a summary of some of the useful accessor methods of the ``Axis`` -(these have corresponding setters where useful, such as -set_major_formatter) - -====================== ========================================================= -Accessor method Description -====================== ========================================================= -get_scale The scale of the axis, eg 'log' or 'linear' -get_view_interval The interval instance of the axis view limits -get_data_interval The interval instance of the axis data limits -get_gridlines A list of grid lines for the Axis -get_label The axis label - a Text instance -get_ticklabels A list of Text instances - keyword minor=True|False -get_ticklines A list of Line2D instances - keyword minor=True|False -get_ticklocs A list of Tick locations - keyword minor=True|False -get_major_locator The matplotlib.ticker.Locator instance for major ticks -get_major_formatter The matplotlib.ticker.Formatter instance for major ticks -get_minor_locator The matplotlib.ticker.Locator instance for minor ticks -get_minor_formatter The matplotlib.ticker.Formatter instance for minor ticks -get_major_ticks A list of Tick instances for major ticks -get_minor_ticks A list of Tick instances for minor ticks -grid Turn the grid on or off for the major or minor ticks -====================== ========================================================= - -Here is an example, not recommended for its beauty, which customizes -the axes and tick properties - -.. plot:: pyplots/fig_axes_customize_simple.py - :include-source: - - -.. _tick-container: - -Tick containers -=============== - -The :class:`matplotlib.axis.Tick` is the final container object in our -descent from the :class:`~matplotlib.figure.Figure` to the -:class:`~matplotlib.axes.Axes` to the :class:`~matplotlib.axis.Axis` -to the :class:`~matplotlib.axis.Tick`. The ``Tick`` contains the tick -and grid line instances, as well as the label instances for the upper -and lower ticks. Each of these is accessible directly as an attribute -of the ``Tick``. In addition, there are boolean variables that determine -whether the upper labels and ticks are on for the x-axis and whether -the right labels and ticks are on for the y-axis. - -============== ========================================================== -Tick attribute Description -============== ========================================================== -tick1line Line2D instance -tick2line Line2D instance -gridline Line2D instance -label1 Text instance -label2 Text instance -gridOn boolean which determines whether to draw the tickline -tick1On boolean which determines whether to draw the 1st tickline -tick2On boolean which determines whether to draw the 2nd tickline -label1On boolean which determines whether to draw tick label -label2On boolean which determines whether to draw tick label -============== ========================================================== - -Here is an example which sets the formatter for the right side ticks with -dollar signs and colors them green on the right side of the yaxis - -.. plot:: pyplots/dollar_ticks.py - :include-source: diff --git a/doc/users/beginner.rst b/doc/users/beginner.rst deleted file mode 100644 index c895415c4ffd..000000000000 --- a/doc/users/beginner.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. _users-guide-index: - -################ -Beginner's Guide -################ - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 2 - - pyplot_tutorial.rst - style_sheets.rst - navigation_toolbar.rst - index_text.rst - image_tutorial.rst - legend_guide.rst - annotations_guide.rst - screenshots.rst - - - diff --git a/doc/users/configuration.rst b/doc/users/configuration.rst deleted file mode 100644 index 5d7a53ab87ad..000000000000 --- a/doc/users/configuration.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _users-guide-index: - -################### -Configuration Guide -################### - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 2 - - installing.rst - customizing.rst - shell.rst - - - diff --git a/doc/users/credits.rst b/doc/users/credits.rst index aa15928ebd57..b843f81ad5c1 100644 --- a/doc/users/credits.rst +++ b/doc/users/credits.rst @@ -5,215 +5,487 @@ Credits ******* -matplotlib was written by John Hunter and is now developed and -maintained by a number of `active -`_ developers. -The current co-lead developers of matplotlib are Michael Droettboom -and Thomas A. Caswell. - -Special thanks to those who have made valuable contributions (roughly -in order of first contribution by date). Any list like this is bound -to be incomplete and can't capture the thousands and thousands of -contributions over the years from these and others: - -Jeremy O'Donoghue - wrote the wx backend - -Andrew Straw - Provided much of the log scaling architecture, the fill command, PIL - support for imshow, and provided many examples. He also wrote the - support for dropped axis spines and the `buildbot - `_ unit testing infrastructure - which triggers the JPL/James Evans platform specific builds and - regression test image comparisons from svn matplotlib across - platforms on svn commits. - -Charles Twardy - provided the impetus code for the legend class and has made - countless bug reports and suggestions for improvement. - -Gary Ruben - made many enhancements to errorbar to support x and y - errorbar plots, and added a number of new marker types to plot. - -John Gill - wrote the table class and examples, helped with support for - auto-legend placement, and added support for legending scatter - plots. - -David Moore - wrote the paint backend (no longer used) - -Todd Miller - supported by `STSCI `_ contributed the TkAgg - backend and the numerix module, which allows matplotlib to work with - either numeric or numarray. He also ported image support to the - postscript backend, with much pain and suffering. - -Paul Barrett - supported by `STSCI `_ overhauled font - management to provide an improved, free-standing, platform - independent font manager with a WC3 compliant font finder and cache - mechanism and ported truetype and mathtext to PS. - -Perry Greenfield - supported by `STSCI `_ overhauled and - modernized the goals and priorities page, implemented an improved - colormap framework, and has provided many suggestions and a lot of - insight to the overall design and organization of matplotlib. - -Jared Wahlstrand - wrote the initial SVG backend. - -Steve Chaplin - served as the GTK maintainer and wrote the Cairo and - GTKCairo backends. - -Jim Benson - provided the patch to handle vertical mathttext. - -Gregory Lielens - provided the FltkAgg backend and several patches for the frontend, - including contributions to toolbar2, and support for log ticking - with alternate bases and major and minor log ticking. - -Darren Dale - - did the work to do mathtext exponential labeling for log plots, - added improved support for scalar formatting, and did the lions - share of the `psfrag - `_ - LaTeX support for postscript. He has made substantial contributions - to extending and maintaining the PS and Qt backends, and wrote the - site.cfg and matplotlib.conf build and runtime configuration - support. He setup the infrastructure for the sphinx documentation - that powers the mpl docs. - -Paul Mcguire - provided the pyparsing module on which mathtext relies, and made a - number of optimizations to the matplotlib mathtext grammar. - - -Fernando Perez - has provided numerous bug reports and patches for cleaning up - backend imports and expanding pylab functionality, and provided - matplotlib support in the pylab mode for `ipython - `_. He also provided the - :func:`~matplotlib.pyplot.matshow` command, and wrote TConfig, which - is the basis for the experimental traited mpl configuration. - -Andrew Dalke - of `Dalke Scientific Software `_ contributed the - strftime formatting code to handle years earlier than 1900. - -Jochen Voss - served as PS backend maintainer and has contributed several - bugfixes. - -Nadia Dencheva - - supported by `STSCI `_ provided the contouring and - contour labeling code. - -Baptiste Carvello - provided the key ideas in a patch for proper - shared axes support that underlies ganged plots and multiscale - plots. - -Jeffrey Whitaker - at `NOAA `_ wrote the - :ref:`toolkit_basemap` toolkit - -Sigve Tjoraand, Ted Drain, James Evans - and colleagues at the `JPL `_ collaborated - on the QtAgg backend and sponsored development of a number of - features including custom unit types, datetime support, scale free - ellipses, broken bar plots and more. The JPL team wrote the unit - testing image comparison `infrastructure - `_ - for regression test image comparisons. - -James Amundson - did the initial work porting the qt backend to qt4 - -Eric Firing - has contributed significantly to contouring, masked - array, pcolor, image and quiver support, in addition to ongoing - support and enhancements in performance, design and code quality in - most aspects of matplotlib. - -Daishi Harada - added support for "Dashed Text". See `dashpointlabel.py - <../examples/pylab_examples/dashpointlabel.html>`_ and - :class:`~matplotlib.text.TextWithDash`. - -Nicolas Young - added support for byte images to imshow, which are - more efficient in CPU and memory, and added support for irregularly - sampled images. - -The `brainvisa `_ Orsay team and Fernando Perez - added Qt support to `ipython `_ in pylab mode. - - -Charlie Moad - contributed work to matplotlib's Cocoa support and has done a lot of work on the OSX and win32 binary releases. - -Jouni K. Seppänen - wrote the PDF backend and contributed numerous - fixes to the code, to tex support and to the get_sample_data handler - -Paul Kienzle - improved the picking infrastructure for interactive plots, and with - Alex Mont contributed fast rendering code for quadrilateral meshes. - -Michael Droettboom - supported by `STSCI `_ wrote the enhanced - mathtext support, implementing Knuth's box layout algorithms, saving - to file-like objects across backends, and is responsible for - numerous bug-fixes, much better font and unicode support, and - feature and performance enhancements across the matplotlib code - base. He also rewrote the transformation infrastructure to support - custom projections and scales. - -John Porter, Jonathon Taylor and Reinier Heeres - John Porter wrote the mplot3d module for basic 3D plotting in - matplotlib, and Jonathon Taylor and Reinier Heeres ported it to the - refactored transform trunk. - -Jae-Joon Lee - Implemented fancy arrows and boxes, rewrote the legend - support to handle multiple columns and fancy text boxes, wrote the - axes grid toolkit, and has made numerous contributions to the code - and documentation - -Paul Ivanov - Has worked on getting matplotlib integrated better with other tools, - such as Sage and IPython, and getting the test infrastructure - faster, lighter and meaner. Listen to his podcast. - -Tony Yu - Has been involved in matplotlib since the early days, and recently - has contributed stream plotting among many other improvements. He - is the author of mpltools. - -Michiel de Hoon - Wrote and maintains the macosx backend. - -Ian Thomas - Contributed, among other things, the triangulation (tricolor and - tripcontour) methods. - -Benjamin Root - Has significantly improved the capabilities of the 3D plotting. He - has improved matplotlib's documentation and code quality throughout, - and does invaluable triaging of pull requests and bugs. - -Phil Elson - Fixed some deep-seated bugs in the transforms framework, and has - been laser-focused on improving polish throughout matplotlib, - tackling things that have been considered to large and daunting for - a long time. - -Damon McDougall - Added triangulated 3D surfaces and stack plots to matplotlib. +Matplotlib was written by John D. Hunter, with contributions from +an ever-increasing number of users and developers. +The current co-lead developers are Michael Droettboom +and Thomas A. Caswell; they are assisted by many +`active +`_ developers. + +The following is a list of contributors extracted from the +git revision control history of the project: + +4over7, +Aaron Boushley, +Acanthostega, +Adam Ginsburg, +Adam Heck, +Adam Ortiz, +Adrian Price-Whelan, +Adrien F. Vincent, +Ahmet Bakan, +Alan Du, +Alejandro Dubrovsky, +Alex C. Szatmary, +Alex Loew, +Alexander Taylor, +Alexei Colin, +Ali Mehdi, +Alistair Muldal, +Allan Haldane, +Amit Aronovitch, +Amy, +AmyTeegarden, +Andrea Bedini, +Andreas Hilboll, +Andreas Wallner, +Andrew Dawson, +Andrew Merrill, +Andrew Straw, +Andy Zhu, +Anton Akhmerov, +Antony Lee, +Arie, +Ariel Hernán Curiale, +Arnaud Gardelein, +Arpad Horvath, +Aseem Bansal, +Behram Mistree, +Ben Cohen, +Ben Gamari, +Ben Keller, +Ben Root, +Benjamin Reedlunn, +Binglin Chang, +Bradley M. Froehle, +Brandon Liu, +Brett Cannon, +Brett Graham, +Brian Mattern, +Brian McLaughlin, +Bruno Beltran, +CJ Carey, +Cameron Bates, +Cameron Davidson-Pilon, +Carissa Brittain, +Carl Michal, +Carwyn Pelley, +Casey Webster, +Casper van der Wel, +Charles Moad, +Chris Beaumont, +Chris G, +Christian Brueffer, +Christian Stade-Schuldt, +Christoph Dann, +Christoph Gohlke, +Christoph Hoffmann, +Cimarron Mittelsteadt, +Corey Farwell, +Craig M, +Craig Tenney, +Damon McDougall, +Dan Hickstein, +Daniel Hyams, +Daniel O'Connor, +Dara Adib, +Darren Dale, +David Anderson, +David Haberthür, +David Huard, +David Kaplan, +David Kua, +David Trémouilles, +Dean Malmgren, +Dmitry Lupyan, +DonaldSeo, +Dora Fraeman, +Duncan Macleod, +Edin Salkovic, +Elena Glassman, +Elias Pipping, +Elliott Sales de Andrade, +Emil Mikulic, +Eric Dill, +Eric Firing, +Eric Ma, +Eric O. LEBIGOT (EOL), +Erik Bray, +Eugen Beck, +Eugene Yurtsev, +Evan Davey, +Ezra Peisach, +Fabien Maussion, +Fabio Zanini, +Federico Ariza, +Felipe, +Fernando Perez, +Filipe Fernandes, +Florian Rhiem, +Francesco Montesano, +Francis Colas, +François Magimel, +Gaute Hope, +Gellule Xg, +Geoffroy Billotey, +Gerald Storer, +Giovanni, +Graham Poulter, +Gregory Ashton, +Gregory R. Lee, +Grégory Lielens, +Guillaume Gay, +Gustavo Braganca, +Hans Dembinski, +Hans Meine, +Hans Moritz Günther, +Hassan Kibirige, +Holger Peters, +Hubert Holin, +Ian Thomas, +Ignas Anikevicius (gns_ank), +Ilia Kurenkov, +Ioannis Filippidis, +Ismo Toijala, +J. Goutin, +Jack Kelly, +Jae-Joon Lee, +Jaime Fernandez, +Jake Vanderplas, +James A. Bednar, +James Pallister, +James R. Evans, +JamesMakela, +Jan Schulz, +Jan-Philip Gehrcke, +Jan-willem De Bleser, +Jarrod Millman, +Jascha Ulrich, +Jason Grout, +Jason Liw Yan Chong, +Jason Miller, +JayP16, +Jeff Lutgen, +Jeff Whitaker, +Jeffrey Bingham, +Jens Hedegaard Nielsen, +Jeremy Fix, +Jeremy O'Donoghue, +Jeremy Thurgood, +Jessica B. Hamrick, +Jim Radford, +Jochen Voss, +Jody Klymak, +Joe Kington, +Joel B. Mohler, +John Hunter, +Jonathan Waltman, +Jorrit Wronski, +Josef Heinen, +Joseph Jon Booker, +José Ricardo, +Jouni K. Seppänen, +Julian Mehne, +Julian Taylor, +JulianCienfuegos, +Julien Lhermitte, +Julien Schueller, +Julien Woillez, +Julien-Charles Lévesque, +Kanwar245, +Katy Huff, +Ken McIvor, +Kevin Chan, +Kevin Davies, +Kevin Keating, +Kimmo Palin, +Konrad Förstner, +Konstantin Tretyakov, +Kristen M. Thyng, +Lance Hepler, +Larry Bradley, +Leeonadoh, +Lennart Fricke, +Leo Singer, +Levi Kilcher, +Lion Krischer, +Lodato Luciano, +Lori J, +Loïc Estève, +Loïc Séguin-C, +Magnus Nord, +Majid alDosari, +Maksym P, +Manuel GOACOLOU, +Manuel Metz, +Marc Abramowitz, +Marcos Duarte, +Marek Rudnicki, +Marianne Corvellec, +Marin Gilles, +Markus Roth, +Markus Rothe, +Martin Dengler, +Martin Fitzpatrick, +Martin Spacek, +Martin Teichmann, +Martin Thoma, +Martin Ueding, +Masud Rahman, +Mathieu Duponchelle, +Matt Giuca, +Matt Klein, +Matt Li, +Matt Newville, +Matt Shen, +Matt Terry, +Matthew Brett, +Matthew Emmett, +Matthias Bussonnier, +Matthieu Caneill, +Matěj Týč, +Maximilian Albert, +Maximilian Trescher, +Mellissa Cross, +Michael, +Michael Droettboom, +Michael Sarahan, +Michael Welter, +Michiel de Hoon, +Michka Popoff, +Mike Kaufman, +Mikhail Korobov, +MinRK, +Minty Zhang, +MirandaXM, +Miriam Sierig, +Muhammad Mehdi, +Neil, +Neil Crighton, +Nelle Varoquaux, +Niall Robinson, +Nic Eggert, +Nicholas Devenish, +Nick Semenkovich, +Nicolas P. Rougier, +Nicolas Pinto, +Nikita Kniazev, +Niklas Koep, +Nikolay Vyahhi, +Norbert Nemec, +OceanWolf, +Oleg Selivanov, +Olga Botvinnik, +Oliver Willekens, +Parfenov Sergey, +Pascal Bugnion, +Patrick Chen, +Patrick Marsh, +Paul, +Paul Barret, +Paul G, +Paul Hobson, +Paul Ivanov, +Pauli Virtanen, +Per Parker, +Perry Greenfield, +Pete Bachant, +Peter Iannucci, +Peter St. John, +Peter Würtz, +Phil Elson, +Pierre Haessig, +Pim Schellart, +Piti Ongmongkolkul, +Puneeth Chaganti, +Ramiro Gómez, +Randy Olson, +Reinier Heeres, +Remi Rampin, +Richard Hattersley, +Richard Trieu, +Ricky, +Robert Johansson, +Robin Dunn, +Rohan Walker, +Roland Wirth, +Russell Owen, +RutgerK, +Ryan Blomberg, +Ryan D'Souza, +Ryan Dale, +Ryan May, +Ryan Nelson, +RyanPan, +Salil Vanvari, +Sameer D'Costa, +Sandro Tosi, +Scott Lasley, +Scott Lawrence, +Scott Stevenson, +Sebastian Pinnau, +Sebastian Raschka, +Sergey Kholodilov, +Sergey Koposov, +Silviu Tantos, +Simon Cross, +Simon Gibbons, +Skelpdar, +Skipper Seabold, +Slav Basharov, +Spencer McIntyre, +Stanley, Simon, +Stefan Lehmann, +Stefan van der Walt, +Stefano Rivera, +Stephen Horst, +Sterling Smith, +Steve Chaplin, +Steven Silvester, +Stuart Mumford, +Takafumi Arakaki, +Takeshi Kanmae, +Tamas Gal, +Thomas A Caswell, +Thomas Hisch, +Thomas Kluyver, +Thomas Lake, +Thomas Robitaille, +Thomas Spura, +Till Stensitzki, +Timo Vanwynsberghe, +Tobias Hoppe, +Tobias Megies, +Todd Jennings, +Todd Miller, +Tomas Kazmar, +Tony S Yu, +Tor Colvin, +Travis Oliphant, +Trevor Bekolay, +Ulrich Dobramysl, +Umair Idris, +Vadim Markovtsev, +Valentin Haenel, +Victor Zabalza, +Viktor Kerkez, +Vlad Seghete, +Víctor Terrón, +Víctor Zabalza, +Wen Li, +Wendell Smith, +Werner F Bruhin, +Wes Campaigne, +Wieland Hoffmann, +William Manley, +Wouter Overmeire, +Xiaowen Tang, +Yann Tambouret, +Yaron de Leeuw, +Yu Feng, +Yunfei Yang, +Yuri D'Elia, +Yuval Langer, +Zach Pincus, +Zair Mubashar, +alex, +anykraus, +arokem, +aseagram, +aszilagyi, +bblay, +bev-a-tron, +blackw1ng, +blah blah, +burrbull, +butterw, +cammil, +captainwhippet, +chadawagner, +chebee7i, +danielballan, +davidovitch, +daydreamt, +domspad, +donald, +drevicko, +e-q, +elpres, +endolith, +fardal, +ffteja, +fgb, +fibersnet, +frenchwr, +fvgoto, +gitj, +gluap, +goir, +hugadams, +insertroar, +itziakos, +jbbrokaw, +juan.gonzalez, +kcrisman, +kelsiegr, +khyox, +kikocorreoso, +kramer65, +kshramt, +lichri12, +limtaesu, +marky, +masamson, +mbyt, +mcelrath, +mdipierro, +mrkrd, +nickystringer, +nwin, +pkienzle, +profholzer, +pupssman, +rahiel, +rhoef, +rsnape, +s9w, +sdementen, +sfroid, +sohero, +spiessbuerger, +stahlous, +switham, +syngron, +torfbolt, +u55, +ugurthemaster, +vbr, +xbtsw, +and xuanyuansen. + +Some earlier contributors not included above are (with apologies +to any we have missed): + +Charles Twardy, +Gary Ruben, +John Gill, +David Moore, +Paul Barrett, +Jared Wahlstrand, +Jim Benson, +Paul Mcguire, +Andrew Dalke, +Nadia Dencheva, +Baptiste Carvello, +Sigve Tjoraand, +Ted Drain, +James Amundson, +Daishi Harada, +Nicolas Young, +Paul Kienzle, +John Porter, +and Jonathon Taylor. + +We also thank all who have reported bugs, commented on +proposed changes, or otherwise contributed to Matplotlib's +development and usefulness. diff --git a/doc/users/customizing.rst b/doc/users/customizing.rst deleted file mode 100644 index a6b483cca46b..000000000000 --- a/doc/users/customizing.rst +++ /dev/null @@ -1,86 +0,0 @@ -.. _customizing-matplotlib: - -********************** -Customizing matplotlib -********************** - -.. _customizing-with-matplotlibrc-files: - -The :file:`matplotlibrc` file -============================= - -matplotlib uses :file:`matplotlibrc` configuration files to customize all kinds -of properties, which we call `rc settings` or `rc parameters`. You can control -the defaults of almost every property in matplotlib: figure size and dpi, line -width, color and style, axes, axis and grid properties, text and font -properties and so on. matplotlib looks for :file:`matplotlibrc` in three -locations, in the following order: - -1. :file:`matplotlibrc` in the current working directory, usually used for - specific customizations that you do not want to apply elsewhere. - -2. It next looks in a user-specific place, depending on your platform: - - - On Linux, it looks in :file:`.config/matplotlib/matplotlibrc` (or - `$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized - your environment. - - - On other platforms, it looks in :file:`.matplotlib/matplotlibrc`. - - See :ref:`locating-matplotlib-config-dir`. - -3. :file:`{INSTALL}/matplotlib/mpl-data/matplotlibrc`, where - :file:`{INSTALL}` is something like - :file:`/usr/lib/python2.5/site-packages` on Linux, and maybe - :file:`C:\\Python25\\Lib\\site-packages` on Windows. Every time you - install matplotlib, this file will be overwritten, so if you want - your customizations to be saved, please move this file to your - user-specific matplotlib directory. - -To display where the currently active :file:`matplotlibrc` file was -loaded from, one can do the following:: - - >>> import matplotlib - >>> matplotlib.matplotlib_fname() - '/home/foo/.config/matplotlib/matplotlibrc' - -See below for a sample :ref:`matplotlibrc file`. - -.. _customizing-with-dynamic-rc-settings: - -Dynamic rc settings -=================== - -You can also dynamically change the default rc settings in a python script or -interactively from the python shell. All of the rc settings are stored in a -dictionary-like variable called :data:`matplotlib.rcParams`, which is global to -the matplotlib package. rcParams can be modified directly, for example:: - - import matplotlib as mpl - mpl.rcParams['lines.linewidth'] = 2 - mpl.rcParams['lines.color'] = 'r' - -Matplotlib also provides a couple of convenience functions for modifying rc -settings. The :func:`matplotlib.rc` command can be used to modify multiple -settings in a single group at once, using keyword arguments:: - - import matplotlib as mpl - mpl.rc('lines', linewidth=2, color='r') - -The :func:`matplotlib.rcdefaults` command will restore the standard matplotlib -default settings. - -There is some degree of validation when setting the values of rcParams, see -:mod:`matplotlib.rcsetup` for details. - - -.. _matplotlibrc-sample: - -A sample matplotlibrc file --------------------------------------------------------------------- - -.. htmlonly:: - - `(download) <../_static/matplotlibrc>`__ - -.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc diff --git a/doc/users/developer.rst b/doc/users/developer.rst deleted file mode 100644 index 88b83ea3a542..000000000000 --- a/doc/users/developer.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. _users-guide-index: - -############### -Advanced Guide -############### - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 2 - - artists.rst - gridspec.rst - tight_layout_guide.rst - event_handling.rst - transforms_tutorial.rst - path_tutorial.rst - recipes.rst - diff --git a/doc/users/dflt_style_changes.rst b/doc/users/dflt_style_changes.rst new file mode 100644 index 000000000000..f2a7badf6f2c --- /dev/null +++ b/doc/users/dflt_style_changes.rst @@ -0,0 +1,1230 @@ +============================== + Changes to the default style +============================== + +The most important changes in matplotlib 2.0 are the changes to the +default style. + +While it is impossible to select the best default for all cases, these +are designed to work well in the most common cases. + +A 'classic' style sheet is provided so reverting to the 1.x default +values is a single line of python + +.. code:: + + import matplotlib.style + import matplotlib as mpl + mpl.style.use('classic') + +See :ref:`customizing-with-matplotlibrc-files` for details about how to +persistently and selectively revert many of these changes. + + +.. contents:: Table of Contents + :depth: 2 + :local: + :backlinks: entry + + + +Colors, color cycles, and color maps +==================================== + +Colors in default property cycle +-------------------------------- + +The colors in the default property cycle have been changed from +``['b', 'g', 'r', 'c', 'm', 'y', 'k']`` to the category10 +color palette used by `Vega +`__ and +`d3 +`__ +originally developed at Tableau. + + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + th = np.linspace(0, 2*np.pi, 512) + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) + + + def color_demo(ax, colors, title): + ax.set_title(title) + for j, c in enumerate(colors): + v_offset = -(j / len(colors)) + ax.plot(th, .1*np.sin(th) + v_offset, color=c) + ax.annotate("'C{}'".format(j), (0, v_offset), + xytext=(-1.5, 0), + ha='right', + va='center', + color=c, + textcoords='offset points', + family='monospace') + + ax.annotate("{!r}".format(c), (2*np.pi, v_offset), + xytext=(1.5, 0), + ha='left', + va='center', + color=c, + textcoords='offset points', + family='monospace') + ax.axis('off') + + old_colors = ['b', 'g', 'r', 'c', 'm', 'y', 'k'] + + new_colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', + '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', + '#bcbd22', '#17becf'] + + color_demo(ax1, old_colors, 'classic') + color_demo(ax2, new_colors, 'v2.0') + + fig.subplots_adjust(**{'bottom': 0.0, 'left': 0.059, + 'right': 0.869, 'top': 0.895}) + +In addition to changing the colors, an additional method to specify +colors was added. Previously, the default colors were the single +character short-hand notations for red, green, blue, cyan, magenta, +yellow, and black. This made them easy to type and usable in the +abbreviated style string in ``plot``, however the new default colors +are only specified via hex values. To access these colors outside of +the property cycling the notation for colors ``'CN'``, where ``N`` +takes values 0-9, was added to +denote the first 10 colors in ``mpl.rcParams['axes.prop_cycle']`` See +:ref:`sphx_glr_tutorials_colors_colors.py` for more details. + +To restore the old color cycle use + +.. code:: + + from cycler import cycler + mpl.rcParams['axes.prop_cycle'] = cycler(color='bgrcmyk') + +or set + +.. code:: + + axes.prop_cycle : cycler('color', 'bgrcmyk') + +in your :file:`matplotlibrc` file. + + +Colormap +-------- + +The new default color map used by `matplotlib.cm.ScalarMappable` instances is + `'viridis'` (aka `option D `__). + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + N = M = 200 + X, Y = np.ogrid[0:20:N*1j, 0:20:M*1j] + data = np.sin(np.pi * X*2 / 20) * np.cos(np.pi * Y*2 / 20) + + fig, (ax2, ax1) = plt.subplots(1, 2, figsize=(7, 3)) + im = ax1.imshow(data, extent=[0, 200, 0, 200]) + ax1.set_title("v2.0: 'viridis'") + fig.colorbar(im, ax=ax1, shrink=0.8) + + im2 = ax2.imshow(data, extent=[0, 200, 0, 200], cmap='jet') + fig.colorbar(im2, ax=ax2, shrink=0.8) + ax2.set_title("classic: 'jet'") + + fig.tight_layout() + +For an introduction to color theory and how 'viridis' was generated +watch Nathaniel Smith and Stéfan van der Walt's talk from SciPy2015. +See `here for many more details `__ +about the other alternatives and the tools used to create the color +map. For details on all of the color maps available in matplotlib see +:ref:`sphx_glr_tutorials_colors_colormaps.py`. + +.. raw:: html + + + + +The previous default can be restored using + +.. code:: + + mpl.rcParams['image.cmap'] = 'jet' + +or setting + +.. code:: + + image.cmap : 'jet' + +in your :file:`matplotlibrc` file; however this is strongly discouraged. + +Interactive figures +------------------- + +The default interactive figure background color has changed from grey +to white, which matches the default background color used when saving. + +The previous defaults can be restored by :: + + mpl.rcParams['figure.facecolor'] = '0.75' + +or by setting :: + + + figure.facecolor : '0.75' + +in your :file:`matplotlibrc` file. + + +Grid lines +---------- + +The default style of grid lines was changed from black dashed lines to thicker +solid light grey lines. + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) + + ax1.grid(color='k', linewidth=.5, linestyle=':') + ax1.set_title('classic') + + ax2.grid() + ax2.set_title('v2.0') + +The previous default can be restored by using:: + + mpl.rcParams['grid.color'] = 'k' + mpl.rcParams['grid.linestyle'] = ':' + mpl.rcParams['grid.linewidth'] = 0.5 + +or by setting:: + + grid.color : k # grid color + grid.linestyle : : # dotted + grid.linewidth : 0.5 # in points + +in your :file:`matplotlibrc` file. + + +Figure size, font size, and screen dpi +====================================== + +The default dpi used for on-screen display was changed from 80 dpi to +100 dpi, the same as the default dpi for saving files. Due to this +change, the on-screen display is now more what-you-see-is-what-you-get +for saved files. To keep the figure the same size in terms of pixels, in +order to maintain approximately the same size on the screen, the +default figure size was reduced from 8x6 inches to 6.4x4.8 inches. As +a consequence of this the default font sizes used for the title, tick +labels, and axes labels were reduced to maintain their size relative +to the overall size of the figure. By default the dpi of the saved +image is now the dpi of the `~matplotlib.figure.Figure` instance being +saved. + +This will have consequences if you are trying to match text in a +figure directly with external text. + + +The previous defaults can be restored by :: + + mpl.rcParams['figure.figsize'] = [8.0, 6.0] + mpl.rcParams['figure.dpi'] = 80 + mpl.rcParams['savefig.dpi'] = 100 + + mpl.rcParams['font.size'] = 12 + mpl.rcParams['legend.fontsize'] = 'large' + mpl.rcParams['figure.titlesize'] = 'medium' + +or by setting:: + + figure.figsize : [8.0, 6.0] + figure.dpi : 80 + savefig.dpi : 100 + + font.size : 12.0 + legend.fontsize : 'large' + figure.titlesize : 'medium' + +In your :file:`matplotlibrc` file. + +In addition, the ``forward`` kwarg to +`~matplotlib.Figure.set_size_inches` now defaults to `True` to improve +the interactive experience. Backend canvases that adjust the size of +their bound `matplotlib.figure.Figure` must pass ``forward=False`` to +avoid circular behavior. This default is not configurable. + + +Plotting functions +================== + +``scatter`` +----------- + +The following changes were made to the default behavior of +`~matplotlib.axes.Axes.scatter` + + - The default size of the elements in a scatter plot is now based on + the rcParam ``lines.markersize`` so it is consistent with ``plot(X, + Y, 'o')``. The old value was 20, and the new value is 36 (6^2). + - scatter markers no longer have a black edge. + - if the color of the markers is not specified it will follow the + property cycle, pulling from the 'patches' cycle on the ``Axes``. + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + np.random.seed(2) + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) + + x = np.arange(15) + y = np.random.rand(15) + y2 = np.random.rand(15) + ax1.scatter(x, y, s=20, edgecolors='k', c='b', label='a') + ax1.scatter(x, y2, s=20, edgecolors='k', c='b', label='b') + ax1.legend() + ax1.set_title('classic') + + ax2.scatter(x, y, label='a') + ax2.scatter(x, y2, label='b') + ax2.legend() + ax2.set_title('v2.0') + + +The classic default behavior of `~matplotlib.axes.Axes.scatter` can +only be recovered through ``mpl.style.use('classic')``. The marker size +can be recovered via :: + + mpl.rcParam['lines.markersize'] = np.sqrt(20) + +however, this will also affect the default marker size of +`~matplotlib.axes.Axes.plot`. To recover the classic behavior on +a per-call basis pass the following kwargs:: + + classic_kwargs = {'s': 20, 'edgecolors': 'k', 'c': 'b'} + +``plot`` +-------- + +The following changes were made to the default behavior of +`~matplotlib.axes.Axes.plot` + + - the default linewidth increased from 1 to 1.5 + - the dash patterns associated with ``'--'``, ``':'``, and ``'-.'`` have + changed + - the dash patterns now scale with line width + + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + import matplotlib as mpl + from cycler import cycler + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) + + N = 15 + + x = np.arange(N) + y = np.ones_like(x) + + sty_cycle = (cycler('ls', ['--' ,':', '-.']) * + cycler('lw', [None, 1, 2, 5])) + + classic = { + 'lines.linewidth': 1.0, + 'lines.dashed_pattern' : [6, 6], + 'lines.dashdot_pattern' : [3, 5, 1, 5], + 'lines.dotted_pattern' : [1, 3], + 'lines.scale_dashes': False} + + v2 = {} + # {'lines.linewidth': 1.5, + # 'lines.dashed_pattern' : [2.8, 1.2], + # 'lines.dashdot_pattern' : [4.8, 1.2, 0.8, 1.2], + # 'lines.dotted_pattern' : [1.1, 1.1], + # 'lines.scale_dashes': True} + + def demo(ax, rcparams, title): + ax.axis('off') + ax.set_title(title) + with mpl.rc_context(rc=rcparams): + for j, sty in enumerate(sty_cycle): + ax.plot(x, y + j, **sty) + + demo(ax1, classic, 'classic') + demo(ax2, {}, 'v2.0') + + +The previous defaults can be restored by setting:: + + mpl.rcParams['lines.linewidth'] = 1.0 + mpl.rcParams['lines.dashed_pattern'] = [6, 6] + mpl.rcParams['lines.dashdot_pattern'] = [3, 5, 1, 5] + mpl.rcParams['lines.dotted_pattern'] = [1, 3] + mpl.rcParams['lines.scale_dashes'] = False + +or by setting:: + + lines.linewidth : 1.0 + lines.dashed_pattern : 6, 6 + lines.dashdot_pattern : 3, 5, 1, 5 + lines.dotted_pattern : 1, 3 + lines.scale_dashes: False + +in your :file:`matplotlibrc` file. + +``errorbar`` +------------ + +By default, caps on the ends of errorbars are not present. + +.. plot:: + + import matplotlib as mpl + import matplotlib.pyplot as plt + import numpy as np + + # example data + x = np.arange(0.1, 4, 0.5) + y = np.exp(-x) + + # example variable error bar values + yerr = 0.1 + 0.2*np.sqrt(x) + xerr = 0.1 + yerr + + def demo(ax, rc, title): + with mpl.rc_context(rc=rc): + ax.errorbar(x, y, xerr=0.2, yerr=0.4) + ax.set_title(title) + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3), tight_layout=True) + + demo(ax1, {'errorbar.capsize': 3}, 'classic') + demo(ax2, {}, 'v2.0') + +This also changes the return value of +:meth:`~matplotlib.axes.Axes.errorbar` as the list of 'caplines' will +be empty by default. + +The previous defaults can be restored by setting:: + + mpl.rcParams['errorbar.capsize'] = 3 + +or by setting :: + + errorbar.capsize : 3 + +in your :file:`matplotlibrc` file. + + +``boxplot`` +----------- + +Previously, boxplots were composed of a mish-mash of styles that were, for +better for worse, inherited from Matlab. Most of the elements were blue, +but the medians were red. The fliers (outliers) were black plus-symbols +(`+`) and the whiskers were dashed lines, which created ambiguity if +the (solid and black) caps were not drawn. + +For the new defaults, everything is black except for the median and mean +lines (if drawn), which are set to the first two elements of the current +color cycle. Also, the default flier markers are now hollow circles, +which maintain the ability of the plus-symbols to overlap without +obscuring data too much. + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + data = np.random.lognormal(size=(37, 4)) + fig, (old, new) = plt.subplots(ncols=2, sharey=True) + with plt.style.context('default'): + new.boxplot(data, labels=['A', 'B', 'C', 'D']) + new.set_title('v2.0') + + with plt.style.context('classic'): + old.boxplot(data, labels=['A', 'B', 'C', 'D']) + old.set_title('classic') + + new.set_yscale('log') + old.set_yscale('log') + +The previous defaults can be restored by setting:: + + mpl.rcParams['boxplot.flierprops.color'] = 'k' + mpl.rcParams['boxplot.flierprops.marker'] = '+' + mpl.rcParams['boxplot.flierprops.markerfacecolor'] = 'none' + mpl.rcParams['boxplot.flierprops.markeredgecolor'] = 'k' + mpl.rcParams['boxplot.boxprops.color'] = 'b' + mpl.rcParams['boxplot.whiskerprops.color'] = 'b' + mpl.rcParams['boxplot.whiskerprops.linestyle'] = '--' + mpl.rcParams['boxplot.medianprops.color'] = 'r' + mpl.rcParams['boxplot.meanprops.color'] = 'r' + mpl.rcParams['boxplot.meanprops.marker'] = '^' + mpl.rcParams['boxplot.meanprops.markerfacecolor'] = 'r' + mpl.rcParams['boxplot.meanprops.markeredgecolor'] = 'k' + mpl.rcParams['boxplot.meanprops.markersize'] = 6 + mpl.rcParams['boxplot.meanprops.linestyle'] = '--' + mpl.rcParams['boxplot.meanprops.linewidth'] = 1.0 + +or by setting:: + + boxplot.flierprops.color: 'k' + boxplot.flierprops.marker: '+' + boxplot.flierprops.markerfacecolor: 'none' + boxplot.flierprops.markeredgecolor: 'k' + boxplot.boxprops.color: 'b' + boxplot.whiskerprops.color: 'b' + boxplot.whiskerprops.linestyle: '--' + boxplot.medianprops.color: 'r' + boxplot.meanprops.color: 'r' + boxplot.meanprops.marker: '^' + boxplot.meanprops.markerfacecolor: 'r' + boxplot.meanprops.markeredgecolor: 'k' + boxplot.meanprops.markersize: 6 + boxplot.meanprops.linestyle: '--' + boxplot.meanprops.linewidth: 1.0 + +in your :file:`matplotlibrc` file. + + +``fill_between`` and ``fill_betweenx`` +-------------------------------------- + +`~matplotlib.axes.Axes.fill_between` and +`~matplotlib.axes.Axes.fill_betweenx` both follow the patch color +cycle. + +.. plot:: + + import matplotlib.pyplot as plt + import numpy as np + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3)) + fig.subplots_adjust(wspace=0.3) + th = np.linspace(0, 2*np.pi, 128) + N = 5 + + def demo(ax, extra_kwargs, title): + ax.set_title(title) + return [ax.fill_between(th, np.sin((j / N) * np.pi + th), alpha=.5, **extra_kwargs) + for j in range(N)] + + demo(ax1, {'facecolor': 'C0'}, 'classic') + demo(ax2, {}, 'v2.0') + + +If the facecolor is set via the ``facecolors`` or ``color`` keyword argument, +then the color is not cycled. + +To restore the previous behavior, explicitly pass the keyword argument +``facecolors='C0'`` to the method call. + + +Patch edges and color +--------------------- + +Most artists drawn with a patch (``~matplotlib.axes.Axes.bar``, +``~matplotlib.axes.Axes.pie``, etc) no longer have a black edge by +default. The default face color is now ``'C0'`` instead of ``'b'``. + +.. plot:: + + import matplotlib.pyplot as plt + import numpy as np + from matplotlib import rc_context + import matplotlib.patches as mpatches + + fig, all_ax = plt.subplots(3, 2, figsize=(4, 6), tight_layout=True) + + def demo(ax_top, ax_mid, ax_bottom, rcparams, label): + labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' + fracs = [15, 30, 45, 10] + + explode = (0, 0.05, 0, 0) + + ax_top.set_title(label) + + with rc_context(rc=rcparams): + ax_top.pie(fracs, labels=labels) + ax_top.set_aspect('equal') + ax_mid.bar(range(len(fracs)), fracs, tick_label=labels) + plt.setp(ax_mid.get_xticklabels(), rotation=-45) + grid = np.mgrid[0.2:0.8:3j, 0.2:0.8:3j].reshape(2, -1).T + + ax_bottom.set_xlim(0, .75) + ax_bottom.set_ylim(0, .75) + ax_bottom.add_artist(mpatches.Rectangle(grid[1] - [0.025, 0.05], + 0.05, 0.1)) + ax_bottom.add_artist(mpatches.RegularPolygon(grid[3], 5, 0.1)) + ax_bottom.add_artist(mpatches.Ellipse(grid[4], 0.2, 0.1)) + ax_bottom.add_artist(mpatches.Circle(grid[0], 0.1)) + ax_bottom.axis('off') + + demo(*all_ax[:, 0], rcparams={'patch.force_edgecolor': True, + 'patch.facecolor': 'b'}, label='classic') + demo(*all_ax[:, 1], rcparams={}, label='v2.0') + +The previous defaults can be restored by setting:: + + mpl.rcParams['patch.force_edgecolor'] = True + mpl.rcParams['patch.facecolor'] = 'b' + +or by setting:: + + patch.facecolor : b + patch.force_edgecolor : True + +in your :file:`matplotlibrc` file. + +``hexbin`` +---------- + +The default value of the ``linecolor`` kwarg for `~matplotlib.Axes.hexbin` has +changed from ``'none'`` to ``'face'``. If 'none' is now supplied, no line edges +are drawn around the hexagons. + +.. _barbarh_align: + +``bar`` and ``barh`` +-------------------- + +The default value of the ``align`` kwarg for both +`~matplotlib.Axes.bar` and `~matplotlib.Axes.barh` is changed from +``'edge'`` to ``'center'``. + + +.. plot:: + + import matplotlib.pyplot as plt + import numpy as np + + fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(5, 5)) + + def demo(bar_func, bar_kwargs): + return bar_func([1, 2, 3], [1, 2, 3], tick_label=['a', 'b', 'c'], + **bar_kwargs) + + + ax1.set_title("classic") + ax2.set_title('v2.0') + + demo(ax1.bar, {'align': 'edge'}) + demo(ax2.bar, {}) + demo(ax3.barh, {'align': 'edge'}) + demo(ax4.barh, {}) + + +To restore the previous behavior explicitly pass the keyword argument +``align='edge'`` to the method call. + + +Hatching +======== + + +The color of the lines in the hatch is now determined by + + - If an edge color is explicitly set, use that for the hatch color + - If the edge color is not explicitly set, use ``rcParam['hatch.color']`` which + is looked up at artist creation time. + +The width of the lines in a hatch pattern is now configurable by the +rcParams `hatch.linewidth`, which defaults to 1 point. The old +behavior for the line width was different depending on backend: + + - PDF: 0.1 pt + - SVG: 1.0 pt + - PS: 1 px + - Agg: 1 px + +The old line width behavior can not be restored across all backends +simultaneously, but can be restored for a single backend by setting:: + + mpl.rcParams['hatch.linewidth'] = 0.1 # previous pdf hatch linewidth + mpl.rcParams['hatch.linewidth'] = 1.0 # previous svg hatch linewidth + +The behavior of the PS and Agg backends was DPI dependent, thus:: + + + mpl.rcParams['figure.dpi'] = dpi + mpl.rcParams['savefig.dpi'] = dpi # or leave as default 'figure' + mpl.rcParams['hatch.linewidth'] = 1.0 / dpi # previous ps and Agg hatch linewidth + + +There is no direct API level control of the hatch color or linewidth. + +Hatching patterns are now rendered at a consistent density, regardless of DPI. +Formerly, high DPI figures would be more dense than the default, and low DPI +figures would be less dense. This old behavior cannot be directly restored, +but the density may be increased by repeating the hatch specifier. + + +.. _default_changes_font: + +Fonts +===== + +Normal text +----------- + +The default font has changed from "Bitstream Vera Sans" to "DejaVu +Sans". DejaVu Sans has additional international and math characters, +but otherwise has the same appearance as Bitstream Vera Sans. +Latin, Greek, Cyrillic, Armenian, Georgian, Hebrew, and Arabic are +`all supported `__ +(but right-to-left rendering is still not handled by matplotlib). +In addition, DejaVu contains a sub-set of emoji symbols. + +.. plot:: + + from __future__ import unicode_literals + + import matplotlib.pyplot as plt + + fig, ax = plt.subplots() + tick_labels = ['😃', '😎', '😴', '😲', '😻'] + bar_labels = ['א', 'α', '☣', '⌬', 'ℝ'] + y = [1, 4, 9, 16, 25] + x = range(5) + ax.bar(x, y, tick_label=tick_labels, align='center') + ax.xaxis.set_tick_params(labelsize=20) + for _x, _y, t in zip(x, y, bar_labels): + ax.annotate(t, (_x, _y), fontsize=20, ha='center', + xytext=(0, -2), textcoords='offset pixels', + bbox={'facecolor': 'w'}) + + ax.set_title('Диаграмма со смайликами') + +See the `DejaVu Sans PDF sample for full coverage +`__. + +Math text +--------- + +The default math font when using the built-in math rendering engine +(mathtext) has changed from "Computer Modern" (i.e. LaTeX-like) to +"DejaVu Sans". This change has no effect if the +TeX backend is used (i.e. ``text.usetex`` is ``True``). + + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib as mpl + + mpl.rcParams['mathtext.fontset'] = 'cm' + mpl.rcParams['mathtext.rm'] = 'serif' + + fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3)) + + ax.plot(range(15), label=r'int: $15 \int_0^\infty dx$') + ax.legend() + ax.set_title('classic') + + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib as mpl + + fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3)) + + ax.plot(range(15), label=r'int: $15 \int_0^\infty dx$') + ax.legend() + ax.set_title('v2.0') + + + +To revert to the old behavior set the:: + + mpl.rcParams['mathtext.fontset'] = 'cm' + mpl.rcParams['mathtext.rm'] = 'serif' + +or set:: + + mathtext.fontset: cm + mathtext.rm : serif + + +in your :file:`matplotlibrc` file. + +This ``rcParam`` is consulted when the text is drawn, not when the +artist is created. Thus all mathtext on a given ``canvas`` will use the +same fontset. + + +Legends +======= + +- By default, the number of points displayed in a legend is now 1. +- The default legend location is ``'best'``, so the legend will be + automatically placed in a location to minimize overlap with data. +- The legend defaults now include rounded corners, a lighter + boundary, and partially transparent boundary and background. + +.. plot:: + + import matplotlib as mpl + import matplotlib.pyplot as plt + import numpy as np + + def demo(ax, rcparams, title): + np.random.seed(2) + N = 25 + with mpl.rc_context(rc=rcparams): + x = range(N) + y = np.cumsum(np.random.randn(N) ) + # unpack the single Line2D artist + ln, = ax.plot(x, y, marker='s', + linestyle='-', label='plot') + ax.fill_between(x, y, 0, label='fill', alpha=.5, color=ln.get_color()) + ax.scatter(N*np.random.rand(N), np.random.rand(N), label='scatter') + ax.set_title(title) + ax.legend() + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3), tight_layout=True) + + classic_rc = {'legend.fancybox': False, + 'legend.numpoints': 2, + 'legend.scatterpoints': 3, + 'legend.framealpha': None, + 'legend.edgecolor': 'inherit', + 'legend.loc': 'upper right', + 'legend.fontsize': 'large'} + + demo(ax1, classic_rc, 'classic') + demo(ax2, {}, 'v2.0') + + +The previous defaults can be restored by setting:: + + mpl.rcParams['legend.fancybox'] = False + mpl.rcParams['legend.loc'] = 'upper right' + mpl.rcParams['legend.numpoints'] = 2 + mpl.rcParams['legend.fontsize'] = 'large' + mpl.rcParams['legend.framealpha'] = None + mpl.rcParams['legend.scatterpoints'] = 3 + mpl.rcParams['legend.edgecolor'] = 'inherit' + + +or by setting:: + + legend.fancybox : False + legend.loc : upper right + legend.numpoints : 2 # the number of points in the legend line + legend.fontsize : large + legend.framealpha : None # opacity of legend frame + legend.scatterpoints : 3 # number of scatter points + legend.edgecolor : inherit # legend edge color ('inherit' + # means it uses axes.edgecolor) + +in your :file:`matplotlibrc` file. + +Image +===== + +Interpolation +------------- + +The default interpolation method for `~matplotlib.axes.Axes.imshow` is +now ``'nearest'`` and by default it resamples the data (both up and down +sampling) before color mapping. + + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib as mpl + import numpy as np + + + def demo(ax, rcparams, title): + np.random.seed(2) + A = np.random.rand(5, 5) + + with mpl.rc_context(rc=rcparams): + ax.imshow(A) + ax.set_title(title) + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(6, 3), tight_layout=True) + + classic_rcparams = {'image.interpolation': 'bilinear', + 'image.resample': False} + + demo(ax1, classic_rcparams, 'classic') + demo(ax2, {}, 'v2.0') + + +To restore the previous behavior set:: + + mpl.rcParams['image.interpolation'] = 'bilinear' + mpl.rcParams['image.resample'] = False + +or set:: + + image.interpolation : bilinear # see help(imshow) for options + image.resample : False + +in your :file:`matplotlibrc` file. + +Colormapping pipeline +--------------------- + +Previously, the input data was normalized, then color mapped, and then +resampled to the resolution required for the screen. This meant that +the final resampling was being done in color space. Because the color +maps are not generally linear in RGB space, colors not in the color map +may appear in the final image. This bug was addressed by an almost +complete overhaul of the image handling code. + +The input data is now normalized, then resampled to the correct +resolution (in normalized dataspace), and then color mapped to +RGB space. This ensures that only colors from the color map appear +in the final image. (If your viewer subsequently resamples the image, +the artifact may reappear.) + +The previous behavior cannot be restored. + + +Shading +------- + +- The default shading mode for light source shading, in + ``matplotlib.colors.LightSource.shade``, is now ``overlay``. + Formerly, it was ``hsv``. + + +Plot layout +=========== + +Auto limits +----------- + +The previous auto-scaling behavior was to find 'nice' round numbers +as view limits that enclosed the data limits, but this could produce +bad plots if the data happened to fall on a vertical or +horizontal line near the chosen 'round number' limit. The new default +sets the view limits to 5% wider than the data range. + +.. plot:: + + import matplotlib as mpl + import matplotlib.pyplot as plt + import numpy + + data = np.zeros(1000) + data[0] = 1 + + fig = plt.figure(figsize=(6, 3)) + + def demo(fig, rc, title, j): + with mpl.rc_context(rc=rc): + ax = fig.add_subplot(1, 2, j) + ax.plot(data) + ax.set_title(title) + + demo(fig, {'axes.autolimit_mode': 'round_numbers', + 'axes.xmargin': 0, + 'axes.ymargin': 0}, 'classic', 1) + demo(fig, {}, 'v2.0', 2) + +The size of the padding in the x and y directions is controlled by the +``'axes.xmargin'`` and ``'axes.ymargin'`` rcParams respectively. Whether +the view limits should be 'round numbers' is controlled by the +``'axes.autolimit_mode'`` rcParam. In the original ``'round_number'`` mode, +the view limits coincide with ticks. + +The previous default can be restored by using:: + + mpl.rcParams['axes.autolimit_mode'] = 'round_numbers' + mpl.rcParams['axes.xmargin'] = 0 + mpl.rcParams['axes.ymargin'] = 0 + +or setting:: + + axes.autolimit_mode: round_numbers + axes.xmargin: 0 + axes.ymargin: 0 + +in your :file:`matplotlibrc` file. + + +Z-order +------- + +- Ticks and grids are now plotted above solid elements such as + filled contours, but below lines. To return to the previous + behavior of plotting ticks and grids above lines, set + ``rcParams['axes.axisbelow'] = False``. + + +Ticks +----- + +Direction +~~~~~~~~~ + +To reduce the collision of tick marks with data, the default ticks now +point outward by default. In addition, ticks are now drawn only on +the bottom and left spines to prevent a porcupine appearance, and for +a cleaner separation between subplots. + + +.. plot:: + + import matplotlib as mpl + import matplotlib.pyplot as plt + import numpy as np + + th = np.linspace(0, 2*np.pi, 128) + y = np.sin(th) + + def demo(fig, rcparams, title, j): + np.random.seed(2) + with mpl.rc_context(rc=rcparams): + + ax = fig.add_subplot(2, 2, j) + ax.hist(np.random.beta(0.5, 0.5, 10000), 25, normed=True) + ax.set_xlim([0, 1]) + ax.set_title(title) + + ax = fig.add_subplot(2, 2, j + 2) + ax.imshow(np.random.rand(5, 5)) + + classic = {'xtick.direction': 'in', + 'ytick.direction': 'in', + 'xtick.top': True, + 'ytick.right': True} + + fig = plt.figure(figsize=(6, 6), tight_layout=True) + + demo(fig, classic, 'classic', 1) + demo(fig, {}, 'v2.0', 2) + + +To restore the previous behavior set:: + + mpl.rcParams['xtick.direction'] = 'in' + mpl.rcParams['ytick.direction'] = 'in' + mpl.rcParams['xtick.top'] = True + mpl.rcParams['ytick.right'] = True + +or set:: + + xtick.top: True + xtick.direction: in + + ytick.right: True + ytick.direction: in + +in your :file:`matplotlibrc` file. + + + +Number of ticks +~~~~~~~~~~~~~~~ + +The default `~matplotlib.ticker.Locator` used for the x and y axis is +`~matplotlib.ticker.AutoLocator` which tries to find, up to some +maximum number, 'nicely' spaced ticks. The locator now includes +an algorithm to estimate the maximum number of ticks that will leave +room for the tick labels. By default it also ensures that there are at least +two ticks visible. + +.. plot:: + + import matplotlib.pyplot as plt + import numpy as np + + from matplotlib.ticker import AutoLocator + + fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(4, 3), tight_layout=True) + ax1.set_xlim(0, .1) + ax2.set_xlim(0, .1) + + ax1.xaxis.get_major_locator().set_params(nbins=9, steps=[1, 2, 5, 10]) + ax1.set_title('classic') + ax2.set_title('v2.0') + +There is no way, other than using ``mpl.style.use('classic')``, to restore the +previous behavior as the default. On an axis-by-axis basis you may either +control the existing locator via: :: + + ax.xaxis.get_major_locator().set_params(nbins=9, steps=[1, 2, 5, 10]) + +or create a new `~matplotlib.ticker.MaxNLocator`:: + + import matplotlib.ticker as mticker + ax.set_major_locator(mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10]) + +The algorithm used by `~matplotlib.ticker.MaxNLocator` has been +improved, and this may change the choice of tick locations in some +cases. This also affects `~matplotlib.ticker.AutoLocator`, which +uses ``MaxNLocator`` internally. + +For a log-scaled axis the default locator is the +`~matplotlib.ticker.LogLocator`. Previously the maximum number +of ticks was set to 15, and could not be changed. Now there is a +`numticks` kwarg for setting the maximum to any integer value, +to the string 'auto', or to its default value of None which is +equivalent to 'auto'. With the 'auto' setting the maximum number +will be no larger than 9, and will be reduced depending on the +length of the axis in units of the tick font size. As in the +case of the AutoLocator, the heuristic algorithm reduces the +incidence of overlapping tick labels but does not prevent it. + + +Tick label formatting +--------------------- + +``LogFormatter`` labeling of minor ticks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Minor ticks on a log axis are now labeled when the axis view limits +span a range less than or equal to the interval between two major +ticks. See `~matplotlib.ticker.LogFormatter` for details. The +minor tick labeling is turned off when using ``mpl.style.use('classic')``, +but cannot be controlled independently via ``rcParams``. + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + np.random.seed(2) + + fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(6, 3)) + fig.subplots_adjust(wspace=0.35, left=0.09, right=0.95) + + x = np.linspace(0.9, 1.7, 10) + y = 10 ** x[np.random.randint(0, 10, 10)] + + ax2.semilogy(x, y) + ax2.set_title('v2.0') + + with plt.style.context('classic'): + ax1.semilogy(x, y) + ax1.set_xlim(ax2.get_xlim()) + ax1.set_ylim(ax2.get_ylim()) + ax1.set_title('classic') + + +``ScalarFormatter`` tick label formatting with offsets +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +With the default of ``rcParams['axes.formatter.useoffset'] = True``, +an offset will be used when it will save 4 or more digits. This can +be controlled with the new rcParam, ``axes.formatter.offset_threshold``. +To restore the previous behavior of using an offset to save 2 or more +digits, use ``rcParams['axes.formatter.offset_threshold'] = 2``. + +.. plot:: + + import numpy as np + import matplotlib.pyplot as plt + + np.random.seed(5) + + fig = plt.figure(figsize=(6, 3)) + fig.subplots_adjust(bottom=0.15, wspace=0.3, left=0.09, right=0.95) + + x = np.linspace(2000, 2008, 9) + y = np.random.randn(9) + 50000 + + with plt.rc_context(rc={'axes.formatter.offset_threshold' : 2}): + ax1 = fig.add_subplot(1, 2, 1) + ax1.plot(x, y) + ax1.set_title('classic') + + ax2 = fig.add_subplot(1, 2, 2) + ax2.plot(x, y) + ax2.set_title('v2.0') + + +``AutoDateFormatter`` format strings +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The default date formats are now all based on ISO format, i.e., with +the slowest-moving value first. The date formatters are +configurable through the ``date.autoformatter.*`` rcParams. + + ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| Threshold (tick interval >= than) | rcParam | classic | v2.0 | ++======================================+======================================+===================+===================+ +| 365 days | ``'date.autoformatter.year'`` | ``'%Y'`` | ``'%Y'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| 30 days | ``'date.autoformatter.month'`` | ``'%b %Y'`` | ``'%Y-%m'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| 1 day | ``'date.autoformatter.day'`` | ``'%b %d %Y'`` | ``'%Y-%m-%d'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| 1 hour | ``'date.autoformatter.hour'`` | ``'%H:%M:%S'`` | ``'%H:%M'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| 1 minute | ``'date.autoformatter.minute'`` | ``'%H:%M:%S.%f'`` | ``'%H:%M:%S'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| 1 second | ``'date.autoformatter.second'`` | ``'%H:%M:%S.%f'`` | ``'%H:%M:%S'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ +| 1 microsecond | ``'date.autoformatter.microsecond'`` | ``'%H:%M:%S.%f'`` | ``'%H:%M:%S.%f'`` | ++--------------------------------------+--------------------------------------+-------------------+-------------------+ + + + +Python's ``%x`` and ``%X`` date formats may be of particular interest +to format dates based on the current locale. + +The previous default can be restored by:: + + mpl.rcParams['date.autoformatter.year'] = '%Y' + mpl.rcParams['date.autoformatter.month'] = '%b %Y' + mpl.rcParams['date.autoformatter.day'] = '%b %d %Y' + mpl.rcParams['date.autoformatter.hour'] = '%H:%M:%S' + mpl.rcParams['date.autoformatter.minute'] = '%H:%M:%S.%f' + mpl.rcParams['date.autoformatter.second'] = '%H:%M:%S.%f' + mpl.rcParams['date.autoformatter.microsecond'] = '%H:%M:%S.%f' + + +or setting :: + + date.autoformatter.year : %Y + date.autoformatter.month : %b %Y + date.autoformatter.day : %b %d %Y + date.autoformatter.hour : %H:%M:%S + date.autoformatter.minute : %H:%M:%S.%f + date.autoformatter.second : %H:%M:%S.%f + date.autoformatter.microsecond : %H:%M:%S.%f + +in your :file:`matplotlibrc` file. + +mplot3d +======= + +- mplot3d now obeys some style-related rcParams, rather than using + hard-coded defaults. These include: + + - xtick.major.width + - ytick.major.width + - xtick.color + - ytick.color + - axes.linewidth + - axes.edgecolor + - grid.color + - grid.linewidth + - grid.linestyle diff --git a/doc/users/event_handling.rst b/doc/users/event_handling.rst index 452e159aa0d7..4545fefee618 100644 --- a/doc/users/event_handling.rst +++ b/doc/users/event_handling.rst @@ -29,13 +29,13 @@ connect your function to the event manager, which is part of the example that prints the location of the mouse click and which button was pressed:: - fig = plt.figure() - ax = fig.add_subplot(111) + fig, ax = plt.subplots() ax.plot(np.random.rand(10)) def onclick(event): - print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%( - event.button, event.x, event.y, event.xdata, event.ydata) + print('%s click: button=%d, x=%d, y=%d, xdata=%f, ydata=%f' % + ('double' if event.dblclick else 'single', event.button, + event.x, event.y, event.xdata, event.ydata)) cid = fig.canvas.mpl_connect('button_press_event', onclick) @@ -128,7 +128,7 @@ is created every time a mouse is pressed:: self.cid = line.figure.canvas.mpl_connect('button_press_event', self) def __call__(self, event): - print 'click', event + print('click', event) if event.inaxes!=self.line.axes: return self.xs.append(event.xdata) self.ys.append(event.ydata) @@ -196,7 +196,7 @@ Here is the solution:: contains, attrd = self.rect.contains(event) if not contains: return - print 'event contains', self.rect.xy + print('event contains', self.rect.xy) x0, y0 = self.rect.xy self.press = x0, y0, event.xdata, event.ydata @@ -207,7 +207,8 @@ Here is the solution:: x0, y0, xpress, ypress = self.press dx = event.xdata - xpress dy = event.ydata - ypress - #print 'x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f'%(x0, xpress, event.xdata, dx, x0+dx) + #print('x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f' % + # (x0, xpress, event.xdata, dx, x0+dx)) self.rect.set_x(x0+dx) self.rect.set_y(y0+dy) @@ -239,8 +240,8 @@ Here is the solution:: **Extra credit**: use the animation blit techniques discussed in the `animations recipe -`_ to make the -animated drawing faster and smoother. +`_ to +make the animated drawing faster and smoother. Extra credit solution:: @@ -271,7 +272,7 @@ Extra credit solution:: if DraggableRectangle.lock is not None: return contains, attrd = self.rect.contains(event) if not contains: return - print 'event contains', self.rect.xy + print('event contains', self.rect.xy) x0, y0 = self.rect.xy self.press = x0, y0, event.xdata, event.ydata DraggableRectangle.lock = self @@ -361,22 +362,22 @@ background that the mouse is over:: import matplotlib.pyplot as plt def enter_axes(event): - print 'enter_axes', event.inaxes + print('enter_axes', event.inaxes) event.inaxes.patch.set_facecolor('yellow') event.canvas.draw() def leave_axes(event): - print 'leave_axes', event.inaxes + print('leave_axes', event.inaxes) event.inaxes.patch.set_facecolor('white') event.canvas.draw() def enter_figure(event): - print 'enter_figure', event.canvas.figure + print('enter_figure', event.canvas.figure) event.canvas.figure.patch.set_facecolor('red') event.canvas.draw() def leave_figure(event): - print 'leave_figure', event.canvas.figure + print('leave_figure', event.canvas.figure) event.canvas.figure.patch.set_facecolor('grey') event.canvas.draw() @@ -403,14 +404,13 @@ background that the mouse is over:: plt.show() - .. _object-picking: Object picking ============== You can enable picking by setting the ``picker`` property of an -:class:`~matplotlib.artist.Artist` (eg a matplotlib +:class:`~matplotlib.artist.Artist` (e.g., a matplotlib :class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.text.Text`, :class:`~matplotlib.patches.Patch`, :class:`~matplotlib.patches.Polygon`, :class:`~matplotlib.patches.AxesImage`, etc...) @@ -426,10 +426,10 @@ There are a variety of meanings of the ``picker`` property: ``float`` if picker is a number it is interpreted as an epsilon tolerance in - points and the the artist will fire off an event if its data is + points and the artist will fire off an event if its data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to - the pick event that is generated, eg the indices of the data + the pick event that is generated, e.g., the indices of the data within epsilon of the pick event. ``function`` @@ -457,7 +457,7 @@ your callback is always fired with two attributes: ``mouseevent`` the mouse event that generate the pick event. The mouse event in turn has attributes like ``x`` and ``y`` (the - coords in display space, eg pixels from left, bottom) and xdata, + coords in display space, e.g., pixels from left, bottom) and xdata, ydata (the coords in data space). Additionally, you can get information about which buttons were pressed, which keys were pressed, which :class:`~matplotlib.axes.Axes` the mouse is over, @@ -471,7 +471,7 @@ your callback is always fired with two attributes: Additionally, certain artists like :class:`~matplotlib.lines.Line2D` and :class:`~matplotlib.collections.PatchCollection` may attach additional meta data like the indices into the data that meet the -picker criteria (eg all the points in the line that are within the +picker criteria (e.g., all the points in the line that are within the specified epsilon tolerance) Simple picking example @@ -503,7 +503,8 @@ properties of the line. Here is the code:: xdata = thisline.get_xdata() ydata = thisline.get_ydata() ind = event.ind - print 'onpick points:', zip(xdata[ind], ydata[ind]) + points = tuple(zip(xdata[ind], ydata[ind])) + print('onpick points:', points) fig.canvas.mpl_connect('pick_event', onpick) diff --git a/doc/users/github_stats.rst b/doc/users/github_stats.rst index bbaa504723ee..5e5d83e92070 100644 --- a/doc/users/github_stats.rst +++ b/doc/users/github_stats.rst @@ -1,1031 +1,2990 @@ - .. _github-stats: -Github stats + +GitHub Stats ============ -GitHub stats for 2012/11/08 - 2013/05/29 (tag: v1.2.0) +GitHub stats for 2015/10/29 - 2017/08/31 (tag: v1.5.0) These lists are automatically generated, and may be incomplete or contain duplicates. -The following 85 authors contributed 1428 commits. +We closed 1370 issues and merged 1247 pull requests. + +The following 352 authors contributed 9253 commits. -* Adam Ginsburg +* 4over7 +* Aashil Patel +* AbdealiJK +* Acanthostega +* Adam +* Adam Williamson * Adrian Price-Whelan -* Alejandro Dubrovsky -* Amit Aronovitch -* Andrew Dawson +* Adrien Chardon +* Adrien F. Vincent +* Alan Bernstein +* Alberto +* alcinos +* Aleksey Bilogur +* Alex Rothberg +* Alexander Buchkovsky +* Alexis Bienvenüe +* Ali Uneri +* Alvaro Sanchez +* alvarosg +* AndersonDaniel +* Andras Deak +* Andreas Hilboll +* Andreas Mayer +* Andreas Mueller +* aneda +* Anthony Scopatz * Anton Akhmerov * Antony Lee +* Arvind +* bduick * Ben Root -* Binglin Chang -* Bradley M. Froehle -* Brian Mattern -* Cameron Bates -* Carl Michal -* Chris Beaumont +* Benedikt Daurer +* Benedikt J. Daurer +* Benjamin Berg +* Benjamin Congdon +* Bernhard M. Wiedemann +* BHT +* Bianca Gibson +* Big Data Tech. Lab +* Björn Dahlgren +* braaannigan +* Bruno Zohreh +* BTWS +* buefox +* Cameron Davidson-Pilon +* Cameron Fackler +* chelseatroy +* Chen Karako +* Chris Holdgraf +* Christian Stade-Schuldt +* Christoph Deil * Christoph Gohlke +* Christopher Holdgraf * Cimarron Mittelsteadt -* Damon McDougall -* Daniel Hyams -* David Trémouilles +* CJ Carey +* cknd +* Colin +* Conner R. Phillips +* Craig Citro +* DaCoEx +* Damian +* Dan Hickstein +* Dana +* Daniel C. Marcu +* Daniel Laidig +* danielballan +* Danny Hermes +* DaveL17 +* David A +* David Kent +* David Stansby +* deeenes +* Devashish Deshpande +* Diego Mora Cespedes +* Dietrich Brunn +* dlmccaffrey +* Dmitry Shachnev +* Dora Fraeman +* DoriekeMG +* Dorota Jarecka +* Drew J. Sonne +* Dylan Evans +* E. G. Patrick Bos +* Egor Panfilov +* Elliott Sales de Andrade +* Elvis Stansvik +* endolith +* Eric Dill * Eric Firing -* Francesco Montesano -* Geoffroy Billotey +* Eric Larson +* Eric Wieser +* Erin Pintozzi +* Eugene Yurtsev +* Fabian-Robert Stöter +* FedeMiorelli +* Federico Ariza +* Felix +* Felix Kohlgrüber +* Felix Yan +* fibersnet +* Florencia Noriega +* Florian Le Bourdais +* Francoise Provencher +* Frank Yu +* Gabe +* Gabriel Munteanu +* Gauravjeet +* Gaute Hope +* gcallah +* Geoffrey Spear +* gepcel +* gnaggnoyil +* goldstarwebs +* greg-roper +* Grillard +* Guillermo Breto +* Gustavo Goretkin +* Hakan Kucukdereli +* hannah +* Hans Moritz Günther +* Harshit Patni +* Hassan Kibirige +* Hastings Greer +* Heath Henley +* Heiko Oberdiek +* helmiriawan +* Henning Pohl +* Herbert Kruitbosch +* herilalaina +* Herilalaina Rakotoarison * Ian Thomas +* Ilia Kurenkov +* ilivni +* Ilya Flyamer +* Importance of Being Ernest +* ImSoErgodic +* Isa Hassen +* Isaac Schwabacher +* Isaac Slavitt +* Ismo Toijala +* J Alammar +* J. Goutin +* Jaap Versteegh +* Jacob McDonald +* jacob-on-github * Jae-Joon Lee -* Jake Vanderplas -* James R. Evans -* Jan-Philip Gehrcke -* Jeff Bingham -* Jeffrey Bingham -* Jens H. Nielsen +* James A. Bednar +* Jan Schlüter +* Jan Schulz +* Jarrod Millman +* Jason King +* Jason Zheng +* jbhopkins +* Jeffrey Hokanson @ Loki * Jens Hedegaard Nielsen -* Joe Kington +* Jesse B. Hopkins +* jhelie +* jli +* Jody Klymak +* Johannes Wienke +* John Vandenberg +* JojoBoulix +* jonchar +* Joseph Fox-Rabinovitz +* Joseph Jon Booker +* Jouni K. Seppänen +* Juan Nunez-Iglesias +* juan.gonzalez +* Julia Sprenger +* Julian Mehne +* Julian V. Modesto +* Julien L +* Julien Lhermitte * Julien Schueller -* Julien Woillez -* Kevin Davies +* Jun Tan +* Jörg Dietrich +* Kacper Kowalik (Xarthisius) +* kalagau +* Kanchana Ranasinghe +* Kanwar245 +* Keerysanth Sribaskaran +* keithbriggs +* Kenneth Ma +* Kevin Keating +* Kevin Rose +* khyox +* Kjartan Myrdal +* Klara Gerlei +* klaus +* klonuo +* Kristen M. Thyng +* kshramt +* Kyle Bridgemohansingh +* Kyler Brown +* Laptop11_ASPP2016 +* lboogaard +* legitz7 * Leo Singer -* Lodato Luciano -* Martin Spacek -* Martin Teichmann -* Martin Ueding -* Matt Giuca +* Leon Yin +* Levi Kilcher +* Liam Brannigan +* lspvic +* Luis Pedro Coelho +* lzkelley +* Maarten Baert +* Magnus Nord +* mamrehn +* Manuel Jung +* Martin Fitzpatrick +* Massimo Santini +* Matt Hancock +* Matthew Brett +* Matthew Newville +* Matthias Bussonnier +* Matthias Lüthi * Maximilian Albert +* Maximilian Maahn +* Mher Kazandjian * Michael Droettboom -* Michael Welter +* Michael Scott Cuthbert * Michiel de Hoon -* Min RK +* Mike Henninger +* Mike Jarvis * MinRK +* mitch +* mlub +* mobando +* Molly Rossow +* Moritz Boehle +* muahah +* myyc +* Naoya Kanai +* Nathan Goldbaum +* Nathan Musoke +* nbrunett * Nelle Varoquaux -* Nic Eggert -* Pascal Bugnion +* neok-m4700 +* nepix32 +* Nico Schlömer +* Nicolas P. Rougier +* Nicolas Tessore +* Nikita Kniazev +* Nils Werner +* Ninad Bhat +* OceanWolf +* Orso Meneghini +* Pankaj Pandey +* patniharshit +* Paul Ganssle * Paul Hobson * Paul Ivanov -* Pauli Virtanen +* Paul Kirow +* Paul Romano +* Pavol Juhas +* Pete Huang +* Pete Peterson +* Peter Iannucci +* Peter Mortensen * Peter Würtz +* Petr Danecek * Phil Elson +* Phil Ruffwind +* Pierre de Buyl * Pierre Haessig -* Piti Ongmongkolkul -* Ryan Dale +* productivememberofsociety666 +* Przemysław Dąbek +* Qingpeng "Q.P." Zhang +* RAKOTOARISON Herilalaina +* Ramiro Gómez +* Randy Olson +* rebot +* Rishikesh +* rishikksh20 +* Robin Dunn +* Robin Neatherway +* Robin Wilson +* Ronald Hartley-Davies +* Rui Lopes +* ruin +* rvhbooth +* Ryan +* Ryan LaClair * Ryan May -* Sandro Tosi -* Sebastian Pinnau -* Sergey Koposov -* Takeshi Kanmae +* Ryan Morshead +* Ryan Watkins +* RyanPan +* s0vereign +* Salganos +* Salil Vanvari +* Samson +* Samuel St-Jean +* Sander +* scls19fr +* Scott Howard +* Scott Lasley +* scott-vsi +* Sebastian Raschka +* Sebastián Vanrell +* Seraphim Alvanides +* serv-inc +* shaunwbell +* Simon Gibbons +* sindunuragarp +* Stefan Pfenninger +* Stephan Erb +* Sterling Smith +* Steven Silvester +* Steven Tilley +* Tadeo Corradi +* Taehoon Lee +* TD22057 +* Terrence J. Katzenbaer +* Terrence Katzenbaer +* The Gitter Badger * Thomas A Caswell -* Thomas Kluyver +* Thomas Hisch * Thomas Robitaille +* Thomas Spura +* Thorsten Liebig +* Tian Xia * Till Stensitzki +* tmdavison +* Tobias Froehlich * Tobias Megies -* Todd Jennings -* Tomas Kazmar -* Tony S Yu -* Víctor Terrón -* Wes Campaigne -* aseagram -* burrbull -* dhyams -* drevicko -* endolith -* gitj -* jschueller -* krischer -* montefra -* pelson -* pwuertz -* torfbolt - +* tomoemon +* tonyyli +* Trish Gillett-Kawamoto +* Truong Pham +* Tuan +* Tuan Dung Tran +* Tuan333 +* u55 +* ultra-andy +* V. R +* vab9 +* Valentin Schmidt +* Vedant Nanda +* Victor Zabalza +* Vidur Satija +* vidursatija +* vraelvrangr +* Víctor Zabalza +* Warren Weckesser +* watkinrt +* Wieland Hoffmann +* Will Silva +* William Granados +* Xufeng Wang +* yinleon +* Zbigniew Jędrzejewski-Szmek +* Zohreh +* Élie Gouzien -We closed a total of 924 issues, 326 pull requests and 598 regular issues; -this is the full list (generated with the script -:file:`tools/github_stats.py`): +GitHub issues and pull requests: -Pull Requests (326): +Pull Requests (1247): -* :ghpull:`2082`: Data limits (on 1.3.x) -* :ghpull:`2070`: incorrect bbox of text -* :ghpull:`2080`: Fixed failing test on python3. -* :ghpull:`2079`: added some comments -* :ghpull:`2077`: changed URL to the current CSV API for yahoo finance -* :ghpull:`2076`: Build the _windowing extension -* :ghpull:`2066`: [DOC] Mathtext and matshow examples -* :ghpull:`2024`: Update homepage image -* :ghpull:`2074`: backend gtk and gtk3: destroy figure save dialog after use; closes #2073 -* :ghpull:`2050`: Added the from_levels_and_colors function. -* :ghpull:`454`: Use a subdirectory of $XDG_CONFIG_HOME instead of ~/.matplotlibrc on Linux -* :ghpull:`1813`: GTK segfault with GTK3 and mpl_toolkits -* :ghpull:`2069`: BUG: pass kwargs to TimedAnimation -* :ghpull:`2063`: Let _pcolorargs check C for consistency with X and Y; closes #1688 -* :ghpull:`2065`: mlab.FIFOBuffer: remove fossil line referring to nonexistent method -* :ghpull:`1975`: MixedModeRenderer non-72-dpi fixes & Pgf mixed rendering -* :ghpull:`2004`: Make wx and wxagg work with wx 2.9.x on Mac. -* :ghpull:`2044`: Svg rasterize (rebased) -* :ghpull:`2056`: backend_gtk: don't hide FileChooserDialog; closes #1530 -* :ghpull:`2053`: sphinxext.ipython_directive broken -* :ghpull:`2017`: qt4_editor formlayout now works with colour tuples (fixes Issue #1690) -* :ghpull:`2057`: pep8 fixes in animation.py -* :ghpull:`2055`: Deprecated the set_colorbar method on a scalar mappable. -* :ghpull:`1945`: PEP8 testing -* :ghpull:`2042`: Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each extension -* :ghpull:`2041`: Fix a number of issues in the doc build -* :ghpull:`2049`: Fix parallel testing by using the multi-process safe cbook.mkdirs -* :ghpull:`2047`: Fixed typos in legend docs. -* :ghpull:`2048`: Tweak image path -* :ghpull:`1889`: Fixed handling of `bar(.., bottom=None, log=True)` -* :ghpull:`2036`: Fix missing ticks on inverted log axis -* :ghpull:`2038`: Added parameters to the xkcd function. Fixed deprecation warning on Path. -* :ghpull:`2028`: Add a what's new entry for the WebAgg backend -* :ghpull:`2002`: Added support for providing 1 or 2 extra colours to the contour routines to easily specify the under and over colors. -* :ghpull:`2011`: Added the "cleared" method to Path, and updated the path module's documentation. -* :ghpull:`2033`: fix pstoeps function in backend_ps.py -* :ghpull:`2026`: Deprecations and housecleaning -* :ghpull:`2032`: 'annotate' ignores path_effects argument. -* :ghpull:`2030`: Image pep8 -* :ghpull:`2029`: Type correction: float -> double -* :ghpull:`1753`: Resolving Issue #1737 - MacOSX backend unicode problems in python 3.3 -* :ghpull:`1925`: Supported datetimes with microseconds, and those with long time series (>160 years). -* :ghpull:`1951`: parallelize_tests -* :ghpull:`2020`: Fixed call to path.Path.contains_point from pnpoly. -* :ghpull:`2019`: Build: avoid win32-incompatible functions -* :ghpull:`1919`: Issue warning if too many figures are open -* :ghpull:`1993`: PS backend fails to savefig() pcolormesh with gouraud shading -* :ghpull:`2005`: Fail to export properly to svg and pdf with interactive paths -* :ghpull:`2016`: Crash when using character with umlaut -* :ghpull:`2015`: Wrong text baseline with usetex. -* :ghpull:`2012`: texmanager doesn't handle list of names for `font.family` -* :ghpull:`2010`: Allow Paths to be marked as readonly -* :ghpull:`2003`: Fixed hatch clipping. -* :ghpull:`2006`: ValueError: stretch is invalid -* :ghpull:`956`: Shared axes colorbars & finer location control -* :ghpull:`1329`: Add a "sketch" path filter -* :ghpull:`1999`: Setting dashes to (0,0) results in infinite loop for agg backends -* :ghpull:`1092`: Better handling of scalars to plt.subplot(). Fixes #880 -* :ghpull:`1950`: Tidy up the matplotlib.__init__ documentation. -* :ghpull:`1770`: strange output from wx and wxagg when trying to render to JPEG or TIFF -* :ghpull:`1998`: Wx backend broken -* :ghpull:`1917`: Make `axis.set_scale` private -* :ghpull:`1927`: Workaround for Python 3 with pyparsing <= 2.0.0 -* :ghpull:`1885`: text is not properly clipped in 1.2.1 -* :ghpull:`1955`: Honouring the alpha attribute when creating composite images. -* :ghpull:`1136`: Configuring automatic use of tight_layout -* :ghpull:`1953`: New doc build failure -* :ghpull:`1896`: Doc build is full of lots of irrelevant warnings -* :ghpull:`1902`: Default quit keymap - support for cmd+w on OSX -* :ghpull:`1954`: Supporting different alphas for face and edge colours -* :ghpull:`1964`: Fixes issue #1960. Account for right/top spine data offset on transform ... -* :ghpull:`1988`: Added bar plot pickle support. -* :ghpull:`1989`: Log scale pickle -* :ghpull:`1990`: Fixed tight_layout pickle support. -* :ghpull:`1991`: bugfix for matplotlib/ticker.py (python 3.3) -* :ghpull:`1833`: Change hist behavior when normed and stacked to something more sensible -* :ghpull:`1985`: horizontal histogramm doesn't work in 1.2 branch -* :ghpull:`1984`: colors.rgb_to_hsv does not work properly with array of int dtype -* :ghpull:`1982`: Fix bug in SpanSelector, introduced in commit #dd325759 -* :ghpull:`1978`: Setting font type using rcParams does not work under Python 3.* -* :ghpull:`1976`: Replace usage of Lena image in the gallery. -* :ghpull:`1977`: Fix `backend_driver.py` -* :ghpull:`1972`: SubplotBase._make_twin_axes always creates a new subplot instance -* :ghpull:`1787`: Path.contains_points() incorrect return -* :ghpull:`1973`: Collection's contains method doesn't honour offset_position attribute -* :ghpull:`1956`: imsave should preserve alpha channel -* :ghpull:`1967`: svg double hyphen in plot title -- -* :ghpull:`1929`: Fixed failing bbox_inches='tight' case when a contour collection is empty -* :ghpull:`1968`: Rotated text element misalignment in Agg -* :ghpull:`1868`: Fixed background colour of PNGs saved with a non-zero opacity. -* :ghpull:`1965`: Make the travis output quieter on v1.2.x -* :ghpull:`1946`: re-arrange mplDeprecation imports -* :ghpull:`1949`: Build failes under ubuntu 13.04 -* :ghpull:`1918`: Tidied up some of the documentation. -* :ghpull:`1924`: MEP 12: Gallery cleanup and reorganization (rebase) -* :ghpull:`1884`: incorrect linkage if system PyCXX is found -* :ghpull:`1936`: add pkgconfig to homebrew install instruction -* :ghpull:`1941`: Use freetype-config if pkg-config is not installed -* :ghpull:`1940`: Cleanup and what's new item added for jpeg quality rcParam feature. -* :ghpull:`1771`: Jpeg quality 95 by default with rendering with PIL -* :ghpull:`1935`: 1836 latex docs fail -* :ghpull:`1932`: DOC - two modules link appeared in the documentation -* :ghpull:`1810`: Cairo + plot_date = misaligned x-axis labels -* :ghpull:`1905`: Prevent Qt4 from stopping the interpreter -* :ghpull:`1861`: Added a find_all method to the RcParams dictionary. -* :ghpull:`1921`: Fix filename decoding when calling fc-match -* :ghpull:`1757`: DOC improves documentation on the pyplot module and the bar method -* :ghpull:`1858`: backend_pgf: clip paths within the backend (fixes #1857) -* :ghpull:`1913`: Fix for issue #1812 -* :ghpull:`1916`: Normalize all 'e.g.' instances. Addresses issue #1423. -* :ghpull:`1908`: added rcParam for x and y margin -* :ghpull:`1903`: Switching b and c in _transformation_converter to fix issue #1886 -* :ghpull:`1897`: Doc build failure - unicode error in generate_example_rst -* :ghpull:`1915`: Corrected a wrong numpy record name in documentation. -* :ghpull:`1914`: Fix texmanager.dvipng_hack_alpha() to correctly use Popen. -* :ghpull:`1906`: Spectral plot unit tests -* :ghpull:`1824`: Support environments without a home dir or writable file system -* :ghpull:`1878`: Webagg changes -* :ghpull:`1894`: Exporting figure as pdf using savefig() messes up axis background in OS X -* :ghpull:`1887`: Clarify documentation for FuncAnimation -* :ghpull:`1890`: Restored inkscape installing on travis-ci. -* :ghpull:`1874`: Building Matplotlib on Ubuntu -* :ghpull:`1186`: Make default arrow head width sensible -* :ghpull:`1875`: [EHN] Add frameon and savefig.frameon to rcParams -* :ghpull:`1865`: Fix manual contour label positions on sparse contours -* :ghpull:`1210`: Add dateutil kwargs to csv2rec -* :ghpull:`1383`: More fixes for doc building with python 3 -* :ghpull:`1864`: fix legend w/ 'expand' mode which fails for a single item. -* :ghpull:`1448`: ```bbox_inches="tight"``` support for *all* figure artists. -* :ghpull:`1869`: Installed inkscape on the travis-ci vm. -* :ghpull:`1870`: Testing documentation isn't clear about which files to copy -* :ghpull:`1866`: fix the pyplot version of rc_context -* :ghpull:`1860`: Bug with PatchCollection in PDF output -* :ghpull:`1862`: Matplotlib savefig() closes BytesIO object when saving in postscript format -* :ghpull:`1841`: Fixes issue #1259 - Added modifier key handling for macosx backend -* :ghpull:`1816`: Avoid macosx backend slowdown; issue 1563 -* :ghpull:`1796`: axes.grid lines using lines.marker settings? -* :ghpull:`1846`: Fix the clippath renderering so that it uses no-clip unsigned chars -* :ghpull:`1853`: fill_betweenx signature fixed -* :ghpull:`1854`: BF - prevent a TypeError for lists of vertices -* :ghpull:`1843`: test_backend_pgf: TypeError -* :ghpull:`1848`: add flushing of stdout to update on key event -* :ghpull:`1802`: Step linestyle -* :ghpull:`1127`: Change spectral to nipy_spectral, update docs, leave aliases -* :ghpull:`1804`: MEP10 - documentation improvements on set_xlabel and text of axes.py -* :ghpull:`1764`: Make loc come after fontdict in set_title. Closes #1759 -* :ghpull:`1825`: Work around missing subprocess members on Google App Engine -* :ghpull:`1826`: backend_ps: Do not write to a temporary file unless using an external distiller -* :ghpull:`1827`: MEP10 - documentation improvements on many common plots: scatter plots, ... -* :ghpull:`1834`: finance: Fixed making directories for explicit cachename -* :ghpull:`1832`: BF - correct return type for Axes.get_title -* :ghpull:`1803`: Markers module: PEP8 fixes and MEP10 documentation fixes -* :ghpull:`1795`: MEP10 - refactored hlines and vlines documentation -* :ghpull:`1822`: Improved triinterp_demo pylab example -* :ghpull:`1811`: MultiCursor with additionnal optionnal horizontal bar -* :ghpull:`1817`: Improved test_triinterp_colinear -* :ghpull:`1799`: Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values -* :ghpull:`1800`: Agg snapping fixes (for the last time...?) :) -* :ghpull:`1786`: Cubic interpolation for triangular grids -* :ghpull:`1808`: DOC: typo, break lines >80 char, add link to cmaps list -* :ghpull:`1801`: Add .directory files to .gitignore -* :ghpull:`1724`: Re-write stacked step histogram -* :ghpull:`1790`: Fixes problem raised in #1431 (```get_transform``` should not affect ```is_transform_set```) -* :ghpull:`1779`: Bug in postscript backend in Python 3 -* :ghpull:`1797`: PEP8 on colors module -* :ghpull:`1291`: Fix image comparison -* :ghpull:`1791`: Symbol not found: _CGAffineTransformIdentity on MacOS 10.6 -* :ghpull:`1794`: Fix for #1792 -* :ghpull:`1454`: Retool the setup.py infrastructure -* :ghpull:`1785`: Fix test_bbox_inches_tight -* :ghpull:`1784`: Attempt to fix Travis "permission denied" error for Python 3 -* :ghpull:`1775`: Issue #1763 -* :ghpull:`1615`: Offset is empty with usetex when offset is equal to 1 -* :ghpull:`1778`: Fix clip_path_to_rect, add convenience method on Path object for it -* :ghpull:`1669`: Add EventCollection and eventplot -* :ghpull:`1725`: Fix compiler warnings -* :ghpull:`1756`: Remove broken printing_in_wx.py example. -* :ghpull:`1762`: Make cbook safe to import while removing duplicate is_string_like; -* :ghpull:`1252`: Properly passing on horiz-/vertOn to Cursor() -* :ghpull:`1686`: Fix lost ticks -* :ghpull:`1640`: Fix bugs in legend positioning with loc='best' -* :ghpull:`1687`: Update lib/matplotlib/backends/backend_cairo.py -* :ghpull:`1760`: Improved the subplot function documentation and fixed the autogeneration from boilerplate. -* :ghpull:`1716`: PEP8 fixes on the figure module -* :ghpull:`1643`: Clean up code in cbook -* :ghpull:`1755`: Update examples/pylab_examples/histogram_demo_extended.py -* :ghpull:`1497`: Fix for empty collection check in axes.add_collection -* :ghpull:`1685`: Add default savefig directory -* :ghpull:`1698`: Fix bug updating WeakKeyDictionary during iteration -* :ghpull:`1743`: slight tweak to the documentation of `errorbar` -* :ghpull:`1748`: Typo in "Annotation" docstring. -* :ghpull:`1750`: Name missmatch in filetypes.rgba and print_rgb of backend_bases.py -* :ghpull:`1722`: Fix sign of infstr in exceltools.rec2exel -* :ghpull:`1726`: stackplot_test_baseline has different results on 32-bit and 64-bit platforms -* :ghpull:`1577`: PEP8 fixes on the line module -* :ghpull:`1728`: Macosx backend: tweak to coordinates position -* :ghpull:`1718`: Fix set dashes for line collections -* :ghpull:`1721`: rcParams.keys() is not Python 3 compatible -* :ghpull:`1699`: Enable to switch off the removal of comments in csv2rec. -* :ghpull:`1710`: Mixing Arial with mathtext on Windows 8 fails -* :ghpull:`1705`: Qt closeevent fixes for v1.2.x -* :ghpull:`1671`: Feature stack base -* :ghpull:`1684`: Fix hist for log=True and histtype='step' -* :ghpull:`1708`: Fix breaking doc build -* :ghpull:`1644`: NF - Left and right side axes titles -* :ghpull:`1666`: Fix USE_FONTCONFIG=True mode -* :ghpull:`1691`: Fix svg flipping (again) -* :ghpull:`1695`: Alpha kwarg fix -* :ghpull:`1696`: Fixed doc dependency on numpy_ext.numpydoc -* :ghpull:`1665`: MEP10: adding numpydoc and activating autosummary -* :ghpull:`1660`: Explain that matplotlib must be built before the HTML documentation -* :ghpull:`1694`: fixes Issue #1693 -* :ghpull:`1682`: Fixed the expected output from test_arrow_patches.test_fancyarrow. -* :ghpull:`1663`: Fix suptitle -* :ghpull:`1675`: fix "alpha" kwarg in errorbar plot -* :ghpull:`1678`: added QtGui.QMainWindow.closeEvent() to make sure the close event -* :ghpull:`1674`: Fix SVG flip when svg.image_noscale is True -* :ghpull:`1680`: Ignore lib/dateutil -* :ghpull:`1626`: Add framealpha argument for legend -* :ghpull:`1642`: remove `import new` from cbook.py -* :ghpull:`1534`: Make `rc_context` available via pyplot interface -* :ghpull:`1672`: Nuke Travis python 3.1 testing -* :ghpull:`1670`: Deprecate mpl -* :ghpull:`1635`: Recompute Wedge path after change of attributes. -* :ghpull:`1498`: use QMainWindow.closeEvent for close events -* :ghpull:`1617`: Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x) -* :ghpull:`1585`: Fix Qt canvas resize_event -* :ghpull:`1611`: change handling of legend labels which are None -* :ghpull:`1657`: Add EventCollection and eventplot -* :ghpull:`1641`: PEP8 fixes on the rcsetup module -* :ghpull:`1650`: _png.read_png crashes on Python 3 with urllib.request object -* :ghpull:`1568`: removed deprecated methods from the axes module. -* :ghpull:`1589`: Fix shifted ylabels (Issue #1571) -* :ghpull:`1634`: add scatterpoints to rcParam -* :ghpull:`1654`: added explicit 'zorder' kwarg to `Colection` and `LineCollection`. -* :ghpull:`1653`: Fix #570 - Reversing a 3d axis should now work properly. -* :ghpull:`1651`: WebAgg: pylab compatibility -* :ghpull:`1505`: Issue 1504: changed how `draw` handles alpha in `markerfacecolor` -* :ghpull:`1655`: add get_segments method to collections.LineCollection -* :ghpull:`1652`: Ignore kdevelop4 project files -* :ghpull:`1613`: Using a stricter check to see if Python was installed as a framework. -* :ghpull:`1599`: Ada Lovelace and Grace Murray Hopper images in place of Lena -* :ghpull:`1582`: Linear tri interpolator -* :ghpull:`1637`: change cbook to relative import -* :ghpull:`1618`: Mplot3d/crashfixes -* :ghpull:`1636`: hexbin log scale is broken in matplotlib 1.2.0 -* :ghpull:`1624`: implemented inverse transform for Mollweide axes -* :ghpull:`1630`: A disconnected callback cannot be reconnected -* :ghpull:`1139`: Make Axes.stem take at least one argument. -* :ghpull:`1426`: WebAgg backend -* :ghpull:`1606`: Document the C/C++ code guidelines -* :ghpull:`1628`: Fix errorbar zorder v1.2 -* :ghpull:`1620`: Fix bug in _AnnotationBase -* :ghpull:`1587`: Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer... -* :ghpull:`1597`: new MatplotlibDeprecationWarning class (against master) -* :ghpull:`1596`: new MatplotlibDeprecationWarning class (against 1.2.x) -* :ghpull:`1532`: CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0' -* :ghpull:`1604`: Make font_manager ignore KeyErrors for bad fonts -* :ghpull:`1605`: Change printed -> pretty-printed -* :ghpull:`1557`: inverting an axis shouldn't affect the autoscaling setting -* :ghpull:`1603`: ylim=0.0 is not well handled in polar plots -* :ghpull:`1583`: Crash with text.usetex=True and plt.annotate -* :ghpull:`1602`: Fixed typos in docs (squashed version of #1600) -* :ghpull:`1592`: Fix a syntax error in examples (movie_demo.py) -* :ghpull:`1590`: Positional argument specifiers are required by Python 2.6 -* :ghpull:`1579`: Updated custom_projection_example.py to work with v1.2 and newer -* :ghpull:`1578`: Fixed blitting in Gtk3Agg backend -* :ghpull:`1573`: fix issue #1572 caused by PR #1081 -* :ghpull:`1562`: Mac OS X Backend: Removing clip that is no longer needed -* :ghpull:`1574`: Improvements to Sankey class -* :ghpull:`1536`: ENH: add AVConv movie writer for animations -* :ghpull:`1570`: PEP8 fixes on the tests of the dates module -* :ghpull:`1569`: FIX Removes code that does work from the axes module -* :ghpull:`1531`: fix rendering slowdown with big invisible lines (issue #1256) -* :ghpull:`1398`: PEP8 fixes on dates.py -* :ghpull:`1564`: PEP8-compliance on axes.py (patch 4 / 4) -* :ghpull:`1559`: Workaround for QT cursor bug in dock areas -* :ghpull:`1560`: Remove python2.5 support from texmanager.py -* :ghpull:`1555`: Geo projections getting clobbered by 2to3 when used when python3 -* :ghpull:`1477`: alternate fix for issue #997 -* :ghpull:`1522`: PEP8-compliance on axes.py (patch 3 / 4) -* :ghpull:`1550`: PEP8 fixes on the module texmanager -* :ghpull:`1289`: Autoscaling and limits in mplot3d. -* :ghpull:`1551`: PEP8 fixes on the spines module -* :ghpull:`1537`: Fix savefig.extension == "auto" -* :ghpull:`1297`: pyplot.plotfile. gridon option added with default from rcParam. -* :ghpull:`1538`: Remove unnecessary clip from Cairo backend; squashed commit -* :ghpull:`1544`: str.format() doesn't work on python 2.6 -* :ghpull:`1549`: Add citation page to website -* :ghpull:`1514`: Fix streamplot when color argument has NaNs -* :ghpull:`1081`: Propagate mpl.text.Text instances to the backends and fix documentation -* :ghpull:`1533`: ENH: raise a more informative error -* :ghpull:`1540`: Changed mailinglist archive link. -* :ghpull:`1493`: check `ret == False` in Timer._on_timer -* :ghpull:`1523`: DOC: github ribbon does not cover up index link -* :ghpull:`1515`: set_cmap should not require an active image -* :ghpull:`1489`: Documentation update for specgram -* :ghpull:`1527`: fix 2 html color names -* :ghpull:`1524`: Make README.txt consistent reStructuredText -* :ghpull:`1525`: pgf: documentation enhancements -* :ghpull:`1510`: pgf: documentation enhancements -* :ghpull:`1512`: Reorganize the developer docs -* :ghpull:`1518`: PEP8 compliance on the delaunay module -* :ghpull:`1357`: PEP8 fixes on text.py -* :ghpull:`1469`: PEP8-compliance on axes.py (patch 2 / 4) -* :ghpull:`1470`: Add ``test`` and ``test-coverage`` to Makefile -* :ghpull:`1442`: Add savefig_kwargs to Animation.save() method -* :ghpull:`1503`: DOC: 'inout' option for tick_params direction -* :ghpull:`1494`: Added sphinx documentation for Triangulation -* :ghpull:`1480`: Remove dead code in patches -* :ghpull:`1496`: Correct scatter docstring -* :ghpull:`1472`: FIX extra comma in Sankey.add -* :ghpull:`1471`: Improved checking logic of _check_xyz in contour.py -* :ghpull:`1491`: Reintroduce examples.directory rc parameter -* :ghpull:`1405`: Add angle kwarg to patches.Rectangle -* :ghpull:`1278`: Make arrow docstring mention data transform -* :ghpull:`1355`: Add sym-log normalization. -* :ghpull:`1474`: use an imagemap for the "fork me on github" ribbon -* :ghpull:`1485`: Fix leak of gc's in gtkagg backend -* :ghpull:`1374`: PEP8 fixes on widgets.py -* :ghpull:`1379`: PEP8 fixes on quiver.py -* :ghpull:`1399`: PEP8 fixes on patches -* :ghpull:`1395`: PEP8 fixes on contour.py -* :ghpull:`1464`: PEP8-compliance on axes.py (patch 1 / 4) -* :ghpull:`1400`: PEP8 fixes on offsetbox.py -* :ghpull:`1463`: Document the Gtk3 backends +* :ghpull:`4821`: Import JSAnimation into the animation module. (Fixes #4703) +* :ghpull:`9124`: Use savefig instead of print_figure +* :ghpull:`9125`: Cleanups +* :ghpull:`9126`: DOC: note that ipympl is external dependency +* :ghpull:`9128`: Remove Artist.{get,set}_axes. +* :ghpull:`9136`: Don't highlight the end of the API changes (plain text). +* :ghpull:`9132`: DOC: document axes-collision deprecation +* :ghpull:`8966`: Fix image interpolation +* :ghpull:`9110`: Api bar signature +* :ghpull:`9123`: DOC: add section on setting random number seeds +* :ghpull:`9122`: Move event_handling/README to event_handling/README.txt. +* :ghpull:`9049`: BUG: Fix weird behavior with mask and units (Fixes #8908) +* :ghpull:`6603`: Switch the cursor to a busy cursor while redrawing. +* :ghpull:`9101`: Doc backends +* :ghpull:`9116`: DOC: add missing imports +* :ghpull:`9099`: BLD: bump minimum dateutil to 2.0 +* :ghpull:`9070`: Replace use of renderer._uid by weakref. +* :ghpull:`9103`: Don't call draw() twice when Qt canvas first appears. +* :ghpull:`7562`: Cleanup: broadcasting +* :ghpull:`9105`: Update color docs. +* :ghpull:`9102`: Convert some dates.py docstrings to numpydoc +* :ghpull:`9106`: TST: do not do import in finally block +* :ghpull:`9095`: DOC: merge new whats_new and api_changes into top level doc +* :ghpull:`9097`: Validate string rcParams with string_types, not text_types. +* :ghpull:`9096`: Document auto-tightlayouting. +* :ghpull:`6542`: ENH: EngFormatter new kwarg 'sep' +* :ghpull:`8873`: Improved qhull triangulations with large x,y offset +* :ghpull:`9093`: Drop python 3.3 from setup.py +* :ghpull:`9066`: Let dpi be set when saving JPEG using Agg backend +* :ghpull:`9025`: fix leaked exception in RRuleLocator.tick_values +* :ghpull:`9087`: Micro-optimization of to_rgba_array. +* :ghpull:`8939`: Don't pretend to support Google App Engine. +* :ghpull:`8957`: New style for fast plotting, updated performance docs +* :ghpull:`9090`: [MAINT] savefig only takes one args +* :ghpull:`8956`: Fix ``text.set(bbox=None)``. +* :ghpull:`9063`: Api callback exceptions +* :ghpull:`9073`: Fix two cases of signed integer overflow. +* :ghpull:`9032`: Cleanup to image.py. +* :ghpull:`9079`: removing import that is prone to circular imports +* :ghpull:`9055`: Small cleanups. +* :ghpull:`9075`: Delete commented out code in figure +* :ghpull:`9069`: Doc: 2.1 api changes and whats_new doc merge up +* :ghpull:`9071`: Deprecate more of cbook. +* :ghpull:`9038`: Allow tuples of 4 floats as color rcparams. +* :ghpull:`9052`: Cooperative __init__ for Qt4 canvas. +* :ghpull:`9064`: Using ``canvas.draw_idle()`` inside ``plt.pause`` +* :ghpull:`8954`: Fix scatter alpha +* :ghpull:`4699`: Polar limits enhancements +* :ghpull:`9046`: Document class methods +* :ghpull:`9059`: Add entry for .notdef to CharStrings for type 42 fonts in eps files. … +* :ghpull:`9060`: CI: do not create venv on travis +* :ghpull:`9061`: DOC: use start_event_loop rather than plt.pause in example +* :ghpull:`9050`: fix pyplot tutorial bug +* :ghpull:`9026`: Sty solarized +* :ghpull:`9039`: docstring for key_press_handler_id +* :ghpull:`9034`: Revert "ENH: Switch to a private, simpler AxesStack." +* :ghpull:`9037`: Deprecate axes collision +* :ghpull:`9033`: Animation doc markup cleanups. +* :ghpull:`7728`: Warn about unused kwargs in contour methods +* :ghpull:`9002`: FIX: Qt5 account for dpiratio as early as possible +* :ghpull:`9027`: Revert "Merge pull request #5754 from blink1073/ipython-widget" +* :ghpull:`7377`: ENH: Switch to a private, simpler AxesStack. +* :ghpull:`8678`: Use Axes.tick_params/Axis.set_tick_params more +* :ghpull:`6598`: Register figureoptions edits in views history. +* :ghpull:`6384`: ENH: Figure.show() raises figure with qt backends +* :ghpull:`9021`: adding missing numpy import in backend-tools +* :ghpull:`8988`: If Legend shadow=True set framealpha=1 if not passed explicitly instead of consulting rcParams +* :ghpull:`9012`: Clarify docstring for SymmetricLogScale linthresh keyword arg +* :ghpull:`9011`: CI: re-enable py2.7 testing on appveyor +* :ghpull:`9009`: BUG: fix .remove method for container when one of the items is None +* :ghpull:`9010`: Fix typos +* :ghpull:`8897`: Update Usage FAQ to reflect new behaviour +* :ghpull:`6404`: Add a ax.voxels(bool3d) function +* :ghpull:`8972`: Don't drop marker alpha in Qt figure options. +* :ghpull:`9003`: Add a banner indicating docs are unreleased. +* :ghpull:`8984`: Workaround for islice int error in animation.py +* :ghpull:`9006`: Add whats new for barbs/quiver date support +* :ghpull:`8993`: Add 'density' kwarg to histogram +* :ghpull:`9001`: [DOC] replaced np.random with concrete data in stackplot_demo +* :ghpull:`8994`: Ensure that Path.arc works for any full circle. +* :ghpull:`8949`: ENH: add style aliases for 'default' and 'classic' +* :ghpull:`9005`: Fixes zoom rubberband display on macOS w/ wxagg and multiple subplots +* :ghpull:`8870`: Add num2timedelta method with test +* :ghpull:`8999`: CI: increase the allowed number of failures +* :ghpull:`8936`: Fix cairo mathtext. +* :ghpull:`8971`: ENH: Support x,y units for barbs/quiver +* :ghpull:`8996`: Stop using np.{builtin}, and fix bugs due to the previous confusion +* :ghpull:`8989`: Fix crash with Slider if value is out-of-bounds. +* :ghpull:`8991`: Remove superfluous list calls from around map +* :ghpull:`8975`: adding gallery sorting +* :ghpull:`8977`: Change labels in Qt figure options. +* :ghpull:`8776`: Updated downsampling +* :ghpull:`8628`: Use CSS-based Fork-on-GitHub ribbon. +* :ghpull:`8985`: Add tight_layout to some examples +* :ghpull:`8983`: Final batch of pylab example moves +* :ghpull:`8980`: Fix docstring of set_clip_path. +* :ghpull:`8961`: Doc install docs +* :ghpull:`8978`: Fix typos +* :ghpull:`8976`: Undocument shading kwarg to pcolor. +* :ghpull:`8963`: Some more pylab moves +* :ghpull:`8970`: Update colorbar.py +* :ghpull:`8968`: Correct step docstring +* :ghpull:`8931`: Fix a bug with the Qt5 backend with mixed resolution displays +* :ghpull:`8962`: Don't revalidate original rcParams when exiting rc_context. +* :ghpull:`8955`: Various documentation updates +* :ghpull:`7036`: DOC Updated parameters to numpy format +* :ghpull:`8857`: Pylab example moves 2 +* :ghpull:`8770`: Arrow patch docstring clean +* :ghpull:`8813`: Move and clean some pylab examples +* :ghpull:`8950`: FIX: invalid escapes in backend_pgf +* :ghpull:`7873`: ENH: Add a LockableBbox type. +* :ghpull:`8938`: Move float() casting in Rectangle patch +* :ghpull:`8151`: Issue #1888: added in the \dfrac macro for displaystyle fractions +* :ghpull:`8928`: DOC: tweak colormap docs in pyplot.colormaps +* :ghpull:`8937`: Fix stopping of Tk timers from with timer callback. +* :ghpull:`8773`: Backend class for better code reuse between backend modules +* :ghpull:`8880`: MAINT: Simplify algebra in LightSource.hillshade +* :ghpull:`8918`: tidy up markevery_demo example +* :ghpull:`8925`: Remove semicolon after PyObject_HEAD. +* :ghpull:`8919`: rewrote example to OO format +* :ghpull:`8920`: ci: Update Circle-CI apt cache first. +* :ghpull:`8893`: Build docs with Circle CI +* :ghpull:`8899`: Separating examples with multiple plots into separate blocks +* :ghpull:`8912`: Fix invalid NumPyDoc headings. +* :ghpull:`8906`: Fix typos +* :ghpull:`8905`: Upload built docs on Python 3 only. +* :ghpull:`8891`: Fix exception in plt.tight_layout() +* :ghpull:`8898`: Update some pylab examples to OO format +* :ghpull:`8900`: Convert get_ticklabels/add_axes/add_subplot to numpydoc +* :ghpull:`8887`: Add one-line descriptions to 19 examples currently missing them +* :ghpull:`8889`: DOC: updated review guidelines +* :ghpull:`8888`: FIX: Dev installation instructions documentation issue +* :ghpull:`8858`: Pylab example moves 3 +* :ghpull:`8879`: adding auto ticks example +* :ghpull:`8886`: Update pylab example to OO format +* :ghpull:`8884`: Changed dev docs to use https://github.com instead of git@github.com +* :ghpull:`8836`: Mask invalid values by default when setting log scale +* :ghpull:`8860`: Doc yinleon rebase +* :ghpull:`8743`: Fix 'animation' unable to detect AVConv. +* :ghpull:`8868`: Fix typos +* :ghpull:`8864`: Fix method/class links in plot_date docstring +* :ghpull:`8850`: Pdf color none +* :ghpull:`8861`: Fix eventplot colors kwarg +* :ghpull:`8853`: Add sentence to textprops tutorial mentioning mathtext rcParams +* :ghpull:`8851`: DOC: add NUMFocus badges +* :ghpull:`8451`: Allow unhashable keys in AxesStack. +* :ghpull:`8685`: DOC: moderize pong demo +* :ghpull:`8855`: Ci appveyor +* :ghpull:`8856`: Fix typo in test. +* :ghpull:`8848`: Prefer to the GraphicsContext public API when possible. +* :ghpull:`8772`: Backends cleanup +* :ghpull:`8846`: Minor cleanups for tests. +* :ghpull:`8835`: Allow users to control the fill for AnchoredSizeBar +* :ghpull:`8832`: Fix typos +* :ghpull:`7488`: Cleanups: np.clip and np.ptp are awesome +* :ghpull:`8785`: Fix pandas DataFrame align center +* :ghpull:`8831`: Allow zero dash linewidth +* :ghpull:`8751`: Clean up Line2D kwarg docstring bits +* :ghpull:`8568`: mlab test parametrization +* :ghpull:`8828`: [Documentation Typo] Update axes_divider.py +* :ghpull:`8753`: Remove tex version check; require dvipng >=1.6 +* :ghpull:`8827`: Remove user_interfaces/interactive_sgskip example. +* :ghpull:`8782`: Update index.rst (add DeCiDa to Toolkits paragraph) +* :ghpull:`8826`: Fix typos +* :ghpull:`8822`: fix vlines spelling in docstring +* :ghpull:`8824`: Update make.py clean for tutorials +* :ghpull:`8815`: document axhline from hlines docstring +* :ghpull:`8812`: BUGS: in colorbar: divide-by-zero, and undesired masked array +* :ghpull:`8811`: Updated file +* :ghpull:`8803`: Catch exception for PyPy +* :ghpull:`8809`: DOC: colorbar.set_ticks() accepts a Locator. +* :ghpull:`8722`: No longer connect to idle event on wx. +* :ghpull:`7771`: More code removal +* :ghpull:`8799`: Fix typos +* :ghpull:`8801`: Remove redundant variables in pcolormesh. +* :ghpull:`8669`: [MRG+1] Use svg file for applicaiton icon on qt5 +* :ghpull:`8792`: Fix typos +* :ghpull:`8757`: make sure marker colors also accept np.array, fixes #8750 +* :ghpull:`8761`: Fix typos +* :ghpull:`8754`: Bump minimal pyparsing to 2.0.1 +* :ghpull:`8719`: BUG: handle empty levels array in contour, closes #7486 +* :ghpull:`8741`: Simplify some examples. +* :ghpull:`8747`: sort input files +* :ghpull:`8737`: Fix colorbar test and color level determination for contour +* :ghpull:`8582`: Changed normalization in _spectral_helper() to obtain conistent scaling +* :ghpull:`8739`: Made colorbar.py accept numpy array input, compatible with output fro… +* :ghpull:`8720`: Simplify cla sharex/sharey code; alternative to #8710 +* :ghpull:`8708`: Fix flaky text tests +* :ghpull:`8711`: Various cleanups to backends code. +* :ghpull:`8735`: Allow divmod to be overridden by numpy +* :ghpull:`8703`: Clarify how a FancyArrowPatch behaves +* :ghpull:`8725`: removing sgskip +* :ghpull:`8614`: Make histogram example figures fit on web page +* :ghpull:`8729`: Parameterize test_fill_between and test_fill_betweenx +* :ghpull:`8709`: Fix typos +* :ghpull:`8726`: Fix typos +* :ghpull:`8727`: Remove 'Demo of' from stats example titles +* :ghpull:`8728`: Fix some lgtm alerts +* :ghpull:`8696`: Interpret data to normalize as ndarrays +* :ghpull:`8707`: Added default value of align to bar an barh +* :ghpull:`8721`: Remove deprecated rcParams entries and functions. +* :ghpull:`8714`: Minor cleanups of the qt4 embedding examples. +* :ghpull:`8713`: Minor fix to check on text.latex.preamble. +* :ghpull:`8697`: Deprecate NavigationToolbar2.dynamic_update. +* :ghpull:`8670`: str_angles and scale_units logic for quiver +* :ghpull:`8681`: Move text examples out of pylab_examples +* :ghpull:`8687`: FIX: gtk blitting +* :ghpull:`8691`: Fix skipif in interactive backends test. +* :ghpull:`8677`: Cleanup of merged pylab examples +* :ghpull:`8683`: Simplify and improve Qt borders/spacing tool. +* :ghpull:`8671`: FIX: Handle properly stopping the NSApp when a tooltip panel might st… +* :ghpull:`8199`: merged the tex_X.py files into a single file tex.py +* :ghpull:`8676`: Add basic testing of wxagg backend. +* :ghpull:`8600`: Colorbar only tut +* :ghpull:`8633`: Move some examples out of pylab_examples +* :ghpull:`8574`: Make sure circular contours don't throw a warning +* :ghpull:`5391`: Custom pivot for barbs +* :ghpull:`8651`: Ignore non-finite vertices when running count_contains +* :ghpull:`8657`: Add pandas package to appveyor configuration +* :ghpull:`8672`: Update Travis to Trusty build images +* :ghpull:`8666`: Document 'right' legend position as alias for 'center right'. +* :ghpull:`8660`: Add basic testing of interactive backends. +* :ghpull:`8375`: Issue #8299, implemented copy, added test +* :ghpull:`8266`: Consolidate and move examples out of pylab +* :ghpull:`8656`: WebAgg backend: Fix unbound variable error in get_diff_image +* :ghpull:`8655`: Fix tests against pytest 3.1 +* :ghpull:`8643`: Remove unused resolution kwarg to PolarAxes +* :ghpull:`8647`: FIX: fail early for non-finite figure sizes +* :ghpull:`8305`: In ginput(), don't call show() if we can't. +* :ghpull:`8648`: Don't require sphinx-gallery<1.6 +* :ghpull:`8573`: SG for toolkits +* :ghpull:`8634`: Require sphinx < 1.6 +* :ghpull:`8621`: Added keep_observers to clf() synonym clear() +* :ghpull:`8601`: Mpl toolkit fix for zoomed_inset_axes +* :ghpull:`8608`: Fix a number of minor local bugs +* :ghpull:`8580`: Only install doc requirements if building docs on travis +* :ghpull:`8581`: linking front thumbnails, updating screenshots + pyplot API page +* :ghpull:`8602`: doc: State default for legend's ``markerfirst`` +* :ghpull:`8605`: Add mpl.contour to api docs; minor fix to docstring. +* :ghpull:`8591`: shims for categorical support for numpy < 1.8 +* :ghpull:`8603`: Cleanup examples and re-enable pep8 +* :ghpull:`8610`: BUG: Correct invocation of ``expand_dims`` +* :ghpull:`8596`: Adding an intro tutorial +* :ghpull:`8598`: Add test for _num_to_string method used in __call__ of LogFormatter +* :ghpull:`8594`: Missing return in _num_to_string() +* :ghpull:`8584`: Add pandas to python 3.6 build +* :ghpull:`8583`: Fix pandas datetime test on pandas 0.20 +* :ghpull:`8566`: adding keyword plotting +* :ghpull:`8567`: Minor pytest parametrization +* :ghpull:`8554`: added basic_units download link to units examples +* :ghpull:`8545`: Add tutorials +* :ghpull:`8176`: Custom error message for draw_path. issues : #8131 (bad error message from pyplot.plot) +* :ghpull:`8185`: Implement blocking Qt event loop. +* :ghpull:`8346`: Use some more pytest plugins: warnings & rerunfailures +* :ghpull:`8536`: Update doc build. +* :ghpull:`8544`: updating developer docs +* :ghpull:`8548`: fixing scatter doc +* :ghpull:`8546`: nested pie example +* :ghpull:`8539`: Fix rectangular patches to be properly transformed on polar axes +* :ghpull:`8525`: Sphinx Gallery API pages + deprecating old examples folder +* :ghpull:`8538`: Update doc/thirdpartypackages/index.rst +* :ghpull:`8535`: Remove use of (deprecated) is_string_like in mplot3d. +* :ghpull:`8526`: Clarify docs for rcdefaults and friends. +* :ghpull:`8513`: Fix autoscaling with twinx and vspans: consider axis with one pair of finite limits ONLY +* :ghpull:`8523`: Update conda patch for AppVeyor build. +* :ghpull:`8522`: adding backreferences_dir param +* :ghpull:`8491`: Remove codecov coverage targets. +* :ghpull:`8518`: Discourage omitting backend in matplotlibrc +* :ghpull:`8486`: changed inherited Axes calls to super +* :ghpull:`8511`: Update front page so there's only one gallery +* :ghpull:`8510`: MNT: update GH issue template [ci skip] +* :ghpull:`8478`: Fixed Error: local variable 'xdata' referenced before assignment" in legend_handler.py +* :ghpull:`8502`: Update PR template to encourage PRs off not master. +* :ghpull:`8495`: Fix incorrect text line spacing. +* :ghpull:`8472`: migrate examples to sphinx-gallery +* :ghpull:`8488`: Build docs with oldest numpy on 2.7. +* :ghpull:`8377`: Clean up unit examples +* :ghpull:`8011`: Deprecate is_string_like, is_sequence_of_strings +* :ghpull:`7990`: Added a workaround for Jupyter notebooks +* :ghpull:`8324`: Update svg_tooltip.py +* :ghpull:`8380`: Make image_comparison more pytest-y +* :ghpull:`8485`: FIX markevery only accepts builtin integers, not numpy integers +* :ghpull:`8489`: Fix markup in plt.subplots docstring. +* :ghpull:`8490`: Clarify that Path.contains_x implicitly closes the Path. +* :ghpull:`8492`: Remove useless, confusing check in hist(). +* :ghpull:`7931`: The font with the same weight name as the user specified weight name … +* :ghpull:`8256`: [DOC] Clean up bar_demo2 +* :ghpull:`8455`: Added axes inversion to cla() +* :ghpull:`8474`: Check for non-finite axis limits placed on converted_limit +* :ghpull:`8482`: Modified PR Template +* :ghpull:`7572`: Overhaul external process calls +* :ghpull:`8394`: Unify WM_CLASS across backends +* :ghpull:`8447`: Let imshow handle float128 data. +* :ghpull:`8476`: Pull Request template +* :ghpull:`8450`: Don't bother disconnecting signals in TimerQt.__del__. +* :ghpull:`8468`: Clarify that Image.set_data doesn't update normalization. +* :ghpull:`8403`: New Feature - PolygonSelector Widget +* :ghpull:`8157`: add which kwarg to autofmt_xdate +* :ghpull:`8022`: Fixed Issue #7460: Raised an error if argument to xlim is invalid +* :ghpull:`8336`: Merged streamline examples +* :ghpull:`8399`: Fix % formatting and Transform equality. +* :ghpull:`8319`: FancyArrowPatch docstring overhaul +* :ghpull:`8452`: Revert #5392 +* :ghpull:`8344`: Add simple ax.arrow test +* :ghpull:`8462`: Add container module to API docs +* :ghpull:`8456`: Migration to sphinx-gallery +* :ghpull:`8454`: Finish deprecating idle_event; style cleanups to backend_bases +* :ghpull:`8326`: Orthographic projection for mplot3d +* :ghpull:`8453`: Manually collect lines on checkbox example +* :ghpull:`8446`: Download the depsy.org badge when building the html documentation +* :ghpull:`8435`: Improve hist2d docstring by inlining properties. +* :ghpull:`8376`: Remove exceltools and gtktools from docs +* :ghpull:`8322`: Use scalars below a certain exponent in labes of log-scales axis +* :ghpull:`8374`: DOC update build dependencies +* :ghpull:`8339`: Give wide code blocks a scrollbar on website +* :ghpull:`8253`: Handle floating point round-off error when converting to pixels for h264 animations +* :ghpull:`8156`: DOC: Add missing cmaps to perception doc (fix for #8073) +* :ghpull:`8373`: [DOC] Updated the documentation +* :ghpull:`8391`: DOC: Update MEP 28 +* :ghpull:`8340`: Refactor code duplication in ``matplotlib.markers`` +* :ghpull:`8396`: DOC: Show off FuncFormatter as a decorator +* :ghpull:`8383`: Merge v2.0.x into master +* :ghpull:`8372`: MNT: cleanup whitespace around @_preprocess decorator +* :ghpull:`6310`: Make checkbuttons with all plotted lines with correct visibility automatically +* :ghpull:`7786`: Don't reshape offsets into the correct shape. +* :ghpull:`8254`: Adding headers for examples/units for MEP12/sphinx-gallery compliance +* :ghpull:`8369`: Use cbook._reshape_2D in hist. +* :ghpull:`8371`: DOC: Clean up the pie docstring PR +* :ghpull:`8343`: Make ArrowStyle docstrings numpydoc compatible +* :ghpull:`8368`: Cleanup appveyor.yml. +* :ghpull:`8334`: Fix Appveyor build. +* :ghpull:`8367`: symlog + minor ticks = exception +* :ghpull:`8258`: DOC: Clean up equal-aspect example +* :ghpull:`8116`: Simplify _reshape_2D. +* :ghpull:`8240`: DOC refactored installation instruction +* :ghpull:`8363`: DOC: update link to mpl-probscale +* :ghpull:`8362`: Add adjustText to the list of third party packages +* :ghpull:`7691`: ENH: Optional 3d bar shading +* :ghpull:`8264`: Fix leaky ps +* :ghpull:`8338`: Renamed all 'mtrans' into more common 'mtransforms' +* :ghpull:`8331`: Don't index into __builtins__ (not supported by PyPy). +* :ghpull:`8311`: DOC api's transition to sphinx-gallery is now complete +* :ghpull:`8287`: FIX: add __setstate__ function +* :ghpull:`8281`: Fix testing with tests.py on Py3.6. +* :ghpull:`8149`: Fix check for DISPLAY on PyQt5. +* :ghpull:`7844`: Fix containment test with nonlinear transforms. +* :ghpull:`8306`: DOC added titles to the rest of the 3D plots +* :ghpull:`8328`: Use neutral pronoun in docs. +* :ghpull:`8295`: Removes OldScalarFormatter #7956 +* :ghpull:`8310`: DOC shapes and collections is fully SG compatible +* :ghpull:`8304`: Remove executable bit from examples and headers. +* :ghpull:`8229`: MEP12 ganged example +* :ghpull:`8301`: STY: fix whitespace in the tests +* :ghpull:`8248`: Inkscape shell mode. +* :ghpull:`8298`: Fix sphinx required version +* :ghpull:`8276`: MAINT moved some maintenance and helper python scripts to tools/ +* :ghpull:`8275`: DOC moved changelog to the documentation +* :ghpull:`8262`: TST: fail on missing baseline file +* :ghpull:`8244`: BUG Ignore invisible axes in computing tight_layout +* :ghpull:`8018`: Cleanup visual_tests and disable browser opening +* :ghpull:`8268`: DOC moved spines examples sphinx-gallery +* :ghpull:`8239`: changes in travis's build environment +* :ghpull:`8274`: Removed obsolete license.py file +* :ghpull:`8165`: FIX: Remove type checking for strings in '_validate_linestyle' +* :ghpull:`8261`: Set __name__ for list validators in rcsetup. +* :ghpull:`8217`: Add option to rotate labels in a pie chart (#2304) +* :ghpull:`8227`: Contouring 1x1 array (issue #8197) +* :ghpull:`8269`: Use sys.executable -msphinx instead of sphinx-build. +* :ghpull:`8252`: Memoize parse_fontconfig_pattern; speeds up test suite by ~1min. +* :ghpull:`8047`: Correct theta values when drawing a non-circular arc +* :ghpull:`8245`: DOC: sphinx-gallery histograms +* :ghpull:`8241`: Remove image with non-free color calibration profile +* :ghpull:`7878`: Update vlines example with axes wide lines. +* :ghpull:`8237`: Fix pep8 violation +* :ghpull:`8224`: Implement Path.intersects_bbox in C++ to speed up legend positioning. +* :ghpull:`8228`: MEP12 text alignment example +* :ghpull:`8179`: TST: Enable cache directories on AppVeyor. +* :ghpull:`8211`: Mep12 text labels and annotations +* :ghpull:`8234`: fix gitter badge +* :ghpull:`8233`: changes to MEP12/sphinx-gallery compliant +* :ghpull:`8196`: Issue #8141: Dash validator allowing None values in addition to floats +* :ghpull:`8154`: merge fill_demo and fill_demo_features +* :ghpull:`8213`: TST: skip fc-list related tests if not installed +* :ghpull:`8172`: [MRG+1] [DOC] Turn ginput dostring into a numpydocstring +* :ghpull:`8173`: [MRG+1] Simplify and clean multicolor_line example +* :ghpull:`8221`: Early check for dot binary (from graphviz) when building the doc (fixes #8207) +* :ghpull:`8215`: Mep12 showcase +* :ghpull:`8212`: Mep12 ticks and spines +* :ghpull:`8219`: [DOC] Plural of axis is axes +* :ghpull:`7744`: Added axis limit check for non-finite values +* :ghpull:`5691`: Update documentation of stem to mention StemContainer +* :ghpull:`8175`: Add autoclass entry for Artist API doc. +* :ghpull:`8158`: Fix layout of spectrum_demo.py +* :ghpull:`8190`: add gitter link in README +* :ghpull:`8007`: Clean up BoundaryNorm docstring +* :ghpull:`8178`: Addresses #8177, Readme badges +* :ghpull:`8166`: MAINT: mappingview check for Python 3.4 +* :ghpull:`8171`: DOC: Fix small typos in 'eventplot' docstring +* :ghpull:`8167`: Fixes typos in Artist tutorial +* :ghpull:`8161`: Add a code block in 'installing' docs. +* :ghpull:`8150`: Deprecate Axes.axesPatch, Figure.figurePatch. +* :ghpull:`8148`: Remove support for -dbackend argv. +* :ghpull:`8137`: Regenerate the gitwash docs. +* :ghpull:`6977`: Handle dvi font names as ASCII bytestrings +* :ghpull:`8066`: Clean up and move text rotation example +* :ghpull:`8134`: Update Slider docs and type check slidermin and slidermax. +* :ghpull:`8139`: DOC: Fixed x, y, docstring in errorbar +* :ghpull:`8133`: Disable network tests on AppVeyor. +* :ghpull:`8065`: Clean up and move accented text example +* :ghpull:`8119`: Drop None from Container.get_children(). +* :ghpull:`8115`: Add branch coverage; exclude _version.py from coverage. +* :ghpull:`7995`: Set sticky_edges correctly for negative height bar(). +* :ghpull:`8118`: Deprecate matplotlib.tests.assert_str_equal. +* :ghpull:`7394`: Cleanup transforms.py. +* :ghpull:`8036`: Tweak coverage +* :ghpull:`8110`: Mrg2.0.x +* :ghpull:`8103`: Use XDG config path on FreeBSD +* :ghpull:`8026`: Pytest documentation + build tweaks +* :ghpull:`8101`: Named Matplotlib module in windows instructions +* :ghpull:`8099`: Update examples/README.txt. +* :ghpull:`8094`: Remove example of matrix of size (12, 12) and (64, 64) +* :ghpull:`8040`: ENH: Stricter validation of line style rcParams (and extended accepted types for ``grid.linestyle``) +* :ghpull:`8097`: use plt.gca instead of plt.axes for already exhisting implicit axes +* :ghpull:`8096`: Improve error message for image_comparison decorator. +* :ghpull:`8085`: Fix PYTHONHASHSEED setup on OS X. +* :ghpull:`8086`: DOC: add SOURCELINK_SUFFIX for compatibility with Sphinx 1.5 +* :ghpull:`8063`: Update MovieWriter dpi default +* :ghpull:`8084`: Add link to scipython book +* :ghpull:`7871`: Use backports.functools_lru_cache instead of functools32 +* :ghpull:`8070`: Switch to suppress option to True in setup.cfg.template. +* :ghpull:`4997`: The url of downloading historical prices of Yahoo Finance has changed +* :ghpull:`8043`: Fix pyplot.axis(ax) when ax is in other figure. +* :ghpull:`8055`: Undeprecate is_scalar_or_string. +* :ghpull:`8060`: Added tight_layout() to example. +* :ghpull:`7968`: Fix cohere-demo +* :ghpull:`8033`: Update inline comment in set_and_get.py +* :ghpull:`7985`: Catch specgram warnings during tests +* :ghpull:`7965`: ENH: Fixed PercentFormatter usage with latex +* :ghpull:`8014`: do not ignore "closed" parameter in Poly3DCollection +* :ghpull:`7933`: Cleanup: use ``is not`` instead of ``not ... is``, etc. +* :ghpull:`7981`: Clarify backports documentation +* :ghpull:`8020`: Allow choosing logit scale in qt figure options. +* :ghpull:`8003`: Coverage config +* :ghpull:`7974`: Switch testing to pytest completely +* :ghpull:`8001`: Switch to pytest-pep8. +* :ghpull:`7993`: MAINT: Updated tick and category test formatting +* :ghpull:`8002`: Remove pytest_pycollect_makeitem. +* :ghpull:`7925`: Fix a number of Deprecated/Invalid escape sequences +* :ghpull:`7999`: More cbook deprecations. +* :ghpull:`7973`: Convert test decorators to pytest fixtures +* :ghpull:`7996`: Simplify implementation of is_numlike & is_string_like. +* :ghpull:`7998`: Display relative image paths when tests fail. +* :ghpull:`7997`: Default cmap is not jet anymore... +* :ghpull:`7809`: Fix for marker verts bug +* :ghpull:`7987`: Add vega deprecations to tests on master +* :ghpull:`7625`: Legend autopositioning with "spiraling" lines. +* :ghpull:`7983`: Remove assert_true calls from new PRs. +* :ghpull:`7980`: Coding Guide Edits +* :ghpull:`7959`: Allow zero sized ticks +* :ghpull:`7767`: Don't check ``iterable()`` before ``len()``. +* :ghpull:`7913`: Clean up quiver docstring + add simple quiver example +* :ghpull:`7023`: Add ``clf`` kwarg to plt.figure() +* :ghpull:`7857`: Fix/hide some deprecations +* :ghpull:`7961`: Compute glyph widths similarly in Type 42 as in Type 3 +* :ghpull:`7972`: MAINT cleaning up of gallery examples. +* :ghpull:`7952`: MEP12 of showcase's examples + other folders. +* :ghpull:`7904`: twinx / twiny inherit autoscale behavior for shared axis +* :ghpull:`7935`: Finish removing nose +* :ghpull:`7859`: Fix typo in Axes3D.set_autoscalez_on. +* :ghpull:`7947`: MAINT testing.nose -> testing._nose to make it explicitely private +* :ghpull:`7960`: Don't try to build for py34 on appveyor +* :ghpull:`7949`: Remove ``sharex_foreign`` example, now useless. +* :ghpull:`7843`: MAINT: add ability to specify recursionlimit +* :ghpull:`7941`: Cleanup: remove unused variable/assignment/expression and debug comments +* :ghpull:`7944`: Improve hexbin performance +* :ghpull:`7938`: Fix typo in toolkits docs +* :ghpull:`7752`: bugfix for wx backend: release mouse on loss of focus and before trying to recapture +* :ghpull:`7914`: Fix unpickling of CallbackRegistry on Py2. +* :ghpull:`7929`: Remove a dead code (``font_manager.ttfdict_fnames``) +* :ghpull:`7932`: Convert remaining tests to pytest +* :ghpull:`7926`: Stop codecov from posting messages +* :ghpull:`7892`: Configure AppVeyor to fail fast +* :ghpull:`7934`: Run animation smoketest in a temporary directory. +* :ghpull:`7872`: Convert font/text tests to pytest +* :ghpull:`7915`: Convert sphinxext tests to pytest. +* :ghpull:`7898`: MAINT moved g-i-l* modules to pytest +* :ghpull:`7897`: MAINT moved all remaining "f" modules to pytest +* :ghpull:`7863`: Convert backend tests to use pytest +* :ghpull:`7907`: BUG: Add a newline separator in fc-list call +* :ghpull:`7920`: Convert preprocess tests to pytest +* :ghpull:`7887`: Convert mpl toolkits tests to pytest + minor cleanup +* :ghpull:`7918`: Convert test_s* files to pytest and flake8 them +* :ghpull:`7916`: Convert test_[ab]* files to pytest. +* :ghpull:`7923`: Fix leak of filedescriptor if fontsize cannot be set. +* :ghpull:`7900`: DOC MEP12: pie/polar and color examples + style sheets fix +* :ghpull:`7818`: Tripcolor.py: Remove documentation rendering error +* :ghpull:`7896`: Reject floatlike strings in mcolors.to_rgba. +* :ghpull:`7830`: MAINT moved _backports to cbook module +* :ghpull:`7883`: Convert mlab tests to pytest +* :ghpull:`7885`: MAINT moved all "d" modules to pytest. +* :ghpull:`7889`: Convert remaining test_t* files to pytest. +* :ghpull:`7748`: MAINT: Deterministic SVG and PDF tests +* :ghpull:`7884`: MAINT moved "c" modules to pytest +* :ghpull:`7890`: DOC Convert style sheet examples to MEP12 +* :ghpull:`7888`: Transform test updates (pytest + cleanup) +* :ghpull:`7882`: MAINT pytest now exit on first failure on travis +* :ghpull:`7327`: DOC MEP12 - converted lines, bars and markers to SG/MEP12 compatible +* :ghpull:`7811`: Allow figure.legend to be called without arguments +* :ghpull:`7854`: !B [#7852] fix for _rrule maximum recursion depth exceeded on multiprocessing usage +* :ghpull:`7861`: Make radio and check buttons visible +* :ghpull:`7868`: MNT: reference the proper variable in bootstrapper +* :ghpull:`7817`: better input validation on ``fill_between`` +* :ghpull:`7864`: Minor simplification of inset_locator_demo. +* :ghpull:`7865`: FIX Preserve title case when saving through GUI (issue #7824) +* :ghpull:`7850`: Allow AnchoredOffset to take a string-like location code +* :ghpull:`7845`: Fixed bug with default parameters NFFT and noverlap in specgram() +* :ghpull:`7800`: DOC: explain non-linear scales and imshow (closes #7661) +* :ghpull:`7639`: Enh color names +* :ghpull:`7829`: MAINT tests should not use relative imports +* :ghpull:`7828`: MAINT added early checks for dependencies for doc building +* :ghpull:`7424`: Numpy Doc Format +* :ghpull:`7821`: DOC: Changes to screenshots plots. +* :ghpull:`7644`: Allow scalar height for plt.bar +* :ghpull:`7838`: Merge v2.x +* :ghpull:`7823`: MAINT matplotlib -> Matplotlib +* :ghpull:`7833`: Deprecate unused verification code. +* :ghpull:`7827`: Cast stackplot input to float when required. +* :ghpull:`7834`: Remove deprecated get_example_data. +* :ghpull:`7826`: Remove invalid dimension checking in axes_rgb. +* :ghpull:`7831`: Function wrapper for examples/api/two_scales.py +* :ghpull:`7801`: Add short-circuit return to matplotlib.artist.setp if input is length 0 +* :ghpull:`7740`: Beautified frontpage plots and two pylab examples +* :ghpull:`7730`: Fixed GraphicsContextBase linestyle getter +* :ghpull:`7747`: Update qhull to 2015.2 +* :ghpull:`7645`: Clean up stock sample data. +* :ghpull:`7753`: Clarify the uses of whiskers float parameter. +* :ghpull:`7765`: TST: Clean up figure tests +* :ghpull:`7729`: For make raw_input compatible with python3 +* :ghpull:`7783`: Raise exception if negative height or width is passed to axes() +* :ghpull:`7727`: DOC: Fix invalid nose argument in testing.rst +* :ghpull:`7731`: Check origin when saving image to PNG +* :ghpull:`7782`: Fix some more integer type inconsistencies in Freetype code +* :ghpull:`7781`: Fix integer types for font metrics in PyGlyph class +* :ghpull:`7791`: Use reliable int type for mesh size in draw_quad_mesh (#7788) +* :ghpull:`7796`: Only byte-swap 16-bit PNGs on little-endian (#7792) +* :ghpull:`7794`: Ignore images that doc build produces +* :ghpull:`7790`: Adjust markdown and text in ISSUE_TEMPLATE.md +* :ghpull:`7773`: Fix more invalid escapes sequences. +* :ghpull:`7769`: Remove redundant pep8 entry in .travis.yml. +* :ghpull:`7760`: DOC: Correct subplot() doc +* :ghpull:`7768`: Convert unicode index to long, not int, in get_char_index +* :ghpull:`7770`: BUG: improve integer step selection in MaxNLocator +* :ghpull:`7766`: Invalid escape sequences are deprecated in Py3.6. +* :ghpull:`7758`: fix axes barh default align option document +* :ghpull:`7749`: DOC: Sync keyboard shortcuts for fullscreen toggle +* :ghpull:`7757`: By default, don't include tests in binary distributions. +* :ghpull:`7762`: DOC: Fix finance depr docs to point to mpl_finance +* :ghpull:`7737`: Ensure that pyenv command is in a literal block +* :ghpull:`7732`: Add rcsetup_api.rst, fix typo for rcsetup.cycler +* :ghpull:`7726`: FIX: Clean up in the new quiverkey test; make new figs in scale tests +* :ghpull:`7620`: Add warning context +* :ghpull:`7719`: Add angle kwarg to quiverkey +* :ghpull:`7701`: DOC: Add bug report reqs and template to contributing guide +* :ghpull:`7723`: Use mplDeprecation class for all deprecations. +* :ghpull:`7676`: Makes eventplot legend work +* :ghpull:`7714`: TST: switch from 3.6-dev to 3.6 +* :ghpull:`7713`: Declare Python 3.6 support via classifier in setup.py +* :ghpull:`7693`: Change majority of redirected links in docs +* :ghpull:`7705`: Fixes tzname return type +* :ghpull:`7703`: BF: Convert namespace path to list +* :ghpull:`7702`: DOC: Add link to bokeh/colorcet in colormaps.rst +* :ghpull:`7700`: DOC: Add gitter to home page +* :ghpull:`7692`: Corrected default values of xextent in specgram(). Fixes Bug #7666. +* :ghpull:`7698`: Update INSTALL for Python 3.6 +* :ghpull:`7694`: Fix a few broken links in docs +* :ghpull:`7349`: Add support for png_text metadata, allow to customize metadata for other backends. +* :ghpull:`7670`: Decode error messages from image converters. +* :ghpull:`7677`: Make new default style examples consistent +* :ghpull:`7674`: Serialize comparison of multiple baseline images. +* :ghpull:`7665`: FIX: Fix super call for Python 2.7 +* :ghpull:`7668`: Save SVG test directly to file instead of its name. +* :ghpull:`7549`: Cleanup: sorted, dict iteration, array.{ndim,size}, ... +* :ghpull:`7667`: FIX: Fix missing package +* :ghpull:`7651`: BUG,ENH: make deprecated decorator work (and more flexibly) +* :ghpull:`7658`: Avoid comparing numpy array to strings in two places +* :ghpull:`7657`: Fix warning when setting markeredgecolor to a numpy array +* :ghpull:`7659`: DOC: Original documentation was misleading +* :ghpull:`6780`: Call _transform_vmin_vmax during SymLogNorm.__init__ +* :ghpull:`7646`: Improve deprecation documentation. Closes #7643 +* :ghpull:`7604`: Warn if different axis projection requested +* :ghpull:`7568`: Deprecate unused functions in cbook. +* :ghpull:`6428`: Give a better error message on missing PostScript fonts +* :ghpull:`7585`: Fix a bug in TextBox where shortcut keys were not being reenabled +* :ghpull:`7628`: picker may not be callable. +* :ghpull:`7464`: ENH: _StringFuncParser to get numerical functions callables from strings +* :ghpull:`7622`: Mrg animation merge +* :ghpull:`7618`: DOC: fixed typo in mlab.py +* :ghpull:`7596`: Delay fc-list warning by 5s. +* :ghpull:`7607`: TST: regenerate patheffect2 +* :ghpull:`7608`: Don't call np.min on generator. +* :ghpull:`7570`: Correctly skip colors for nan points given to scatter +* :ghpull:`7605`: Make bars stick to explicitly-specified edges. +* :ghpull:`6597`: Reproducible PS/PDF output (master) +* :ghpull:`7546`: Deprecate update_datalim_numerix&update_from_data. +* :ghpull:`7574`: Docs edits +* :ghpull:`7538`: Don't work out packages to install if user requests information from setup.p +* :ghpull:`7577`: Spelling fix: corosponding -> corresponding +* :ghpull:`7536`: Rectangle patch angle attribute and patch __str__ improvements +* :ghpull:`7547`: Additional cleanups +* :ghpull:`7544`: Cleanups +* :ghpull:`7548`: Clarify to_rgba docstring. +* :ghpull:`7476`: Sticky margins +* :ghpull:`7552`: Correctly extend a lognormed colorbar +* :ghpull:`7499`: Improve the marker table in markers_api documentation +* :ghpull:`7468`: TST: Enable pytest-xdist +* :ghpull:`7530`: MAINT: TkAgg default backend depends on tkinter +* :ghpull:`7531`: double tolerance for test_png.py/pngsuite on Windows +* :ghpull:`7533`: FIX chinese character are hard to deal with in latex +* :ghpull:`7525`: Avoid division by zero if headlength=0 for quiver +* :ghpull:`7522`: Check at least one argument is provided for plt.table +* :ghpull:`7520`: Fix table.py bug +* :ghpull:`7397`: Numpydoc for backends +* :ghpull:`7513`: Doc: Typo in gridspec example subtitle +* :ghpull:`7494`: Remove some numpy 1.6 workarounds +* :ghpull:`7500`: Set hexbin default linecolor to 'face' +* :ghpull:`7498`: Fix double running of explicitly chosen tests. +* :ghpull:`7475`: Remove deprecated "shading" option to pcolor. +* :ghpull:`7436`: DOC: Fixed Unicode error in gallery template cache +* :ghpull:`7496`: Commit to fix a broken link +* :ghpull:`6062`: Add maximum streamline length property. +* :ghpull:`7470`: Clarify cross correlation documentation #1835 +* :ghpull:`7481`: Minor cleanup of hist(). +* :ghpull:`7474`: FIX/API: regenerate test figure due to hatch changes +* :ghpull:`7469`: TST: Added codecov +* :ghpull:`7467`: TST: Fixed part of a test that got displaced in all the changes somehow +* :ghpull:`7447`: Showcase example: (kind of mandatory) Mandelbrot set +* :ghpull:`7463`: Added additional coverage excludes +* :ghpull:`7449`: Clarify documentation of pyplot.draw +* :ghpull:`7454`: Avoid temporaries when preparing step plots. +* :ghpull:`7455`: Update two_scales.py example. +* :ghpull:`7456`: Add pytest's .cache to .gitignore. +* :ghpull:`7453`: TST: Fixed ``test_log_margins`` test +* :ghpull:`7144`: Cleanup scales +* :ghpull:`7442`: Added spacer to Tk toolbar +* :ghpull:`7444`: Enhance ``annotation_demoX`` examples +* :ghpull:`7439`: MEP12 API examples +* :ghpull:`7416`: MAINT deprecated 'spectral' in favor of 'nipy_spectral' +* :ghpull:`7435`: restore test that was inadvertently removed by 5901b38 +* :ghpull:`7363`: Add appropriate error on color size mismatch in ``scatter`` +* :ghpull:`7433`: FIX: search for tkinter first in builtins +* :ghpull:`7362`: Added ``-j`` shortcut for ``--processes=`` +* :ghpull:`7408`: Handle nan/masked values Axes.vlines and hlines +* :ghpull:`7409`: FIX: MPL should not use new tool manager unless explicited asked for. Closes #7404 +* :ghpull:`7389`: DOC Convert axes docstrings to numpydoc: #7205 +* :ghpull:`7417`: Merge from v2.x +* :ghpull:`7398`: Moved python files from doc/pyplots to examples folder +* :ghpull:`7291`: MEP 29: Markup text +* :ghpull:`6560`: Fillbetween +* :ghpull:`7399`: Clarify wspace/hspace in documentation/comments +* :ghpull:`7400`: fix ReST tag +* :ghpull:`7381`: Updating the readme +* :ghpull:`7384`: change hardcopy.docstring to docstring.hardcopy +* :ghpull:`7386`: ENH examples are now reproducible +* :ghpull:`7395`: Drop code that supports numpy pre-1.6. +* :ghpull:`7385`: remove unused random import +* :ghpull:`7236`: ENH Improving the contribution guidelines +* :ghpull:`7370`: Add example use of axes.spines.SIDE prop in matplotlibrc +* :ghpull:`7367`: Warn on invalid log axis limits, per issue #7299 +* :ghpull:`7360`: Updated violin plot example as per suggestions in issue #7251 +* :ghpull:`7357`: Added notes on how to use matplotlib in pyenv +* :ghpull:`7329`: DOC MEP12 - converted animation to SG/MEP12 compatible +* :ghpull:`7337`: FIX symlog scale now shows negative labels. +* :ghpull:`7354`: fix small error in poly_editor example +* :ghpull:`7310`: TST: Make proj3d tests into real tests +* :ghpull:`7331`: MEP12 improvments for statistics plots +* :ghpull:`7340`: DOC: Normalize symlink target +* :ghpull:`7328`: TST: Fixed rcparams ``test_Issue_1713`` test +* :ghpull:`7303`: Traceback to help fixing double-calls to mpl.use. +* :ghpull:`7346`: DOC: Fix annotation position (issue #7345) +* :ghpull:`5392`: BUG: arrowhead drawing code +* :ghpull:`7318`: Convert a few test files to Pytest +* :ghpull:`7323`: Fix #6448: set xmin/ymin even without non-zero bins in 'step' hist +* :ghpull:`7326`: Enable coverage sending on pytest build +* :ghpull:`7321`: Remove bundled virtualenv module +* :ghpull:`7290`: Remove deprecated stuff schedule for removal. +* :ghpull:`7324`: DOC: Boxplot color demo update +* :ghpull:`6476`: Add a common example to compare style sheets +* :ghpull:`7309`: MEP28: fix rst syntax for code blocks +* :ghpull:`7250`: Adds docstrings to demo_curvelinear_grid.py and demo_curvelinear_grid… +* :ghpull:`4128`: Code removal for post 1.5/2.1 +* :ghpull:`7308`: Fix travis nightly build +* :ghpull:`7282`: Draft version of MEP28: Simplification of boxplots +* :ghpull:`7304`: DOC: Remove duplicate documentation from last merge. +* :ghpull:`7249`: add docstring to example: axisartist/demo_floating_axes.py +* :ghpull:`7296`: MAINT removing docstring dedent_interpd when possible +* :ghpull:`7298`: Changed Examples for Pep8 Compliance +* :ghpull:`7295`: MAINT finance module is deprecated +* :ghpull:`7214`: FIX: Only render single patch for scatter +* :ghpull:`7297`: MAINT docstring appending doesn't mess with rendering anymore. +* :ghpull:`6907`: Filled + and x markers +* :ghpull:`7288`: Style typos fixes +* :ghpull:`7277`: MEP12 - added sphinx-gallery docstrings +* :ghpull:`7286`: DOC: Fix for #7283 by adding a trailing underscore to misrendered URLs +* :ghpull:`7285`: added some fixes to the documentation of the functions +* :ghpull:`6690`: Tidying up and tweaking mplot3d examples [MEP12] +* :ghpull:`7273`: Fix image watermark example where image was hidden by axes (#7265) +* :ghpull:`7276`: FIX: don't compute flier positions if not showing +* :ghpull:`7267`: DOC: changed documentation for axvspan to numpydoc format +* :ghpull:`7268`: DOC Numpydoc documentation for def fill() +* :ghpull:`7272`: Don't use __builtins__ (an impl. detail) in pylab. +* :ghpull:`7241`: Categorical support for NumPy string arrays. +* :ghpull:`7232`: DOC improved subplots' docstring +* :ghpull:`7256`: CI: skip failing test on appveyor +* :ghpull:`7255`: CI: pin to qt4 +* :ghpull:`7229`: DOC: instructions on installing matplotlib for dev +* :ghpull:`7252`: ENH: improve PySide2 loading +* :ghpull:`7245`: TST: Always produce image comparison test result images +* :ghpull:`6677`: Remove a copy in pcolormesh. +* :ghpull:`6814`: Customize violin plot demo, see #6723 +* :ghpull:`7067`: DOC: OO interface in api and other examples +* :ghpull:`6790`: BUG: fix C90 warning -> error in new tkagg code +* :ghpull:`7242`: Add mplcursors to third-party packages. +* :ghpull:`7222`: Catch IO errors when building font cache +* :ghpull:`7220`: Fix innocent typo in comments +* :ghpull:`7192`: DOC: switch pylab example ``mri_with_eeg.py`` to OO interface + cosmetick fixes +* :ghpull:`6583`: Fix default parameters of FancyArrow +* :ghpull:`7195`: remove check under linux for ~/.matplotlib +* :ghpull:`6753`: Don't warn when legend() finds no labels. +* :ghpull:`7178`: Boxplot zorder kwarg +* :ghpull:`6327`: Fix captions for plot directive in latex target +* :ghpull:`7188`: Remove hard-coded streamplot zorder kwarg +* :ghpull:`7170`: DOC updated hexbin documentation to numpydoc format. +* :ghpull:`7031`: DOC Replaced documentation with numpydoc for semilogx +* :ghpull:`7029`: [WIP] DOC Updated documentation of arrow function to numpy docs format. +* :ghpull:`7167`: Less stringent normalization test for float128. +* :ghpull:`7169`: Remove unused variable. +* :ghpull:`7066`: DOC: switch to O-O interface in basic examples +* :ghpull:`7084`: [DOC] Tick locators & formatters examples +* :ghpull:`7152`: Showcase example: Bézier curves & SVG +* :ghpull:`7019`: Check for fontproperties in figure.suptitle. +* :ghpull:`7145`: Add ``style`` to api doc; fix capitalization. +* :ghpull:`7097`: ``image_comparison`` decorator refactor +* :ghpull:`7096`: DOC refer to plot in the scatter plot doc +* :ghpull:`7140`: FIX added matplotlib.testing.nose.plugins to setupext.py +* :ghpull:`5112`: OffsetImage: use dpi_cor in get_extent +* :ghpull:`7136`: DOC: minor fix in development_workflow.rst +* :ghpull:`7137`: DOC: improve engineering formatter example +* :ghpull:`7131`: Fix branch name in "Deleting a branch on GitHub\_" section +* :ghpull:`6521`: Issue #6429 fix +* :ghpull:`7111`: [DOC] Fix example following comments in issue #6865 +* :ghpull:`7118`: PR # 7038 rebased (DOC specgram() documentation now in numpy style) +* :ghpull:`7117`: PR #7030 rebased +* :ghpull:`6618`: Small improvements to legend's docstring. +* :ghpull:`7102`: Adding the artist data on mouse move event message +* :ghpull:`7110`: [DOC] Apply comments from issue #7017 +* :ghpull:`7087`: [DOC] Example of user-defined linestyle (TikZ linestyle) +* :ghpull:`7108`: Typos in ticker.py +* :ghpull:`7035`: DOC Update semilogy docstring to numpy doc format +* :ghpull:`7033`: DOC Updated plot_date to NumPy/SciPy style +* :ghpull:`7032`: DOC: Updating docstring to numpy doc format for errorbar +* :ghpull:`7094`: TST: Restore broken ``test_use14corefonts`` +* :ghpull:`6995`: Turn off minor grids when interactively turning off major grids. +* :ghpull:`7072`: [DOC] New figure for the gallery (showcase section) +* :ghpull:`7077`: label_outer() should remove inner minor ticks too. +* :ghpull:`7037`: DOC change axhspan to numpydoc format +* :ghpull:`7047`: DOC - SpanSelector widget documentation +* :ghpull:`7049`: Documentated dependencies to the doc and remove unecessary dependencies. +* :ghpull:`7063`: Tweek tol for test_hist_steplog to fix tests on appveyor +* :ghpull:`7055`: FIX: testings.nose was not installed +* :ghpull:`7058`: Minor animation fixes +* :ghpull:`7057`: FIX: Removed financial demos that stalled because of yahoo requests +* :ghpull:`7052`: Uncaught exns are fatal for PyQt5, so catch them. +* :ghpull:`7048`: FIX: remove unused variable +* :ghpull:`7042`: FIX: ticks filtered by Axis, not in Tick.draw +* :ghpull:`7026`: Merge 2.x to master +* :ghpull:`6988`: Text box widget, take over of PR5375 +* :ghpull:`6957`: DOC: clearing out some instances of using pylab in the docs +* :ghpull:`7012`: Don't blacklist test_usetex using pytest +* :ghpull:`7011`: TST: Fixed ``skip_if_command_unavailable`` decorator problem +* :ghpull:`6918`: enable previously leftout test_usetex +* :ghpull:`7006`: FIX: sphinx 1.4.0 details +* :ghpull:`6900`: Enh: break website screenshot banner into 4 pieces and introduce a responsive layout +* :ghpull:`6997`: FIX: slow plots of pandas objects (Second try) +* :ghpull:`6792`: PGF Backend: Support interpolation='none' +* :ghpull:`6983`: Catch invalid interactive switch to log scale. +* :ghpull:`6491`: Don't warn in Collections.contains if picker is not numlike. +* :ghpull:`6978`: Add link to O'Reilly video course covering matplotlib +* :ghpull:`6930`: BUG: PcolorImage handles non-contiguous arrays, provides data readout +* :ghpull:`6889`: support for updating axis ticks for categorical data +* :ghpull:`6974`: Fixed wrong expression +* :ghpull:`6730`: Add Py.test testing framework support +* :ghpull:`6904`: Use edgecolor rather than linewidth to control edge display. +* :ghpull:`6919`: Rework MaxNLocator, eliminating infinite loop; closes #6849 +* :ghpull:`6955`: Add parameter checks to DayLocator initiator +* :ghpull:`5161`: Proposed change to default log scale tick formatting +* :ghpull:`6875`: Add keymap (default: G) to toggle minor grid. +* :ghpull:`6920`: Prepare for cross-framework test suite +* :ghpull:`6944`: Restore cbook.report_memory, which was deleted in d063dee. +* :ghpull:`6961`: remove extra "a" +* :ghpull:`6947`: Changed error message. Issue #6933 +* :ghpull:`6923`: Make sure nose is only imported when needed +* :ghpull:`6851`: Do not restrict coverage to ``matplotlib`` module only +* :ghpull:`6938`: Image interpolation selector in Qt figure options. +* :ghpull:`6787`: Python3.5 dictview support +* :ghpull:`6407`: adding default toggled state for toggle tools +* :ghpull:`6898`: Fix read mode when loading cached AFM fonts +* :ghpull:`6892`: Don't force anncoords to fig coords upon dragging. +* :ghpull:`6895`: Prevent forced alpha in figureoptions. +* :ghpull:`6877`: Fix Path deepcopy signature +* :ghpull:`6822`: Use travis native cache +* :ghpull:`6821`: Break reference cycle Line2D <-> Line2D._lineFunc. +* :ghpull:`6879`: Delete font cache in one of the configurations +* :ghpull:`6832`: Fix for ylabel title in example tex_unicode_demo.py +* :ghpull:`6848`: ``test_tinypages``: pytest compatible module level setup +* :ghpull:`6881`: add doi to bibtex entry for Hunter (2007) +* :ghpull:`6842`: Clarify Axes.hexbin *extent* docstring +* :ghpull:`6861`: Update ggplot URLs +* :ghpull:`6878`: DOC: use venv instead of virtualenv on python 3 +* :ghpull:`6837`: Fix Normalize(). +* :ghpull:`6874`: Update bachelors_degree_by_gender example. +* :ghpull:`6867`: Mark ``make_all_2d_testfuncs`` as not a test +* :ghpull:`6854`: Fix for PyQt5.7 support. +* :ghpull:`6862`: Change default doc image format to png and pdf +* :ghpull:`6819`: Add mpl_toolkits to coveragerc. +* :ghpull:`6840`: Fixed broken ``test_pickle.test_complete`` test +* :ghpull:`6841`: DOC: Switch to OO code style & ensure fixed y-range in ``psd_demo3`` +* :ghpull:`6843`: DOC: Fix ``psd_demo_complex`` similarly to ``psd_demo3`` +* :ghpull:`6829`: Tick label rotation via ``set_tick_params`` +* :ghpull:`6799`: Allow creating annotation arrows w/ default props. +* :ghpull:`6262`: Properly handle UTC conversion in date2num. +* :ghpull:`6777`: Raise lock timeout as actual exception +* :ghpull:`6817`: DOC: Fix a few typos and formulations +* :ghpull:`6826`: Clarify doc for "norm" kwarg to ``imshow``. +* :ghpull:`6807`: Deprecate ``{get,set}_cursorprops``. +* :ghpull:`6811`: Add xkcd font as one of the options +* :ghpull:`6815`: Rename tests in ``test_mlab.py`` +* :ghpull:`6808`: Don't forget to disconnect callbacks for dragging. +* :ghpull:`6803`: better freetype version checking +* :ghpull:`6778`: Added contribute information to readme +* :ghpull:`6786`: 2.0 Examples fixes. See #6762 +* :ghpull:`6774`: Appveyor: use newer conda packages and only run all tests on one platform +* :ghpull:`6779`: Fix tutorial pyplot scales (issue #6775) +* :ghpull:`6768`: Takeover #6535 +* :ghpull:`6763`: Invalidate test cache on gs/inkscape version +* :ghpull:`6765`: Get more rcParams for 3d +* :ghpull:`6764`: Support returning polylines from to_polygons +* :ghpull:`6760`: DOC: clean up of demo_annotation_box.py +* :ghpull:`6735`: Added missing side tick rcParams +* :ghpull:`6761`: Fixed warnings catching and counting with ``warnings.catch_warnings`` +* :ghpull:`5349`: Add a Gitter chat badge to README.rst +* :ghpull:`6755`: PEP: fix minor formatting issues +* :ghpull:`6699`: Warn if MPLBACKEND is invalid. +* :ghpull:`6754`: Fixed error handling in ``ImageComparisonTest.setup_class`` +* :ghpull:`6734`: register IPython's eventloop integration in plt.install_repl_displayhook +* :ghpull:`6745`: DOC: typo in broken_axis pylab example +* :ghpull:`6747`: Also output the actual error on svg backend tests using subprocess +* :ghpull:`6744`: Add workaround for failures due to newer miktex +* :ghpull:`6741`: Missing ``cleanup`` decorator in ``test_subplots.test_exceptions`` +* :ghpull:`6736`: doc: fix unescaped backslash +* :ghpull:`6733`: Mergev2.x to master +* :ghpull:`6729`: Fix crash if byte-compiled level 2 +* :ghpull:`6575`: setup.py: Recommend installation command for pkgs +* :ghpull:`6645`: Fix containment and subslice optim. for steps. +* :ghpull:`6619`: Hide "inner" {x,y}labels in label_outer too. +* :ghpull:`6639`: Simplify get_legend_handler method +* :ghpull:`6694`: Improve Line2D and MarkerStyle instantiation +* :ghpull:`6692`: Remove explicit children invalidation in update_position method +* :ghpull:`6703`: DOC: explain behavior of notches beyond quartiles +* :ghpull:`6707`: Call ``gc.collect`` after each test only if the user asks for it +* :ghpull:`6711`: Added support for ``mgs`` to Ghostscript dependecy checker +* :ghpull:`6700`: Don't convert vmin, vmax to floats. +* :ghpull:`6714`: fixed font_manager.is_opentype_cff_font() +* :ghpull:`6701`: Colours like 'XeYYYY' don't get recognised properly if X, Y's are numbers +* :ghpull:`6512`: Add computer modern font family +* :ghpull:`6383`: Qt editor alpha +* :ghpull:`6381`: Fix canonical name for "None" linestyle. +* :ghpull:`6689`: Str Categorical Axis Support +* :ghpull:`6686`: Merged _bool from axis into cbook._string_to_bool +* :ghpull:`6683`: New entry in ``.mailmap`` +* :ghpull:`6520`: Appveyor overhaul +* :ghpull:`6697`: Fixed path caching bug in ``Path.unit_regular_star`` +* :ghpull:`6688`: DOC: fix radial increase of size & OO style in polar_scatter_demo +* :ghpull:`6681`: Fix #6680 (minor typo in IdentityTransform docstring) +* :ghpull:`6676`: Fixed AppVeyor building script +* :ghpull:`6672`: Fix example of streamplot ``start_points`` option +* :ghpull:`6601`: BF: protect against locale in sphinext text +* :ghpull:`6662`: adding from_list to custom cmap tutorial +* :ghpull:`6666`: Guard against too-large figures +* :ghpull:`6659`: Fix image alpha +* :ghpull:`6642`: Fix rectangle selector release bug +* :ghpull:`6652`: Minor doc updates. +* :ghpull:`6653`: DOC: Incorrect rendering of dashes +* :ghpull:`6648`: adding a new color and editing an existing color in fivethirtyeight.mplstyle +* :ghpull:`6548`: Fix typo. +* :ghpull:`6628`: fix the swab bug to compile on solaris system +* :ghpull:`6622`: colors: ensure masked array data is an ndarray +* :ghpull:`6625`: DOC: Found a typo. +* :ghpull:`6614`: Fix docstring for PickEvent. +* :ghpull:`6554`: Update mpl_toolkits.gtktools. +* :ghpull:`6564`: Cleanup for drawstyles. +* :ghpull:`6577`: Fix mlab.rec_join. +* :ghpull:`6596`: Added a new example to create error boxes using a PatchCollection +* :ghpull:`2370`: Implement draw_markers in the cairo backend. +* :ghpull:`6599`: Drop conditional import of figureoptions. +* :ghpull:`6573`: Some general cleanups +* :ghpull:`6568`: Add OSX to travis tests +* :ghpull:`6600`: Typo: markeredgewith -> markeredgewidth +* :ghpull:`6526`: ttconv: Also replace carriage return with spaces. +* :ghpull:`6530`: Update make.py +* :ghpull:`6405`: ToolManager/Tools adding methods to set figure after initialization +* :ghpull:`6553`: Drop prettyplotlib from the list of toolkits. +* :ghpull:`6557`: Merge 2.x to master +* :ghpull:`5626`: New toolbar icons +* :ghpull:`6555`: Fix docstrings for ``warn_deprecated``. +* :ghpull:`6544`: Fix typo in margins handling. +* :ghpull:`6014`: Patch for issue #6009 +* :ghpull:`6517`: Fix conversion of string grays with alpha. +* :ghpull:`6522`: DOC: made sure boxplot demos share y-axes +* :ghpull:`6529`: TST Remove plt.show() from test_axes.test_dash_offset +* :ghpull:`6519`: Fix FigureCanvasAgg.print_raw(...) +* :ghpull:`6481`: Default boxplot style rebase +* :ghpull:`6504`: Patch issue 6035 rebase +* :ghpull:`5593`: ENH: errorbar color cycle clean up +* :ghpull:`6497`: Line2D._path obeys drawstyle. +* :ghpull:`6487`: Added docstring to scatter_with_legend.py [MEP12] +* :ghpull:`6485`: Barchart demo example clean up [MEP 12] +* :ghpull:`6472`: Install all dependencies from pypi +* :ghpull:`6482`: Skip test broken with numpy 1.11 +* :ghpull:`6475`: Do not turn on interactive mode on in example script +* :ghpull:`6442`: loading TCL / Tk symbols dynamically +* :ghpull:`6467`: ENH: add unified seaborn style sheet +* :ghpull:`6465`: updated boxplot figure +* :ghpull:`6462`: CI: Use Miniconda already installed on AppVeyor. +* :ghpull:`6456`: FIX: unbreak master after 2.x merge +* :ghpull:`6445`: Offset text colored by labelcolor param +* :ghpull:`6417`: Showraise gtk gtk3 +* :ghpull:`6423`: TST: splitlines in rec2txt test +* :ghpull:`6427`: Output pdf dicts in deterministic order +* :ghpull:`6431`: Merge from v2.x +* :ghpull:`6433`: Make the frameworkpython script compatible with Python 3 +* :ghpull:`6358`: Stackplot weighted_wiggle zero-area fix +* :ghpull:`6382`: New color conversion machinery. +* :ghpull:`6372`: DOC: add whats_new for qt configuration editor. +* :ghpull:`6415`: removing unused DialogLineprops from gtk3 +* :ghpull:`6390`: Use xkcd: prefix to avoid color name clashes. +* :ghpull:`6397`: key events handler return value to True to stop propagation +* :ghpull:`6402`: more explicit message for missing image +* :ghpull:`5785`: Better choice of offset-text. +* :ghpull:`6302`: FigureCanvasQT key auto repeat +* :ghpull:`6334`: ENH: webagg: Handle ioloop shutdown correctly +* :ghpull:`5267`: AutoMinorLocator and and logarithmic axis +* :ghpull:`6386`: Minor improvements concerning #6353 and #6357 +* :ghpull:`6388`: Remove wrongly commited test.txt +* :ghpull:`6379`: Install basemap from git trying to fix build issue with docs +* :ghpull:`6369`: Update demo_floating_axes.py with comments +* :ghpull:`6377`: Remove unused variable in GeoAxes class +* :ghpull:`6373`: Remove misspelled and unused variable in GeoAxes class +* :ghpull:`6376`: Update index.rst - add Windrose as third party tool +* :ghpull:`6371`: Set size of static figure to match widget on hidp displays +* :ghpull:`6370`: Restore webagg backend following the merge of widget nbagg backend +* :ghpull:`6366`: Sort default labels numerically in Qt editor. +* :ghpull:`6367`: Remove stray nonascii char from nbagg +* :ghpull:`5754`: IPython Widget +* :ghpull:`6146`: ticker.LinearLocator view_limits algorithm improvement closes #6142 +* :ghpull:`6287`: ENH: add axisbelow option 'line', make it the default +* :ghpull:`6339`: Fix #6335: Queue boxes to update +* :ghpull:`6347`: Allow setting image clims in Qt options editor. +* :ghpull:`6354`: Update events handling documentation to work with Python 3. +* :ghpull:`6356`: Merge 2.x to master +* :ghpull:`6304`: Updating animation file writer to allow keywork arguments when using ``with`` construct +* :ghpull:`6328`: Add default scatter marker option to rcParams +* :ghpull:`6342`: Remove shebang lines from all examples. [MEP12] +* :ghpull:`6337`: Add a 'useMathText' param to method 'ticklabel_format' +* :ghpull:`6346`: Avoid duplicate cmap in image options. +* :ghpull:`6253`: MAINT: Updates to formatters in ``matplotlib.ticker`` +* :ghpull:`6291`: Color cycle handling +* :ghpull:`6340`: BLD: make minimum cycler version 0.10.0 +* :ghpull:`6322`: Typo fixes and wording modifications (minor) +* :ghpull:`6319`: Add PyUpSet as extension +* :ghpull:`6314`: Only render markers on a line when markersize > 0 +* :ghpull:`6303`: DOC Clean up on about half the Mplot3d examples +* :ghpull:`6311`: Seaborn sheets +* :ghpull:`6300`: Remake of #6286 +* :ghpull:`6297`: removed duplicate word in Choosing Colormaps documentation +* :ghpull:`6200`: Tick vertical alignment +* :ghpull:`6203`: Fix #5998: Support fallback font correctly +* :ghpull:`6198`: Make hatch linewidth an rcParam +* :ghpull:`6275`: Fix cycler validation +* :ghpull:`6283`: Use ``figure.stale`` instead of internal member in macosx +* :ghpull:`6247`: DOC: Clarify fillbetween_x example. +* :ghpull:`6251`: ENH: Added a ``PercentFormatter`` class to ``matplotlib.ticker`` +* :ghpull:`6267`: MNT: trap inappropriate use of color kwarg in scatter; closes #6266 +* :ghpull:`6249`: Adjust test tolerance to pass for me on OSX +* :ghpull:`6263`: TST: skip broken test +* :ghpull:`6260`: Bug fix and general touch ups for hist3d_demo example (#1702) +* :ghpull:`6239`: Clean warnings in examples +* :ghpull:`6170`: getter for ticks for colorbar +* :ghpull:`6246`: Merge v2.x into master +* :ghpull:`6238`: Fix sphinx 1.4.0 issues +* :ghpull:`6241`: Force Qt validator to use C locale. +* :ghpull:`6234`: Limit Sphinx to 1.3.6 for the time being +* :ghpull:`6178`: Use Agg for rendering in the Mac OSX backend +* :ghpull:`6232`: MNT: use stdlib tools in allow_rasterization +* :ghpull:`6211`: A method added to Colormap classes to reverse the colormap +* :ghpull:`6205`: Use io.BytesIO instead of io.StringIO in examples +* :ghpull:`6229`: Add a locator to AutoDateFormatters example code +* :ghpull:`6222`: ENH: Added ``file`` keyword to ``setp`` to redirect output +* :ghpull:`6217`: BUG: Made ``setp`` accept arbitrary iterables +* :ghpull:`6154`: Some small cleanups based on Quantified code +* :ghpull:`4446`: Label outer offset text +* :ghpull:`6218`: DOC: fix typo +* :ghpull:`6202`: Fix #6136: Don't hardcode default scatter size +* :ghpull:`6195`: Documentation bug #6180 +* :ghpull:`6194`: Documentation bug fix: #5517 +* :ghpull:`6011`: Fix issue #6003 +* :ghpull:`6179`: Issue #6105: Adds targetfig parameter to the subplot2grid function +* :ghpull:`6185`: Fix to csv2rec bug for review +* :ghpull:`6192`: More precise choice of axes limits. +* :ghpull:`6176`: DOC: Updated docs for rc_context +* :ghpull:`5617`: Legend tuple handler improve +* :ghpull:`6188`: Merge 2x into master +* :ghpull:`6158`: Fix: pandas series of strings +* :ghpull:`6156`: Bug: Fixed regression of ``drawstyle=None`` +* :ghpull:`5343`: Boxplot stats w/ equal quartiles +* :ghpull:`6132`: Don't check if in range if the caller passed norm +* :ghpull:`6091`: Fix for issue 5575 along with testing +* :ghpull:`6123`: docstring added +* :ghpull:`6145`: BUG: Allowing unknown drawstyles +* :ghpull:`6148`: Fix: Pandas indexing Error in collections +* :ghpull:`6140`: clarified color argument in scatter +* :ghpull:`6137`: Fixed outdated link to thirdpartypackages, and simplified the page +* :ghpull:`6095`: Bring back the module level 'backend' +* :ghpull:`6124`: Fix about dialog on Qt 5 +* :ghpull:`6110`: Fixes matplotlib/matplotlib#1235 +* :ghpull:`6122`: MNT: improve image array argument checking in to_rgba. Closes #2499. +* :ghpull:`6047`: bug fix related #5479 +* :ghpull:`6119`: added comment on "usetex=False" to ainde debugging when latex not ava… +* :ghpull:`6073`: fixed bug 6028 +* :ghpull:`6116`: CI: try explicitly including msvc_runtime +* :ghpull:`6100`: Update INSTALL +* :ghpull:`6099`: Fix #6069. Handle image masks correctly +* :ghpull:`6079`: Fixed Issue 4346 +* :ghpull:`6102`: Update installing_faq.rst +* :ghpull:`6101`: Update INSTALL +* :ghpull:`6074`: Fixes an error in the documentation, linestyle is dash_dot and should be dashdot +* :ghpull:`6068`: Text class: changed __str__ method and added __repr__ method +* :ghpull:`6018`: Added get_status() function to the CheckButtons widget +* :ghpull:`6013`: Mnt cleanup pylab setup +* :ghpull:`5984`: Suggestion for Rasterization to docs pgf-backend +* :ghpull:`5911`: Fix #5895: Properly clip MOVETO commands +* :ghpull:`6039`: DOC: added missing import to navigation_toolbar.rst +* :ghpull:`6036`: BUG: fix ListedColormap._resample, hence plt.get_cmap; closes #6025 +* :ghpull:`6029`: TST: Always use / in URLs for visual results. +* :ghpull:`6022`: Make @cleanup *really* support generative tests. +* :ghpull:`6024`: Add Issue template with some guidelines +* :ghpull:`5718`: Rewrite of image infrastructure +* :ghpull:`3973`: WIP: BUG: Convert qualitative colormaps to ListedColormap +* :ghpull:`6005`: FIX: do not short-cut all white-space strings +* :ghpull:`5727`: Refresh pgf baseline images. +* :ghpull:`5975`: ENH: add kwarg normalization function to cbook +* :ghpull:`5931`: use ``locale.getpreferredencoding()`` to prevent OS X locale issues +* :ghpull:`5972`: add support for PySide2, #5971 +* :ghpull:`5625`: DOC: add FAQ about np.datetime64 +* :ghpull:`5131`: fix #4854: set default numpoints of legend entries to 1 +* :ghpull:`5926`: Fix #5917. New dash patterns. Scale dashes by lw +* :ghpull:`5976`: Lock calls to latex in texmanager +* :ghpull:`5628`: Reset the available animation movie writer on rcParam change +* :ghpull:`5951`: tkagg: raise each new window; partially addresses #596 +* :ghpull:`5958`: TST: add a test for tilde in tempfile for the PS backend +* :ghpull:`5957`: Win: add mgs as a name for ghostscript executable +* :ghpull:`5928`: fix for latex call on PS backend (Issue #5895) +* :ghpull:`5954`: Fix issues with getting tempdir when unknown uid +* :ghpull:`5922`: Fixes for Windows test failures on appveyor +* :ghpull:`5953`: Fix typos in Axes.boxplot and Axes.bxp docstrings +* :ghpull:`5947`: Fix #5944: Fix PNG writing from notebook backend +* :ghpull:`5936`: Merge 2x to master +* :ghpull:`5629`: WIP: more windows build and CI changes +* :ghpull:`5914`: Make barbs draw correctly (Fixes #5803) +* :ghpull:`5906`: Merge v2x to master +* :ghpull:`5809`: Support generative tests in @cleanup. +* :ghpull:`5910`: Fix reading/writing from urllib.request objects +* :ghpull:`5882`: mathtext: Fix comma behaviour at start of string +* :ghpull:`5880`: mathtext: Fix bugs in conversion of apostrophes to primes +* :ghpull:`5872`: Fix issue with Sphinx 1.3.4 +* :ghpull:`5894`: Boxplot concept figure update +* :ghpull:`5870`: Docs / examples fixes. +* :ghpull:`5892`: Fix gridspec.Gridspec: check ratios for consistency with rows and columns +* :ghpull:`5901`: Fixes incorrect ipython sourcecode +* :ghpull:`5893`: Show significant digits by default in QLineEdit. +* :ghpull:`5881`: Allow build children to run +* :ghpull:`5886`: Revert "Build the docs with python 3.4 which should fix the Traitlets… +* :ghpull:`5877`: DOC: added blurb about external mpl-proscale package +* :ghpull:`5879`: Build the docs with python 3.4 which should fix the Traitlets/IPython… +* :ghpull:`5871`: Fix sized delimiters for regular-sized mathtext (#5863) +* :ghpull:`5852`: FIX: create _dashSeq and _dashOfset before use +* :ghpull:`5832`: Rewordings for normalizations docs. +* :ghpull:`5849`: Update setupext.py to solve issue #5846 +* :ghpull:`5853`: Typo: fix some typos in patches.FancyArrowPatch +* :ghpull:`5842`: Allow image comparison outside tests module +* :ghpull:`5845`: V2.x merge to master +* :ghpull:`5813`: mathtext: no space after comma in brackets +* :ghpull:`5828`: FIX: overzealous clean up of imports +* :ghpull:`5826`: Strip spaces in properties doc after newline. +* :ghpull:`5815`: Properly minimize the rasterized layers +* :ghpull:`5752`: Reorganise mpl_toolkits documentation +* :ghpull:`5788`: Fix ImportError: No module named 'StringIO' on Python 3 +* :ghpull:`5797`: Build docs on python3.5 with linkcheck running on python 2.7 +* :ghpull:`5778`: Fix #5777. Don't warn when applying default style +* :ghpull:`4857`: Toolbars keep history if axes change (navtoolbar2 + toolmanager) +* :ghpull:`5790`: Fix ImportError: No module named 'Tkinter' on Python 3 +* :ghpull:`5789`: Index.html template. Only insert snippet if found +* :ghpull:`5783`: MNT: remove reference to deleted example +* :ghpull:`5780`: Choose offset text from ticks, not axes limits. +* :ghpull:`5776`: Add .noseids to .gitignore. +* :ghpull:`5466`: Fixed issue with ``rasterized`` not working for errorbar +* :ghpull:`5773`: Fix eb rasterize +* :ghpull:`5440`: Fix #4855: Blacklist rcParams that aren't style +* :ghpull:`5764`: BUG: make clabel obey fontsize kwarg +* :ghpull:`5771`: Remove no longer used Scikit image code +* :ghpull:`5766`: Deterministic LaTeX text in SVG images +* :ghpull:`5762`: Don't fallback to old ipython_console_highlighting +* :ghpull:`5728`: Use custom RNG for sketch path +* :ghpull:`5454`: ENH: Create an abstract base class for movie writers. +* :ghpull:`5600`: Fix #5572: Allow passing empty range to broken_barh +* :ghpull:`4874`: Document mpl_toolkits.axes_grid1.anchored_artists +* :ghpull:`5746`: Clarify that easy_install may be used to install all dependencies +* :ghpull:`5739`: Silence labeled data warning in tests +* :ghpull:`5732`: RF: fix annoying parens bug +* :ghpull:`5735`: Correct regex in filterwarnings +* :ghpull:`5640`: Warning message prior to fc-list command +* :ghpull:`5686`: Remove banner about updating styles in 2.0 +* :ghpull:`5676`: Fix #5646: bump the font manager version +* :ghpull:`5719`: Fix #5693: Implemented is_sorted in C +* :ghpull:`5721`: Remove unused broken doc example axes_zoom_effect +* :ghpull:`5664`: Low-hanging performance improvements +* :ghpull:`5709`: Addresses issue #5704. Makes usage of parameters clearer +* :ghpull:`5716`: Fix #5715. +* :ghpull:`5690`: Fix #5687: Don't pass unicode to QApplication() +* :ghpull:`5707`: Fix string format substitution key missing error +* :ghpull:`5706`: Fix SyntaxError on Python 3 +* :ghpull:`5700`: BUG: handle colorbar ticks with boundaries and NoNorm; closes #5673 +* :ghpull:`5702`: Add missing substitution value +* :ghpull:`5701`: str.formatter invalid +* :ghpull:`5697`: TST: add missing decorator +* :ghpull:`5683`: Include outward ticks in bounding box +* :ghpull:`5688`: Improved documentation for FuncFormatter formatter class +* :ghpull:`5469`: Image options +* :ghpull:`5677`: Fix #5573: Use SVG in docs +* :ghpull:`4864`: Add documentation for mpl_toolkits.axes_grid1.inset_locator +* :ghpull:`5434`: Remove setup.py tests and adapt docs to use tests.py +* :ghpull:`5586`: Fix errorbar extension arrows +* :ghpull:`5653`: Update banner logo on main website +* :ghpull:`5667`: Nicer axes names in selector for figure options. +* :ghpull:`5672`: Fix #5670. No double endpoints in Path.to_polygon +* :ghpull:`5553`: qt: raise each new window +* :ghpull:`5594`: FIX: formatting in LogFormatterExponent +* :ghpull:`5588`: Adjust number of ticks based on length of axis +* :ghpull:`5671`: Deterministic svg +* :ghpull:`5659`: Change ``savefig.dpi`` and ``figure.dpi`` defaults +* :ghpull:`5662`: Bugfix for test_triage tool on Python 2 +* :ghpull:`5661`: Fix #5660. No FileNotFoundError on Py2 +* :ghpull:`4921`: Add a quit_all key to the default keymap +* :ghpull:`5651`: Shorter svg files +* :ghpull:`5656`: Fix #5495. Combine two tests to prevent race cond +* :ghpull:`5383`: Handle HiDPI displays in WebAgg/NbAgg backends +* :ghpull:`5307`: Lower test tolerance +* :ghpull:`5631`: WX/WXagg backend add code that zooms properly on a Mac with a Retina display +* :ghpull:`5644`: Fix typo in pyplot_scales.py +* :ghpull:`5639`: Test if a frame is not already being deleted before trying to Destroy. +* :ghpull:`5583`: Use data limits plus a little padding by default +* :ghpull:`4702`: sphinxext/plot_directive does not accept a caption +* :ghpull:`5612`: mathtext: Use DejaVu display symbols when available +* :ghpull:`5374`: MNT: Mailmap fixes and simplification +* :ghpull:`5516`: OSX virtualenv fixing by creating a simple alias +* :ghpull:`5546`: Fix #5524: Use large, but finite, values for contour extensions +* :ghpull:`5621`: Tst up coverage +* :ghpull:`5620`: FIX: quiver key pivot location +* :ghpull:`5607`: Clarify error when plot() args have bad shapes. +* :ghpull:`5604`: WIP: testing on windows and conda packages/ wheels for master +* :ghpull:`5611`: Update colormap user page +* :ghpull:`5587`: No explicit mathdefault in log formatter +* :ghpull:`5591`: fixed ordering of lightness plots and changed from getting lightness … +* :ghpull:`5605`: Fix DeprecationWarning in stackplot.py +* :ghpull:`5603`: Draw markers around center of pixels +* :ghpull:`5596`: No edges on filled things by default +* :ghpull:`5249`: Keep references to modules required in pgf LatexManager destructor +* :ghpull:`5589`: return extension metadata +* :ghpull:`5566`: DOC: Fix typo in Axes.bxp.__doc__ +* :ghpull:`5570`: use base64.encodestring on python2.7 +* :ghpull:`5578`: Fix #5576: Handle CPLUS_INCLUDE_PATH +* :ghpull:`5555`: Use shorter float repr in figure options dialog. +* :ghpull:`5552`: Dep contourset vminmax +* :ghpull:`5433`: ENH: pass dash_offset through to gc for Line2D +* :ghpull:`5342`: Sort and uniquify style entries in figure options. +* :ghpull:`5484`: fix small typo in documentation about CheckButtons. +* :ghpull:`5547`: Fix #5545: Fix collection scale in data space +* :ghpull:`5500`: Fix #5475: Support tolerance when picking patches +* :ghpull:`5501`: Use facecolor instead of axisbg/axis_bgcolor +* :ghpull:`5544`: Revert "Fix #5524. Use finfo.max instead of np.inf" +* :ghpull:`5146`: Move impl. of plt.subplots to Figure.add_subplots. +* :ghpull:`5534`: Fix #5524. Use finfo.max instead of np.inf +* :ghpull:`5521`: Add test triage tool +* :ghpull:`5537`: Fix for broken maplotlib.test function +* :ghpull:`5539`: Fix docstring of violin{,plot} for return value. +* :ghpull:`5515`: Fix some theoretical problems with png reading +* :ghpull:`5526`: Add boxplot params to rctemplate +* :ghpull:`5533`: Fixes #5522, bug in custom scale example +* :ghpull:`5514`: adding str to force string in format +* :ghpull:`5512`: V2.0.x +* :ghpull:`5465`: Better test for isarray in figaspect(). Closes #5464. +* :ghpull:`5503`: Fix #4487: Take hist bins from rcParam +* :ghpull:`5485`: Contour levels must be increasing +* :ghpull:`4678`: TST: Enable coveralls/codecov code coverage +* :ghpull:`5437`: Make "classic" style have effect +* :ghpull:`5458`: Removed normalization of arrows in 3D quiver +* :ghpull:`5480`: make sure an autoreleasepool is in place +* :ghpull:`5451`: [Bug] masking of NaN Z values in pcolormesh +* :ghpull:`5453`: Force frame rate of FFMpegFileWriter input +* :ghpull:`5452`: Fix axes.set_prop_cycle to handle any generic iterable sequence. +* :ghpull:`5448`: Fix #5444: do not access subsuper nucleus _metrics if not available +* :ghpull:`5439`: Use DejaVu Sans as default fallback font +* :ghpull:`5204`: Minor cleanup work on navigation, text, and customization files. +* :ghpull:`5432`: Don't draw text when it's completely clipped away +* :ghpull:`5426`: MNT: examples: Set the aspect ratio to "equal" in the double pendulum animation. +* :ghpull:`5214`: Use DejaVu fonts as default for text and mathtext +* :ghpull:`5306`: Use a specific version of Freetype for testing +* :ghpull:`5410`: Remove uses of font.get_charmap +* :ghpull:`5407`: DOC: correct indentation +* :ghpull:`4863`: [mpl_toolkits] Allow "figure" kwarg for host functions in parasite_axes +* :ghpull:`5166`: [BUG] Don't allow 1d-arrays in plot_surface. +* :ghpull:`5360`: Add a new memleak script that does everything +* :ghpull:`5361`: Fix #347: Faster text rendering in Agg +* :ghpull:`5373`: Remove various Python 2.6 related workarounds +* :ghpull:`5398`: Updating 2.0 schedule +* :ghpull:`5389`: Faster image generation in WebAgg/NbAgg backends +* :ghpull:`4970`: Fixed ZoomPanBase to work with log plots +* :ghpull:`5387`: Fix #3314 assert mods.pop(0) fails +* :ghpull:`5385`: Faster event delegation in WebAgg/NbAgg backends +* :ghpull:`5384`: BUG: Make webagg work without IPython installed +* :ghpull:`5358`: Fix #5337. Turn off --no-capture (-s) on nose +* :ghpull:`5379`: DOC: Fix typo, broken link in references +* :ghpull:`5371`: DOC: Add what's new entry for TransformedPatchPath. +* :ghpull:`5299`: Faster character mapping +* :ghpull:`5356`: Replace numpy funcs for scalars. +* :ghpull:`5359`: Fix memory leaks found by memleak_hawaii3.py +* :ghpull:`5357`: Fixed typo +* :ghpull:`4920`: ENH: Add TransformedPatchPath for clipping. -Issues (598): +Issues (1370): -* :ghissue:`2075`: Test failure in matplotlib.tests.test_colors.test_cmap_and_norm_from_levels_and_colors2 -* :ghissue:`2061`: hist(..., histtype='step') does not set ylim properly. -* :ghissue:`2081`: AutoDateLocator interval bug -* :ghissue:`2082`: Data limits (on 1.3.x) -* :ghissue:`854`: Bug in Axes.relim when the first line is y_isdata=False and possible fix -* :ghissue:`2070`: incorrect bbox of text -* :ghissue:`1063`: PyQt: fill_between => Singular matrix -* :ghissue:`2072`: PEP8 conformance tests complain about missing files -* :ghissue:`2080`: Fixed failing test on python3. -* :ghissue:`2079`: added some comments -* :ghissue:`1876`: [WIP] Steppath and Line2D -* :ghissue:`296`: 2D imagemap for 3D scatter plot -* :ghissue:`667`: hexbin lacks a weights argument -* :ghissue:`2077`: changed URL to the current CSV API for yahoo finance -* :ghissue:`602`: axisartist incompatible with autofmt_xdate -* :ghissue:`609`: Large values in histograms not showing -* :ghissue:`654`: autofmt_xdate cropping graph wrongly -* :ghissue:`615`: Cannot set label text size or family using axisartist -* :ghissue:`343`: Response Spectra Tripartite Plot -* :ghissue:`325`: EMF backend does not support bitmaps -* :ghissue:`281`: scatter and plot should have the same kwards -* :ghissue:`318`: ability to unshare axis -* :ghissue:`227`: Set cap and join styles for patches -* :ghissue:`222`: Support for amsmath in TexManager -* :ghissue:`214`: add quote charater support to csv related functions. -* :ghissue:`161`: one pixel error with gtkagg and blitting -* :ghissue:`157`: Sphinx plot extension source/build directory issues -* :ghissue:`2076`: Build the _windowing extension -* :ghissue:`2066`: [DOC] Mathtext and matshow examples -* :ghissue:`2024`: Update homepage image -* :ghissue:`2074`: backend gtk and gtk3: destroy figure save dialog after use; closes #2073 -* :ghissue:`2073`: Gtk file save dialog doesn't go ahead when clicking "Save" or "Cancel" -* :ghissue:`2037`: PGF backend doesn't fire draw_event when not being used as the "primary" backend -* :ghissue:`2050`: Added the from_levels_and_colors function. -* :ghissue:`454`: Use a subdirectory of $XDG_CONFIG_HOME instead of ~/.matplotlibrc on Linux -* :ghissue:`2043`: Use subplots in examples (rebase) -* :ghissue:`1813`: GTK segfault with GTK3 and mpl_toolkits -* :ghissue:`2069`: BUG: pass kwargs to TimedAnimation -* :ghissue:`2063`: Let _pcolorargs check C for consistency with X and Y; closes #1688 -* :ghissue:`1688`: _pcolorargs should check consistency of argument shapes -* :ghissue:`2065`: mlab.FIFOBuffer: remove fossil line referring to nonexistent method -* :ghissue:`2067`: Font issue while trying to save PS/EPS/SVG but not PDF -* :ghissue:`1975`: MixedModeRenderer non-72-dpi fixes & Pgf mixed rendering -* :ghissue:`1821`: WxAgg hangs in interactive mode -* :ghissue:`162`: twinx and plot_date -* :ghissue:`1609`: test_pcolormesh hangs -* :ghissue:`1598`: Use sublots in examples -* :ghissue:`1185`: Svg rasterize resolution fix -* :ghissue:`2004`: Make wx and wxagg work with wx 2.9.x on Mac. -* :ghissue:`1530`: saving a figure triggers (very) excessive IO activity -* :ghissue:`2044`: Svg rasterize (rebased) -* :ghissue:`2056`: backend_gtk: don't hide FileChooserDialog; closes #1530 -* :ghissue:`1926`: Unable to pickle histogram figure -* :ghissue:`1690`: Edit figure parameters: TypeError: argument 1 has unexpected type 'list' -* :ghissue:`2053`: sphinxext.ipython_directive broken -* :ghissue:`1997`: eps files stump evince -* :ghissue:`2017`: qt4_editor formlayout now works with colour tuples (fixes Issue #1690) -* :ghissue:`2057`: pep8 fixes in animation.py -* :ghissue:`2055`: Deprecated the set_colorbar method on a scalar mappable. -* :ghissue:`2058`: mplot3d: backend_pdf.py problem with last release not present in 1.2.1rc1 -* :ghissue:`1391`: AutoDateLocator should handle sub-second intervals -* :ghissue:`308`: Emf backend should support math text -* :ghissue:`1945`: PEP8 testing -* :ghissue:`740`: plt.pcolormesh and shape mismatch -* :ghissue:`1734`: Y-axis labels are impossible to align by baseline -* :ghissue:`2039`: PY_ARRAY_UNIQUE_SYMBOL not unique enough -* :ghissue:`2042`: Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each extension -* :ghissue:`2041`: Fix a number of issues in the doc build -* :ghissue:`1223`: dpi= for bitmaps not handled correctly -* :ghissue:`2049`: Fix parallel testing by using the multi-process safe cbook.mkdirs -* :ghissue:`1324`: backend_pgf: open file handles on Windows -* :ghissue:`2047`: Fixed typos in legend docs. -* :ghissue:`2048`: Tweak image path -* :ghissue:`1904`: Legend kwarg scatteroffsets vs. scatteryoffsets -* :ghissue:`1807`: Regression: odd rendering of zordered areas on twinx axes in 1.2 (release) versus 1.1 -* :ghissue:`1882`: Possible regression in 1.2.1 vs 1.2.0 re bar plot with log=True -* :ghissue:`2031`: Update screenshots page -* :ghissue:`1889`: Fixed handling of `bar(.., bottom=None, log=True)` -* :ghissue:`2036`: Fix missing ticks on inverted log axis -* :ghissue:`2040`: Cannot align subplot yaxis labels with PGF backend -* :ghissue:`2038`: Added parameters to the xkcd function. Fixed deprecation warning on Path. -* :ghissue:`2028`: Add a what's new entry for the WebAgg backend -* :ghissue:`2009`: Deprecate C++ functions in _path.cpp that are imported in path.py -* :ghissue:`1961`: All included backends should work or be removed -* :ghissue:`1966`: Remove deprecated code we threatened to remove for 1.3.x -* :ghissue:`2002`: Added support for providing 1 or 2 extra colours to the contour routines to easily specify the under and over colors. -* :ghissue:`2011`: Added the "cleared" method to Path, and updated the path module's documentation. -* :ghissue:`2033`: fix pstoeps function in backend_ps.py -* :ghissue:`2026`: Deprecations and housecleaning -* :ghissue:`2032`: 'annotate' ignores path_effects argument. -* :ghissue:`2030`: Image pep8 -* :ghissue:`1720`: Can't pickle RendererAgg in tight_layout figures -* :ghissue:`2029`: Type correction: float -> double -* :ghissue:`1737`: MacOSX backend unicode problems in python 3.3 -* :ghissue:`1753`: Resolving Issue #1737 - MacOSX backend unicode problems in python 3.3 -* :ghissue:`1925`: Supported datetimes with microseconds, and those with long time series (>160 years). -* :ghissue:`2023`: imshow's "nearest" and "none" interpolations produce smoothed images -* :ghissue:`1951`: parallelize_tests -* :ghissue:`2020`: Fixed call to path.Path.contains_point from pnpoly. -* :ghissue:`2019`: Build: avoid win32-incompatible functions -* :ghissue:`2018`: can't create single legend line with different point types -* :ghissue:`1919`: Issue warning if too many figures are open -* :ghissue:`1993`: PS backend fails to savefig() pcolormesh with gouraud shading -* :ghissue:`2005`: Fail to export properly to svg and pdf with interactive paths -* :ghissue:`2016`: Crash when using character with umlaut -* :ghissue:`2015`: Wrong text baseline with usetex. -* :ghissue:`2012`: texmanager doesn't handle list of names for `font.family` -* :ghissue:`2010`: Allow Paths to be marked as readonly -* :ghissue:`2003`: Fixed hatch clipping. -* :ghissue:`2006`: ValueError: stretch is invalid -* :ghissue:`2014`: Possible error in animate.py after commit cc617006f7f0a18396cecf4a9f1e222f1ee5204e -* :ghissue:`2013`: Histogram output in PDF is mashed -* :ghissue:`1934`: Specifying dictionary argument with dict() or braces matters in set_bbox -* :ghissue:`2000`: Plots show up completely white -* :ghissue:`1994`: Make wx and wxagg work with wx 2.9.x on Mac. -* :ghissue:`956`: Shared axes colorbars & finer location control -* :ghissue:`1329`: Add a "sketch" path filter -* :ghissue:`1999`: Setting dashes to (0,0) results in infinite loop for agg backends -* :ghissue:`2001`: Fixed hatch clipping. -* :ghissue:`1199`: New boxplot features -* :ghissue:`1898`: Hatch clipping -* :ghissue:`1092`: Better handling of scalars to plt.subplot(). Fixes #880 -* :ghissue:`1950`: Tidy up the matplotlib.__init__ documentation. -* :ghissue:`1855`: BUG: fixed weird case where boxplot whiskers went inside box -* :ghissue:`1831`: Unimplemented comparison method for Line3DCollection -* :ghissue:`1909`: patheffects for Line2d object : rebase of #1015 -* :ghissue:`1770`: strange output from wx and wxagg when trying to render to JPEG or TIFF -* :ghissue:`1998`: Wx backend broken -* :ghissue:`1871`: set_scale and set_xscale -* :ghissue:`1917`: Make `axis.set_scale` private -* :ghissue:`1927`: Workaround for Python 3 with pyparsing <= 2.0.0 -* :ghissue:`1885`: text is not properly clipped in 1.2.1 -* :ghissue:`1955`: Honouring the alpha attribute when creating composite images. -* :ghissue:`1290`: Debundle pyparsing -* :ghissue:`1040`: Make 'rstride', 'cstride' default values smarter. -* :ghissue:`1016`: Object oriented way of setting rc parameters, enabling elegant Pythonic syntax. -* :ghissue:`1136`: Configuring automatic use of tight_layout -* :ghissue:`1856`: Raise exception when user tries to use set_xlim or set_ylim on a geographic projection -* :ghissue:`1953`: New doc build failure -* :ghissue:`1896`: Doc build is full of lots of irrelevant warnings -* :ghissue:`1974`: wx backend changes for wxPython Phoenix -* :ghissue:`1900`: Fix building when Gtk doesn't support version check -* :ghissue:`1902`: Default quit keymap - support for cmd+w on OSX -* :ghissue:`1899`: Different alphas for lines and fills. -* :ghissue:`1954`: Supporting different alphas for face and edge colours -* :ghissue:`1938`: Updated patch to not override alpha on edgecolor if set to none -* :ghissue:`1964`: Fixes issue #1960. Account for right/top spine data offset on transform ... -* :ghissue:`1539`: Pickling of log axes -* :ghissue:`1828`: AttributeError with big float Value(s) -* :ghissue:`1971`: Fix initialization problem with useblit on SpanSelector instance creatio... -* :ghissue:`1988`: Added bar plot pickle support. -* :ghissue:`1989`: Log scale pickle -* :ghissue:`1990`: Fixed tight_layout pickle support. -* :ghissue:`1991`: bugfix for matplotlib/ticker.py (python 3.3) -* :ghissue:`1833`: Change hist behavior when normed and stacked to something more sensible -* :ghissue:`1979`: developper's guide: what is the best workflow to test modifications -* :ghissue:`1985`: horizontal histogramm doesn't work in 1.2 branch -* :ghissue:`1984`: colors.rgb_to_hsv does not work properly with array of int dtype -* :ghissue:`1982`: Fix bug in SpanSelector, introduced in commit #dd325759 -* :ghissue:`1978`: Setting font type using rcParams does not work under Python 3.* -* :ghissue:`1970`: Build: allow local static png dependency -* :ghissue:`1976`: Replace usage of Lena image in the gallery. -* :ghissue:`1977`: Fix `backend_driver.py` -* :ghissue:`1944`: ValueError exception in drag_zoom (tk backend) -* :ghissue:`1957`: matplotlib 1.2 / pylab_examples example code: multiple_yaxis_with_spines.py -* :ghissue:`1972`: SubplotBase._make_twin_axes always creates a new subplot instance -* :ghissue:`1787`: Path.contains_points() incorrect return -* :ghissue:`1973`: Collection's contains method doesn't honour offset_position attribute -* :ghissue:`1956`: imsave should preserve alpha channel -* :ghissue:`1967`: svg double hyphen in plot title -- -* :ghissue:`1969`: SubplotBase._make_twin_axes always creates a new subplot instance. -* :ghissue:`1837`: html documentation: modules table and prev-next links -* :ghissue:`1892`: possible 1.2.1 regression in ax.axhline -* :ghissue:`1929`: Fixed failing bbox_inches='tight' case when a contour collection is empty -* :ghissue:`1968`: Rotated text element misalignment in Agg -* :ghissue:`1868`: Fixed background colour of PNGs saved with a non-zero opacity. -* :ghissue:`1965`: Make the travis output quieter on v1.2.x -* :ghissue:`1946`: re-arrange mplDeprecation imports -* :ghissue:`1948`: Unable to import pylab (matplotlib._png) -* :ghissue:`1949`: Build failes under ubuntu 13.04 -* :ghissue:`1918`: Tidied up some of the documentation. -* :ghissue:`1924`: MEP 12: Gallery cleanup and reorganization (rebase) -* :ghissue:`1884`: incorrect linkage if system PyCXX is found -* :ghissue:`1936`: add pkgconfig to homebrew install instruction -* :ghissue:`1941`: Use freetype-config if pkg-config is not installed -* :ghissue:`1940`: Cleanup and what's new item added for jpeg quality rcParam feature. -* :ghissue:`1937`: All text only partially displayed -* :ghissue:`1771`: Jpeg quality 95 by default with rendering with PIL -* :ghissue:`1836`: LaTeX docs build blows up -* :ghissue:`1935`: 1836 latex docs fail -* :ghissue:`1932`: DOC - two modules link appeared in the documentation -* :ghissue:`1930`: FIX Latex documentation now builds properly -* :ghissue:`1928`: Fixed polygon3d rendering bug issue #178 -* :ghissue:`1810`: Cairo + plot_date = misaligned x-axis labels -* :ghissue:`1623`: MEP 12: Gallery cleanup and reorganization -* :ghissue:`1905`: Prevent Qt4 from stopping the interpreter -* :ghissue:`1923`: fix Travis failures on 2.6 and 2.7 -* :ghissue:`1922`: Commit 2415c6200ebdba75a0571d71a4569f18153fff57 introduces syntax error -* :ghissue:`1861`: Added a find_all method to the RcParams dictionary. -* :ghissue:`1879`: Decode subprocess output to utf-8 or regex will fail -* :ghissue:`1921`: Fix filename decoding when calling fc-match -* :ghissue:`1859`: Fixed a bug in offsetbox -* :ghissue:`1757`: DOC improves documentation on the pyplot module and the bar method -* :ghissue:`1767`: bytes regex matching issue in font_manager.py around 1283 (line number) -* :ghissue:`1857`: pgf backend doesn't work well with very large numbers -* :ghissue:`1858`: backend_pgf: clip paths within the backend (fixes #1857) -* :ghissue:`1812`: Error when setting arrowstyle -* :ghissue:`1913`: Fix for issue #1812 -* :ghissue:`1423`: Normalize e.g. instances, or reduce them? -* :ghissue:`1916`: Normalize all 'e.g.' instances. Addresses issue #1423. -* :ghissue:`1766`: add rcParam to set the margin -* :ghissue:`1908`: added rcParam for x and y margin -* :ghissue:`691`: Inner colorbar & Outer colorbar -* :ghissue:`1886`: MacOSX backend incorrectly displays plot/scatter under Affine2D transform -* :ghissue:`1903`: Switching b and c in _transformation_converter to fix issue #1886 -* :ghissue:`1897`: Doc build failure - unicode error in generate_example_rst -* :ghissue:`1915`: Corrected a wrong numpy record name in documentation. -* :ghissue:`1911`: dvipng_hack_alpha version check is broken -* :ghissue:`1914`: Fix texmanager.dvipng_hack_alpha() to correctly use Popen. -* :ghissue:`1823`: Cannot import matplotlib on Google App Engine dev appserver -* :ghissue:`1906`: Spectral plot unit tests -* :ghissue:`1824`: Support environments without a home dir or writable file system -* :ghissue:`1015`: patheffects for Line2d object -* :ghissue:`1878`: Webagg changes -* :ghissue:`1818`: Updated some of the documentation information. -* :ghissue:`1894`: Exporting figure as pdf using savefig() messes up axis background in OS X -* :ghissue:`1887`: Clarify documentation for FuncAnimation -* :ghissue:`1893`: bar plot sets axhline(0) for log plots, mpl 1.2.1 disapproves -* :ghissue:`1890`: Restored inkscape installing on travis-ci. -* :ghissue:`1310`: Drops last tick label for some ranges -* :ghissue:`1874`: Building Matplotlib on Ubuntu -* :ghissue:`1186`: Make default arrow head width sensible -* :ghissue:`1875`: [EHN] Add frameon and savefig.frameon to rcParams -* :ghissue:`1865`: Fix manual contour label positions on sparse contours -* :ghissue:`208`: csv2rec imports dates incorrectly and has no option -* :ghissue:`1356`: Docs don't build with Python3 (make.py except) -* :ghissue:`1210`: Add dateutil kwargs to csv2rec -* :ghissue:`1383`: More fixes for doc building with python 3 -* :ghissue:`1864`: fix legend w/ 'expand' mode which fails for a single item. -* :ghissue:`1763`: Matplotlib 1.2.0 no longer respects the "bottom" argument for horizontal histograms -* :ghissue:`1448`: ```bbox_inches="tight"``` support for *all* figure artists. -* :ghissue:`1869`: Installed inkscape on the travis-ci vm. -* :ghissue:`1008`: Saving animation with coloured background -* :ghissue:`1870`: Testing documentation isn't clear about which files to copy -* :ghissue:`1528`: Fonts rendered are 25% larger than requested on SVG backend -* :ghissue:`1256`: rendering slowdown with big invisible lines -* :ghissue:`1287`: compare_images computes RMS incorrectly -* :ghissue:`1866`: fix the pyplot version of rc_context -* :ghissue:`1631`: histstack looks bad with alpha. -* :ghissue:`1867`: QT backend changes locale -* :ghissue:`1860`: Bug with PatchCollection in PDF output -* :ghissue:`1862`: Matplotlib savefig() closes BytesIO object when saving in postscript format -* :ghissue:`1259`: MacOS backend modifier keys -* :ghissue:`1841`: Fixes issue #1259 - Added modifier key handling for macosx backend -* :ghissue:`1563`: macosx backend slowdown with 1.2.0 -* :ghissue:`1816`: Avoid macosx backend slowdown; issue 1563 -* :ghissue:`1729`: request for plotting variable bin size with imshow -* :ghissue:`1839`: matplotlib 1.2.0 doesn't compile with Solaris Studio 12.3 CC -* :ghissue:`1796`: axes.grid lines using lines.marker settings? -* :ghissue:`1846`: Fix the clippath renderering so that it uses no-clip unsigned chars -* :ghissue:`1844`: 1.2.0 regression: custom scale not working -* :ghissue:`1768`: Build fails on travisCI -* :ghissue:`1851`: Fix for the custom scale example -* :ghissue:`1853`: fill_betweenx signature fixed -* :ghissue:`1854`: BF - prevent a TypeError for lists of vertices -* :ghissue:`1840`: BF - prevent a TypeError for lists of vertices in set_marker -* :ghissue:`1842`: test_backend_pgf errors -* :ghissue:`1850`: fill_betweenx signature fixed -* :ghissue:`1843`: test_backend_pgf: TypeError -* :ghissue:`1830`: Keyboard shortcuts work when toolbar not displayed -* :ghissue:`1848`: add flushing of stdout to update on key event -* :ghissue:`1802`: Step linestyle -* :ghissue:`879`: Two colormaps named "spectral" -* :ghissue:`1127`: Change spectral to nipy_spectral, update docs, leave aliases -* :ghissue:`1804`: MEP10 - documentation improvements on set_xlabel and text of axes.py -* :ghissue:`1764`: Make loc come after fontdict in set_title. Closes #1759 -* :ghissue:`1759`: Axes3d error on set_title -* :ghissue:`800`: Still another Agg snapping issue. -* :ghissue:`1727`: 'stepfilled' histogram is not filled properly when setting yscale('log') -* :ghissue:`1612`: setupegg is broken on windows -* :ghissue:`1591`: Image being snapped erroneously -* :ghissue:`1845`: Agg clip rendering fix -* :ghissue:`1838`: plot_surface and transposed arrays -* :ghissue:`1825`: Work around missing subprocess members on Google App Engine -* :ghissue:`1826`: backend_ps: Do not write to a temporary file unless using an external distiller -* :ghissue:`1827`: MEP10 - documentation improvements on many common plots: scatter plots, ... -* :ghissue:`1834`: finance: Fixed making directories for explicit cachename -* :ghissue:`1714`: qt4_editor broken: `TransformNode instances can not be copied` -* :ghissue:`1832`: BF - correct return type for Axes.get_title -* :ghissue:`324`: ability to change curves, axes, labels attributes via UI -* :ghissue:`1803`: Markers module: PEP8 fixes and MEP10 documentation fixes -* :ghissue:`1795`: MEP10 - refactored hlines and vlines documentation -* :ghissue:`1819`: Option for disregarding matplotlibrc, for reproducible batch production of plots -* :ghissue:`1822`: Improved triinterp_demo pylab example -* :ghissue:`1820`: griddata: Allow for easy switching between interpolation mechanisms -* :ghissue:`1811`: MultiCursor with additionnal optionnal horizontal bar -* :ghissue:`1817`: Improved test_triinterp_colinear -* :ghissue:`1799`: Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values -* :ghissue:`1800`: Agg snapping fixes (for the last time...?) :) -* :ghissue:`1521`: Triangular grid interpolation and refinement -* :ghissue:`1786`: Cubic interpolation for triangular grids -* :ghissue:`1808`: DOC: typo, break lines >80 char, add link to cmaps list -* :ghissue:`1798`: MEP10 - documentation improvements on set_xlabel and text of axes.py -* :ghissue:`1801`: Add .directory files to .gitignore -* :ghissue:`1765`: Unable to Generate Docs -* :ghissue:`1744`: bottom keyword doesn't work for non-stacked histograms -* :ghissue:`1679`: matplotlib-1.2.0: regression in histogram with barstacked drawing? -* :ghissue:`1724`: Re-write stacked step histogram -* :ghissue:`1790`: Fixes problem raised in #1431 (```get_transform``` should not affect ```is_transform_set```) -* :ghissue:`1779`: Bug in postscript backend in Python 3 -* :ghissue:`1797`: PEP8 on colors module -* :ghissue:`1291`: Fix image comparison -* :ghissue:`1788`: Lower minimum pyparsing version to 1.5.2 -* :ghissue:`1789`: imshow() subplots with shared axes generate unwanted white spaces -* :ghissue:`1793`: font_manager unittest errors -* :ghissue:`1791`: Symbol not found: _CGAffineTransformIdentity on MacOS 10.6 -* :ghissue:`1772`: Python 3.3 build failure -* :ghissue:`1794`: Fix for #1792 -* :ghissue:`1781`: Issues with installing matplotlib on Travis with Python 3 -* :ghissue:`1792`: Matplotlib fails to install pyparsing with Python 2 -* :ghissue:`1454`: Retool the setup.py infrastructure -* :ghissue:`1776`: Documentation style suggestion -* :ghissue:`1785`: Fix test_bbox_inches_tight -* :ghissue:`1784`: Attempt to fix Travis "permission denied" error for Python 3 -* :ghissue:`1775`: Issue #1763 -* :ghissue:`1615`: Offset is empty with usetex when offset is equal to 1 -* :ghissue:`1782`: fix copy-to-clipboard in example -* :ghissue:`1778`: Fix clip_path_to_rect, add convenience method on Path object for it -* :ghissue:`1777`: PyList_SetItem return value bug in clip_path_to_rect (_path.cpp). -* :ghissue:`1773`: emf backend doesn't work with StringIO -* :ghissue:`1669`: Add EventCollection and eventplot -* :ghissue:`1774`: ignore singleton dimensions in ndarrays passed to imshow -* :ghissue:`1619`: Arrow with "simple" style is not robust. Code fix included. -* :ghissue:`1725`: Fix compiler warnings -* :ghissue:`1756`: Remove broken printing_in_wx.py example. -* :ghissue:`1094`: Feature request - make it simpler to use full OO interface -* :ghissue:`1457`: Better object-oriented interface for users -* :ghissue:`1762`: Make cbook safe to import while removing duplicate is_string_like; -* :ghissue:`1019`: Repeated is_string_like function -* :ghissue:`1761`: plot_wireframe does not accept vmin, vmax -* :ghissue:`300`: subplot args desription confusing -* :ghissue:`1252`: Properly passing on horiz-/vertOn to Cursor() -* :ghissue:`1632`: Fix build on Ubuntu 12.10 -* :ghissue:`1686`: Fix lost ticks -* :ghissue:`1640`: Fix bugs in legend positioning with loc='best' -* :ghissue:`1687`: Update lib/matplotlib/backends/backend_cairo.py -* :ghissue:`1760`: Improved the subplot function documentation and fixed the autogeneration from boilerplate. -* :ghissue:`1647`: WIP: Deprecation of the cbook module -* :ghissue:`1662`: is_string_like existed both in matplotlib and matplotlib.cbook -* :ghissue:`1716`: PEP8 fixes on the figure module -* :ghissue:`1643`: Clean up code in cbook -* :ghissue:`953`: subplot docstring improvement (re #300) -* :ghissue:`1112`: Bad kwargs to savefig -* :ghissue:`1755`: Update examples/pylab_examples/histogram_demo_extended.py -* :ghissue:`1754`: Fixed a typo in histogram example code -* :ghissue:`1490`: empty scatter messes up the limits -* :ghissue:`1497`: Fix for empty collection check in axes.add_collection -* :ghissue:`1685`: Add default savefig directory -* :ghissue:`1698`: Fix bug updating WeakKeyDictionary during iteration -* :ghissue:`1743`: slight tweak to the documentation of `errorbar` -* :ghissue:`1748`: Typo in "Annotation" docstring. -* :ghissue:`1750`: Name missmatch in filetypes.rgba and print_rgb of backend_bases.py -* :ghissue:`1749`: Incompatibility with latest stable Numpy build (v1.7) -* :ghissue:`1722`: Fix sign of infstr in exceltools.rec2exel -* :ghissue:`1126`: Qt4 save dialog not functional on CentOS-5 -* :ghissue:`1740`: alpha is not set correctly when using eps format -* :ghissue:`1741`: pcolormesh memory leak -* :ghissue:`1726`: stackplot_test_baseline has different results on 32-bit and 64-bit platforms -* :ghissue:`1577`: PEP8 fixes on the line module -* :ghissue:`1728`: Macosx backend: tweak to coordinates position -* :ghissue:`1701`: dash setting in LineCollection is broken -* :ghissue:`1704`: Contour does not pass a list of linestyles to LineCollection -* :ghissue:`1718`: Fix set dashes for line collections -* :ghissue:`1721`: rcParams.keys() is not Python 3 compatible -* :ghissue:`1723`: Re-write stacked histogram (fixes bugs) -* :ghissue:`1706`: Fix bugs in stacked histograms -* :ghissue:`1401`: RuntimeError: dictionary changed size during iteration from colors.py, 3.3 but not 3.2 -* :ghissue:`1699`: Enable to switch off the removal of comments in csv2rec. -* :ghissue:`1710`: Mixing Arial with mathtext on Windows 8 fails -* :ghissue:`1683`: Remove figure from Gcf when it is closed -* :ghissue:`1705`: Qt closeevent fixes for v1.2.x -* :ghissue:`1504`: markerfacecolor/markeredgecolor alpha issue -* :ghissue:`1671`: Feature stack base -* :ghissue:`1075`: fix hist limit issue for step* for both linear and log scale -* :ghissue:`1659`: super hacky fix to issue #1310 -* :ghissue:`196`: Axes.hist(...log=True) mishandles y-axis minimum value -* :ghissue:`1029`: Implemented fix to issue 196 on github for log=True and histtype='step' -* :ghissue:`1684`: Fix hist for log=True and histtype='step' -* :ghissue:`1707`: Docs build failure -* :ghissue:`1708`: Fix breaking doc build -* :ghissue:`289`: reproducible research: sys.argv[0] in plot footer -* :ghissue:`1633`: Add rcParam option for number of scatterplot symbols -* :ghissue:`1113`: Bug in ax.arrow() -* :ghissue:`987`: angle/rotate keyword for rectangle -* :ghissue:`775`: TypeError in Axes.get_legend_handles_labels -* :ghissue:`331`: stem function ability to take one argument -* :ghissue:`1644`: NF - Left and right side axes titles -* :ghissue:`1666`: Fix USE_FONTCONFIG=True mode -* :ghissue:`1697`: Fix bug updating WeakKeyDictionary during iteration -* :ghissue:`1691`: Fix svg flipping (again) -* :ghissue:`1695`: Alpha kwarg fix -* :ghissue:`1696`: Fixed doc dependency on numpy_ext.numpydoc -* :ghissue:`1665`: MEP10: adding numpydoc and activating autosummary -* :ghissue:`1660`: Explain that matplotlib must be built before the HTML documentation -* :ghissue:`1693`: saving to *.eps broken on master -* :ghissue:`1694`: fixes Issue #1693 -* :ghissue:`1689`: SVG flip issue -* :ghissue:`1681`: Fancy arrow tests are failing -* :ghissue:`1682`: Fixed the expected output from test_arrow_patches.test_fancyarrow. -* :ghissue:`1262`: Using figure.suptitle puts another suptitle on top of any existing one. -* :ghissue:`1663`: Fix suptitle -* :ghissue:`1675`: fix "alpha" kwarg in errorbar plot -* :ghissue:`1610`: plotting legends none -* :ghissue:`1676`: Qt close events don't cascade properly. -* :ghissue:`1678`: added QtGui.QMainWindow.closeEvent() to make sure the close event -* :ghissue:`1673`: Images saved as SVG get upside down when `svg.image_noscale` is True. -* :ghissue:`1674`: Fix SVG flip when svg.image_noscale is True -* :ghissue:`1680`: Ignore lib/dateutil -* :ghissue:`1677`: add changelog for #1626 -* :ghissue:`1626`: Add framealpha argument for legend -* :ghissue:`1608`: Incorrect ylabel placement in twinx -* :ghissue:`1642`: remove `import new` from cbook.py -* :ghissue:`1534`: Make `rc_context` available via pyplot interface -* :ghissue:`1672`: Nuke Travis python 3.1 testing -* :ghissue:`1535`: Deprecate mpl.py (was Remove mpl.py) -* :ghissue:`1670`: Deprecate mpl -* :ghissue:`1517`: ENH: Add baseline feature to stackplot. -* :ghissue:`1635`: Recompute Wedge path after change of attributes. -* :ghissue:`1488`: Continue propagating resize event up the chain -* :ghissue:`1498`: use QMainWindow.closeEvent for close events -* :ghissue:`1617`: Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x) -* :ghissue:`1585`: Fix Qt canvas resize_event -* :ghissue:`1629`: Update x,y.z values for an existing Line3D object -* :ghissue:`1611`: change handling of legend labels which are None -* :ghissue:`1657`: Add EventCollection and eventplot -* :ghissue:`1641`: PEP8 fixes on the rcsetup module -* :ghissue:`1650`: _png.read_png crashes on Python 3 with urllib.request object -* :ghissue:`1568`: removed deprecated methods from the axes module. -* :ghissue:`1571`: Y-labels shifted -* :ghissue:`1589`: Fix shifted ylabels (Issue #1571) -* :ghissue:`1276`: Fix overwriting suptitle -* :ghissue:`1661`: Fix travis install failure on py31 -* :ghissue:`1634`: add scatterpoints to rcParam -* :ghissue:`1654`: added explicit 'zorder' kwarg to `Colection` and `LineCollection`. -* :ghissue:`570`: mplot3d reverse axis behavior -* :ghissue:`1653`: Fix #570 - Reversing a 3d axis should now work properly. -* :ghissue:`1651`: WebAgg: pylab compatibility -* :ghissue:`1638`: web_backend is not installed -* :ghissue:`1505`: Issue 1504: changed how `draw` handles alpha in `markerfacecolor` -* :ghissue:`1655`: add get_segments method to collections.LineCollection -* :ghissue:`1649`: add get_segments method to collections.LineCollection -* :ghissue:`1593`: NameError: global name 'iterable' is not defined -* :ghissue:`1652`: Ignore kdevelop4 project files -* :ghissue:`665`: Mac OSX backend keyboard focus stays in terminal -* :ghissue:`1613`: Using a stricter check to see if Python was installed as a framework. -* :ghissue:`1581`: Provide an alternative to lena.png for two examples that use it. -* :ghissue:`1599`: Ada Lovelace and Grace Murray Hopper images in place of Lena -* :ghissue:`1582`: Linear tri interpolator -* :ghissue:`1637`: change cbook to relative import -* :ghissue:`1645`: add get_segments method to collections.LineCollection - updated -* :ghissue:`1639`: Rename web_static to web_backend in setup.py -* :ghissue:`1618`: Mplot3d/crashfixes -* :ghissue:`1636`: hexbin log scale is broken in matplotlib 1.2.0 -* :ghissue:`1624`: implemented inverse transform for Mollweide axes -* :ghissue:`1630`: A disconnected callback cannot be reconnected -* :ghissue:`1139`: Make Axes.stem take at least one argument. -* :ghissue:`1426`: WebAgg backend -* :ghissue:`1606`: Document the C/C++ code guidelines -* :ghissue:`1622`: zorder is not respected by all parts of `errorbar` -* :ghissue:`1628`: Fix errorbar zorder v1.2 -* :ghissue:`1625`: saving pgf to a stream is not supported -* :ghissue:`1588`: Annotations appear in incorrect locations -* :ghissue:`1620`: Fix bug in _AnnotationBase -* :ghissue:`1621`: Package for python 3.3 on OS X -* :ghissue:`1616`: Legend: Also calc the bbox of the legend when the frame is not drawn. -* :ghissue:`1587`: Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer... -* :ghissue:`1597`: new MatplotlibDeprecationWarning class (against master) -* :ghissue:`1596`: new MatplotlibDeprecationWarning class (against 1.2.x) -* :ghissue:`1532`: CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0' -* :ghissue:`1601`: invalid/misconfigured fonts cause the font manager to fail -* :ghissue:`1604`: Make font_manager ignore KeyErrors for bad fonts -* :ghissue:`1605`: Change printed -> pretty-printed -* :ghissue:`1553`: invert_xaxis() accidentially disables autoscaling -* :ghissue:`1557`: inverting an axis shouldn't affect the autoscaling setting -* :ghissue:`1603`: ylim=0.0 is not well handled in polar plots -* :ghissue:`1583`: Crash with text.usetex=True and plt.annotate -* :ghissue:`1584`: triplot(x, y, simplex) should not modify the simplex array as a side effect. -* :ghissue:`1576`: BUG: tri: prevent Triangulation from modifying specified input -* :ghissue:`1602`: Fixed typos in docs (squashed version of #1600) -* :ghissue:`1600`: Fixed typos in matplotlibrc and docs -* :ghissue:`1592`: Fix a syntax error in examples (movie_demo.py) -* :ghissue:`1572`: axes_grid demo broken -* :ghissue:`201`: Drawing rubberband box outside of view crash backend_macosx -* :ghissue:`1038`: osx backend does not allow font changes -* :ghissue:`1590`: Positional argument specifiers are required by Python 2.6 -* :ghissue:`1579`: Updated custom_projection_example.py to work with v1.2 and newer -* :ghissue:`1578`: Fixed blitting in Gtk3Agg backend -* :ghissue:`1580`: lena.png is indecent and needs to be removed -* :ghissue:`1573`: fix issue #1572 caused by PR #1081 -* :ghissue:`1562`: Mac OS X Backend: Removing clip that is no longer needed -* :ghissue:`1506`: DOC: make example cursor show up in the docs -* :ghissue:`1565`: new MatplotlibDeprecationWarning class -* :ghissue:`776`: ticks based on number of subplots -* :ghissue:`1462`: use plt.subplots() in examples as much as possible -* :ghissue:`1407`: Sankey5 -* :ghissue:`1574`: Improvements to Sankey class -* :ghissue:`1536`: ENH: add AVConv movie writer for animations -* :ghissue:`1570`: PEP8 fixes on the tests of the dates module -* :ghissue:`1465`: Undefined elements in axes module -* :ghissue:`1569`: FIX Removes code that does work from the axes module -* :ghissue:`1250`: Fix Travis tests -* :ghissue:`1566`: pylab overwrites user variable(s) -* :ghissue:`1531`: fix rendering slowdown with big invisible lines (issue #1256) -* :ghissue:`1398`: PEP8 fixes on dates.py -* :ghissue:`1564`: PEP8-compliance on axes.py (patch 4 / 4) -* :ghissue:`1559`: Workaround for QT cursor bug in dock areas -* :ghissue:`1552`: Remove python 2.5 stuff from texmanager.py -* :ghissue:`1560`: Remove python2.5 support from texmanager.py -* :ghissue:`1555`: Geo projections getting clobbered by 2to3 when used when python3 -* :ghissue:`997`: Delaunay interpolator: support grid whose width or height is 1 -* :ghissue:`1477`: alternate fix for issue #997 -* :ghissue:`1556`: Invert axis autoscale fix -* :ghissue:`1554`: Geo projections getting clobbered by 2to3 when used when python3 -* :ghissue:`1522`: PEP8-compliance on axes.py (patch 3 / 4) -* :ghissue:`1548`: Broken i386 + Python 3 build -* :ghissue:`1550`: PEP8 fixes on the module texmanager -* :ghissue:`783`: mplot3d: scatter (and others) incorrectly auto-scale axes after set_[xyz]lim() -* :ghissue:`1289`: Autoscaling and limits in mplot3d. -* :ghissue:`1551`: PEP8 fixes on the spines module -* :ghissue:`1537`: Fix savefig.extension == "auto" -* :ghissue:`1297`: pyplot.plotfile. gridon option added with default from rcParam. -* :ghissue:`1526`: Remove unnecessary clip cairo -* :ghissue:`1538`: Remove unnecessary clip from Cairo backend; squashed commit -* :ghissue:`1544`: str.format() doesn't work on python 2.6 -* :ghissue:`1549`: Add citation page to website -* :ghissue:`1514`: Fix streamplot when color argument has NaNs -* :ghissue:`1487`: MaxNLocator for log-scale -* :ghissue:`1081`: Propagate mpl.text.Text instances to the backends and fix documentation -* :ghissue:`1533`: ENH: raise a more informative error -* :ghissue:`955`: Strange resize behaviour with ImageGrid -* :ghissue:`1003`: Fix for issue #955 -* :ghissue:`1546`: Quiver crashes if given matrices -* :ghissue:`1542`: Wrong __version__numpy__ -* :ghissue:`1540`: Changed mailinglist archive link. -* :ghissue:`1507`: python setup.py build (in parallel) -* :ghissue:`1492`: MacOSX backend blocks in IPython QtConsole -* :ghissue:`1493`: check `ret == False` in Timer._on_timer -* :ghissue:`1523`: DOC: github ribbon does not cover up index link -* :ghissue:`1515`: set_cmap should not require an active image -* :ghissue:`1500`: comment on http://matplotlib.org/users/pgf.html#pgf-tutorial - minor issue with xits font -* :ghissue:`1489`: Documentation update for specgram -* :ghissue:`1527`: fix 2 html color names -* :ghissue:`1524`: Make README.txt consistent reStructuredText -* :ghissue:`1525`: pgf: documentation enhancements -* :ghissue:`1510`: pgf: documentation enhancements -* :ghissue:`1512`: Reorganize the developer docs -* :ghissue:`1518`: PEP8 compliance on the delaunay module -* :ghissue:`1357`: PEP8 fixes on text.py -* :ghissue:`1469`: PEP8-compliance on axes.py (patch 2 / 4) -* :ghissue:`1470`: Add ``test`` and ``test-coverage`` to Makefile -* :ghissue:`1513`: Problems with image sizes -* :ghissue:`1509`: pgf: draw_image() doesn't store path to png files in the pgf source -* :ghissue:`1516`: set_xticklabels changes font when text.usetex is enabled -* :ghissue:`1442`: Add savefig_kwargs to Animation.save() method -* :ghissue:`1511`: Reorganize developer docs -* :ghissue:`1503`: DOC: 'inout' option for tick_params direction -* :ghissue:`1494`: Added sphinx documentation for Triangulation -* :ghissue:`1480`: Remove dead code in patches -* :ghissue:`1496`: Correct scatter docstring -* :ghissue:`1495`: scatter docstring, minor -* :ghissue:`1472`: FIX extra comma in Sankey.add -* :ghissue:`1471`: Improved checking logic of _check_xyz in contour.py -* :ghissue:`998`: fix for issue #997 -* :ghissue:`1479`: Reintroduce examples.directory rc parameter -* :ghissue:`1491`: Reintroduce examples.directory rc parameter -* :ghissue:`1405`: Add angle kwarg to patches.Rectangle -* :ghissue:`1278`: Make arrow docstring mention data transform -* :ghissue:`1475`: make plt.subplot() act as plt.subplot(111) -* :ghissue:`1355`: Add sym-log normalization. -* :ghissue:`1474`: use an imagemap for the "fork me on github" ribbon -* :ghissue:`632`: ENH: More included norms, especially a symlog like norm -* :ghissue:`1466`: Too many open files -* :ghissue:`1485`: Fix leak of gc's in gtkagg backend -* :ghissue:`1484`: V1.2.x Fix leak of gc's in gtkagg backend. -* :ghissue:`1374`: PEP8 fixes on widgets.py -* :ghissue:`1379`: PEP8 fixes on quiver.py -* :ghissue:`1399`: PEP8 fixes on patches -* :ghissue:`1478`: Reintroduce examples.directory rcParams to customize cbook.get_sample_data() lookup location -* :ghissue:`1468`: use an imagemap for the "fork me on github" ribbon -* :ghissue:`1395`: PEP8 fixes on contour.py -* :ghissue:`1473`: offsets.shape(-1,2) -* :ghissue:`1467`: matplotlib 1.2.0 Binary installer for 32-bit Windows for python 2.7 is missing -* :ghissue:`1419`: bbox_extra_artists doesn't work for a table -* :ghissue:`1432`: lengend overlaps graph -* :ghissue:`1464`: PEP8-compliance on axes.py (patch 1 / 4) -* :ghissue:`1400`: PEP8 fixes on offsetbox.py -* :ghissue:`1463`: Document the Gtk3 backends -* :ghissue:`1417`: Pep8 on the axes module +* :ghissue:`4703`: Pull in JSAnimation +* :ghissue:`9140`: backend default when no X server present +* :ghissue:`9138`: unable to draw a zoom region with WXAgg backend +* :ghissue:`8723`: imshow() pixelization in matplotlib 2.0.2 but not in 2.0.0 +* :ghissue:`8631`: Image interpolation wrong for pixel values exceeding vmax +* :ghissue:`9041`: document axes-collision deprecation +* :ghissue:`9119`: matplotlib gets installed (according to pip), but pip cannot find it, nor can I import it +* :ghissue:`4077`: osx testing on travis +* :ghissue:`3377`: re-organize gallery +* :ghissue:`2706`: Passing arguments to called function with widgets +* :ghissue:`2560`: error checking should be performed as early as possible (here: non-ASCII str's in e.g. ylabel()) +* :ghissue:`5939`: No Disk Space: IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/root'] +* :ghissue:`5308`: Can't use matplotlib if your home directory's quota is filled +* :ghissue:`7824`: get_default_filename modifies user-supplied title for save dialog +* :ghissue:`6004`: add a "quick fail" to appveyor in case a new push to a PR was made +* :ghissue:`4746`: Qt4 backend windows don't have WM_CLASS property +* :ghissue:`6876`: (Minor) dataLim inconsistency in pyplot.hist +* :ghissue:`7563`: Deduplication between examples and tests +* :ghissue:`7893`: Differing dependencies of matplotlib 2.0 with Python 3 and Python 2 +* :ghissue:`8533`: Drifted marker positions +* :ghissue:`8718`: deprecation warning in the wxagg backend as of master +* :ghissue:`9133`: OSX delayed rendering issue +* :ghissue:`7954`: bar plot: in 2.0.0 bars not as given in the description, ie. first arg is not "left" but "center" +* :ghissue:`8932`: pwd required, but not available, for windows +* :ghissue:`9092`: 'clear' kwarg in plt.figure() not clearing figure +* :ghissue:`8910`: axhline/axvline broken with pint.Quantity +* :ghissue:`8235`: Investigate why some examples build properly in our gallery despite using numpy and not importing it explicitely. +* :ghissue:`8908`: Weird behavior with pint.Quantity + masked array +* :ghissue:`9115`: mpl or plt in code example +* :ghissue:`6308`: Interactive figure issues with notebook backend +* :ghissue:`8064`: Matplotlib pyplot +* :ghissue:`8052`: Issue with DPI corrections with Qt5 backend +* :ghissue:`8206`: rcsetup.py should validate strings using six.string_types (=basestring on Py2), not six.text_type +* :ghissue:`5824`: Recompute figsize-dependent parameters on resize +* :ghissue:`9098`: Tensorflow installation +* :ghissue:`8618`: pyside2 as qt5 backend +* :ghissue:`9076`: Cannot plot graphs +* :ghissue:`9085`: requires Python 3.4 or later, but includes trove classifier for Python 3.3 +* :ghissue:`8881`: Re: auto07p IndexError when uses matplotlib 2.0 instead of matplotlib 1.5 +* :ghissue:`9091`: libpng-1.6.30 Matplotlib 2.0.2 problems (Travis-CI) +* :ghissue:`9083`: matplotlib quiver +* :ghissue:`9030`: DOC: better document rcParams in savefig.* grouping +* :ghissue:`9040`: 'Figure' object has no attribute '_original_dpi' +* :ghissue:`8953`: BUG: PathCollection.set_alpha causes colormap to be lost +* :ghissue:`1730`: No grid for min values in polar plots +* :ghissue:`4217`: Feature request: offset radial origin for polar plots +* :ghissue:`328`: thetamin/-max for polar plot +* :ghissue:`8701`: Class pages don't document their methods +* :ghissue:`9019`: Background figure not really transparent (copy image background of window parent) +* :ghissue:`9043`: Notebook backend returns plot despite bad kwarg raising ValueError +* :ghissue:`9017`: Getting "No module named '_tkinter'" error +* :ghissue:`8960`: _tkinter.TclError: unknown color name "base00" +* :ghissue:`9036`: FileNotFoundError followed by AttributeError +* :ghissue:`9045`: Error when trying to use pydub package +* :ghissue:`4802`: Units examples broken +* :ghissue:`9020`: log-scaled Exception when pressing L-key +* :ghissue:`9024`: Axes creation seems to reuse an old one instead of creating a new one +* :ghissue:`8717`: Bug in the HiDPI support in the qt5agg backend +* :ghissue:`7695`: Jupyter magic command %matplotlib notebook fails with matplotlib2 +* :ghissue:`8313`: while importing EOFError comes out +* :ghissue:`8365`: Matplotlib %notebook lags when showing coordinate pixel values +* :ghissue:`8590`: Qt5 backend gives missing icon errors on KDE Neon +* :ghissue:`8849`: building conda-package on appveyor is broken +* :ghissue:`8973`: itertools issue when saving animations +* :ghissue:`9014`: New Issue +* :ghissue:`8350`: Segfault during savefig for imshow of 10k x 10k matrix +* :ghissue:`8903`: Minor tick labels shown on all axes with log scale and share{x,y}=True +* :ghissue:`8943`: Using ``shadow=True`` does not allow for white background in ``ax.legend`` +* :ghissue:`9023`: Wrong x coordinates in pyplot.hist +* :ghissue:`8202`: English title does not go well with gcf().tight_layout(), which yields bad image direction +* :ghissue:`9015`: boundaries with changing figure size (using imshow) +* :ghissue:`5394`: Proper way of setting the current image for a specific axes +* :ghissue:`9013`: Hi All, +* :ghissue:`8232`: Reduce number of CI builds +* :ghissue:`6915`: plt.yscale('log') after plt.scatter() behaves unpredictably in this example. +* :ghissue:`7364`: Histogram compatibility with numpy +* :ghissue:`8992`: Path.arc breaks for some full-circle inputs +* :ghissue:`9004`: Zoom box doesn't display properly in OS X/macOS w/ subfigures using wxagg backend +* :ghissue:`8934`: Default 2.0 style should have a name +* :ghissue:`8986`: How to easily set the location and size of a sub_axes? +* :ghissue:`8797`: mathtext broken with cairo backend as of master +* :ghissue:`8909`: Lack of date/unit support for barbs/quiver +* :ghissue:`8998`: pyplot.pie doesn't have rotatelabels, but the code is in the repo. +* :ghissue:`8995`: Loglog plots with shared axes sometimes show incorrect labels +* :ghissue:`5820`: consider disabling the "fork me" ribbon for off-line doc +* :ghissue:`8361`: Installation on CentOS using pip in virtualenv +* :ghissue:`8433`: Insufficient OS/X installation Documentation +* :ghissue:`8979`: Patches cannot be picked when y-axis has logarithmic scaling +* :ghissue:`8974`: plot with solid line overhangs fill_between +* :ghissue:`8763`: ENH/Bug: gridspec.tight_layout() should respect rectangle bounds made when created. +* :ghissue:`5805`: Build docs on both python 2 and 3 +* :ghissue:`8061`: Scaling issues with PyQt5 when using mixed resolution displays +* :ghissue:`8940`: Add deploy key for CircleCI +* :ghissue:`6420`: matplotlib Qt5Agg backend error: 'figure' is an unknown keyword argument +* :ghissue:`8964`: Interpolating with ``imshow`` makes some squares appear on plot +* :ghissue:`8875`: uploading the devdocs is broken +* :ghissue:`7085`: 1.5.3, debian unstable: test failures/errors/hands when using --processors=2 +* :ghissue:`8413`: Matplotlib Build & Install on s390x throws KeyError for 'version' +* :ghissue:`8959`: Documentation for plotting categorical variables does not work. +* :ghissue:`8942`: qt5 from jupyter qtconsole +* :ghissue:`8104`: XKEYBOARD extension not present on the X server +* :ghissue:`8945`: The results have a deviation +* :ghissue:`5421`: Rectangle patch constructor fails with units +* :ghissue:`8783`: hline at y=0 appears after setting yscale to log +* :ghissue:`8045`: setting yscale to log, after drawing a plot with values equal to zero, results in incorrect handling of zero values +* :ghissue:`8923`: Slightly imprecise doc wording +* :ghissue:`8933`: LassoSelector Resizes the Y-axis When Setting the 'active' Attribute +* :ghissue:`4020`: Document default key-bindings +* :ghissue:`5163`: stop() method in matplotlib.backend_bases.TimerBase is dysfunctional +* :ghissue:`5950`: Issues with Numpy 1.11 release candidate +* :ghissue:`8913`: Seaborn scatter plot results in black and white dots (wrong color) +* :ghissue:`8929`: No backend in Docker? +* :ghissue:`8927`: Matplotlib doesn't work in .py files (ModuleNotFoundError) +* :ghissue:`8885`: scipy2017 sprint - docs +* :ghissue:`8742`: http://matplotlib.org/devdocs/{examples,gallery} point to old builds of the old examples/gallery folder +* :ghissue:`8820`: Regression with numpy 1.13 for colorbars of boolean data +* :ghissue:`6613`: Assertion Failure + Exit code [400] on macOS Sierra, unusable +* :ghissue:`5252`: Exported to PDF looks different in Mac's Preview and in Acrobat +* :ghissue:`3931`: imshow with log/symlog scales fails to produce figures without raising an Exception +* :ghissue:`3177`: FormatterPrettyPrint(useMathText=True) is a memory killer +* :ghissue:`8907`: [subplot2grid] TypeError when using "fig" argument +* :ghissue:`8578`: Exception in plt.tight_layout() +* :ghissue:`7319`: Alternative dev install instructions +* :ghissue:`7429`: Two entries in examples fo marker_reference.py +* :ghissue:`8882`: bars in plt.bar graph centered on "left" value +* :ghissue:`2222`: Provide links to API docs in examples +* :ghissue:`4378`: for examples, please provide method of showing source code in browser +* :ghissue:`8555`: Final documentation improvements +* :ghissue:`7226`: support bbox='tight' without needing to save the figure +* :ghissue:`8595`: Giving credit via the documentation +* :ghissue:`8564`: Find examples to convert to tutorials +* :ghissue:`8876`: Font warning: ``... font family ['sans-serif'] not found. Falling back to DejaVu Sans ...`` when using ``fig.canvas.draw()`` +* :ghissue:`8702`: setting ``font.family: serif`` does not change math font to serif. +* :ghissue:`8395`: Transforms Cannot be Added to Subplots in Python3 +* :ghissue:`8859`: i am having this problem can anyone help +* :ghissue:`4886`: Move manual_axis.py out of pylab_examples +* :ghissue:`5004`: Alpha blending is incorrect in OffsetImage +* :ghissue:`4862`: Plotting order matters for overlapping colors +* :ghissue:`8844`: Matplotlib 1.4.3 interactive mode not working +* :ghissue:`8845`: iPython hangs when calling show with Matplotlib 1.5.3 and 'TkAgg' backend +* :ghissue:`8843`: weird colormap when map the scalar value to RGB +* :ghissue:`8842`: Triangulation does not include all data points +* :ghissue:`8459`: plt.hist: Unable to plot multiple distributions when x is a datetime +* :ghissue:`8833`: Erros with plt.clabel() +* :ghissue:`8838`: plt.ginput() broken on OSX +* :ghissue:`8767`: Plotting series of bar charts using plt.subplots() based on data in Pandas dataframe fails when bars are aligned center +* :ghissue:`8821`: "ValueError: All values in the dash list must be positive" if linewidth is set to zero in matplotlib 2.x.x +* :ghissue:`8393`: Difference between settings of similar mlab spectrum tests +* :ghissue:`8748`: Use of recent Miktex version (2.9.6350) with Matplotlib --> "tex not found" +* :ghissue:`8825`: arrow_patch in annotate function doesn't inherit zorder +* :ghissue:`5046`: replace Grace Hopper with John Hunter image +* :ghissue:`4936`: Memory leak in NavigationToolbar2.mouse_over +* :ghissue:`5689`: Mac: Save button not working on 1.5.0 or 2.x with backend.qt4 in ipython 4 +* :ghissue:`5793`: GTK backends +* :ghissue:`5807`: 1.5.1rc1: Could not import extension matplotlib.sphinxext.plot_directive (exception: No module named _path) +* :ghissue:`7599`: Feature request: add reflection to transforms +* :ghissue:`8775`: The RC Param ``path.simplify`` does nothing. +* :ghissue:`8816`: Feature Request: Add ability to place annotations or at least "marker points" on plots in UI +* :ghissue:`8534`: "divide by zero" warning doing a proportional colorbar with only 3 bounds +* :ghissue:`4748`: That colorbar.set_ticks can take a locator is not documented sufficently +* :ghissue:`8807`: Cannot change the color of markers in a legend +* :ghissue:`8805`: Savefig shrinks image +* :ghissue:`8810`: Type-check on axes-instances created with subplots() fails +* :ghissue:`8808`: bar plot missing bars +* :ghissue:`5364`: Unclosed file warning in test_image.test_imread_pil_uint16 +* :ghissue:`4998`: Colorbar.add_lines() is misused or something... +* :ghissue:`6411`: Rendered text images do not exactly overlap for same text content +* :ghissue:`7168`: Future warning: elementwise comparison failed +* :ghissue:`5504`: ValueError: invalid capstyle value +* :ghissue:`3292`: Using env var to control where tmp files will be written to? +* :ghissue:`3114`: Visibility of short line depend on the direction +* :ghissue:`3046`: Axis ticks jumping while dragging a plot interactively +* :ghissue:`8750`: Cannot set mec with array +* :ghissue:`8786`: NameError: name 'reduce' is not defined +* :ghissue:`5315`: Tests cannot run with setuptools 18.4 +* :ghissue:`4253`: dtype problems with record arrays +* :ghissue:`4000`: Pandas NaT (not a time) not supported +* :ghissue:`8778`: Histogram range appears to be calculated incorrectly when using "bins='auto'" with 2D data +* :ghissue:`8780`: subplots with +* :ghissue:`8731`: tick labels should have ``horizontalalignment='right'`` even if ``set_ticks_position(right)`` is used. +* :ghissue:`7486`: Contour kills Python +* :ghissue:`8759`: error with setting linewidth and linestyle='--' +* :ghissue:`8734`: Path 'contains_points' does not work well with Bezier curves +* :ghissue:`8749`: ValueError: 'color' kwarg must be an mpl color spec or sequence of color specs. For a sequence of values to be color-mapped, use the 'c' kwarg instead. +* :ghissue:`7334`: VisibleDeprecationWarnings in test_given_colors_levels_and_extends +* :ghissue:`8438`: TclError bad cursor spec thrown while using pyplot.plot +* :ghissue:`8417`: Scaling of ``mlab.magnitude_spectrum()`` is inconsistent +* :ghissue:`8679`: Tcl / Tk failures for Python 3 Linux 64-bit wheel builds +* :ghissue:`8496`: vlines use of color string broken in 2.0.0 +* :ghissue:`7911`: mathtext/mathfont intermittent failures +* :ghissue:`8732`: test_override_builtins failing on master +* :ghissue:`8698`: fill_between_2d tests are testing the wrong thing +* :ghissue:`8716`: create new linestyle +* :ghissue:`8704`: Use JPEG format in matplotlib inline +* :ghissue:`8341`: Default FancyArrowPatch values don't provide visible arrow head +* :ghissue:`8695`: ImageGrid with varying extents fails to maintain padding +* :ghissue:`8694`: FancyArrowPatch path is changed when added to an axis +* :ghissue:`8684`: GTKAgg blit with bbox +* :ghissue:`8689`: Feature Request: add "rasterized" to the pdf backend parameters. +* :ghissue:`7311`: Hexbin overlapping hexagons +* :ghissue:`8680`: Tkinter backend errors over ssh connection +* :ghissue:`8663`: Rectangle with zero height inconsistent rendering +* :ghissue:`8629`: Remove unused resolution kwarg to PolarAxes +* :ghissue:`8561`: Convert colorbar_only to tutorial +* :ghissue:`7984`: gridlines from secondary axis above data +* :ghissue:`8529`: clabel throws runtime error for circular-like contours +* :ghissue:`8611`: Adding legend to a plot with some nan data raises warning +* :ghissue:`5354`: 'ctrl-w' keybinding in wx causes segfault +* :ghissue:`7851`: very small errors in test suite, py3.6 and 3.5 +* :ghissue:`8667`: HTTPError with quotes_historical_yahoo_ochl +* :ghissue:`3746`: matplotlib tooltips for previous plot figure remain stuck to screen with next figure on Mac OS X 10.10 +* :ghissue:`8464`: Possible legend locations +* :ghissue:`8387`: MacOSX backend: figure is cleared when moving from one screen to another +* :ghissue:`8662`: Wrong colour rendering +* :ghissue:`8271`: matplotlib does not build on python 3.6 +* :ghissue:`8283`: [feature request] easier custom ordering of legend entries +* :ghissue:`8299`: copy a color map object does not isolate changes to cm +* :ghissue:`8653`: Exception on font caching +* :ghissue:`8640`: Creating axes and figures with NaN sizes should raise errors earlier +* :ghissue:`8649`: incomplete display when rotate the xaxis.ticks +* :ghissue:`8442`: New urlopen HTTPError on manylinux machines +* :ghissue:`8639`: Setting $HOME to relative folder breaks tex cache +* :ghissue:`8646`: Annotate arrows move improperly with figure resize +* :ghissue:`8642`: data-sensitive bug found. +* :ghissue:`8637`: mpl 2.0.0 vs 2.0.1 line style with wx-backend +* :ghissue:`4590`: Python crash and exit when using plt.show() +* :ghissue:`8635`: get_fontconfig_fonts() returning not a list but a concatenation of file names +* :ghissue:`8627`: Bar Chart(height/position) not equal +* :ghissue:`8630`: Linewidth(s) keywords not working with quiver +* :ghissue:`8620`: clf synonym clear does not support keep_observers +* :ghissue:`6967`: symlog + minor ticks = exception +* :ghissue:`7490`: overhaul external process calls in TexManager +* :ghissue:`6791`: Updating Qhull? +* :ghissue:`5930`: Include ability to query status of CheckButtons widget +* :ghissue:`4062`: FreeType checking for unix +* :ghissue:`8617`: Plot Windows does not close when python script is closed forcefully +* :ghissue:`8589`: zoomed_inset_axes places the inset box outside the figure when the axes are inverted +* :ghissue:`8615`: Cannot pickle ``figure`` or ``axes`` (TypeError: instancemethod) +* :ghissue:`7988`: poor categorical support w/ numpy<1.8 +* :ghissue:`8498`: pep8 not running on examples on master +* :ghissue:`8612`: support ttc fonts +* :ghissue:`6908`: matplotlib window freezing / hanging on close in ipython with OS X +* :ghissue:`8597`: Improve test for LogFormatter +* :ghissue:`8599`: Pie Chart from CSV File +* :ghissue:`8586`: update errorbar in Matplotlib 2.0.0 +* :ghissue:`8463`: wrong hatch color in legend +* :ghissue:`8558`: Rendering really large image +* :ghissue:`8312`: Matplotlib attempts to import PyQt4 when PyQt5 is not available +* :ghissue:`3528`: PS backend is not tested +* :ghissue:`4389`: Windows installer does not run -> restarts itself continually +* :ghissue:`8592`: Qt4 backend (PySide) seemingly tries to use Qt5 +* :ghissue:`8579`: Python 2.7 travis build failing +* :ghissue:`8349`: [feature request] Accepting ``slice`` arguments in ``ax.set_xlim()`` (Python 3) +* :ghissue:`4379`: for the root example page, please provide more description +* :ghissue:`8571`: plt.subplots return is inconsistent +* :ghissue:`8570`: release 2.0.1 has qt4-incompatible code in backend_qt5.py +* :ghissue:`8569`: Superimposed markers when scatterpoints=1 +* :ghissue:`8565`: Unexpected mixing of qt4backend and qt5backend +* :ghissue:`8563`: mpl2.0.1 seems to have broken Qt4Agg +* :ghissue:`8562`: 'QPixmap' object has no attribute 'setDevicePixelRatio' +* :ghissue:`8560`: Calling close() on a figure doesn't seem to close it +* :ghissue:`8174`: Update list of dependencies to build docs +* :ghissue:`8557`: Log scale on pcolor plot with only one tick +* :ghissue:`7412`: Documentation guidelines improvements 2 +* :ghissue:`8541`: Generate a ``tutorials`` sphinx gallery +* :ghissue:`8223`: need to backport docathon PRs +* :ghissue:`7793`: Add pillow and graphviz to doc build dependencies +* :ghissue:`8501`: Remove false deprication warning +* :ghissue:`7206`: All examples should be MEP12/sphinx-gallery compliant +* :ghissue:`6457`: The first subplot is missized after ``savefig`` to a png file. +* :ghissue:`8521`: Rectangle patch not transformed correctly in polar plot +* :ghissue:`8542`: Inconsistent image size with savefig(...,type='png') +* :ghissue:`8445`: Cannot display np.array with dtype = np.float128 +* :ghissue:`8508`: ``%matplotlib notebook`` show nothing, both 2d and 3d plot +* :ghissue:`7289`: ipython loses auto-show/auto-redraw behavior after call to ``plt.rcdefaults()`` +* :ghissue:`6284`: ax.twinx().plot() will reset the x_limits if only an axvspan was used on ax +* :ghissue:`8527`: Confusing docstring in matplotlib.pyplot.bar() in version 2.0.0 +* :ghissue:`8316`: Matplotlib User Interface Example Breaks With More Than Three Patches +* :ghissue:`7835`: Deprecate is_string_like +* :ghissue:`8524`: Errorbar limits arrow heads point in wrong direction on inverted axis +* :ghissue:`8520`: Documentation builds are failing due to sphinx-gallery changes +* :ghissue:`8514`: Can't plot with empty markers +* :ghissue:`8516`: .set_data() errors if number of points change +* :ghissue:`8517`: Log-scale ignores Formatter +* :ghissue:`8506`: text object clipping +* :ghissue:`6921`: "Error: local variable 'xdata' referenced before assignment" in legend_handler.py +* :ghissue:`8505`: plot window hangs and/or is generally unresponsive +* :ghissue:`8500`: plot disappears when moved to second monitor +* :ghissue:`7523`: Multi-line text instances differing in linespacing not rendered correctly +* :ghissue:`7725`: ``is_string_like`` returns True for numpy ``object`` arrays +* :ghissue:`8057`: markevery only accepts builtin integers, not numpy integers +* :ghissue:`8078`: plt.subplots crashes when handed fig_kw argument +* :ghissue:`8038`: Question on Path.contains_point/s +* :ghissue:`7688`: Edit axis with multiple figures causes freeze with Qt5 on Windows +* :ghissue:`7754`: Forgotten restore bounds? +* :ghissue:`5510`: autoscale context manager +* :ghissue:`6649`: UnboundLocalError in hist(x, bins, histtype='step', normed=1) on double entries in bins +* :ghissue:`6805`: Axes.hist with no data in range raises UnboundLocalError +* :ghissue:`7512`: ImportError: No module named Tkinter +* :ghissue:`6704`: Spacing in math text is broken (AIX specific) +* :ghissue:`8050`: Version 2.0.0_1 breaks OpenType font character spacing on PDF save +* :ghissue:`7924`: Python 3.6 deprecated escape sequences. +* :ghissue:`8030`: Unable to intall matpotlib package using whl +* :ghissue:`8079`: Inconsistency between " and ' in the code +* :ghissue:`8128`: figure.Figure.autofmt_xdate applied to major xtick labels only +* :ghissue:`8168`: From matplotlib.font_manager, ImportError: cannot import name get_font +* :ghissue:`8220`: "search" doesn't find cmocean +* :ghissue:`8296`: Remove idle_event from examples/event_handling/idle_and_timeout.py +* :ghissue:`8242`: Investigate alternative svg renderers for the test suite +* :ghissue:`8424`: does matplotlib install in virtual environment work ? +* :ghissue:`8460`: matplotlib API docs missing container module +* :ghissue:`8467`: initialise imshow with zero array has unexpected side effects +* :ghissue:`7460`: Raise error if argument to xlim is invalid, e.g., nan +* :ghissue:`8465`: zorder values as a sequence are not respected by LineCollection +* :ghissue:`8457`: Allow to change base of LogNorm? +* :ghissue:`8406`: FancyArrow, error in the polygon coordinates for shape 'full' +* :ghissue:`8431`: Hatches filling an empty color contour not saved in pdf +* :ghissue:`7989`: 300% CPU on Raspberry Pi +* :ghissue:`537`: Orthogonal projection for mplot3d +* :ghissue:`8443`: No version when building from github archive +* :ghissue:`8444`: Matplotlib hangs with runtime error +* :ghissue:`8441`: ImportError: No module named _backend_gdk +* :ghissue:`8302`: Invalid certificate at https://matplotlib.org. +* :ghissue:`8153`: Long lines in literal blocks run off the edge of the page +* :ghissue:`8160`: Using plt.ion with startup commands +* :ghissue:`8428`: Documentation: matplotlibrc example file confuses x and yticks. +* :ghissue:`8425`: MaxNLocator prune isn't working with decimals +* :ghissue:`8421`: Consistent deprecation of the hold kwarg of hlines and vlines +* :ghissue:`8427`: Matplotlib cannot find default matplotlib fonts on Scientific linux +* :ghissue:`7903`: Regression: imshow on geo axes produces an empty plot in matplotlib 2.0.0 +* :ghissue:`8419`: Incorrect display of minor ticks in Log Scale plot with large font size +* :ghissue:`8418`: Matplotlib defaults to and bundles vera fonts that do not contain Greek letters +* :ghissue:`8073`: Please add Vega in perception documentation +* :ghissue:`8272`: Convert docstring of Axes.pie() into numpydoc +* :ghissue:`8416`: Python 3.4 image comparison test failure for ``mathtext_cm_52-expected.png`` +* :ghissue:`8402`: plotting with TkAgg backend becomes unresponsive after a certain qt5agg backend import command +* :ghissue:`8412`: Data points not rendered for figures saved in vector formats +* :ghissue:`8397`: pyplot.subplots did not return the type of object specified in the documentation +* :ghissue:`8409`: loading pickled figure gives: AttributeError: 'CallbackRegistry' object has no attribute 'callbacks' +* :ghissue:`8111`: Issue with sub-setting minor-ticks at intermediate number of decades +* :ghissue:`8401`: weird bug when using custom formatter; tick labels overlapping +* :ghissue:`7227`: Path effects for text outline is missing corners +* :ghissue:`3517`: Issue with non-ascii paths in font look up +* :ghissue:`8208`: make.py should not use ``os.system("sphinx-build ...")`` +* :ghissue:`8386`: setting log major ticks leaves interfering minor tick labels +* :ghissue:`8370`: Simpler code for common plot setting (e.g. legend, lable, title, figsize)? +* :ghissue:`8385`: Make checkbox rectangles in CheckButtons widget have an edge outline +* :ghissue:`7785`: Passing a transposed array to patch.set_offsets() +* :ghissue:`8378`: ColorbarBase() is dpi dependent +* :ghissue:`8342`: Make ArrowStyle docstrings numpydoc compatible +* :ghissue:`7683`: Please add parameter to bar3d +* :ghissue:`8337`: axes set_position ignored if using tight_layout +* :ghissue:`8260`: test_backend_ps.py leaves temporary files in /tmp +* :ghissue:`8355`: Artifact at border with tricontourf and float32 positions +* :ghissue:`8330`: PyPy compatibility - __builtin__ is not iterable +* :ghissue:`8017`: Font family is not set on log-scaled tick labels +* :ghissue:`8317`: Fonts not changed in LaTeX mode (since version 2.0.0) +* :ghissue:`7293`: Isolated points missing in pdf +* :ghissue:`8348`: style.use not working for some cases +* :ghissue:`7655`: Event picking does not seem to work on polar bar plots +* :ghissue:`3540`: Pick events broken in log axes +* :ghissue:`8124`: Actually deprecate Axes.axesPatch, Figure.figurePatch +* :ghissue:`8290`: six environment polluted when misuse of matplotlib import +* :ghissue:`8230`: cache local freetype source +* :ghissue:`8332`: Importing Issue: "No module named externals" +* :ghissue:`8327`: Inconsistency between documentation and actual effect of the bar plot function +* :ghissue:`8197`: Matplotlib 2.0.0 crashes on plotting contour of array with two dimensions of size 1 in Python 3.4 +* :ghissue:`8054`: is_scalar_or_string deprecated too early +* :ghissue:`8284`: Markers have compression artifacts +* :ghissue:`8294`: x marker is too big +* :ghissue:`8288`: che +* :ghissue:`7951`: matplotlib 2.0.0 not using matplotlibrc file in IPython +* :ghissue:`8012`: imshow interpolation uses masked values +* :ghissue:`8117`: Trying to plot only error bars (with no line connecting data points) results in empty plot +* :ghissue:`7953`: Cannot import _tkagg on windows 64 bits on 2.7 +* :ghissue:`8225`: tight_layout does not work with set_visible(False) +* :ghissue:`8145`: Warning treated as error while generating docs +* :ghissue:`2304`: Add an argument rotate_labels to pie chart +* :ghissue:`8046`: Arc patch with starting and ending angle +* :ghissue:`8263`: error saving pcolormesh with shading=gouraud to eps +* :ghissue:`8034`: necked_tensile_specimen.png contains non-free color calibration profile +* :ghissue:`8231`: gitter badge at top of README.rst is broken +* :ghissue:`8141`: breaking change in dash verification in 2.0.0 +* :ghissue:`8207`: Add early check for "dot" binary (graphviz) when building docs +* :ghissue:`8194`: Sample data not found +* :ghissue:`8186`: Put back gitter plain text link on README.rst +* :ghissue:`8198`: ticklabel font changes when using logscale +* :ghissue:`7616`: make 'dpi' optional for animation.MovieWriter.setup +* :ghissue:`8192`: %matplotlib inline doesn't work well with ipywidgets 6.0 interact +* :ghissue:`8189`: pip install matploblib broken +* :ghissue:`8177`: Add badges to README.rst +* :ghissue:`8180`: icu version problem with matplotlib 2 +* :ghissue:`8169`: Autowrapping text doesn't work in "What's New in Matplotlib 1.5" example +* :ghissue:`8164`: Remove yield tests (now deprecated in pytest) +* :ghissue:`8159`: Doc: Restructure environment variables in ``Installing from source`` docs +* :ghissue:`8123`: Regenerate gitwash docs for improved syntax highlighting of non-python code sections +* :ghissue:`8147`: Use Agg backend by default if DISPLAY is not set +* :ghissue:`8146`: How to display D-stroke symbol in matplotlib +* :ghissue:`7905`: ytick locations different for 1.5.3 and 2.0.0 +* :ghissue:`8121`: PNG output with PGF backend fails with pdftocairo exit code 99 +* :ghissue:`8136`: If division by zero, python cannot convert float infinity to integer in ``get_tick_space()`` +* :ghissue:`8067`: Coordinates of text not properly set in pgf files +* :ghissue:`8112`: Deprecate assert_str_equal +* :ghissue:`8122`: keyword labelrotation is not recognized +* :ghissue:`5151`: Horizontal lines in colorbars in PDF +* :ghissue:`4984`: errorbar incorrectly accepts and plots Nx2 shaped yerr +* :ghissue:`6593`: Feature request: filled error bar +* :ghissue:`7992`: Hatching doesn't respect alpha +* :ghissue:`7991`: Dotted grid lines in matplotlib v2.0.0 appear dashed +* :ghissue:`8015`: Document new testing procedure +* :ghissue:`8106`: Error in demo scripts: to_rgba: Invalid rgba arg "2" in style_sheets_reference.py +* :ghissue:`8105`: calling plt.hist() with np.nan value raises confusing error massage +* :ghissue:`5320`: Some searches in documentation result in no results +* :ghissue:`6042`: return ``_text`` property as __repr__ for Text class +* :ghissue:`7171`: ``axes.boxplot`` does not have zorder kwarg +* :ghissue:`8098`: matplotlibrc doesen't work +* :ghissue:`8091`: Bug with plt.hist when min==max and values are >= 2**53 +* :ghissue:`8087`: zorder is not respected by all parts of ``errorbar`` #1622 problem in matplotlib 2.0.0 +* :ghissue:`7877`: add link to scipython book +* :ghissue:`8053`: save animation to mp4 fail +* :ghissue:`8076`: Matplotlib hatch color broken +* :ghissue:`8077`: ImportError: No module named 'matplotlib.rcsetup' +* :ghissue:`7686`: 'Extend' keyword produces colorbar of zero width +* :ghissue:`7886`: empty imshow crashes python +* :ghissue:`7901`: Allow multiple hatch colors in same figure +* :ghissue:`6708`: KnownFailure becomes an error with ``--processes=1`` flag +* :ghissue:`7899`: Behaviour of c=None is inconsistent in 2.0 +* :ghissue:`8058`: Updating matplotlib to 2.0.0 causing problems when plotting: error/warning message "failed to get the current screen resources" +* :ghissue:`8051`: includes not-really-free BaKoMa fonts +* :ghissue:`8049`: Matplotlib 3D projection axis cannot be created because of missing rcParam[u'_internal.classic_mode'] +* :ghissue:`6285`: ``plt.subplots()`` does not remove existing subplots when called on existing figure +* :ghissue:`8023`: numpy array not accepted for log scaled minor ticks +* :ghissue:`7967`: Catch or stop specgram warnings during tests +* :ghissue:`7813`: Qt5Agg backend not rendering nicely on Windows HiDPI display +* :ghissue:`6891`: Greek letter display error [1.5.1] +* :ghissue:`6393`: Pair of floats breaks plotting renderer (weirdest bug I've ever seen) +* :ghissue:`8027`: Log Scale Ticklabels Refuse to Die (Data Dependent) +* :ghissue:`5859`: savefig() as PNG get a different result than the image shown in ipython notebook(SVG probably) +* :ghissue:`5210`: Unexpected replacement of \right) with exlamation point in MathTextParser output +* :ghissue:`6902`: Include test files in coverage report +* :ghissue:`7756`: Cannot install the matplotlib 1.5.3 or 2.0.0rc2 on Mac OS Sierra, Python 3.6.0 +* :ghissue:`5325`: Migrate to py.test +* :ghissue:`8016`: Unexpected HOME behavior after axis change +* :ghissue:`8009`: Need Python 3.6 wheels for matplotlib 1.5.1 on PyPI +* :ghissue:`8005`: Hex colours with alpha +* :ghissue:`7807`: ValueError when specifying marker vertices +* :ghissue:`7937`: Large TrueType font does not render correctly when saving in .pdf +* :ghissue:`7615`: Subscript/superscript sequence is too long with $\left. X \right|$ +* :ghissue:`5287`: Warnings in doc build +* :ghissue:`6860`: The original xlim changed by twinx +* :ghissue:`6064`: specgram(x) should warn if x.size < 256 +* :ghissue:`7964`: BUG: AxesImage.set_data([[]]) causes FloatingPointException +* :ghissue:`7963`: savefig PDF removing the negative sign from yticklabels +* :ghissue:`7955`: Failed install with "OSError: [Errno 12] Cannot allocate memory" +* :ghissue:`7958`: Matplotlib 2.0 cannot find PyQt5 (Windows) +* :ghissue:`7943`: ValueError when plotting Pandas Dataframe Summary +* :ghissue:`7940`: saving a square image constrained to the extent of axis without any border doesn't work +* :ghissue:`7636`: WX mouseevent assertion errors +* :ghissue:`7902`: Saving an unpickled figure. +* :ghissue:`6048`: AttributeError (no attribute 'callbacks') when setting attributes on pickle-loaded PatchCollection +* :ghissue:`7930`: KeyboardInterrupt while Matplotlib is displaying ≥ 2 figures causes X server crash +* :ghissue:`7874`: wheels not picking correct default backend +* :ghissue:`7906`: font_manager.get_fontconfig_fonts() reports a single item of all fonts concatenated +* :ghissue:`7922`: FT2Font do not close open file, leads to delayed ResourceWarning +* :ghissue:`7803`: tripcolor documentation rendering error . +* :ghissue:`7891`: pyplot.bar does not cycle through colors (>2.0.0b1) +* :ghissue:`7912`: matplotlib doesn't work with numpy+mkl +* :ghissue:`7921`: Text rendered with MathText looks really ugly (version 2.0 vs. 1.5) +* :ghissue:`7919`: ~/.matplotlib/matplotlibrc not being read +* :ghissue:`7909`: Unit length quiver arrow not drawn with a unit length +* :ghissue:`7852`: _rrule maximum recursion depth exceeded on multiprocessing usage +* :ghissue:`7501`: Segmentation fault in QuadMeshGenerator on ppc64 +* :ghissue:`7879`: UTF-8 error on import of matplotlib 1.5.1 +* :ghissue:`7601`: color_cycle deprecation warning could provide more context to user +* :ghissue:`7875`: qt shims: QFontMetrics missing on PyQt5 +* :ghissue:`7860`: widget radio buttons and check buttons no longer display outlines +* :ghissue:`7870`: DOC: FAQ out-of-date +* :ghissue:`7510`: better input validation on ``fill_between`` +* :ghissue:`7867`: pyplot import error when current directory contains a file named sip.py +* :ghissue:`7248`: Adding names to the color in the new (Vega) default color cycle +* :ghissue:`6207`: axes_grid1.zoomed_inset_axes does not accept location as string +* :ghissue:`7775`: Locator tick_values for images +* :ghissue:`7810`: Dimensions sanity check in axes_rgb swaps x and y of shape when checking, prevents use with non-square images. +* :ghissue:`7704`: screenshots in the front page of devdocs are ugly +* :ghissue:`7746`: imshow should silence warnings on invalid values, at least when masked +* :ghissue:`7661`: document that imshow now respects scale +* :ghissue:`6820`: nonsensical error message for invalid input to plt.bar +* :ghissue:`7814`: Legend for lines created using ``LineCollection`` show different handle line scale. +* :ghissue:`7816`: re-enable or delete xmllint tests +* :ghissue:`7802`: plt.stackplot not working for integer input with non-default 'baseline' parameters +* :ghissue:`6149`: travis dedup +* :ghissue:`7822`: Weird stroke join with patheffects +* :ghissue:`7784`: Simple IndexError in artist.setp if empty list is passed +* :ghissue:`3354`: Unecessary arguement in GraphicsContextBase get_linestyle +* :ghissue:`7820`: Figure.savefig() not respecting bbox_inches='tight' when dpi specified +* :ghissue:`7715`: Can't import pyplot in matplotlib 2.0 rc2 +* :ghissue:`7745`: Wheel distributables include unnecessary files +* :ghissue:`7812`: On MacOS Sierra with IPython, inconsistent results with %gui, %matplotlib magic commands and --gui, and --matplotlib command-line options for ipython and qtconsole; complete failure of qtconsole inline figures +* :ghissue:`7808`: Basemap uses deprecated methods +* :ghissue:`7487`: Funny things happen when a rectangle with negative width/height is passed to ``axes()`` +* :ghissue:`7649`: --nose-verbose isn't a correct option for nose +* :ghissue:`7656`: imsave ignores origin option +* :ghissue:`7792`: test_png.test_pngsuite.test fails on ppc64 (big-endian) +* :ghissue:`7788`: Colorbars contain no colors when created on ppc64 (big-endian) +* :ghissue:`4285`: plt.yscale("log") gives FloatingPointError: underflow encountered in multiply +* :ghissue:`7724`: Can't import Matplotlib.widgets.TextBox +* :ghissue:`7798`: ``test_psd_csd_equal`` fails for 12 (but not all) of the ``test_mlab.spectral_testcase`` s on ppc64 (big-endian) +* :ghissue:`7778`: Different font size between math mode and regular text +* :ghissue:`7777`: mpl_toolkits.basemap: ValueError: level must be >= 0 +* :ghissue:`4353`: different behaviour of zoom while using ginput with MouseEvent vs KeyEvent +* :ghissue:`4380`: horizontalalignment 'left' and 'right' do not handle spacing consistently +* :ghissue:`7393`: ``subplot()``: incorrect description of deletion of overlapping axes in the docs +* :ghissue:`7759`: matplotlib dynamic plotting +* :ghissue:`2025`: TkAgg build seems to favor Framework Tcl/Tk on OS-X +* :ghissue:`3991`: SIGINT is ignored by MacOSX backend +* :ghissue:`2722`: limited number of grid lines in matplotlib? +* :ghissue:`3983`: Issue when trying to plot points with transform that requires more/fewer coordinates than it returns +* :ghissue:`7734`: inconsistent doc regarding keymap.fullscreen default value +* :ghissue:`7761`: Deprecation warning for finance is very unclear +* :ghissue:`7223`: matplotlib.rcsetup docs +* :ghissue:`3917`: OS X Cursor Not working on command line +* :ghissue:`4038`: Hist Plot Normalization should allow a 'Per Bin' Normalization +* :ghissue:`3486`: Update Selection Widgets +* :ghissue:`7457`: Improvements to pylab_examples/stock_demo.py +* :ghissue:`7755`: Can't open figure +* :ghissue:`7299`: Raise an error or a warning when ylim's min == 0 and yscale == "log" +* :ghissue:`4977`: Improve resolution of canvas on HiDPI with PyQt5 backend +* :ghissue:`7495`: Missing facecolor2d attribute +* :ghissue:`3727`: plot_date() does not work with x values of type pandas.Timestamp (pandas version 0.15.0)? +* :ghissue:`3368`: Variable number of ticks with LogLocator for a fixed number of tick labels displayed +* :ghissue:`1835`: docstrings of cross-correlation functions (acorr and xcorr) need clarification +* :ghissue:`6972`: quiverkey problem when angles=array +* :ghissue:`6617`: Problem of fonts with LaTeX rendering due to fonts-lyx package +* :ghissue:`7717`: make all deprecation warnings be ``mplDeprecation`` instances +* :ghissue:`7662`: eventplot legend fails (linewidth) +* :ghissue:`7673`: Baseline image reuse breaks parallel testing +* :ghissue:`7666`: Default scaling of x-axis in specgram() is incorrect (i.e. the default value for the ``xextent`` parameter) +* :ghissue:`7709`: Running into problems in seaborn after upgrading matpltolib +* :ghissue:`7684`: 3-D scatter plot disappears when overlaid over a 3-D surface plot. +* :ghissue:`7630`: Unicode issue in matplotlib.dates +* :ghissue:`7678`: add link to bokeh/colorcet +* :ghissue:`2078`: linespacing of multiline texts. +* :ghissue:`6727`: scipy 2016 sprint ideas +* :ghissue:`3212`: Why are numpoints and scatterpoints two different keywords? +* :ghissue:`7697`: Update INSTALL file to include py3.6 +* :ghissue:`4428`: Hyphen as a subscript doesn't appear at certain font sizes +* :ghissue:`2886`: The wrong \Game symbol is used +* :ghissue:`7603`: scatter ``color`` vs ``c`` +* :ghissue:`7660`: 2.0rc2: title too close to frame? +* :ghissue:`7672`: standardize classic/v2.x order is docs +* :ghissue:`7680`: OverflowError: Python int too large to convert to C long during ploting simple numbers on debian testing +* :ghissue:`7664`: BUG: ``super`` requires at least 1 argument +* :ghissue:`7669`: rc on conda-forge +* :ghissue:`5363`: Warnings from test_contour.test_corner_mask +* :ghissue:`7663`: BUG: Can't import ``matplotlib._backports`` +* :ghissue:`7647`: Decorator for deprecation ignores arguments other than 'message' +* :ghissue:`5806`: FutureWarning with Numpy 1.10 +* :ghissue:`6480`: Setting markeredgecolor raises a warning +* :ghissue:`7653`: legend doesn't show all markers +* :ghissue:`7643`: Matplotlib 2.0 deprecations +* :ghissue:`7642`: imshow seems to "shift" grid. +* :ghissue:`7633`: All attempts to plot fail with "OverflowError: Python int too large to convert to C long" +* :ghissue:`7637`: Stacked 2D plots with interconnections in Matplotlib +* :ghissue:`7353`: auto legend position changes upon saving the figure +* :ghissue:`7626`: Saturation mask for imshow() +* :ghissue:`7623`: potential bug with plt.arrow and plt.annotate when setting linestyle via tuples +* :ghissue:`7005`: rcParams['font.size'] is consulted at render time +* :ghissue:`7587`: BUG: shared log axes lose _minpos and revert to default +* :ghissue:`7493`: Plotting zero values with logarithmic axes triggers OverflowError, Matplotlib hangs permanently +* :ghissue:`7595`: math domain error using symlog norm +* :ghissue:`7588`: 2.0.0rc1 cannot import name '_macosx' +* :ghissue:`2051`: Consider making default verticalalignment ``baseline`` +* :ghissue:`4867`: Add additional minor labels in log axis with a span less than two decades +* :ghissue:`7489`: Too small axis arrow when savefig to png +* :ghissue:`7611`: UnicodeDecodeError when using matplotlib save SVG file and open it again +* :ghissue:`7592`: font cache: a possibility to disable building it +* :ghissue:`5836`: Repeated warning about fc-list +* :ghissue:`7609`: The best channel to ask questions related to using matplotlib +* :ghissue:`7141`: Feature request: auto locate minor ticks on log scaled color bar +* :ghissue:`3489`: matplotlib scatter shifts color codes when NaN is present +* :ghissue:`4414`: Specifying histtype='stepfilled' and normed=True when using plt.hist causes ymax to be set incorrectly +* :ghissue:`7597`: python complain about "This application failed to start because it could not find or load the Qt platform plugin 'xcb' " after an update of matplotlib +* :ghissue:`7578`: Validate steps input to ``MaxNLocator`` +* :ghissue:`7590`: Subtick labels are not disabled in classic style +* :ghissue:`6317`: PDF file generation is not deterministic - results in different outputs on the same input +* :ghissue:`6543`: Why does fill_betweenx not have interpolate? +* :ghissue:`7437`: Broken path to example with strpdate2num +* :ghissue:`7593`: Issue: Applying Axis Limits +* :ghissue:`7591`: Number of subplots in mpl.axes.Subplot object +* :ghissue:`7056`: setup.py --name and friends broken +* :ghissue:`7044`: location of convert in rcparams on windows +* :ghissue:`6813`: avoid hiding edge pixels of images +* :ghissue:`7579`: OS X libpng incompatability +* :ghissue:`7576`: v2.0.0rc1 conda-forge dependency issue +* :ghissue:`7558`: Colorbar becomes 0 to 1 after colorbar ax.yaxis.set_major_formatter +* :ghissue:`7526`: Cannot Disable TkAgg Backend +* :ghissue:`6565`: Questionable margin-cancellation logic +* :ghissue:`7175`: new margin system doesn't handle negative values in bars +* :ghissue:`5201`: issue with colorbar using LogNorm and extend='min' +* :ghissue:`6580`: Ensure install requirements in documentation are up to date before release +* :ghissue:`5654`: Update static images in docs to reflect new style +* :ghissue:`7553`: frange returns a last value greater than limit +* :ghissue:`5961`: track bdist_wheel release and remove the workaround when 0.27 is released +* :ghissue:`7554`: TeX formula rendering broken +* :ghissue:`6885`: Check if ~/.matplotlib/ is a symlink to ~/.config/matplotlib/ +* :ghissue:`7202`: Colorbar with SymmetricalLogLocator : issue when handling only negative values +* :ghissue:`7542`: Plotting masked array lose data points +* :ghissue:`6678`: dead links in docs +* :ghissue:`7534`: nbagg doesn't change figure's facecolor +* :ghissue:`7535`: Set return of type Axes in Numpydoc docstring return type hint for Figure.add_subplot and Figure.add_axes to help jedi introspection +* :ghissue:`7443`: pdf doc build is sort of broken +* :ghissue:`7521`: Figure.show() fails with Qt5Agg on Windows (plt.show() works) +* :ghissue:`7423`: Latex cache error when building docs +* :ghissue:`7519`: plt.table() without any kwargs throws exception +* :ghissue:`3070`: remove hold logic from library +* :ghissue:`1910`: Pylab contourf plot using Mollweide projection create artefacts +* :ghissue:`5350`: Minor Bug on table.py +* :ghissue:`7518`: Incorrect transData in a simple plot +* :ghissue:`6985`: Animation of contourf becomes extremely slow +* :ghissue:`7508`: Legend not displayed +* :ghissue:`7484`: Remove numpy 1.6 specific work-arounds +* :ghissue:`6746`: Matplotlib.pyplot 2.0.0b2 fails to import with Conda Python 3.5 on OS X +* :ghissue:`7505`: Default color cycler for plots should have more than 8 colors +* :ghissue:`7185`: Hexbin default edgecolors kwarg is misnamed +* :ghissue:`7478`: 'alpha' kwarg overrides facecolor='none' when plotting circle +* :ghissue:`7375`: Patch edgecolor of a legend item does not follow look of figure +* :ghissue:`6873`: examples/api/skewt.py is not displaying the right part of the grid by default +* :ghissue:`6773`: Shifted image extents in 2.0.0.b3 +* :ghissue:`7350`: Colors drawn outside axis for hist2d +* :ghissue:`7485`: Is there a way to subclass the zoom() function from the NavigationToolbar backends and modify its mouse button definition? +* :ghissue:`7396`: Bump numpy minimal version to 1.7.0? +* :ghissue:`7466`: missing trigger for autoscale +* :ghissue:`7477`: v2.0.0b4 fails to build with python-3.5: Requires pygtk +* :ghissue:`7113`: Problems with anatomy figure on v2.x +* :ghissue:`6722`: Text: rotation inconsistency +* :ghissue:`7244`: Codecov instead of coveralls? +* :ghissue:`5076`: RuntimeError: LaTeX was not able to process the following string: 'z=$\\\\mathregular{{}^{}_{\\\\}}$' in matplotlib +* :ghissue:`7450`: Using Matplotlib in Abaqus +* :ghissue:`7314`: Better error message in scatter plot when len(x) != len(c) +* :ghissue:`7432`: Failure to re-render after Line2D.set_color +* :ghissue:`6695`: support markdown or similar +* :ghissue:`6228`: Rasterizing patch changes filling of hatches in pdf backend +* :ghissue:`3023`: contourf hatching and saving to pdf +* :ghissue:`4108`: Hatch pattern changes with dpi +* :ghissue:`6968`: autoscale differences between 1.5.1 and 2.0.0b3 +* :ghissue:`7452`: ``test_log_margins`` test failure +* :ghissue:`7143`: spurious warning with nans in log-scale plot +* :ghissue:`7448`: Relative lengths in 3d quiver plots +* :ghissue:`7426`: prop_cycler validation over-zealous +* :ghissue:`6899`: ``savefig`` has sideeffects +* :ghissue:`7440`: Confusing examples in ``annotation_demo2`` +* :ghissue:`7441`: Loading a matplotlib figure pickle within a tkinter GUI +* :ghissue:`6643`: Incorrect margins in log scale +* :ghissue:`7356`: plt.hist does not obey the hist.bins rcparams +* :ghissue:`6845`: SVG backend: anomaly in gallery scatter legend +* :ghissue:`6527`: Documentation issues +* :ghissue:`7315`: Spectral vs spectral Deprecation warning +* :ghissue:`7428`: from matplotlib.backends import _tkagg raises AttributeError: 'module' object has no attribute '__file__' +* :ghissue:`7431`: %matplotlib notebook offsetting sns.palplot +* :ghissue:`7361`: add multi-process flag as ``-j`` to ``test.py`` +* :ghissue:`7406`: NaN causes plt.vlines to not scale y limits +* :ghissue:`7104`: set offset threshold to 4 +* :ghissue:`7404`: obnoxious double warning at each script startup +* :ghissue:`7373`: Regression in imshow +* :ghissue:`7166`: Hatching in legends is broken +* :ghissue:`6939`: wspace is not "The amount of width reserved for blank space between subplots" as documented +* :ghissue:`4026`: control hatch linewidth and fill border linewidth separately +* :ghissue:`7390`: MAINT move the examples from doc/pyplots to examples and make them reproducible +* :ghissue:`7198`: style blacklist includes hardcopy.docstring but it should be docstring.hardcopy +* :ghissue:`7391`: How to apply ax.margins to current axes limits? +* :ghissue:`7234`: Improving documentation: Tests failing on a osx setup +* :ghissue:`7379`: Mp4's generated by movie writer do not appear work in browser +* :ghissue:`6870`: Figure is unpicklable after ``savefig`` +* :ghissue:`6181`: When using Agg driver, pickling fails with TypeError after writing figure to PDF +* :ghissue:`6926`: SVG backend closes BytesIO on print if were ``usetex=True`` and ``cleanup`` decorator used +* :ghissue:`3899`: Pickle not working in interactive ipython session +* :ghissue:`7251`: Improve violin plot demo +* :ghissue:`7146`: symlog scale no longer shows labels on the negative side +* :ghissue:`3420`: simple plotting of numpy 2d-arrays +* :ghissue:`7287`: Make matplotlib.use() report where the backend was set first, in case of conflict +* :ghissue:`7305`: RuntimeError In FT2Font with NISC18030.ttf +* :ghissue:`7351`: Interactive mode seems to be broken on MacOSX +* :ghissue:`7313`: Axes3D.plot_surface with meshgrid args stopped working +* :ghissue:`7281`: rcparam encoding test is broken +* :ghissue:`7345`: Annotation minor issue in the example linestyles.py +* :ghissue:`7210`: variable frame size support in animation is a misfeature +* :ghissue:`5222`: legend--plot handle association +* :ghissue:`7312`: get_facecolors() reports incorrect colors +* :ghissue:`7332`: plot range +* :ghissue:`1719`: Can't pickle bar plots: Failed to pickle attribute "gridline" +* :ghissue:`6348`: When I run a file that uses matplolib animation, I keep getting this error. Using OS X, Python 2.7, installed Python from python.org then used homebrew. Matplotlib install from pip. +* :ghissue:`5386`: Error loading fonts on OSX 10.11 +* :ghissue:`6448`: hist step UnboundLocalError +* :ghissue:`6958`: Document the verts kwarg to scatter +* :ghissue:`7204`: Integrate sphinx-gallery to our user documentation +* :ghissue:`7325`: Anaconda broken after trying to install matplotlib 2.0 beta (ubuntu) +* :ghissue:`7218`: v1.5.3: marker=None no longer works in plot() +* :ghissue:`7271`: BUG: symmetric kwarg in locator is not honored by contourf +* :ghissue:`7095`: _preprocess_data interferes in the docstrings Notes section +* :ghissue:`7283`: DOC: Misrendered URLs in the development_worflow section of devdocs. +* :ghissue:`7109`: backport #7108 to v2.x +* :ghissue:`7265`: Image watermark hidden by Axes in example +* :ghissue:`7263`: axes.bxp fails without fliers +* :ghissue:`7274`: Latex greek letters in axis labels +* :ghissue:`7186`: matplotlib 1.5.3 raise TypeError: 'module' object is not subscriptable on pylab.py +* :ghissue:`6865`: custom_projection_example.py is completely out of date +* :ghissue:`7224`: FancyArrowPatch linestyle always solid +* :ghissue:`7215`: BUG: bar deals with bytes and string x data in different manners, both that are unexpected +* :ghissue:`7270`: Pylab import +* :ghissue:`7230`: subplots docstring: no example of NxN grid +* :ghissue:`7269`: documentation: texinfo markup error in matplotlib 1.4.3 and matplotlib 1.5.3 +* :ghissue:`7264`: matplotlib dependency cycle matplotlib <- ipython <- matplotlib - how to resolve? +* :ghissue:`7261`: Legend not displayed in Plot-Matplot lib +* :ghissue:`7260`: Unknown exception in resize +* :ghissue:`7259`: autoscaling of yaxis fails +* :ghissue:`7257`: How can plot a figure with matplotlib like this? +* :ghissue:`3959`: setting up matplotlib for development +* :ghissue:`7240`: New tests without baseline images never produce a result +* :ghissue:`7156`: Inverted imshow using Cairo backend +* :ghissue:`6723`: How to customize violinplots? +* :ghissue:`5423`: fill_between wrong edge line color +* :ghissue:`5999`: Math accents are not correctly aligned +* :ghissue:`1039`: Cairo backend marker/line style +* :ghissue:`7174`: default value of ``lines.dash_capstyle`` +* :ghissue:`7246`: Inconsistent behaviour of ``subplots`` for one and more-than-one axes +* :ghissue:`7228`: axes tick_params label color not respected when showing scientific notation for axes scale +* :ghissue:`7225`: get_geometry() wrong if subplots are nested (e.g., subplots with colorbars) +* :ghissue:`7221`: Why does pyplot display wrong grayscale image? +* :ghissue:`7191`: BUG: Animation bugs fixed in master should be backported to 2.x +* :ghissue:`7017`: Doc typos in "Our favorite recipes" +* :ghissue:`3343`: Issues with ``imshow`` and RGBA values +* :ghissue:`7157`: should fill_between Cycle? +* :ghissue:`7159`: test_colors.test_Normalize fails in 2.0.0b4 on Fedora rawhide/aarch64 (ARMv8) +* :ghissue:`7201`: RGBA values produce different result for imshow and for markers +* :ghissue:`3232`: Navigation API Needed +* :ghissue:`7001`: Default log ticker can make too many ticks +* :ghissue:`806`: Provide an option for the Animation class to retain the previously rendered frames +* :ghissue:`6135`: matplotlib.animate writes png frames in cwd instead of temp files +* :ghissue:`7189`: graph not showing when I set format to line +* :ghissue:`7080`: Difference in symbol sizes using Mathtext with stixsans +* :ghissue:`7162`: _axes.py linestyle_map unused +* :ghissue:`7163`: pyplot.subplots() is slow +* :ghissue:`7161`: matplotlib.ticker.FormatStrFormatter clashes with ax2.set_yticklabels when dual y-axis is used +* :ghissue:`6549`: Log scale tick labels are overlapping +* :ghissue:`7154`: bar graph with nan values leads to "No current point in closepath" in evince +* :ghissue:`7149`: unable to save .eps plot +* :ghissue:`7090`: fix building pdf docs +* :ghissue:`6996`: FontProperties size and weight ignored by figure.suptitle +* :ghissue:`7139`: float128s everywhere for dates? +* :ghissue:`7083`: DOC: Clarify the relationship between ``plot`` and ``scatter`` +* :ghissue:`7125`: Import Error on matplotlib.pyplot: PyQt4 +* :ghissue:`7124`: Updated matplotlib 1.5.3 broken in default Anaconda channel +* :ghissue:`6429`: Segfault when calling show() after using Popen (test code inside) +* :ghissue:`7114`: BUG: ax.tick_params change in tick length does not adjust tick labels +* :ghissue:`7120`: Polar plot cos(2x) +* :ghissue:`7081`: enh: additional colorblind-friendly colormaps +* :ghissue:`7103`: Problem with discrete ``ListedColormaps`` when more than 4 colors are present +* :ghissue:`7115`: Using matplotlib without Tkinter +* :ghissue:`7106`: Wrong reader in mathext.py +* :ghissue:`7078`: imshow() does not interpret aspect/extent when interpolation='none' in svg output +* :ghissue:`6616`: Keyboard shortcuts for toggling minor ticks grid and opening figureoptions window +* :ghissue:`7105`: Can't pickle +* :ghissue:`7086`: DOC (released) style is badly broken on the user doc. +* :ghissue:`7065`: backport #7049 +* :ghissue:`7091`: v2.0.0b4 breaks viscm +* :ghissue:`7043`: BUG: LogLocator.set_params is broken +* :ghissue:`7070`: autoscale does not work for axes added by fig.add_axes() +* :ghissue:`3645`: Proposal: Add rc setting to control dash spacing +* :ghissue:`7009`: No good way to disable SpanSelector +* :ghissue:`7040`: It is getting increasingly difficult to build the matplotlib documentation +* :ghissue:`6964`: Docstring for ArtistAnimation is incorrect +* :ghissue:`6965`: ArtistAnimation cannot animate Figure-only artists +* :ghissue:`7062`: remove the contour on a Basemap object +* :ghissue:`7061`: remove the contour on Basemap +* :ghissue:`7054`: Whether the new version 2.0 will support high-definition screen? +* :ghissue:`7053`: When will release 2.0 official version? +* :ghissue:`6797`: Undefined Symbol Error On Ubuntu +* :ghissue:`6523`: matplotlib-2.0.0b1 test errors on Windows +* :ghissue:`4753`: rubber band in qt5agg slow +* :ghissue:`6959`: extra box on histogram plot with a single value +* :ghissue:`6816`: Segmentation fault on Qt5Agg when using the wrong linestyle +* :ghissue:`4212`: Hist showing wrong first bin +* :ghissue:`4602`: bar / hist : gap between first bar and other bars with lw=0.0 +* :ghissue:`6641`: Edge ticks sometimes disappear +* :ghissue:`7041`: Python 3.5.2 crashes when launching matplotlib 1.5.1 +* :ghissue:`7028`: Latex Greek fonts not working in legend +* :ghissue:`6998`: dash pattern scaling with linewidth should get it's own rcParam +* :ghissue:`7021`: How to prevent matplotlib from importing qt4 libraries when only +* :ghissue:`7020`: Using tick_right() removes any styling applied to tick labels. +* :ghissue:`7018`: Website Down +* :ghissue:`6785`: Callbacks of draggable artists should check that they have not been removed +* :ghissue:`6783`: Draggable annotations specified in offset coordinates switch to figure coordinates after dragging +* :ghissue:`7015`: pcolor() not using "data" keyword argument +* :ghissue:`7014`: matplotlib works well in ipython note book but can't display in a terminal running +* :ghissue:`6999`: cycler 0.10 is required due to change_key() usage +* :ghissue:`6794`: Incorrect text clipping in presence of multiple subplots +* :ghissue:`7004`: Zooming with a large range in y-values while using the linestyle "--" is very slow +* :ghissue:`6828`: Spikes in small wedges of a pie chart +* :ghissue:`6940`: large memory leak in new contour routine +* :ghissue:`6894`: bar(..., linewidth=None) doesn't display bar edges with mpl2.0b3 +* :ghissue:`6989`: bar3d no longer allows default colors +* :ghissue:`6980`: problem accessing canvas on MacOS 10.11.6 with matplotlib 2.0.0b3 +* :ghissue:`6804`: Histogram of xarray.DataArray can be extremely slow +* :ghissue:`6859`: Update URL for links to ggplot +* :ghissue:`6852`: Switching to log scale when there is no positive data crashes the Qt5 backend, causes inconsistent internal state in others +* :ghissue:`6740`: PGF Backend: Support interpolation='none'? +* :ghissue:`6665`: regression: builtin latex rendering doesn't find the right mathematical fonts +* :ghissue:`6984`: plt.annotate(): segmentation fault when coordinates are too high +* :ghissue:`6979`: plot won't show with plt.show(block=False) +* :ghissue:`6981`: link to ggplot is broken... +* :ghissue:`6975`: [Feature request] Simple ticks generator for given range +* :ghissue:`6905`: pcolorfast results in invalid cursor data +* :ghissue:`6970`: quiver problems when angles is an array of values rather than 'uv' or 'xy' +* :ghissue:`6966`: No Windows wheel available on PyPI for new version of matplotlib (1.5.2) +* :ghissue:`6721`: Font cache building of matplotlib blocks requests made to HTTPd +* :ghissue:`6844`: scatter edgecolor is broken in Matplotlib 2.0.0b3 +* :ghissue:`6849`: BUG: endless loop with MaxNLocator integer kwarg and short axis +* :ghissue:`6935`: matplotlib.dates.DayLocator cannot handle invalid input +* :ghissue:`6951`: Ring over A in \AA is too high in Matplotlib 1.5.1 +* :ghissue:`6960`: axvline is sometimes not shown +* :ghissue:`6473`: Matplotlib manylinux wheel - ready to ship? +* :ghissue:`5013`: Add Hershey Fonts a la IDL +* :ghissue:`6953`: ax.vlines adds unwanted padding, changes ticks +* :ghissue:`6946`: No Coveralls reports on GitHub +* :ghissue:`6933`: Misleading error message for matplotlib.pyplot.errorbar() +* :ghissue:`6945`: Matplotlib 2.0.0b3 wheel can't load libpng in OS X 10.6 +* :ghissue:`3865`: Improvement suggestions for matplotlib.Animation.save('video.mp4') +* :ghissue:`6932`: Investigate issue with pyparsing 2.1.6 +* :ghissue:`6941`: Interfering with yahoo_finance +* :ghissue:`6913`: Cant get currency from yahoo finance with matplotlib +* :ghissue:`6901`: Add API function for removing legend label from graph +* :ghissue:`6510`: 2.0 beta: Boxplot patches zorder differs from lines +* :ghissue:`6911`: freetype build won't become local +* :ghissue:`6866`: examples/misc/longshort.py is outdated +* :ghissue:`6912`: Matplotlib fail to compile matplotlib._png +* :ghissue:`1711`: Autoscale to automatically include a tiny margin with ``Axes.errorbar()`` +* :ghissue:`6903`: RuntimeError('Invalid DISPLAY variable') - With docker and django +* :ghissue:`6888`: Can not maintain zoom level when left key is pressed +* :ghissue:`6855`: imsave-generated PNG files missing edges for certain resolutions +* :ghissue:`6479`: Hexbin with log scale takes extent range as logarithm of the data along the log axis +* :ghissue:`6795`: suggestion: set_xticklabels and set_yticklabels default to current labels +* :ghissue:`6825`: I broke imshow() :-( +* :ghissue:`6858`: PyQt5 pyplot error +* :ghissue:`6853`: PyQt5 (v5.7) backend - TypeError upon calling figure() +* :ghissue:`6835`: Which image formats to build in docs. +* :ghissue:`6856`: Incorrect plotting for versions > 1.3.1 and GTK. +* :ghissue:`6838`: Figures not showing in interactive mode with macosx backend +* :ghissue:`6846`: GTK Warning +* :ghissue:`6839`: Test ``test_pickle.test_complete`` is broken +* :ghissue:`6691`: rcParam missing tick side parameters +* :ghissue:`6833`: plot contour with levels from discrete data +* :ghissue:`6636`: DOC: gallery supplies 2 pngs, neither of which is default +* :ghissue:`3896`: dates.date2num bug with daylight switching hour +* :ghissue:`6685`: 2.0 dev legend breaks on scatterplot +* :ghissue:`3655`: ensure removal of font cache on version upgrade +* :ghissue:`6818`: Failure to build docs: unknown property +* :ghissue:`6798`: clean and regenerate travis cache +* :ghissue:`6782`: 2.x: Contour level count is not respected +* :ghissue:`6796`: plot/lines not working for datetime objects that span old dates +* :ghissue:`6660`: cell focus/cursor issue when plotting to nbagg +* :ghissue:`6775`: Last figure in http://matplotlib.org/users/pyplot_tutorial.html is not displayed correctly +* :ghissue:`5981`: Increased tick width in 3D plots looks odd +* :ghissue:`6771`: ImportError: No module named artist +* :ghissue:`6289`: Grids are not rendered in backend implementation +* :ghissue:`6621`: Change in the result of test_markevery_linear_scales_zoomed +* :ghissue:`6515`: Dotted grid lines in v2.0.0b1 +* :ghissue:`6511`: Dependencies in installation of 2.0.0b1 +* :ghissue:`6668`: “Bachelor's degrees…” picture in the gallery is cropped +* :ghissue:`6751`: Tableau style +* :ghissue:`6742`: import matplotlib.pyplot as plt throws an erro +* :ghissue:`6097`: anaconda package missing nose dependency +* :ghissue:`6299`: savefig() to eps/pdf does not work +* :ghissue:`6387`: import matplotlib causes UnicodeDecodeError +* :ghissue:`6471`: Colorbar label position different when executing a block of code +* :ghissue:`6732`: Adding ``pairplot`` functionality? +* :ghissue:`6749`: Step diagram does not support xlim() and ylim() +* :ghissue:`6748`: Step diagram does not suppot +* :ghissue:`6615`: Bad event index for step plots +* :ghissue:`6588`: Different line styles between PNG and PDF exports. +* :ghissue:`6693`: linestyle="None" argument for fill_between() doesn't work +* :ghissue:`6592`: Linestyle pattern depends on current style, not style set at creation +* :ghissue:`5430`: Linestyle: dash tuple with offset +* :ghissue:`6728`: Can't install matplotlib with specific python version +* :ghissue:`6546`: Recommendation to install packages for various OS +* :ghissue:`6536`: get_sample_data() in cbook.py duplicates code from _get_data_path() __init__.py +* :ghissue:`3631`: Better document meaning of notches in boxplots +* :ghissue:`6705`: The test suite spends 20% of it's time in ``gc.collect()`` +* :ghissue:`6698`: Axes3D scatter crashes without alpha keyword +* :ghissue:`5860`: Computer Modern Roman should be the default serif when using TeX backend +* :ghissue:`6702`: Bad fonts crashes matplotlib on startup +* :ghissue:`6671`: Issue plotting big endian images +* :ghissue:`6196`: Qt properties editor discards color alpha +* :ghissue:`6509`: pylab image_masked is broken +* :ghissue:`6657`: appveyor is failing on pre-install +* :ghissue:`6610`: Icons for Tk are not antialiased. +* :ghissue:`6687`: Small issues with the example ``polar_scatter_demo.py`` +* :ghissue:`6541`: Time to deprecate the GTK backend +* :ghissue:`6680`: Minor typo in the docstring of ``IdentityTransform``? +* :ghissue:`6670`: plt.text object updating incorrectly with blit=False +* :ghissue:`6646`: Incorrect fill_between chart when use set_xscale('log') +* :ghissue:`6540`: imshow(..., alpha=0.5) produces different results in 2.x +* :ghissue:`6650`: fill_between() not working properly +* :ghissue:`6566`: Regression: Path.contains_points now returns uint instead of bool +* :ghissue:`6624`: bus error: fc-list +* :ghissue:`6655`: Malware found on matplotlib components +* :ghissue:`6623`: RectangleSelector disappears after resizing +* :ghissue:`6629`: matplotlib version error +* :ghissue:`6638`: get_ticklabels returns '' in ipython/python interpreter +* :ghissue:`6631`: can't build matplotlib on smartos system(open solaris) +* :ghissue:`6562`: 2.x: Cairo backends cannot render images +* :ghissue:`6507`: custom scatter marker demo broken +* :ghissue:`6591`: DOC: update static image for interpolation_none_vs_nearest.py example +* :ghissue:`6607`: BUG: saving image to png changes colors +* :ghissue:`6587`: please copy http://matplotlib.org/devdocs/users/colormaps.html to http://matplotlib.org/users +* :ghissue:`6594`: Documentation Typo +* :ghissue:`5784`: dynamic ticking (#5588) should avoid (if possible) single ticks +* :ghissue:`6492`: mpl_toolkits.mplot3d has a null byte somewhere +* :ghissue:`5862`: Some Microsoft fonts produce unreadable EPS +* :ghissue:`6537`: bundled six 1.9.0 causes ImportError: No module named 'winreg' in Pympler +* :ghissue:`6563`: pyplot.errorbar attempts to plot 0 on a log axis in SVGs +* :ghissue:`6571`: Unexpected behavior with ttk.Notebook - graph not loaded unless tab preselected +* :ghissue:`6570`: Unexpected behavior with ttk.Notebook - graph not loaded unless tab preselected +* :ghissue:`6539`: network tests are not skipped when running tests.py with --no-network +* :ghissue:`6567`: qt_compat fails to identify PyQt5 +* :ghissue:`6559`: mpl 1.5.1 requires pyqt even with a wx backend +* :ghissue:`6009`: No space before unit symbol when there is no SI prefix in ticker.EngFormatter +* :ghissue:`6528`: Fail to install matplotlib by "pip install" on SmartOS(like open solaris system) +* :ghissue:`6531`: Segmentation fault with any backend (matplotlib 1.4.3 and 1.5.1) when calling pyplot.show() +* :ghissue:`6513`: Using gray shade from string ignores alpha parameters +* :ghissue:`6477`: Savefig() to pdf renders markers differently than show() +* :ghissue:`6525`: PS export issue with custom font +* :ghissue:`6514`: LaTeX axis labels can no longer have custom fonts +* :ghissue:`2663`: Multi Cursor disable broken +* :ghissue:`6083`: Figure linewidth default in rcparams +* :ghissue:`1069`: Add a donation information page +* :ghissue:`6035`: Issue(?): head size of FancyArrowPatch changes between interactive figure and picture export +* :ghissue:`6495`: new figsize is bad for subplots with fontsize 12 +* :ghissue:`6493`: Stepfilled color cycle for background and edge different +* :ghissue:`6380`: Implicit addition of "color" to property_cycle breaks semantics +* :ghissue:`6447`: Line2D.contains does not take drawstyle into account. +* :ghissue:`6257`: option for default space between title and axes +* :ghissue:`5868`: tight_layout doesn't leave enough space between outwards ticks and axes title +* :ghissue:`5987`: Outward ticks cause labels to be clipped by default +* :ghissue:`5269`: Default changes: legend +* :ghissue:`6489`: Test errors with numpy 1.11.1rc1 +* :ghissue:`5960`: Misplaced shadows when using FilteredArtistList +* :ghissue:`6452`: Please add a generic "seaborn" style +* :ghissue:`6469`: Test failures testing matplotlib 1.5.1 manylinux wheels +* :ghissue:`5854`: New cycler does not work with bar plots +* :ghissue:`5977`: legend needs logic to deal with new linestyle scaling by linewidth +* :ghissue:`6365`: Default format time series xtick labels changed +* :ghissue:`6104`: docs: latex required for PDF plotting? +* :ghissue:`6451`: Inequality error on web page http://matplotlib.org/faq/howto_faq.htm +* :ghissue:`6459`: use conda already installed on appveyor +* :ghissue:`6043`: Advanced hillshading example looks strange with new defaults. +* :ghissue:`6440`: BUG: set_tick_params labelcolor should apply to offset +* :ghissue:`6458`: Wrong package name in INSTALL file +* :ghissue:`2842`: matplotlib.tests.test_basic.test_override_builtins() fails with Python >=3.4 +* :ghissue:`2375`: matplotlib 1.3.0 doesn't compile with Solaris Studio 12.1 CC +* :ghissue:`2667`: matplotlib.tests.test_mathtext.test_mathtext_{cm,stix,stixsans}_{37,53}.test are failing +* :ghissue:`2243`: axes limits with aspect='equal' +* :ghissue:`1758`: y limit with dashed or dotted lines hangs with somewhat big data +* :ghissue:`5994`: Points annotation coords not working in 2.x +* :ghissue:`6444`: matplotlib.path.contains_points is a LOT slower in 1.51 +* :ghissue:`5461`: Feature request: allow a default line alpha to be set in mpl.rcParams +* :ghissue:`5132`: ENH: Set the alpha value for plots in rcParams +* :ghissue:`6449`: axhline and axvline linestyle as on-off seq doesn't work if set directly in function call +* :ghissue:`6416`: animation with 'ffmpeg' backend and 'savefig.bbox = tight' garbles video +* :ghissue:`6437`: Improperly spaced time axis +* :ghissue:`5974`: scatter is not changing color in Axes3D +* :ghissue:`6436`: clabels plotting outside of projection limb +* :ghissue:`6438`: Cant get emoji working in Pie chart legend with google app engine. Need help. +* :ghissue:`6362`: greyscale scatter points appearing blue +* :ghissue:`6301`: tricky bug in ticker due to special behaviour of numpy +* :ghissue:`6276`: Ticklabel format not preserved after editing plot limits +* :ghissue:`6173`: ``linestyle`` parameter does not support default cycler through ``None``, crashes instead. +* :ghissue:`6109`: colorbar _ticker +_locate bug +* :ghissue:`6231`: Segfault when figures are deleted in random order +* :ghissue:`6432`: micro sign doesn't show in EngFormatter +* :ghissue:`6057`: Infinite Loop: LogLocator Colorbar & update_ticks +* :ghissue:`6270`: pyplot.contour() not working with matplotlib.ticker.LinearLocator() +* :ghissue:`6058`: "Configure subplots" tool is initialized very inefficiently in the Qt backends +* :ghissue:`6363`: Change ``legend`` to accept ``alpha`` instead of (only) ``framealpha``. +* :ghissue:`6394`: Severe bug in ````imshow```` when plotting images with small values +* :ghissue:`6368`: Bug: matplotlib.pyplot.spy: does not work correctly for sparse matrices with many entries (>= 2**32) +* :ghissue:`6419`: Imshow does not copy data array but determines colormap values upon call +* :ghissue:`3615`: mouse scroll event in Gtk3 backend +* :ghissue:`3373`: add link to gtk embedding cookbook to website +* :ghissue:`6121`: opening the configure subplots menu moves the axes by a tiny amount +* :ghissue:`2511`: NavigationToolbar breaks if axes are added during use. +* :ghissue:`6349`: Down arrow on GTK3 backends selects toolbar, which eats furthur keypress events +* :ghissue:`6408`: minor ticks don't respect rcParam xtick.top / ytick.right +* :ghissue:`6398`: sudden install error with pip (pyparsing 2.1.2 related) +* :ghissue:`5819`: 1.5.1rc1: dont use absolute links in the "new updates" on the homepage +* :ghissue:`5969`: urgent bug after 1.5.0: offset of LineCollection when apply agg_filter +* :ghissue:`5767`: axes limits (in old "round_numbers" mode) affected by floating point issues +* :ghissue:`5755`: Better choice of axes offset value +* :ghissue:`5938`: possible bug with ax.set_yscale('log') when all values in array are zero +* :ghissue:`6399`: pyparsing version 2.1.2 not supported (2.1.1 works though) +* :ghissue:`5884`: ``numpy`` as no Attribute ``string0`` +* :ghissue:`6395`: Deprecation warning for axes.color_cycle +* :ghissue:`6385`: Possible division by zero in new ``get_tick_space()`` methods; is rotation ignored? +* :ghissue:`6344`: Installation issue +* :ghissue:`6315`: Qt properties editor could sort lines labels using natsort +* :ghissue:`5111`: nbagg backend captures exceptions raised by callbacks +* :ghissue:`5219`: Notebook backend: possible to remove javascript/html when figure is closed? +* :ghissue:`4940`: NBAgg figure management issues +* :ghissue:`4582`: Matplotlib IPython Widget +* :ghissue:`6142`: matplotlib.ticker.LinearLocator view_limits algorithm improvement? +* :ghissue:`6326`: Unicode invisible after image saved +* :ghissue:`5980`: Gridlines on top of plot by default in 2.0? +* :ghissue:`6272`: Ability to set default scatter marker in matplotlibrc +* :ghissue:`6335`: subplots animation example is broken on OS X with qt4agg +* :ghissue:`6357`: pyplot.hist: normalization fails +* :ghissue:`6352`: clim doesn't update after draw +* :ghissue:`6353`: hist won't norm for small numbers +* :ghissue:`6343`: prop_cycle breaks keyword aliases +* :ghissue:`6226`: Issue saving figure as eps when using gouraud shaded triangulation +* :ghissue:`6330`: ticklabel_format reset to default by ScalarFormatter +* :ghissue:`4975`: Non-default ``color_cycle`` not working in Pie plot +* :ghissue:`5990`: Scatter markers do not follow new colour cycle +* :ghissue:`5577`: Handling of "next color in cycle" should be handled differently +* :ghissue:`5489`: Special color names to pull colors from the currently active color cycle +* :ghissue:`6325`: Master requires cycler 0.10.0 +* :ghissue:`6278`: imshow with pgf backend does not render transparency +* :ghissue:`5945`: Figures in the notebook backend are too large following DPI changes +* :ghissue:`6332`: Animation with blit broken +* :ghissue:`6331`: matplotlib pcolormesh seems to slide some data around on the plot +* :ghissue:`6307`: Seaborn style sheets don't edit ``patch.facecolor`` +* :ghissue:`6294`: Zero size ticks show up as single pixels in rendered pdf +* :ghissue:`6318`: Cannot import mpl_toolkits in Python3 +* :ghissue:`6316`: Viridis exists but not in plt.cm.datad.keys() +* :ghissue:`6082`: Cannot interactively edit axes limits using Qt5 backend +* :ghissue:`6309`: Make CheckButtons based on subplots automatically +* :ghissue:`6306`: Can't show images when plt.show() was executed +* :ghissue:`2527`: Vertical alignment of text is too high +* :ghissue:`4827`: Pickled Figure Loses sharedx Properties +* :ghissue:`5998`: \math??{} font styles are ignored in 2.x +* :ghissue:`6293`: matplotlib notebook magic cells with output plots - skips next cell for computation +* :ghissue:`235`: hatch linewidth patch +* :ghissue:`5875`: Manual linestyle specification ignored if 'prop_cycle' contains 'ls' +* :ghissue:`5959`: imshow rendering issue +* :ghissue:`6237`: MacOSX agg version: doesn't redraw after keymap.grid keypress +* :ghissue:`6266`: Better fallback when color is a float +* :ghissue:`6002`: Potential bug with 'start_points' argument of 'pyplot.streamplot' +* :ghissue:`6265`: Document how to set viridis as default colormap in mpl 1.x +* :ghissue:`6258`: Rendering vector graphics: parsing polygons? +* :ghissue:`1702`: Bug in 3D histogram documentation +* :ghissue:`5937`: xticks/yticks default behaviour +* :ghissue:`4706`: Documentation - Basemap +* :ghissue:`6255`: Can't build matplotlib.ft2font in cygwin +* :ghissue:`5792`: Not easy to get colorbar tick mark locations +* :ghissue:`6233`: ImportError from Sphinx plot_directive from Cython +* :ghissue:`6235`: Issue with building docs with Sphinx 1.4.0 +* :ghissue:`4383`: xkcd color names +* :ghissue:`6219`: Example embedding_in_tk.py freezes in Python3.5.1 +* :ghissue:`5067`: improve whats_new entry for prop cycler +* :ghissue:`4614`: Followup items from the matplotlib 2.0 BoF +* :ghissue:`5986`: mac osx backend does not scale dashes by linewidth +* :ghissue:`4680`: Set forward=True by default when setting the figure size +* :ghissue:`4597`: use mkdtemp in _create_tmp_config_dir +* :ghissue:`3437`: Interactive save should respect 'savefig.facecolor' rcParam. +* :ghissue:`2467`: Improve default colors and layouts +* :ghissue:`4194`: matplotlib crashes on OS X when saving to JPEG and then displaying the plot +* :ghissue:`4320`: Pyplot.imshow() "None" interpolation is not supported on Mac OSX +* :ghissue:`1266`: Draggable legend results RuntimeError and AttributeError on Mac OS 10.8.1 +* :ghissue:`5442`: xkcd plots rendered as regular plots on Mac OS X +* :ghissue:`2697`: Path snapping does not respect quantization scale appropriate for Retina displays +* :ghissue:`6049`: Incorrect TextPath display under interactive mode +* :ghissue:`1319`: macosx backend lacks support for cursor-type widgets +* :ghissue:`531`: macosx backend does not work with blitting +* :ghissue:`5964`: slow rendering with backend_macosx on El Capitan +* :ghissue:`5847`: macosx backend color rendering +* :ghissue:`6224`: References to non-existing class FancyBoxPatch +* :ghissue:`781`: macosx backend doesn't find fonts the same way as other backends +* :ghissue:`4271`: general colormap reverser +* :ghissue:`6201`: examples svg_histogram.html failes with UnicodeEncodeError +* :ghissue:`6212`: ENH? BUG? ``pyplot.setp``/``Artist.setp`` does not accept non-indexable iterables of handles. +* :ghissue:`4445`: Two issues with the axes offset indicator +* :ghissue:`6209`: Qt4 backend uses Qt5 backend +* :ghissue:`6136`: Feature request: configure default scatter plot marker size +* :ghissue:`6180`: Minor typos in the style sheets users' guide +* :ghissue:`5517`: "interactive example" not working with PySide +* :ghissue:`4607`: bug in font_manager.FontManager.score_family() +* :ghissue:`4400`: Setting annotation background covers arrow +* :ghissue:`596`: Add "bring window to front" functionality +* :ghissue:`4674`: Default marker edge width in plot vs. scatter +* :ghissue:`5988`: rainbow_text example is missing some text +* :ghissue:`6165`: MacOSX backend hangs drawing lines with many dashes/dots +* :ghissue:`6155`: Deprecation warnings with Dateutil 2.5 +* :ghissue:`6003`: In 'pyplot.streamplot', starting points near the same streamline raise 'InvalidIndexError' +* :ghissue:`6105`: Accepting figure argument in subplot2grid +* :ghissue:`6184`: csv2rec handles dates differently to datetimes when datefirst is specified. +* :ghissue:`6164`: Unable to use PySide with gui=qt +* :ghissue:`6166`: legends do not refresh +* :ghissue:`3897`: bug: inconsistent types accepted in DateLocator subclasses +* :ghissue:`6160`: EPS issues with rc parameters used in seaborn library on Win 8.1 +* :ghissue:`6163`: Can´t make matplotlib run in my computer +* :ghissue:`5331`: Boxplot with zero IQR sets whiskers to max and min and leaves no outliers +* :ghissue:`5575`: plot_date() ignores timezone +* :ghissue:`6143`: drawstyle accepts anything as default rather than raising +* :ghissue:`6151`: Matplotlib 1.5.1 ignores annotation_clip parameter +* :ghissue:`6147`: colormaps issue +* :ghissue:`5916`: Headless get_window_extent or equivalent +* :ghissue:`6141`: Matplotlib subplots and datetime x-axis functionality not working as intended? +* :ghissue:`6138`: No figure shows, no error +* :ghissue:`6134`: Cannot plot a line of width=1 without antialiased +* :ghissue:`6120`: v2.x failures on travis +* :ghissue:`6092`: %matplotlib notebook broken with current matplotlib master +* :ghissue:`1235`: Legend placement bug +* :ghissue:`2499`: Showing np.uint16 images of the form (h,w,3) is broken +* :ghissue:`5479`: Table: auto_set_column_width not working +* :ghissue:`6028`: Appearance of non-math hyphen changes with math in text +* :ghissue:`6113`: ValueError after moving legend and rcParams.update +* :ghissue:`6111`: patches fails when data are array, not list +* :ghissue:`6108`: Plot update issue within event callback for multiple updates +* :ghissue:`6069`: imshow no longer correctly handles 'bad' (``nan``) values +* :ghissue:`6103`: ticklabels empty when not interactive +* :ghissue:`6084`: Despined figure is cropped +* :ghissue:`6067`: pyplot.savefig doesn't expand ~ (tilde) in path +* :ghissue:`4754`: Change default color cycle +* :ghissue:`6063`: Axes.relim() seems not to work when copying Line2D objects +* :ghissue:`6065`: Proposal to change color -- 'indianred' +* :ghissue:`6056`: quiver plot in polar projection - how to make the quiver density latitude-dependent ? +* :ghissue:`6051`: Matplotlib v1.5.1 apparently not compatible with python-dateutil 2.4.2 +* :ghissue:`5513`: Call get_backend in pylab_setup +* :ghissue:`5983`: Option to Compress Graphs for pgf-backend +* :ghissue:`5895`: Polar Projection PDF Issue +* :ghissue:`5948`: tilted line visible in generated pdf file +* :ghissue:`5737`: matplotlib 1.5 compatibility with wxPython +* :ghissue:`5645`: Missing line in a self-sufficient example in navigation_toolbar.rst :: a minor bug in docs +* :ghissue:`6037`: Matplotlib xtick appends .%f after %H:%M%:%S on chart +* :ghissue:`6025`: Exception in Tkinter/to_rgb with new colormaps +* :ghissue:`6034`: colormap name is broken for ListedColormap? +* :ghissue:`5982`: Styles need update after default style changes +* :ghissue:`6017`: Include tests.py in archive of release +* :ghissue:`5520`: 'nearest' interpolation not working with low dpi +* :ghissue:`4280`: imsave reduces 1row from the image +* :ghissue:`3057`: DPI-connected bug of imshow when using multiple masked arrays +* :ghissue:`5490`: Don't interpolate images in RGB space +* :ghissue:`5996`: 2.x: Figure.add_axes(..., facecolor='color') does not set axis background colour +* :ghissue:`4760`: Default linewidth thicker than axes linewidth +* :ghissue:`2698`: ax.text() fails to draw a box if the text content is full of blank spaces and linefeeds. +* :ghissue:`3948`: a weird thing in the source code comments +* :ghissue:`5921`: test_backend.pgf.check_for(texsystem) does not do what it says... +* :ghissue:`4295`: Draggable annotation position wrong with negative x/y +* :ghissue:`1986`: Importing pyplot messes with command line argument parsing +* :ghissue:`5885`: matplotlib stepfilled histogram breaks at the value 10^-1 on xubuntu +* :ghissue:`5050`: pandas v0.17.0rc1 +* :ghissue:`3658`: axes.locator_params fails with LogLocator (and most Locator subclasses) +* :ghissue:`3742`: Square plots +* :ghissue:`3900`: debugging Segmentation fault with Qt5 backend +* :ghissue:`4192`: Error when color value is None +* :ghissue:`4210`: segfault: fill_between with Python3 +* :ghissue:`4325`: FancyBboxPatch wrong size +* :ghissue:`4340`: Histogram gap artifacts +* :ghissue:`5096`: Add xtick.top.visible, xtick.bottom.visible, ytick.left.visible, ytick.right.visible to rcParams +* :ghissue:`5120`: custom axis scale doesn't work in 1.4.3 +* :ghissue:`5212`: shifted(?) bin positions when plotting multiple histograms at the same time +* :ghissue:`5293`: Qt4Agg: RuntimeError: call __init__ twice +* :ghissue:`5971`: Add support for PySide2 (Qt5) +* :ghissue:`5993`: Basemap readshapefile should read shapefile for the long/lat specified in the Basemap instance. +* :ghissue:`5991`: basemap crashes with no error message when passed numpy nan's +* :ghissue:`5883`: New colormaps : Inferno, Viridis, ... +* :ghissue:`5841`: extra label for non-existent tick +* :ghissue:`4502`: Default style proposal: outward tick marks +* :ghissue:`875`: Replace "jet" as the default colormap +* :ghissue:`5047`: Don't draw end caps on error bars by default +* :ghissue:`4700`: Overlay blend mode +* :ghissue:`4671`: Change default legend location to 'best'. +* :ghissue:`5419`: Default setting of figure transparency in NbAgg is a performance problem +* :ghissue:`4815`: Set default axis limits in 2D-plots to the limits of the data +* :ghissue:`4854`: set numpoints to 1 +* :ghissue:`5917`: improved dash styles +* :ghissue:`5900`: Incorrect Image Tutorial Inline Sample Code +* :ghissue:`5965`: xkcd example in gallery +* :ghissue:`5616`: Better error message if no animation writer is available +* :ghissue:`5920`: How to rotate secondary y axis label so it doesn't overlap with y-ticks, matplotlib +* :ghissue:`5966`: SEGFAULT if ``pyplot`` is imported +* :ghissue:`5967`: savefig SVG and PDF output for scatter plots is excessively complex, crashses Inkscape +* :ghissue:`1943`: legend doesn't work with stackplot +* :ghissue:`5923`: Windows usetex=True error in long usernames +* :ghissue:`5940`: KeyError: 'getpwuid(): uid not found: 5001' +* :ghissue:`5748`: Windows test failures on appveyor +* :ghissue:`5944`: Notebook backend broken on Master +* :ghissue:`5946`: Calling subplots_adjust breaks savefig output +* :ghissue:`5929`: Fallback font doesn't work on windows? +* :ghissue:`5925`: Data points beyond axes range plotted when saved to SVG +* :ghissue:`5918`: Pyplot.savefig is very slow with some combinations of data/ylim scales +* :ghissue:`5919`: Error when trying to import matplotlib into IPython notebook +* :ghissue:`5803`: Barbs broken +* :ghissue:`5846`: setupext.py: problems parsing setup.cfg (not updated to changes in configparser) +* :ghissue:`5309`: Differences between function and keywords for savefig.bbox and axes.facecolor +* :ghissue:`5889`: Factual errors in HowTo FAQ Box Plot Image +* :ghissue:`5618`: New rcParams requests +* :ghissue:`5810`: Regression in test_remove_shared_axes +* :ghissue:`5281`: plt.tight_layout(pad=0) cuts away outer ticks +* :ghissue:`5909`: The documentation for LinearLocator's presets keyword is unclear +* :ghissue:`5864`: mathtext mishandling of certain exponents +* :ghissue:`5869`: doc build fails with mpl-1.5.1 and sphinx-1.3.4 (sphinx-1.3.3 is fine) +* :ghissue:`5835`: gridspec.Gridspec doesn't check for consistency in arguments +* :ghissue:`5867`: No transparency in \*.pgf file when using pgf Backend. +* :ghissue:`5863`: \left( ... \right) are too small +* :ghissue:`5850`: prop_cycler for custom dashes -- linestyle such as (, (, )) throws error +* :ghissue:`5861`: Marker style request +* :ghissue:`5851`: Bar and box plots use the 'default' matplotlib colormap, even if the style is changed +* :ghissue:`5857`: FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance_examples +* :ghissue:`5831`: tests.py is missing from pypi tarball +* :ghissue:`5829`: test_rasterize_dpi fails with 1.5.1 +* :ghissue:`5843`: what is the source code of ax.pcolormesh(T, R, Z,vmin=0,vmax=255,cmap='jet') ? +* :ghissue:`5799`: mathtext kerning around comma +* :ghissue:`2841`: There is no set_linestyle_cycle in the matplotlib axes API +* :ghissue:`5821`: Consider using an offline copy of Raleway font +* :ghissue:`5822`: FuncAnimation.save() only saving 1 frame +* :ghissue:`5449`: Incomplete dependency list for installation from source +* :ghissue:`5814`: Adding colorbars to row subplots doesn't render the main plots when saving to .eps in 1.5.0 +* :ghissue:`5816`: matplotlib.pyplot.boxplot ignored showmeans keyword +* :ghissue:`5086`: Default date format for axis formatting +* :ghissue:`4808`: AutoDateFormatter shows too much precision +* :ghissue:`5812`: Widget event issue +* :ghissue:`5794`: --no-network not recognized as valid option for tests.py +* :ghissue:`5801`: No such file or directory: '/usr/share/matplotlib/stylelib' +* :ghissue:`5777`: Using default style raises warnings about non style parameters +* :ghissue:`5738`: Offset text should be computed based on lowest and highest ticks, not actual axes limits +* :ghissue:`5403`: Document minimal MovieWriter sub-class +* :ghissue:`5558`: The link to the John Hunter Memorial fund is a 404 +* :ghissue:`5757`: Several axes_grid1 and axisartist examples broken on master +* :ghissue:`5557`: plt.hist throws KeyError when passed a pandas.Series without 0 in index +* :ghissue:`5550`: Plotting datetime values from Pandas dataframe +* :ghissue:`4855`: Limit what ``style.use`` can affect? +* :ghissue:`5765`: import matplotlib._png as _png ImportError: libpng16.so.16: cannot open shared object +* :ghissue:`5753`: Handling of zero in log shared axes depends on whether axes are shared +* :ghissue:`5756`: 3D rendering, scatterpoints disapear near edges of surfaces +* :ghissue:`5747`: Figure.suptitle does not respect ``size`` argument +* :ghissue:`5641`: plt.errorbar error with empty list +* :ghissue:`5476`: annotate doesn't trigger redraw +* :ghissue:`5572`: Matplotlib 1.5 broken_barh fails on empty data. +* :ghissue:`5089`: axes.properties calls get_axes internally +* :ghissue:`5745`: Using internal qhull despite the presence of pyqhull installed in the system +* :ghissue:`5744`: cycler is required, is missing, yet build succeeds. +* :ghissue:`5592`: Problem with _init_func in ArtistAnimation +* :ghissue:`5729`: Test matplotlib.tests.test_backend_svg.test_determinism fails on OSX in virtual envs. +* :ghissue:`4756`: font_manager.py takes multiple seconds to import +* :ghissue:`5435`: Unable to upgrade matplotlib 1.5.0 through pip +* :ghissue:`5636`: Generating legend from figure options panel of qt backend raise exception for large number of plots +* :ghissue:`5365`: Warning in test_lines.test_nan_is_sorted +* :ghissue:`5646`: Version the font cache +* :ghissue:`5692`: Can't remove StemContainer +* :ghissue:`5635`: RectangleSelector creates not wanted lines in axes +* :ghissue:`5427`: BUG? Normalize modifies pandas Series inplace +* :ghissue:`5693`: Invalid caching of long lines with nans +* :ghissue:`5705`: doc/users/plotting/examples/axes_zoom_effect.py is not a Python file +* :ghissue:`4359`: savefig crashes with malloc error on os x +* :ghissue:`5715`: Minor error in set up fork +* :ghissue:`5687`: Segfault on plotting with PySide as backend.qt4 +* :ghissue:`5708`: Segfault with Qt4Agg backend in 1.5.0 +* :ghissue:`5704`: Issue with xy and xytext +* :ghissue:`5673`: colorbar labelling bug (1.5 regression) +* :ghissue:`4491`: Document how to get a framework build in a virtual env +* :ghissue:`5468`: axes selection in axes editor +* :ghissue:`5684`: AxesGrid demo exception with LogNorm: 'XAxis' object has no attribute 'set_scale' +* :ghissue:`5663`: AttributeError: 'NoneType' object has no attribute 'canvas' +* :ghissue:`5573`: Support HiDPI (retina) displays in docs +* :ghissue:`5680`: SpanSelector span_stays fails with use_blit=True +* :ghissue:`5679`: Y-axis switches to log scale when an X-axis is shared multiple times. +* :ghissue:`5655`: Problems installing basemap behind a proxy +* :ghissue:`5670`: Doubling of coordinates in polygon clipping +* :ghissue:`4725`: change set_adjustable for share axes with aspect ratio of 1 +* :ghissue:`5488`: The default number of ticks should be based on the length of the axis +* :ghissue:`5543`: num2date ignoring tz in v1.5.0 +* :ghissue:`305`: Change canvas.print_figure default resolution +* :ghissue:`5660`: Cannot raise FileNotFoundError in python2 +* :ghissue:`5658`: A way to remove the image of plt.figimage()? +* :ghissue:`5495`: Something fishy in png reading +* :ghissue:`5549`: test_streamplot:test_colormap test broke unintentionally +* :ghissue:`5381`: HiDPI support in Notebook backend +* :ghissue:`5531`: test_mplot3d:test_quiver3d broke unintentionally +* :ghissue:`5530`: test_axes:test_polar_unit broke unintentionally +* :ghissue:`5525`: Comparison failure in text_axes:test_phase_spectrum_freqs +* :ghissue:`5650`: Wrong backend selection with PyQt4 +* :ghissue:`5649`: Documentation metadata (release version) does not correspond with some of the 'younger' documentation content +* :ghissue:`5648`: Some tests require non-zero tolerance +* :ghissue:`3980`: zoom in wx with retnia behaves badly +* :ghissue:`5642`: Mistype in pyplot_scales.py of pyplot_tutorial.rst :: a minor bug in docs +* :ghissue:`3316`: wx crashes on exit if figure not shown and not explicitly closed +* :ghissue:`5624`: Cannot manually close matplotlib plot window in Mac OS X Yosemite +* :ghissue:`4891`: Better auto-selection of axis limits +* :ghissue:`5633`: No module named externals +* :ghissue:`5634`: No module named 'matplotlib.tests' +* :ghissue:`5473`: Strange OS warning when import pyplot after upgrading to 1.5.0 +* :ghissue:`5524`: Change in colorbar extensions +* :ghissue:`5627`: Followup for Windows CI stuff +* :ghissue:`5613`: Quiverkey() positions arrow incorrectly with labelpos 'N' or 'S' +* :ghissue:`5615`: tornado now a requirement? +* :ghissue:`5582`: FuncAnimation crashes the interpreter (win7, 64bit) +* :ghissue:`5610`: Testfailures on windows +* :ghissue:`5595`: automatically build windows conda packages and wheels in master +* :ghissue:`5535`: test_axes:test_rc_grid image comparison test has always been broken +* :ghissue:`4396`: Qt5 is not mentioned in backends list in doc +* :ghissue:`5205`: pcolor does not handle non-array C data +* :ghissue:`4839`: float repr in axes parameter editing window (aka the green tick button) +* :ghissue:`5542`: Bad superscript positioning for some fonts +* :ghissue:`3791`: Update colormap examples. +* :ghissue:`4679`: Relationship between line-art markers and the markeredgewidth parameter +* :ghissue:`5601`: Scipy/matplotlib recipe with plt.connect() has trouble in python 3 (AnnoteFinder) +* :ghissue:`4211`: Axes3D quiver: variable length arrows +* :ghissue:`773`: mplot3d enhancement +* :ghissue:`395`: need 3D examples for tricontour and tricontourf +* :ghissue:`186`: Axes3D with PolyCollection broken +* :ghissue:`178`: Incorrect mplot3d contourf rendering +* :ghissue:`5508`: Animation.to_html5_video requires python3 base64 module +* :ghissue:`5576`: Improper reliance upon pkg-config when C_INCLUDE_PATH is set +* :ghissue:`5369`: Change in zorder of streamplot between 1.3.1 and 1.4.0 +* :ghissue:`5569`: Stackplot does not handle NaNs +* :ghissue:`5565`: label keyword is not interpreted proporly in errorbar() for pandas.DataFrame-like objects +* :ghissue:`5561`: interactive mode doesn't display images with standard python interpreter +* :ghissue:`5559`: Setting window titles when in interactive mode +* :ghissue:`5554`: Cropping text to axes +* :ghissue:`5545`: EllipseCollection renders incorrectly when passed a sequence of widths +* :ghissue:`5475`: artist picker tolerance has no effect +* :ghissue:`5529`: Wrong image/code for legend_demo (pylab) +* :ghissue:`5139`: plt.subplots for already existing Figure +* :ghissue:`5497`: violin{,plot} return value +* :ghissue:`5441`: boxplot rcParams are not in matplotlibrc.template +* :ghissue:`5522`: axhline fails on custom scale example +* :ghissue:`5528`: $\rho$ in text for plots erroring +* :ghissue:`4799`: Probability axes scales +* :ghissue:`5487`: Trouble importing image_comparison decorator in v1.5 +* :ghissue:`5464`: figaspect not working with numpy floats +* :ghissue:`4487`: Should default hist() bins be changed in 2.0? +* :ghissue:`5499`: UnicodeDecodeError in IPython Notebook caused by negative numbers in plt.legend() +* :ghissue:`5498`: Labels' collisions while plotting named DataFrame iterrows +* :ghissue:`5491`: clippedline.py example should be removed +* :ghissue:`5482`: RuntimeError: could not open display +* :ghissue:`5481`: value error : unknown locale: UTF-8 +* :ghissue:`4780`: Non-interactive backend calls draw more than 100 times +* :ghissue:`5470`: colorbar values could take advantage of offsetting and/or scientific notation +* :ghissue:`5471`: FuncAnimation video saving results in one frame file +* :ghissue:`5457`: Example of new colormaps is misleading +* :ghissue:`3920`: Please fix pip install, so that plt.show() etc works correctly +* :ghissue:`5418`: install backend gtk in Cygwin +* :ghissue:`5368`: New axes.set_prop_cycle method cannot handle any generic iterable +* :ghissue:`5446`: Tests fail to run (killed manually after 7000 sec) +* :ghissue:`5225`: Rare race condition in makedirs with parallel processes +* :ghissue:`5444`: \overline and subscripts/superscripts in mathtext +* :ghissue:`4859`: Call ``tight_layout()`` by default +* :ghissue:`5429`: Segfault in matplotlib.tests.test_image:test_get_window_extent_for_AxisImage on python3.5 +* :ghissue:`5431`: Matplotlib 1.4.3 broken on Windows +* :ghissue:`5409`: Match zdata cursor display scalling with colorbar ? +* :ghissue:`5128`: ENH: Better default font +* :ghissue:`5420`: [Mac OS X 10.10.5] Macports install error :unknown locale: UTF-8 +* :ghissue:`3867`: OSX compile broken since CXX removal (conda only?) +* :ghissue:`5411`: XKCD style fails except for inline mode +* :ghissue:`5406`: Hangs on OS X 10.11.1: No such file or directory: '~/.matplotlib/fontList.json' +* :ghissue:`3116`: mplot3d: argument checking in plot_surface should be improved. +* :ghissue:`347`: Faster Text drawing needed +* :ghissue:`5399`: FuncAnimation w/o init_func breaks when saving +* :ghissue:`5395`: Style changes doc has optimistic release date +* :ghissue:`5393`: wrong legend in errorbar plot for pandas series +* :ghissue:`5396`: fill_between() with gradient +* :ghissue:`5221`: infinite range for hist(histtype="step") +* :ghissue:`4901`: Error running double pendulum animation example +* :ghissue:`3314`: assert mods.pop(0) == 'tests' errors for multiprocess tests on OSX +* :ghissue:`5337`: Remove --nocapture from nosetests on .travis.yml? +* :ghissue:`5378`: errorbar fails with pandas data frame +* :ghissue:`5367`: histogram and digitize do not agree on the definition of a bin +* :ghissue:`5314`: ValueError: insecure string pickle +* :ghissue:`5347`: Problem with importing matplotlib.animation +* :ghissue:`4788`: Modified axes patch will not re-clip artists +* :ghissue:`4968`: Lasso-ing in WxAgg causes flickering of the entire figure diff --git a/doc/users/gridspec.rst b/doc/users/gridspec.rst deleted file mode 100644 index b946fed05caf..000000000000 --- a/doc/users/gridspec.rst +++ /dev/null @@ -1,161 +0,0 @@ -.. _gridspec-guide: - - -********************************************** -Customizing Location of Subplot Using GridSpec -********************************************** - - ``GridSpec`` - specifies the geometry of the grid that a subplot will be - placed. The number of rows and number of columns of the grid - need to be set. Optionally, the subplot layout parameters - (e.g., left, right, etc.) can be tuned. - - ``SubplotSpec`` - specifies the location of the subplot in the given *GridSpec*. - - ``subplot2grid`` - a helper function that is similar to "pyplot.subplot" but uses - 0-based indexing and let subplot to occupy multiple cells. - - -Basic Example of using subplot2grid -=================================== - -To use subplot2grid, you provide geometry of the grid and the location -of the subplot in the grid. For a simple single-cell subplot:: - - ax = plt.subplot2grid((2,2),(0, 0)) - -is identical to :: - - ax = plt.subplot(2,2,1) - -Note that, unlike matplotlib's subplot, the index starts from 0 in gridspec. - -To create a subplot that spans multiple cells, :: - - ax2 = plt.subplot2grid((3,3), (1, 0), colspan=2) - ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2) - -For example, the following commands :: - - ax1 = plt.subplot2grid((3,3), (0,0), colspan=3) - ax2 = plt.subplot2grid((3,3), (1,0), colspan=2) - ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2) - ax4 = plt.subplot2grid((3,3), (2, 0)) - ax5 = plt.subplot2grid((3,3), (2, 1)) - -creates - -.. plot:: users/plotting/examples/demo_gridspec01.py - - -GridSpec and SubplotSpec -======================== - -You can create GridSpec explicitly and use them to create a Subplot. - -For example, :: - - ax = plt.subplot2grid((2,2),(0, 0)) - -is equal to :: - - import matplotlib.gridspec as gridspec - gs = gridspec.GridSpec(2, 2) - ax = plt.subplot(gs[0, 0]) - -A gridspec instance provides array-like (2d or 1d) indexing that -returns the SubplotSpec instance. For, SubplotSpec that spans multiple -cells, use slice. :: - - ax2 = plt.subplot(gs[1,:-1]) - ax3 = plt.subplot(gs[1:, -1]) - -The above example becomes :: - - gs = gridspec.GridSpec(3, 3) - ax1 = plt.subplot(gs[0, :]) - ax2 = plt.subplot(gs[1,:-1]) - ax3 = plt.subplot(gs[1:, -1]) - ax4 = plt.subplot(gs[-1,0]) - ax5 = plt.subplot(gs[-1,-2]) - -.. plot:: users/plotting/examples/demo_gridspec02.py - -Adjust GridSpec layout -====================== - -When a GridSpec is explicitly used, you can adjust the layout -parameters of subplots that are created from the gridspec. :: - - gs1 = gridspec.GridSpec(3, 3) - gs1.update(left=0.05, right=0.48, wspace=0.05) - -This is similar to *subplots_adjust*, but it only affects the subplots -that are created from the given GridSpec. - -The code below :: - - gs1 = gridspec.GridSpec(3, 3) - gs1.update(left=0.05, right=0.48, wspace=0.05) - ax1 = plt.subplot(gs1[:-1, :]) - ax2 = plt.subplot(gs1[-1, :-1]) - ax3 = plt.subplot(gs1[-1, -1]) - - gs2 = gridspec.GridSpec(3, 3) - gs2.update(left=0.55, right=0.98, hspace=0.05) - ax4 = plt.subplot(gs2[:, :-1]) - ax5 = plt.subplot(gs2[:-1, -1]) - ax6 = plt.subplot(gs2[-1, -1]) - -creates - -.. plot:: users/plotting/examples/demo_gridspec03.py - -GridSpec using SubplotSpec -========================== - -You can create GridSpec from the SubplotSpec, in which case its layout -parameters are set to that of the location of the given SubplotSpec. :: - - gs0 = gridspec.GridSpec(1, 2) - - gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0]) - gs01 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[1]) - - -.. plot:: users/plotting/examples/demo_gridspec04.py - - -A Complex Nested GridSpec using SubplotSpec -=========================================== - -Here's a more sophisticated example of nested gridspec where we put -a box around each cell of the outer 4x4 grid, by hiding appropriate -spines in each of the inner 3x3 grids. - -.. plot:: users/plotting/examples/demo_gridspec06.py - - -GridSpec with Varying Cell Sizes -================================ - -By default, GridSpec creates cells of equal sizes. You can adjust -relative heights and widths of rows and columns. Note that absolute -values are meaningless, only their relative ratios matter. :: - - gs = gridspec.GridSpec(2, 2, - width_ratios=[1,2], - height_ratios=[4,1] - ) - - ax1 = plt.subplot(gs[0]) - ax2 = plt.subplot(gs[1]) - ax3 = plt.subplot(gs[2]) - ax4 = plt.subplot(gs[3]) - - -.. plot:: users/plotting/examples/demo_gridspec05.py - diff --git a/doc/users/image_tutorial.rst b/doc/users/image_tutorial.rst deleted file mode 100644 index 6cff4b03f273..000000000000 --- a/doc/users/image_tutorial.rst +++ /dev/null @@ -1,403 +0,0 @@ -.. _image_tutorial: - - -************** -Image tutorial -************** - -.. _imaging_startup: - -Startup commands -=================== - -At the very least, you'll need to have access to the -:func:`~matplotlib.pyplot.imshow` function. There are a couple of -ways to do it. The easy way for an interactive environment:: - - $ipython - -to enter the ipython shell, followed by:: - - In [1]: %pylab - -to enter the pylab environment. - -The imshow function is now directly accessible (it's in your -`namespace `_). -See also :ref:`pyplot-tutorial`. - -The more expressive, easier to understand later method (use this in -your scripts to make it easier for others (including your future self) -to read) is to use the matplotlib API (see :ref:`artist-tutorial`) -where you use explicit namespaces and control object creation, etc... - -.. sourcecode:: ipython - - In [1]: import matplotlib.pyplot as plt - In [2]: import matplotlib.image as mpimg - In [3]: import numpy as np - -Examples below will use the latter method, for clarity. In these -examples, if you use the %pylab method, you can skip the "mpimg." and -"plt." prefixes. - -.. _importing_data: - -Importing image data into Numpy arrays -=============================================== - -Plotting image data is supported by the `Pillow -`_). Natively, matplotlib only -supports PNG images. The commands shown below fall back on Pillow if the -native read fails. - -The image used in this example is a PNG file, but keep that Pillow -requirement in mind for your own data. - -Here's the image we're going to play with: - -.. image:: ../_static/stinkbug.png - -It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending -on where you get your data, the other kinds of image that you'll most -likely encounter are RGBA images, which allow for transparency, or -single-channel grayscale (luminosity) images. You can right click on -it and choose "Save image as" to download it to your computer for the -rest of this tutorial. - -And here we go... - -.. sourcecode:: ipython - - In [4]: img=mpimg.imread('stinkbug.png') - Out[4]: - array([[[ 0.40784314, 0.40784314, 0.40784314], - [ 0.40784314, 0.40784314, 0.40784314], - [ 0.40784314, 0.40784314, 0.40784314], - ..., - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098]], - - [[ 0.41176471, 0.41176471, 0.41176471], - [ 0.41176471, 0.41176471, 0.41176471], - [ 0.41176471, 0.41176471, 0.41176471], - ..., - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098]], - - [[ 0.41960785, 0.41960785, 0.41960785], - [ 0.41568628, 0.41568628, 0.41568628], - [ 0.41568628, 0.41568628, 0.41568628], - ..., - [ 0.43137255, 0.43137255, 0.43137255], - [ 0.43137255, 0.43137255, 0.43137255], - [ 0.43137255, 0.43137255, 0.43137255]], - - ..., - [[ 0.43921569, 0.43921569, 0.43921569], - [ 0.43529412, 0.43529412, 0.43529412], - [ 0.43137255, 0.43137255, 0.43137255], - ..., - [ 0.45490196, 0.45490196, 0.45490196], - [ 0.4509804 , 0.4509804 , 0.4509804 ], - [ 0.4509804 , 0.4509804 , 0.4509804 ]], - - [[ 0.44313726, 0.44313726, 0.44313726], - [ 0.44313726, 0.44313726, 0.44313726], - [ 0.43921569, 0.43921569, 0.43921569], - ..., - [ 0.4509804 , 0.4509804 , 0.4509804 ], - [ 0.44705883, 0.44705883, 0.44705883], - [ 0.44705883, 0.44705883, 0.44705883]], - - [[ 0.44313726, 0.44313726, 0.44313726], - [ 0.4509804 , 0.4509804 , 0.4509804 ], - [ 0.4509804 , 0.4509804 , 0.4509804 ], - ..., - [ 0.44705883, 0.44705883, 0.44705883], - [ 0.44705883, 0.44705883, 0.44705883], - [ 0.44313726, 0.44313726, 0.44313726]]], dtype=float32) - -Note the dtype there - float32. Matplotlib has rescaled the 8 bit -data from each channel to floating point data between 0.0 and 1.0. As -a side note, the only datatype that Pillow can work with is uint8. -Matplotlib plotting can handle float32 and uint8, but image -reading/writing for any format other than PNG is limited to uint8 -data. Why 8 bits? Most displays can only render 8 bits per channel -worth of color gradation. Why can they only render 8 bits/channel? -Because that's about all the human eye can see. More here (from a -photography standpoint): `Luminous Landscape bit depth tutorial -`_. - -Each inner list represents a pixel. Here, with an RGB image, there -are 3 values. Since it's a black and white image, R, G, and B are all -similar. An RGBA (where A is alpha, or transparency), has 4 values -per inner list, and a simple luminance image just has one value (and -is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, -matplotlib supports float32 and uint8 data types. For grayscale, -matplotlib supports only float32. If your array data does not meet -one of these descriptions, you need to rescale it. - -.. _plotting_data: - -Plotting numpy arrays as images -=================================== - -So, you have your data in a numpy array (either by importing it, or by -generating it). Let's render it. In Matplotlib, this is performed -using the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab -the plot object. This object gives you an easy way to manipulate the -plot from the prompt. - -.. sourcecode:: ipython - - In [5]: imgplot = plt.imshow(img) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - imgplot = plt.imshow(img) - -You can also plot any numpy array - just remember that the datatype -must be float32 (and range from 0.0 to 1.0) or uint8. - -.. _Pseudocolor: - -Applying pseudocolor schemes to image plots -------------------------------------------------- - -Pseudocolor can be a useful tool for enhancing contrast and -visualizing your data more easily. This is especially useful when -making presentations of your data using projectors - their contrast is -typically quite poor. - -Pseudocolor is only relevant to single-channel, grayscale, luminosity -images. We currently have an RGB image. Since R, G, and B are all -similar (see for yourself above or in your data), we can just pick one -channel of our data: - -.. sourcecode:: ipython - - In [6]: lum_img = img[:,:,0] - -This is array slicing. You can read more in the `Numpy tutorial -`_. - -.. sourcecode:: ipython - - In [7]: imgplot = plt.imshow(lum_img) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - plt.imshow(lum_img) - -Now, with a luminosity image, the default colormap (aka lookup table, -LUT), is applied. The default is called jet. There are plenty of -others to choose from. Let's set some others using the -:meth:`~matplotlib.image.Image.set_cmap` method on our image plot -object: - -.. sourcecode:: ipython - - In [8]: imgplot.set_cmap('hot') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - imgplot.set_cmap('hot') - -.. sourcecode:: ipython - - In [9]: imgplot.set_cmap('spectral') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - imgplot.set_cmap('spectral') - -There are many other colormap schemes available. See the `list and -images of the colormaps -<../examples/color/colormaps_reference.html>`_. - -.. _`Color Bars`: - -Color scale reference ------------------------- - -It's helpful to have an idea of what value a color represents. We can -do that by adding color bars. It's as easy as one line: - -.. sourcecode:: ipython - - In [10]: plt.colorbar() - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - imgplot.set_cmap('spectral') - plt.colorbar() - -This adds a colorbar to your existing figure. This won't -automatically change if you change you switch to a different -colormap - you have to re-create your plot, and add in the colorbar -again. - -.. _`Data ranges`: - -Examining a specific data range ---------------------------------- - -Sometimes you want to enhance the contrast in your image, or expand -the contrast in a particular region while sacrificing the detail in -colors that don't vary much, or don't matter. A good tool to find -interesting regions is the histogram. To create a histogram of our -image data, we use the :func:`~matplotlib.pyplot.hist` function. - -.. sourcecode:: ipython - - In[10]: plt.hist(lum_img.flatten(), 256, range=(0.0,1.0), fc='k', ec='k') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - plt.hist(lum_img.flatten(), 256, range=(0.0,1.0), fc='black', ec='black') - -Most often, the "interesting" part of the image is around the peak, -and you can get extra contrast by clipping the regions above and/or -below the peak. In our histogram, it looks like there's not much -useful information in the high end (not many white things in the -image). Let's adjust the upper limit, so that we effectively "zoom in -on" part of the histogram. We do this by calling the -:meth:`~matplotlib.image.Image.set_clim` method of the image plot -object. - -.. sourcecode:: ipython - - In[11]: imgplot.set_clim(0.0,0.7) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - fig = plt.figure() - a=fig.add_subplot(1,2,1) - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - a.set_title('Before') - plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation ='horizontal') - a=fig.add_subplot(1,2,2) - imgplot = plt.imshow(lum_img) - imgplot.set_clim(0.0,0.7) - a.set_title('After') - plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation='horizontal') - -.. _Interpolation: - -Array Interpolation schemes ---------------------------- - -Interpolation calculates what the color or value of a pixel "should" -be, according to different mathematical schemes. One common place -that this happens is when you resize an image. The number of pixels -change, but you want the same information. Since pixels are discrete, -there's missing space. Interpolation is how you fill that space. -This is why your images sometimes come out looking pixelated when you -blow them up. The effect is more pronounced when the difference -between the original image and the expanded image is greater. Let's -take our image and shrink it. We're effectively discarding pixels, -only keeping a select few. Now when we plot it, that data gets blown -up to the size on your screen. The old pixels aren't there anymore, -and the computer has to draw in pixels to fill that space. - -.. sourcecode:: ipython - - In [8]: from PIL import Image - In [9]: img = Image.open('stinkbug.png') # Open image as Pillow image object - In [10]: rsize = img.resize((img.size[0]/10,img.size[1]/10)) # Use Pillow to resize - In [11]: rsizeArr = np.asarray(rsize) # Get array back - In [12]: imgplot = plt.imshow(rsizeArr) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - from PIL import Image - img = Image.open('../_static/stinkbug.png') # opens the file using Pillow - it's not an array yet - rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image - rsizeArr = np.asarray(rsize) - lum_img = rsizeArr[:,:,0] - imgplot = plt.imshow(rsizeArr) - -Here we have the default interpolation, bilinear, since we did not -give :func:`~matplotlib.pyplot.imshow` any interpolation argument. - -Let's try some others: - -.. sourcecode:: ipython - - In [10]: imgplot.set_interpolation('nearest') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - from PIL import Image - img = Image.open('../_static/stinkbug.png') # opens the file using Pillow - it's not an array yet - rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image - rsizeArr = np.asarray(rsize) - lum_img = rsizeArr[:,:,0] - imgplot = plt.imshow(rsizeArr) - imgplot.set_interpolation('nearest') - -.. sourcecode:: ipython - - In [10]: imgplot.set_interpolation('bicubic') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - from PIL import Image - img = Image.open('../_static/stinkbug.png') # opens the file using Pillow - it's not an array yet - rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image - rsizeArr = np.asarray(rsize) - lum_img = rsizeArr[:,:,0] - imgplot = plt.imshow(rsizeArr) - imgplot.set_interpolation('bicubic') - -Bicubic interpolation is often used when blowing up photos - people -tend to prefer blurry over pixelated. diff --git a/doc/users/index.rst b/doc/users/index.rst index eca6241e139e..52f82bd88295 100644 --- a/doc/users/index.rst +++ b/doc/users/index.rst @@ -13,14 +13,9 @@ User's Guide :maxdepth: 2 intro.rst - configuration.rst - beginner.rst - developer.rst + installing.rst + interactive.rst whats_new.rst github_stats.rst license.rst credits.rst - - - - diff --git a/doc/users/index_text.rst b/doc/users/index_text.rst deleted file mode 100644 index bba1f330299f..000000000000 --- a/doc/users/index_text.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _text-guide: - -Working with text -################# - -.. toctree:: - - text_intro.rst - text_props.rst - mathtext.rst - pgf.rst - usetex.rst - annotations_intro.rst - - diff --git a/doc/users/interactive.rst b/doc/users/interactive.rst new file mode 100644 index 000000000000..e8af8df9409e --- /dev/null +++ b/doc/users/interactive.rst @@ -0,0 +1,12 @@ +.. _dump-index: + +=================== + Interactive plots +=================== + +.. toctree:: + :maxdepth: 2 + + navigation_toolbar.rst + shell.rst + event_handling.rst diff --git a/doc/users/intro.rst b/doc/users/intro.rst index dc7a8df3d43b..f20d669af94b 100644 --- a/doc/users/intro.rst +++ b/doc/users/intro.rst @@ -1,18 +1,18 @@ Introduction ============ -matplotlib is a library for making 2D plots of arrays in `Python -`_. Although it has its origins in emulating -the MATLAB |reg| [*]_ graphics commands, it is +Matplotlib is a library for making 2D plots of arrays in `Python +`_. Although it has its origins in emulating +the MATLAB |reg| [#]_ graphics commands, it is independent of MATLAB, and can be used in a Pythonic, object oriented -way. Although matplotlib is written primarily in pure Python, it +way. Although Matplotlib is written primarily in pure Python, it makes heavy use of `NumPy `_ and other extension code to provide good performance even for large arrays. .. |reg| unicode:: 0xAE :ltrim: -matplotlib is designed with the philosophy that you should be able to +Matplotlib is designed with the philosophy that you should be able to create simple plots with just a few commands, or just one! If you want to see a histogram of your data, you shouldn't need to instantiate objects, call methods, set properties, and so on; it @@ -21,7 +21,7 @@ should just work. For years, I used to use MATLAB exclusively for data analysis and visualization. MATLAB excels at making nice looking plots easy. When I began working with EEG data, I found that I needed to write -applications to interact with my data, and developed and EEG analysis +applications to interact with my data, and developed an EEG analysis application in MATLAB. As the application grew in complexity, interacting with databases, http servers, manipulating complex data structures, I began to strain against the limitations of MATLAB as a @@ -58,38 +58,37 @@ perspective, having a fixed user interface (the pylab interface) has been very useful, because the guts of the code base can be redesigned without affecting user code. -The matplotlib code is conceptually divided into three parts: the +The Matplotlib code is conceptually divided into three parts: the *pylab interface* is the set of functions provided by :mod:`matplotlib.pylab` which allow the user to create plots with code quite similar to MATLAB figure generating code -(:ref:`pyplot-tutorial`). The *matplotlib frontend* or *matplotlib +(:ref:`sphx_glr_tutorials_introductory_pyplot.py`). The *Matplotlib frontend* or *Matplotlib API* is the set of classes that do the heavy lifting, creating and managing figures, text, lines, plots and so on -(:ref:`artist-tutorial`). This is an abstract interface that knows -nothing about output. The *backends* are device dependent drawing +(:ref:`sphx_glr_tutorials_intermediate_artists.py`). This is an abstract interface that knows +nothing about output. The *backends* are device-dependent drawing devices, aka renderers, that transform the frontend representation to hardcopy or a display device (:ref:`what-is-a-backend`). Example backends: PS creates `PostScript® `_ hardcopy, SVG creates `Scalable Vector Graphics `_ hardcopy, Agg creates PNG output using the high quality `Anti-Grain -Geometry `_ library that ships with -matplotlib, GTK embeds matplotlib in a `Gtk+ `_ +Geometry `_ +library that ships with Matplotlib, GTK embeds Matplotlib in a +`Gtk+ `_ application, GTKAgg uses the Anti-Grain renderer to create a figure -and embed it a Gtk+ application, and so on for `PDF -`_, `WxWidgets -`_, `Tkinter -`_ etc. +and embed it in a Gtk+ application, and so on for `PDF +`_, `WxWidgets +`_, `Tkinter +`_, etc. -matplotlib is used by many people in many different contexts. Some +Matplotlib is used by many people in many different contexts. Some people want to automatically generate PostScript files to send -to a printer or publishers. Others deploy matplotlib on a web +to a printer or publishers. Others deploy Matplotlib on a web application server to generate PNG output for inclusion in -dynamically-generated web pages. Some use matplotlib interactively +dynamically-generated web pages. Some use Matplotlib interactively from the Python shell in Tkinter on Windows™. My primary use is to -embed matplotlib in a Gtk+ EEG application that runs on Windows, Linux +embed Matplotlib in a Gtk+ EEG application that runs on Windows, Linux and Macintosh OS X. -.. [*] MATLAB is a registered trademark of The MathWorks, Inc. - - +.. [#] MATLAB is a registered trademark of The MathWorks, Inc. diff --git a/doc/users/legend_guide.rst b/doc/users/legend_guide.rst deleted file mode 100644 index 8287a5ca071e..000000000000 --- a/doc/users/legend_guide.rst +++ /dev/null @@ -1,282 +0,0 @@ -.. _plotting-guide-legend: - -************ -Legend guide -************ - -.. currentmodule:: matplotlib.pyplot - - -This legend guide is an extension of the documentation available at -:func:`~matplotlib.pyplot.legend` - please ensure you are familiar with -contents of that documentation before proceeding with this guide. - - -This guide makes use of some common terms, which are documented here for clarity: - -.. glossary:: - - legend entry - A legend is made up of one or more legend entries. An entry is made up of - exactly one key and one label. - - legend key - The colored/patterned marker to the left of each legend label. - - legend label - The text which describes the handle represented by the key. - - legend handle - The original object which is used to generate an appropriate entry in - the legend. - - -Controlling the legend entries -============================== - -Calling :func:`legend` with no arguments automatically fetches the legend -handles and their associated labels. This functionality is equivalent to:: - - handles, labels = ax.get_legend_handles_labels() - ax.legend(handles, labels) - -The :meth:`~matplotlib.axes.Axes.get_legend_handles_labels` function returns -a list of handles/artists which exist on the Axes which can be used to -generate entries for the resulting legend - it is worth noting however that -not all artists can be added to a legend, at which point a "proxy" will have -to be created (see :ref:`proxy_legend_handles` for further details). - -For full control of what is being added to the legend, it is common to pass -the appropriate handles directly to :func:`legend`:: - - line_up, = plt.plot([1,2,3], label='Line 2') - line_down, = plt.plot([3,2,1], label='Line 1') - plt.legend(handles=[line_up, line_down]) - -In some cases, it is not possible to set the label of the handle, so it is -possible to pass through the list of labels to :func:`legend`:: - - line_up, = plt.plot([1,2,3], label='Line 2') - line_down, = plt.plot([3,2,1], label='Line 1') - plt.legend([line_up, line_down], ['Line Up', 'Line Down']) - - -.. _proxy_legend_handles: - -Creating artists specifically for adding to the legend (aka. Proxy artists) -=========================================================================== - -Not all handles can be turned into legend entries automatically, -so it is often necessary to create an artist which *can*. Legend handles -don't have to exists on the Figure or Axes in order to be used. - -Suppose we wanted to create a legend which has an entry for some data which -is represented by a red color: - -.. plot:: - :include-source: - - import matplotlib.patches as mpatches - import matplotlib.pyplot as plt - - red_patch = mpatches.Patch(color='red', label='The red data') - plt.legend(handles=[red_patch]) - - plt.show() - -There are many supported legend handles, instead of creating a patch of color -we could have created a line with a marker: - -.. plot:: - :include-source: - - import matplotlib.lines as mlines - import matplotlib.pyplot as plt - - blue_line = mlines.Line2D([], [], color='blue', marker='*', - markersize=15, label='Blue stars') - plt.legend(handles=[blue_line]) - - plt.show() - - -Legend location -=============== - -The location of the legend can be specified by the keyword argument -*loc*. Please see the documentation at :func:`legend` for more details. - -The ``bbox_to_anchor`` keyword gives a great degree of control for manual -legend placement. For example, if you want your axes legend located at the -figure's top right-hand corner instead of the axes' corner, simply specify -the corner's location, and the coordinate system of that location:: - - plt.legend(bbox_to_anchor=(1, 1), - bbox_transform=plt.gcf().transFigure) - -More examples of custom legend placement: - -.. plot:: users/plotting/examples/simple_legend01.py - :include-source: - - -Multiple legends on the same Axes -================================= - -Sometimes it is more clear to split legend entries across multiple -legends. Whilst the instinctive approach to doing this might be to call -the :func:`legend` function multiple times, you will find that only one -legend ever exists on the Axes. This has been done so that it is possible -to call :func:`legend` repeatedly to update the legend to the latest -handles on the Axes, so to persist old legend instances, we must add them -manually to the Axes: - -.. plot:: users/plotting/examples/simple_legend02.py - :include-source: - -Legend Handlers -=============== - -In order to create legend entries, handles are given as an argument to an -appropriate :class:`~matplotlib.legend_handler.HandlerBase` subclass. -The choice of handler subclass is determined by the following rules: - - 1. Update :func:`~matplotlib.legend.Legend.get_legend_handler_map` - with the value in the ``handler_map`` keyword. - 2. Check if the ``handle`` is in the newly created ``handler_map``. - 3. Check if the type of ``handle`` is in the newly created - ``handler_map``. - 4. Check if any of the types in the ``handle``'s mro is in the newly - created ``handler_map``. - -For completeness, this logic is mostly implemented in -:func:`~matplotlib.legend.Legend.get_legend_handler`. - -All of this flexibility means that we have the necessary hooks to implement -custom handlers for our own type of legend key. - -The simplest example of using custom handlers is to instantiate one of the -existing :class:`~matplotlib.legend_handler.HandlerBase` subclasses. For the -sake of simplicity, let's choose :class:`matplotlib.legend_handler.HandlerLine2D` -which accepts a ``numpoints`` argument (note numpoints is a keyword -on the :func:`legend` function for convenience). We can then pass the mapping -of instance to Handler as a keyword to legend. - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - from matplotlib.legend_handler import HandlerLine2D - - line1, = plt.plot([3,2,1], marker='o', label='Line 1') - line2, = plt.plot([1,2,3], marker='o', label='Line 2') - - plt.legend(handler_map={line1: HandlerLine2D(numpoints=4)}) - -As you can see, "Line 1" now has 4 marker points, where "Line 2" has 2 (the -default). Try the above code, only change the map's key from ``line1`` to -``type(line1)``. Notice how now both :class:`~matplotlib.lines.Line2D` instances -get 4 markers. - -Along with handlers for complex plot types such as errorbars, stem plots -and histograms, the default ``handler_map`` has a special ``tuple`` handler -(:class:`~matplotlib.legend_handler.HandlerTuple`) which simply plots -the handles on top of one another for each item in the given tuple. The -following example demonstrates combining two legend keys on top of one another: - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - from numpy.random import randn - - z = randn(10) - - red_dot, = plt.plot(z, "ro", markersize=15) - # Put a white cross over some of the data. - white_cross, = plt.plot(z[:5], "w+", markeredgewidth=3, markersize=15) - - plt.legend([red_dot, (red_dot, white_cross)], ["Attr A", "Attr A+B"]) - - -Implementing a custom legend handler ------------------------------------- - -A custom handler can be implemented to turn any handle into a legend key (handles -don't necessarily need to be matplotlib artists). -The handler must implement a "legend_artist" method which returns a -single artist for the legend to use. Signature details about the "legend_artist" -are documented at :meth:`~matplotlib.legend_handler.HandlerBase.legend_artist`. - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import matplotlib.patches as mpatches - - class AnyObject(object): - pass - - class AnyObjectHandler(object): - def legend_artist(self, legend, orig_handle, fontsize, handlebox): - x0, y0 = handlebox.xdescent, handlebox.ydescent - width, height = handlebox.width, handlebox.height - patch = mpatches.Rectangle([x0, y0], width, height, facecolor='red', - edgecolor='black', hatch='xx', lw=3, - transform=handlebox.get_transform()) - handlebox.add_artist(patch) - return patch - - plt.legend([AnyObject()], ['My first handler'], - handler_map={AnyObject: AnyObjectHandler()}) - -Alternatively, had we wanted to globally accept ``AnyObject`` instances without -needing to manually set the ``handler_map`` keyword all the time, we could have -registered the new handler with:: - - from matplotlib.legend import Legend - Legend.update_default_handler_map({AnyObject: AnyObjectHandler()}) - -Whilst the power here is clear, remember that there are already many handlers -implemented and what you want to achieve may already be easily possible with -existing classes. For example, to produce elliptical legend keys, rather than -rectangular ones: - -.. plot:: - :include-source: - - from matplotlib.legend_handler import HandlerPatch - import matplotlib.pyplot as plt - import matplotlib.patches as mpatches - - - class HandlerEllipse(HandlerPatch): - def create_artists(self, legend, orig_handle, - xdescent, ydescent, width, height, fontsize, trans): - center = 0.5 * width - 0.5 * xdescent, 0.5 * height - 0.5 * ydescent - p = mpatches.Ellipse(xy=center, width=width + xdescent, - height=height + ydescent) - self.update_prop(p, orig_handle, legend) - p.set_transform(trans) - return [p] - - - c = mpatches.Circle((0.5, 0.5), 0.25, facecolor="green", - edgecolor="red", linewidth=3) - plt.gca().add_patch(c) - - plt.legend([c], ["An ellipse, not a rectangle"], - handler_map={mpatches.Circle: HandlerEllipse()}) - -Known examples of using legend -============================== - -Here is a non-exhaustive list of the examples available involving legend -being used in various ways: - -* :ref:`lines_bars_and_markers-scatter_with_legend` -* :ref:`api-legend_demo` -* :ref:`pylab_examples-contourf_hatching` -* :ref:`pylab_examples-figlegend_demo` -* :ref:`pylab_examples-finance_work2` -* :ref:`pylab_examples-scatter_symbol` diff --git a/doc/users/license.rst b/doc/users/license.rst index c52290f26d85..4dcb0798712f 100644 --- a/doc/users/license.rst +++ b/doc/users/license.rst @@ -6,10 +6,10 @@ License Matplotlib only uses BSD compatible code, and its license is based on -the `PSF `_ license. See the Open +the `PSF `_ license. See the Open Source Initiative `licenses page -`_ for details on individual -licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in +`_ for details on individual +licenses. Non-BSD compatible licenses (e.g., LGPL) are acceptable in matplotlib toolkits. For a discussion of the motivations behind the licencing choice, see :ref:`license-discussion`. diff --git a/doc/users/mathtext.rst b/doc/users/mathtext.rst deleted file mode 100644 index 833e86455fef..000000000000 --- a/doc/users/mathtext.rst +++ /dev/null @@ -1,351 +0,0 @@ -.. _mathtext-tutorial: - -Writing mathematical expressions -================================ - -You can use a subset TeX markup in any matplotlib text string by -placing it inside a pair of dollar signs ($). - -Note that you do not need to have TeX installed, since matplotlib -ships its own TeX expression parser, layout engine and fonts. The -layout engine is a fairly direct adaptation of the layout algorithms -in Donald Knuth's TeX, so the quality is quite good (matplotlib also -provides a ``usetex`` option for those who do want to call out to TeX -to generate their text (see :ref:`usetex-tutorial`). - -Any text element can use math text. You should use raw strings -(precede the quotes with an ``'r'``), and surround the math text with -dollar signs ($), as in TeX. Regular text and mathtext can be -interleaved within the same string. Mathtext can use the Computer -Modern fonts (from (La)TeX), `STIX `_ -fonts (with are designed to blend well with Times) or a Unicode font -that you provide. The mathtext font can be selected with the -customization variable ``mathtext.fontset`` (see -:ref:`customizing-matplotlib`) - -.. note:: - On `"narrow" `_ builds - of Python, if you use the STIX fonts you should also set - ``ps.fonttype`` and ``pdf.fonttype`` to 3 (the default), not 42. - Otherwise `some characters will not be visible - `_. - -Here is a simple example:: - - # plain text - plt.title('alpha > beta') - -produces "alpha > beta". - -Whereas this:: - - # math text - plt.title(r'$\alpha > \beta$') - -produces ":math:`\alpha > \beta`". - -.. note:: - Mathtext should be placed between a pair of dollar signs ($). To - make it easy to display monetary values, e.g., "$100.00", if a - single dollar sign is present in the entire string, it will be - displayed verbatim as a dollar sign. This is a small change from - regular TeX, where the dollar sign in non-math text would have to - be escaped ('\$'). - -.. note:: - While the syntax inside the pair of dollar signs ($) aims to be - TeX-like, the text outside does not. In particular, characters - such as:: - - # $ % & ~ _ ^ \ { } \( \) \[ \] - - have special meaning outside of math mode in TeX. Therefore, these - characters will behave differently depending on the rcParam - ``text.usetex`` flag. See the :ref:`usetex tutorial - ` for more information. - -Subscripts and superscripts ---------------------------- - -To make subscripts and superscripts, use the ``'_'`` and ``'^'`` symbols:: - - r'$\alpha_i > \beta_i$' - -.. math:: - - \alpha_i > \beta_i - -Some symbols automatically put their sub/superscripts under and over -the operator. For example, to write the sum of :math:`x_i` from :math:`0` to -:math:`\infty`, you could do:: - - r'$\sum_{i=0}^\infty x_i$' - -.. math:: - - \sum_{i=0}^\infty x_i - -Fractions, binomials and stacked numbers ----------------------------------------- - -Fractions, binomials and stacked numbers can be created with the -``\frac{}{}``, ``\binom{}{}`` and ``\stackrel{}{}`` commands, -respectively:: - - r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$' - -produces - -.. math:: - - \frac{3}{4} \binom{3}{4} \stackrel{3}{4} - -Fractions can be arbitrarily nested:: - - r'$\frac{5 - \frac{1}{x}}{4}$' - -produces - -.. math:: - - \frac{5 - \frac{1}{x}}{4} - -Note that special care needs to be taken to place parentheses and brackets around -fractions. Doing things the obvious way produces brackets that are -too small:: - - r'$(\frac{5 - \frac{1}{x}}{4})$' - -.. math :: - - (\frac{5 - \frac{1}{x}}{4}) - -The solution is to precede the bracket with ``\left`` and ``\right`` -to inform the parser that those brackets encompass the entire object:: - - r'$\left(\frac{5 - \frac{1}{x}}{4}\right)$' - -.. math :: - - \left(\frac{5 - \frac{1}{x}}{4}\right) - -Radicals --------- - -Radicals can be produced with the ``\sqrt[]{}`` command. For example:: - - r'$\sqrt{2}$' - -.. math :: - - \sqrt{2} - -Any base can (optionally) be provided inside square brackets. Note -that the base must be a simple expression, and can not contain layout -commands such as fractions or sub/superscripts:: - - r'$\sqrt[3]{x}$' - -.. math :: - - \sqrt[3]{x} - -Fonts ------ - -The default font is *italics* for mathematical symbols. - -.. note:: - - This default can be changed using the ``mathtext.default`` rcParam. - This is useful, for example, to use the same font as regular - non-math text for math text, by setting it to ``regular``. - -To change fonts, eg, to write "sin" in a Roman font, enclose the text -in a font command:: - - r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$' - -.. math:: - - s(t) = \mathcal{A}\mathrm{sin}(2 \omega t) - -More conveniently, many commonly used function names that are typeset in a -Roman font have shortcuts. So the expression above could be written -as follows:: - - r'$s(t) = \mathcal{A}\sin(2 \omega t)$' - -.. math:: - - s(t) = \mathcal{A}\sin(2 \omega t) - -Here "s" and "t" are variable in italics font (default), "sin" is in -Roman font, and the amplitude "A" is in calligraphy font. Note in the -example above the caligraphy ``A`` is squished into the ``sin``. You -can use a spacing command to add a little whitespace between them:: - - s(t) = \mathcal{A}\/\sin(2 \omega t) - -.. math:: - - s(t) = \mathcal{A}\/\sin(2 \omega t) - -The choices available with all fonts are: - - ============================ ================================== - Command Result - ============================ ================================== - ``\mathrm{Roman}`` :math:`\mathrm{Roman}` - ``\mathit{Italic}`` :math:`\mathit{Italic}` - ``\mathtt{Typewriter}`` :math:`\mathtt{Typewriter}` - ``\mathcal{CALLIGRAPHY}`` :math:`\mathcal{CALLIGRAPHY}` - ============================ ================================== - -.. role:: math-stix(math) - :fontset: stix - -When using the `STIX `_ fonts, you also have the choice of: - - ====================================== ========================================= - Command Result - ====================================== ========================================= - ``\mathbb{blackboard}`` :math-stix:`\mathbb{blackboard}` - ``\mathrm{\mathbb{blackboard}}`` :math-stix:`\mathrm{\mathbb{blackboard}}` - ``\mathfrak{Fraktur}`` :math-stix:`\mathfrak{Fraktur}` - ``\mathsf{sansserif}`` :math-stix:`\mathsf{sansserif}` - ``\mathrm{\mathsf{sansserif}}`` :math-stix:`\mathrm{\mathsf{sansserif}}` - ====================================== ========================================= - -.. htmlonly:: - - ====================================== ========================================= - ``\mathcircled{circled}`` :math-stix:`\mathcircled{circled}` - ====================================== ========================================= - -There are also three global "font sets" to choose from, which are -selected using the ``mathtext.fontset`` parameter in -:ref:`matplotlibrc `. - -``cm``: **Computer Modern (TeX)** - -.. image:: ../_static/cm_fontset.png - -``stix``: **STIX** (designed to blend well with Times) - -.. image:: ../_static/stix_fontset.png - -``stixsans``: **STIX sans-serif** - -.. image:: ../_static/stixsans_fontset.png - -Additionally, you can use ``\mathdefault{...}`` or its alias -``\mathregular{...}`` to use the font used for regular text outside of -mathtext. There are a number of limitations to this approach, most -notably that far fewer symbols will be available, but it can be useful -to make math expressions blend well with other text in the plot. - -Custom fonts -~~~~~~~~~~~~ - -mathtext also provides a way to use custom fonts for math. This -method is fairly tricky to use, and should be considered an -experimental feature for patient users only. By setting the rcParam -``mathtext.fontset`` to ``custom``, you can then set the following -parameters, which control which font file to use for a particular set -of math characters. - - ============================== ================================= - Parameter Corresponds to - ============================== ================================= - ``mathtext.it`` ``\mathit{}`` or default italic - ``mathtext.rm`` ``\mathrm{}`` Roman (upright) - ``mathtext.tt`` ``\mathtt{}`` Typewriter (monospace) - ``mathtext.bf`` ``\mathbf{}`` bold italic - ``mathtext.cal`` ``\mathcal{}`` calligraphic - ``mathtext.sf`` ``\mathsf{}`` sans-serif - ============================== ================================= - -Each parameter should be set to a fontconfig font descriptor (as -defined in the yet-to-be-written font chapter). - -.. TODO: Link to font chapter - -The fonts used should have a Unicode mapping in order to find any -non-Latin characters, such as Greek. If you want to use a math symbol -that is not contained in your custom fonts, you can set the rcParam -``mathtext.fallback_to_cm`` to ``True`` which will cause the mathtext -system to use characters from the default Computer Modern fonts -whenever a particular character can not be found in the custom font. - -Note that the math glyphs specified in Unicode have evolved over time, -and many fonts may not have glyphs in the correct place for mathtext. - -Accents -------- - -An accent command may precede any symbol to add an accent above it. -There are long and short forms for some of them. - - ============================== ================================= - Command Result - ============================== ================================= - ``\acute a`` or ``\'a`` :math:`\acute a` - ``\bar a`` :math:`\bar a` - ``\breve a`` :math:`\breve a` - ``\ddot a`` or ``\"a`` :math:`\ddot a` - ``\dot a`` or ``\.a`` :math:`\dot a` - ``\grave a`` or ``\`a`` :math:`\grave a` - ``\hat a`` or ``\^a`` :math:`\hat a` - ``\tilde a`` or ``\~a`` :math:`\tilde a` - ``\vec a`` :math:`\vec a` - ``\overline{abc}`` :math:`\overline{abc}` - ============================== ================================= - -In addition, there are two special accents that automatically adjust -to the width of the symbols below: - - ============================== ================================= - Command Result - ============================== ================================= - ``\widehat{xyz}`` :math:`\widehat{xyz}` - ``\widetilde{xyz}`` :math:`\widetilde{xyz}` - ============================== ================================= - -Care should be taken when putting accents on lower-case i's and j's. -Note that in the following ``\imath`` is used to avoid the extra dot -over the i:: - - r"$\hat i\ \ \hat \imath$" - -.. math:: - - \hat i\ \ \hat \imath - -Symbols -------- - -You can also use a large number of the TeX symbols, as in ``\infty``, -``\leftarrow``, ``\sum``, ``\int``. - -.. math_symbol_table:: - -If a particular symbol does not have a name (as is true of many of the -more obscure symbols in the STIX fonts), Unicode characters can -also be used:: - - ur'$\u23ce$' - -Example -------- - -Here is an example illustrating many of these features in context. - -.. plot:: pyplots/pyplot_mathtext.py - :include-source: - - - - - - diff --git a/doc/users/navigation_toolbar.rst b/doc/users/navigation_toolbar.rst index 6e327621ba4b..47b30d6e7600 100644 --- a/doc/users/navigation_toolbar.rst +++ b/doc/users/navigation_toolbar.rst @@ -9,24 +9,24 @@ All figure windows come with a navigation toolbar, which can be used to navigate through the data set. Here is a description of each of the buttons at the bottom of the toolbar -.. image:: ../../lib/matplotlib/mpl-data/images/home.png +.. image:: ../../lib/matplotlib/mpl-data/images/home_large.png -.. image:: ../../lib/matplotlib/mpl-data/images/back.png +.. image:: ../../lib/matplotlib/mpl-data/images/back_large.png -.. image:: ../../lib/matplotlib/mpl-data/images/forward.png +.. image:: ../../lib/matplotlib/mpl-data/images/forward_large.png -The ``Forward`` and ``Back`` buttons - These are akin to the web browser forward and back buttons. They - are used to navigate back and forth between previously defined - views. They have no meaning unless you have already navigated - somewhere else using the pan and zoom buttons. This is analogous +The ``Home``, ``Forward`` and ``Back`` buttons + These are akin to a web browser's home, forward and back controls. + ``Forward`` and ``Back`` are used to navigate back and forth between + previously defined views. They have no meaning unless you have already + navigated somewhere else using the pan and zoom buttons. This is analogous to trying to click ``Back`` on your web browser before visiting a - new page --nothing happens. ``Home`` always takes you to the - first, default view of your data. For ``Home``, ``Forward`` and - ``Back``, think web browser where data views are web pages. Use - the pan and zoom to rectangle to define new views. + new page or ``Forward`` before you have gone back to a page -- + nothing happens. ``Home`` always takes you to the + first, default view of your data. Again, all of these buttons should + feel very familiar to any user of a web browser. -.. image:: ../../lib/matplotlib/mpl-data/images/move.png +.. image:: ../../lib/matplotlib/mpl-data/images/move_large.png The ``Pan/Zoom`` button This button has two modes: pan and zoom. Click the toolbar button @@ -37,11 +37,11 @@ The ``Pan/Zoom`` button where you released. If you press 'x' or 'y' while panning the motion will be constrained to the x or y axis, respectively. Press the right mouse button to zoom, dragging it to a new position. - The x axis will be zoomed in proportionate to the rightward - movement and zoomed out proportionate to the leftward movement. - Ditto for the y axis and up/down motions. The point under your + The x axis will be zoomed in proportionately to the rightward + movement and zoomed out proportionately to the leftward movement. + The same is true for the y axis and up/down motions. The point under your mouse when you begin the zoom remains stationary, allowing you to - zoom to an arbitrary point in the figure. You can use the + zoom in or out around that point as much as you wish. You can use the modifier keys 'x', 'y' or 'CONTROL' to constrain the zoom to the x axis, the y axis, or aspect ratio preserve, respectively. @@ -50,25 +50,26 @@ The ``Pan/Zoom`` button mouse button. The radius scale can be zoomed in and out using the right mouse button. -.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png +.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect_large.png The ``Zoom-to-rectangle`` button Click this toolbar button to activate this mode. Put your mouse - somewhere over and axes and press the left mouse button. Drag the + somewhere over an axes and press the left mouse button. Drag the mouse while holding the button to a new location and release. The axes view limits will be zoomed to the rectangle you have defined. There is also an experimental 'zoom out to rectangle' in this mode with the right button, which will place your entire axes in the region defined by the zoom out rectangle. -.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png +.. image:: ../../lib/matplotlib/mpl-data/images/subplots_large.png The ``Subplot-configuration`` button - Use this tool to configure the parameters of the subplot: the - left, right, top, bottom, space between the rows and space between - the columns. + Use this tool to configure the appearance of the subplot: + you can stretch or compress the left, right, top, or bottom + side of the subplot, or the space between the rows or + space between the columns. -.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png +.. image:: ../../lib/matplotlib/mpl-data/images/filesave_large.png The ``Save`` button Click this button to launch a file save dialog. You can save @@ -92,12 +93,14 @@ Forward **v** or **right arrow** Pan/Zoom **p** Zoom-to-rect **o** Save **ctrl** + **s** -Toggle fullscreen **ctrl** + **f** +Toggle fullscreen **f** or **ctrl** + **f** Close plot **ctrl** + **w** -Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse +Close all plots **shift** + **w** +Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse Constrain pan/zoom to y axis hold **y** when panning/zooming with mouse Preserve aspect ratio hold **CONTROL** when panning/zooming with mouse -Toggle grid **g** when mouse is over an axes +Toggle major grids **g** when mouse is over an axes +Toggle minor grids **G** when mouse is over an axes Toggle x axis scale (log/linear) **L** or **k** when mouse is over an axes Toggle y axis scale (log/linear) **l** when mouse is over an axes ================================== ================================================= @@ -110,6 +113,8 @@ depends on your UI, but we have examples for every supported UI in the example code for GTK:: + import gtk + from matplotlib.figure import Figure from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar @@ -133,8 +138,3 @@ example code for GTK:: win.show_all() gtk.main() - - - - - diff --git a/doc/users/next_whats_new/README b/doc/users/next_whats_new/README new file mode 100644 index 000000000000..5c9b9bb8c486 --- /dev/null +++ b/doc/users/next_whats_new/README @@ -0,0 +1,19 @@ +What's new in unreleased Matplotlib? +==================================== + +Please place new portions of `whats_new.rst` in the `next_whats_new` directory. + +When adding an entry please look at the currently existing files to +see if you can extend any of them. If you create a file, name it +something like :file:`cool_new_feature.rst` if you have added a brand new +feature or something like :file:`updated_feature.rst` for extensions of +existing features. Include contents of the form: :: + + Section Title for Feature + ------------------------- + + A bunch of text about how awesome the new feature is and examples of how + to use it. + + A sub-section + ~~~~~~~~~~~~~ diff --git a/doc/users/path_tutorial.rst b/doc/users/path_tutorial.rst deleted file mode 100644 index d34d80d80a5a..000000000000 --- a/doc/users/path_tutorial.rst +++ /dev/null @@ -1,187 +0,0 @@ -.. _path_tutorial: - -************* -Path Tutorial -************* - -The object underlying all of the :mod:`matplotlib.patch` objects is -the :class:`~matplotlib.path.Path`, which supports the standard set of -moveto, lineto, curveto commands to draw simple and compound outlines -consisting of line segments and splines. The ``Path`` is instantiated -with a (N,2) array of (x,y) vertices, and a N-length array of path -codes. For example to draw the unit rectangle from (0,0) to (1,1), we -could use this code - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - from matplotlib.path import Path - import matplotlib.patches as patches - - verts = [ - (0., 0.), # left, bottom - (0., 1.), # left, top - (1., 1.), # right, top - (1., 0.), # right, bottom - (0., 0.), # ignored - ] - - codes = [Path.MOVETO, - Path.LINETO, - Path.LINETO, - Path.LINETO, - Path.CLOSEPOLY, - ] - - path = Path(verts, codes) - - fig = plt.figure() - ax = fig.add_subplot(111) - patch = patches.PathPatch(path, facecolor='orange', lw=2) - ax.add_patch(patch) - ax.set_xlim(-2,2) - ax.set_ylim(-2,2) - plt.show() - - -The following path codes are recognized - -============== ================================= ==================================================================================================================== -Code Vertices Description -============== ================================= ==================================================================================================================== -``STOP`` 1 (ignored) A marker for the end of the entire path (currently not required and ignored) -``MOVETO`` 1 Pick up the pen and move to the given vertex. -``LINETO`` 1 Draw a line from the current position to the given vertex. -``CURVE3`` 2 (1 control point, 1 endpoint) Draw a quadratic Bézier curve from the current position, with the given control point, to the given end point. -``CURVE4`` 3 (2 control points, 1 endpoint) Draw a cubic Bézier curve from the current position, with the given control points, to the given end point. -``CLOSEPOLY`` 1 (point itself is ignored) Draw a line segment to the start point of the current polyline. -============== ================================= ==================================================================================================================== - - -.. path-curves: - - -Bézier example -============== - -Some of the path components require multiple vertices to specify them: -for example CURVE 3 is a `bézier -`_ curve with one -control point and one end point, and CURVE4 has three vertices for the -two control points and the end point. The example below shows a -CURVE4 Bézier spline -- the bézier curve will be contained in the -convex hull of the start point, the two control points, and the end -point - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - from matplotlib.path import Path - import matplotlib.patches as patches - - verts = [ - (0., 0.), # P0 - (0.2, 1.), # P1 - (1., 0.8), # P2 - (0.8, 0.), # P3 - ] - - codes = [Path.MOVETO, - Path.CURVE4, - Path.CURVE4, - Path.CURVE4, - ] - - path = Path(verts, codes) - - fig = plt.figure() - ax = fig.add_subplot(111) - patch = patches.PathPatch(path, facecolor='none', lw=2) - ax.add_patch(patch) - - xs, ys = zip(*verts) - ax.plot(xs, ys, 'x--', lw=2, color='black', ms=10) - - ax.text(-0.05, -0.05, 'P0') - ax.text(0.15, 1.05, 'P1') - ax.text(1.05, 0.85, 'P2') - ax.text(0.85, -0.05, 'P3') - - ax.set_xlim(-0.1, 1.1) - ax.set_ylim(-0.1, 1.1) - plt.show() - -.. compound_paths: - -Compound paths -============== - -All of the simple patch primitives in matplotlib, Rectangle, Circle, -Polygon, etc, are implemented with simple path. Plotting functions -like :meth:`~matplotlib.axes.Axes.hist` and -:meth:`~matplotlib.axes.Axes.bar`, which create a number of -primitives, eg a bunch of Rectangles, can usually be implemented more -efficiently using a compound path. The reason ``bar`` creates a list -of rectangles and not a compound path is largely historical: the -:class:`~matplotlib.path.Path` code is comparatively new and ``bar`` -predates it. While we could change it now, it would break old code, -so here we will cover how to create compound paths, replacing the -functionality in bar, in case you need to do so in your own code for -efficiency reasons, eg you are creating an animated bar plot. - -We will make the histogram chart by creating a series of rectangles -for each histogram bar: the rectangle width is the bin width and the -rectangle height is the number of datapoints in that bin. First we'll -create some random normally distributed data and compute the -histogram. Because numpy returns the bin edges and not centers, the -length of ``bins`` is 1 greater than the length of ``n`` in the -example below:: - - # histogram our data with numpy - data = np.random.randn(1000) - n, bins = np.histogram(data, 100) - -We'll now extract the corners of the rectangles. Each of the -``left``, ``bottom``, etc, arrays below is ``len(n)``, where ``n`` is -the array of counts for each histogram bar:: - - # get the corners of the rectangles for the histogram - left = np.array(bins[:-1]) - right = np.array(bins[1:]) - bottom = np.zeros(len(left)) - top = bottom + n - -Now we have to construct our compound path, which will consist of a -series of ``MOVETO``, ``LINETO`` and ``CLOSEPOLY`` for each rectangle. -For each rectangle, we need 5 vertices: 1 for the ``MOVETO``, 3 for -the ``LINETO``, and 1 for the ``CLOSEPOLY``. As indicated in the -table above, the vertex for the closepoly is ignored but we still need -it to keep the codes aligned with the vertices:: - - nverts = nrects*(1+3+1) - verts = np.zeros((nverts, 2)) - codes = np.ones(nverts, int) * path.Path.LINETO - codes[0::5] = path.Path.MOVETO - codes[4::5] = path.Path.CLOSEPOLY - verts[0::5,0] = left - verts[0::5,1] = bottom - verts[1::5,0] = left - verts[1::5,1] = top - verts[2::5,0] = right - verts[2::5,1] = top - verts[3::5,0] = right - verts[3::5,1] = bottom - -All that remains is to create the path, attach it to a -:class:`~matplotlib.patch.PathPatch`, and add it to our axes:: - - barpath = path.Path(verts, codes) - patch = patches.PathPatch(barpath, facecolor='green', - edgecolor='yellow', alpha=0.5) - ax.add_patch(patch) - -Here is the result - -.. plot:: pyplots/compound_path_demo.py diff --git a/doc/users/patheffects_guide.rst b/doc/users/patheffects_guide.rst deleted file mode 100644 index 120a5e784048..000000000000 --- a/doc/users/patheffects_guide.rst +++ /dev/null @@ -1,134 +0,0 @@ -.. _patheffects-guide: - -****************** -Path effects guide -****************** - -.. py:module:: matplotlib.patheffects - - -Matplotlib's :mod:`~matplotlib.patheffects` module provides functionality to -apply a multiple draw stage to any Artist which can be rendered via a -:class:`~matplotlib.path.Path`. - -Artists which can have a path effect applied to them include :class:`~matplotlib.patches.Patch`, -:class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.collections.Collection` and even -:class:`~matplotlib.text.Text`. Each artist's path effects can be controlled via the -``set_path_effects`` method (:class:`~matplotlib.artist.Artist.set_path_effects`), which takes -an iterable of :class:`AbstractPathEffect` instances. - -The simplest path effect is the :class:`Normal` effect, which simply -draws the artist without any effect: - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import matplotlib.patheffects as path_effects - - fig = plt.figure(figsize=(5, 1.5)) - text = fig.text(0.5, 0.5, 'Hello path effects world!\nThis is the normal ' - 'path effect.\nPretty dull, huh?', - ha='center', va='center', size=20) - text.set_path_effects([path_effects.Normal()]) - plt.show() - -Whilst the plot doesn't look any different to what you would expect without any path -effects, the drawing of the text now been changed to use the the path effects -framework, opening up the possibilities for more interesting examples. - -Adding a shadow ---------------- - -A far more interesting path effect than :class:`Normal` is the -drop-shadow, which we can apply to any of our path based artists. The classes -:class:`SimplePatchShadow` and -:class:`SimpleLineShadow` do precisely this by drawing either a filled -patch or a line patch below the original artist: - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import matplotlib.patheffects as path_effects - - text = plt.text(0.5, 0.5, 'Hello path effects world!', - path_effects=[path_effects.withSimplePatchShadow()]) - - plt.plot([0, 3, 2, 5], linewidth=5, color='blue', - path_effects=[path_effects.SimpleLineShadow(), - path_effects.Normal()]) - plt.show() - - -Notice the two approaches to setting the path effects in this example. The -first uses the ``with*`` classes to include the desired functionality automatically -followed with the "normal" effect, whereas the latter explicitly defines the two path -effects to draw. - -Making an artist stand out --------------------------- - -One nice way of making artists visually stand out is to draw an outline in a bold -color below the actual artist. The :class:`Stroke` path effect -makes this a relatively simple task: - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import matplotlib.patheffects as path_effects - - fig = plt.figure(figsize=(7, 1)) - text = fig.text(0.5, 0.5, 'This text stands out because of\n' - 'its black border.', color='white', - ha='center', va='center', size=30) - text.set_path_effects([path_effects.Stroke(linewidth=3, foreground='black'), - path_effects.Normal()]) - plt.show() - -It is important to note that this effect only works because we have drawn the text -path twice; once with a thick black line, and then once with the original text -path on top. - -You may have noticed that the keywords to :class:`Stroke` and -:class:`SimplePatchShadow` and :class:`SimpleLineShadow` are not the usual Artist -keywords (such as ``facecolor`` and ``edgecolor`` etc.). This is because with these -path effects we are operating at lower level of matplotlib. In fact, the keywords -which are accepted are those for a :class:`matplotlib.backend_bases.GraphicsContextBase` -instance, which have been designed for making it easy to create new backends - and not -for its user interface. - - -Greater control of the path effect artist ------------------------------------------ - -As already mentioned, some of the path effects operate at a lower level than most users -will be used to, meaning that setting keywords such as ``facecolor`` and ``edgecolor`` -raise an AttributeError. Luckily there is a generic :class:`PathPatchEffect` path effect -which creates a :class:`~matplotlib.patches.PathPatch` class with the original path. -The keywords to this effect are identical to those of :class:`~matplotlib.patches.PathPatch`: - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import matplotlib.patheffects as path_effects - - fig = plt.figure(figsize=(8, 1)) - t = fig.text(0.02, 0.5, 'Hatch shadow', fontsize=75, weight=1000, va='center') - t.set_path_effects([path_effects.PathPatchEffect(offset=(4, -4), hatch='xxxx', - facecolor='gray'), - path_effects.PathPatchEffect(edgecolor='white', linewidth=1.1, - facecolor='black')]) - plt.show() - - -.. - Headings for future consideration: - - Implementing a custom path effect - --------------------------------- - - What is going on under the hood - -------------------------------- diff --git a/doc/users/pgf.rst b/doc/users/pgf.rst deleted file mode 100644 index 84d48294a803..000000000000 --- a/doc/users/pgf.rst +++ /dev/null @@ -1,167 +0,0 @@ -.. _pgf-tutorial: - -********************************* -Typesetting With XeLaTeX/LuaLaTeX -********************************* - -Using the ``pgf`` backend, matplotlib can export figures as pgf drawing commands -that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX -have full unicode support and can use any font that is installed in the operating -system, making use of advanced typographic features of OpenType, AAT and -Graphite. Pgf pictures created by ``plt.savefig('figure.pgf')`` can be -embedded as raw commands in LaTeX documents. Figures can also be directly -compiled and saved to PDF with ``plt.savefig('figure.pdf')`` by either -switching to the backend - -.. code-block:: python - - matplotlib.use('pgf') - -or registering it for handling pdf output - -.. code-block:: python - - from matplotlib.backends.backend_pgf import FigureCanvasPgf - matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf) - -The second method allows you to keep using regular interactive backends and to -save xelatex, lualatex or pdflatex compiled PDF files from the graphical user interface. - -Matplotlib's pgf support requires a recent LaTeX_ installation that includes -the TikZ/PGF packages (such as TeXLive_), preferably with XeLaTeX or LuaLaTeX -installed. If either pdftocairo or ghostscript is present on your system, -figures can optionally be saved to PNG images as well. The executables -for all applications must be located on your :envvar:`PATH`. - -Rc parameters that control the behavior of the pgf backend: - - ================= ===================================================== - Parameter Documentation - ================= ===================================================== - pgf.preamble Lines to be included in the LaTeX preamble - pgf.rcfonts Setup fonts from rc params using the fontspec package - pgf.texsystem Either "xelatex" (default), "lualatex" or "pdflatex" - ================= ===================================================== - -.. note:: - - TeX defines a set of special characters, such as:: - - # $ % & ~ _ ^ \ { } - - Generally, these characters must be escaped correctly. For convenience, - some characters (_,^,%) are automatically escaped outside of math - environments. - -.. _pgf-rcfonts: - -Font specification -================== - -The fonts used for obtaining the size of text elements or when compiling -figures to PDF are usually defined in the matplotlib rc parameters. You can -also use the LaTeX default Computer Modern fonts by clearing the lists for -``font.serif``, ``font.sans-serif`` or ``font.monospace``. Please note that -the glyph coverage of these fonts is very limited. If you want to keep the -Computer Modern font face but require extended unicode support, consider -installing the `Computer Modern Unicode `_ -fonts *CMU Serif*, *CMU Sans Serif*, etc. - -When saving to ``.pgf``, the font configuration matplotlib used for the -layout of the figure is included in the header of the text file. - -.. literalinclude:: plotting/examples/pgf_fonts.py - :end-before: plt.savefig - -.. image:: /_static/pgf_fonts.* - - -.. _pgf-preamble: - -Custom preamble -=============== - -Full customization is possible by adding your own commands to the preamble. -Use the ``pgf.preamble`` parameter if you want to configure the math fonts, -using ``unicode-math`` for example, or for loading additional packages. Also, -if you want to do the font configuration yourself instead of using the fonts -specified in the rc parameters, make sure to disable ``pgf.rcfonts``. - -.. htmlonly:: - - .. literalinclude:: plotting/examples/pgf_preamble.py - :end-before: plt.savefig - -.. latexonly:: - - .. literalinclude:: plotting/examples/pgf_preamble.py - :end-before: import matplotlib.pyplot as plt - -.. image:: /_static/pgf_preamble.* - - -.. _pgf-texsystem: - -Choosing the TeX system -======================= - -The TeX system to be used by matplotlib is chosen by the ``pgf.texsystem`` -parameter. Possible values are ``'xelatex'`` (default), ``'lualatex'`` and -``'pdflatex'``. Please note that when selecting pdflatex the fonts and -unicode handling must be configured in the preamble. - -.. literalinclude:: plotting/examples/pgf_texsystem.py - :end-before: plt.savefig - -.. image:: /_static/pgf_texsystem.* - - -.. _pgf-troubleshooting: - -Troubleshooting -=============== - -* Please note that the TeX packages found in some Linux distributions and - MiKTeX installations are dramatically outdated. Make sure to update your - package catalog and upgrade or install a recent TeX distribution. - -* On Windows, the :envvar:`PATH` environment variable may need to be modified - to include the directories containing the latex, dvipng and ghostscript - executables. See :ref:`environment-variables` and - :ref:`setting-windows-environment-variables` for details. - -* A limitation on Windows causes the backend to keep file handles that have - been opened by your application open. As a result, it may not be possible - to delete the corresponding files until the application closes (see - `#1324 `_). - -* Sometimes the font rendering in figures that are saved to png images is - very bad. This happens when the pdftocairo tool is not available and - ghostscript is used for the pdf to png conversion. - -* Make sure what you are trying to do is possible in a LaTeX document, - that your LaTeX syntax is valid and that you are using raw strings - if necessary to avoid unintended escape sequences. - -* The ``pgf.preamble`` rc setting provides lots of flexibility, and lots of - ways to cause problems. When experiencing problems, try to minimalize or - disable the custom preamble. - -* Configuring an ``unicode-math`` environment can be a bit tricky. The - TeXLive distribution for example provides a set of math fonts which are - usually not installed system-wide. XeTeX, unlike LuaLatex, cannot find - these fonts by their name, which is why you might have to specify - ``\setmathfont{xits-math.otf}`` instead of ``\setmathfont{XITS Math}`` or - alternatively make the fonts available to your OS. See this - `tex.stackexchange.com question `_ - for more details. - -* If the font configuration used by matplotlib differs from the font setting - in yout LaTeX document, the alignment of text elements in imported figures - may be off. Check the header of your ``.pgf`` file if you are unsure about - the fonts matplotlib used for the layout. - -* If you still need help, please see :ref:`reporting-problems` - -.. _LaTeX: http://www.tug.org -.. _TeXLive: http://www.tug.org/texlive/ diff --git a/doc/users/plotting/examples/anchored_box01.py b/doc/users/plotting/examples/anchored_box01.py deleted file mode 100644 index 517a2f88d151..000000000000 --- a/doc/users/plotting/examples/anchored_box01.py +++ /dev/null @@ -1,14 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -at = AnchoredText("Figure 1a", - prop=dict(size=15), frameon=True, - loc=2, - ) -at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") -ax.add_artist(at) - -plt.show() diff --git a/doc/users/plotting/examples/anchored_box02.py b/doc/users/plotting/examples/anchored_box02.py deleted file mode 100644 index 6f8db6dd8de8..000000000000 --- a/doc/users/plotting/examples/anchored_box02.py +++ /dev/null @@ -1,18 +0,0 @@ -from matplotlib.patches import Circle -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - - -ada = AnchoredDrawingArea(40, 20, 0, 0, - loc=1, pad=0., frameon=False) -p1 = Circle((10, 10), 10) -ada.drawing_area.add_artist(p1) -p2 = Circle((30, 10), 5, fc="r") -ada.drawing_area.add_artist(p2) - -ax.add_artist(ada) - -plt.show() diff --git a/doc/users/plotting/examples/anchored_box03.py b/doc/users/plotting/examples/anchored_box03.py deleted file mode 100644 index 0848e1b9d270..000000000000 --- a/doc/users/plotting/examples/anchored_box03.py +++ /dev/null @@ -1,14 +0,0 @@ -from matplotlib.patches import Ellipse -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -box = AnchoredAuxTransformBox(ax.transData, loc=2) -el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates! -box.drawing_area.add_artist(el) - -ax.add_artist(box) - -plt.show() diff --git a/doc/users/plotting/examples/anchored_box04.py b/doc/users/plotting/examples/anchored_box04.py deleted file mode 100644 index 570c73162141..000000000000 --- a/doc/users/plotting/examples/anchored_box04.py +++ /dev/null @@ -1,35 +0,0 @@ -from matplotlib.patches import Ellipse -import matplotlib.pyplot as plt -from matplotlib.offsetbox import AnchoredOffsetbox, TextArea, DrawingArea, HPacker - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -box1 = TextArea(" Test : ", textprops=dict(color="k")) - -box2 = DrawingArea(60, 20, 0, 0) -el1 = Ellipse((10, 10), width=16, height=5, angle=30, fc="r") -el2 = Ellipse((30, 10), width=16, height=5, angle=170, fc="g") -el3 = Ellipse((50, 10), width=16, height=5, angle=230, fc="b") -box2.add_artist(el1) -box2.add_artist(el2) -box2.add_artist(el3) - - -box = HPacker(children=[box1, box2], - align="center", - pad=0, sep=5) - -anchored_box = AnchoredOffsetbox(loc=3, - child=box, pad=0., - frameon=True, - bbox_to_anchor=(0., 1.02), - bbox_transform=ax.transAxes, - borderpad=0., - ) - - -ax.add_artist(anchored_box) - -fig.subplots_adjust(top=0.8) -plt.show() diff --git a/doc/users/plotting/examples/annotate_simple01.py b/doc/users/plotting/examples/annotate_simple01.py deleted file mode 100644 index 1a376b66f5b0..000000000000 --- a/doc/users/plotting/examples/annotate_simple01.py +++ /dev/null @@ -1,14 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ax.annotate("", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3"), - ) - -plt.show() - diff --git a/doc/users/plotting/examples/annotate_simple02.py b/doc/users/plotting/examples/annotate_simple02.py deleted file mode 100644 index 25bb0002de5f..000000000000 --- a/doc/users/plotting/examples/annotate_simple02.py +++ /dev/null @@ -1,15 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ax.annotate("Test", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - size=20, va="center", ha="center", - arrowprops=dict(arrowstyle="simple", - connectionstyle="arc3,rad=-0.2"), - ) - -plt.show() - diff --git a/doc/users/plotting/examples/annotate_simple03.py b/doc/users/plotting/examples/annotate_simple03.py deleted file mode 100644 index 61a885afd2a5..000000000000 --- a/doc/users/plotting/examples/annotate_simple03.py +++ /dev/null @@ -1,17 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ann = ax.annotate("Test", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - size=20, va="center", ha="center", - bbox=dict(boxstyle="round4", fc="w"), - arrowprops=dict(arrowstyle="-|>", - connectionstyle="arc3,rad=-0.2", - fc="w"), - ) - -plt.show() - diff --git a/doc/users/plotting/examples/annotate_simple_coord01.py b/doc/users/plotting/examples/annotate_simple_coord01.py deleted file mode 100644 index 7b53d0c22973..000000000000 --- a/doc/users/plotting/examples/annotate_simple_coord01.py +++ /dev/null @@ -1,15 +0,0 @@ - -import matplotlib.pyplot as plt - -plt.figure(figsize=(3,2)) -ax=plt.subplot(111) -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) -an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, - xytext=(30,0), textcoords="offset points", - va="center", ha="left", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) -plt.show() - diff --git a/doc/users/plotting/examples/annotate_simple_coord02.py b/doc/users/plotting/examples/annotate_simple_coord02.py deleted file mode 100644 index d2ce74dc6cf9..000000000000 --- a/doc/users/plotting/examples/annotate_simple_coord02.py +++ /dev/null @@ -1,16 +0,0 @@ - -import matplotlib.pyplot as plt - -plt.figure(figsize=(3,2)) -ax=plt.axes([0.1, 0.1, 0.8, 0.7]) -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) - -an2 = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=an1, - xytext=(0.5,1.1), textcoords=(an1, "axes fraction"), - va="bottom", ha="center", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) -plt.show() - diff --git a/doc/users/plotting/examples/annotate_text_arrow.py b/doc/users/plotting/examples/annotate_text_arrow.py deleted file mode 100644 index 4ed10f99670e..000000000000 --- a/doc/users/plotting/examples/annotate_text_arrow.py +++ /dev/null @@ -1,38 +0,0 @@ - -import numpy.random -import matplotlib.pyplot as plt - -fig = plt.figure(1, figsize=(5,5)) -fig.clf() - -ax = fig.add_subplot(111) -ax.set_aspect(1) - -x1 = -1 + numpy.random.randn(100) -y1 = -1 + numpy.random.randn(100) -x2 = 1. + numpy.random.randn(100) -y2 = 1. + numpy.random.randn(100) - -ax.scatter(x1, y1, color="r") -ax.scatter(x2, y2, color="g") - -bbox_props = dict(boxstyle="round", fc="w", ec="0.5", alpha=0.9) -ax.text(-2, -2, "Sample A", ha="center", va="center", size=20, - bbox=bbox_props) -ax.text(2, 2, "Sample B", ha="center", va="center", size=20, - bbox=bbox_props) - - -bbox_props = dict(boxstyle="rarrow", fc=(0.8,0.9,0.9), ec="b", lw=2) -t = ax.text(0, 0, "Direction", ha="center", va="center", rotation=45, - size=15, - bbox=bbox_props) - -bb = t.get_bbox_patch() -bb.set_boxstyle("rarrow", pad=0.6) - -ax.set_xlim(-4, 4) -ax.set_ylim(-4, 4) - -plt.draw() -plt.show() diff --git a/doc/users/plotting/examples/axes_zoom_effect.py b/doc/users/plotting/examples/axes_zoom_effect.py deleted file mode 100644 index d63cde6af35f..000000000000 --- a/doc/users/plotting/examples/axes_zoom_effect.py +++ /dev/null @@ -1 +0,0 @@ -../../../../examples/pylab_examples/axes_zoom_effect.py \ No newline at end of file diff --git a/doc/users/plotting/examples/connect_simple01.py b/doc/users/plotting/examples/connect_simple01.py deleted file mode 100644 index 7e251ca6bc28..000000000000 --- a/doc/users/plotting/examples/connect_simple01.py +++ /dev/null @@ -1,31 +0,0 @@ -from matplotlib.patches import ConnectionPatch -import matplotlib.pyplot as plt - -fig = plt.figure(1, figsize=(6,3)) -ax1 = plt.subplot(121) -xyA=(0.2, 0.2) -xyB=(0.8, 0.8) -coordsA="data" -coordsB="data" -con = ConnectionPatch(xyA, xyB, coordsA, coordsB, - arrowstyle="-|>", shrinkA=5, shrinkB=5, - mutation_scale=20, fc="w") -ax1.plot([xyA[0], xyB[0]], [xyA[1], xyB[1]], "o") -ax1.add_artist(con) - -ax2 = plt.subplot(122) -#xyA=(0.7, 0.7) -xy=(0.3, 0.2) -coordsA="data" -coordsB="data" -con = ConnectionPatch(xyA=xy, xyB=xy, coordsA=coordsA, coordsB=coordsB, - axesA=ax2, axesB=ax1, - arrowstyle="->", shrinkB=5) -ax2.add_artist(con) - -ax1.set_xlim(0, 1) -ax1.set_ylim(0, 1) -ax2.set_xlim(0, .5) -ax2.set_ylim(0, .5) -plt.draw() -plt.show() diff --git a/doc/users/plotting/examples/demo_gridspec01.py b/doc/users/plotting/examples/demo_gridspec01.py deleted file mode 100644 index 55c76a7f0f4d..000000000000 --- a/doc/users/plotting/examples/demo_gridspec01.py +++ /dev/null @@ -1,20 +0,0 @@ -import matplotlib.pyplot as plt - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - -plt.figure(0) -ax1 = plt.subplot2grid((3,3), (0,0), colspan=3) -ax2 = plt.subplot2grid((3,3), (1,0), colspan=2) -ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2) -ax4 = plt.subplot2grid((3,3), (2, 0)) -ax5 = plt.subplot2grid((3,3), (2, 1)) - -plt.suptitle("subplot2grid") -make_ticklabels_invisible(plt.gcf()) -plt.show() - diff --git a/doc/users/plotting/examples/demo_gridspec02.py b/doc/users/plotting/examples/demo_gridspec02.py deleted file mode 100644 index 43a7f0899403..000000000000 --- a/doc/users/plotting/examples/demo_gridspec02.py +++ /dev/null @@ -1,26 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.gridspec import GridSpec - - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - -plt.figure() - -gs = GridSpec(3, 3) -ax1 = plt.subplot(gs[0, :]) -# identical to ax1 = plt.subplot(gs.new_subplotspec((0,0), colspan=3)) -ax2 = plt.subplot(gs[1,:-1]) -ax3 = plt.subplot(gs[1:, -1]) -ax4 = plt.subplot(gs[-1,0]) -ax5 = plt.subplot(gs[-1,-2]) - -plt.suptitle("GridSpec") -make_ticklabels_invisible(plt.gcf()) - -plt.show() - diff --git a/doc/users/plotting/examples/demo_gridspec03.py b/doc/users/plotting/examples/demo_gridspec03.py deleted file mode 100644 index da7c801566c1..000000000000 --- a/doc/users/plotting/examples/demo_gridspec03.py +++ /dev/null @@ -1,34 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.gridspec import GridSpec - - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - - -# demo 3 : gridspec with subplotpars set. - -f = plt.figure() - -plt.suptitle("GridSpec w/ different subplotpars") - -gs1 = GridSpec(3, 3) -gs1.update(left=0.05, right=0.48, wspace=0.05) -ax1 = plt.subplot(gs1[:-1, :]) -ax2 = plt.subplot(gs1[-1, :-1]) -ax3 = plt.subplot(gs1[-1, -1]) - -gs2 = GridSpec(3, 3) -gs2.update(left=0.55, right=0.98, hspace=0.05) -ax4 = plt.subplot(gs2[:, :-1]) -ax5 = plt.subplot(gs2[:-1, -1]) -ax6 = plt.subplot(gs2[-1, -1]) - -make_ticklabels_invisible(plt.gcf()) - -plt.show() - diff --git a/doc/users/plotting/examples/demo_gridspec05.py b/doc/users/plotting/examples/demo_gridspec05.py deleted file mode 100644 index 6bc263a89331..000000000000 --- a/doc/users/plotting/examples/demo_gridspec05.py +++ /dev/null @@ -1,26 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.gridspec as gridspec - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - - -f = plt.figure() - -gs = gridspec.GridSpec(2, 2, - width_ratios=[1,2], - height_ratios=[4,1] - ) - -ax1 = plt.subplot(gs[0]) -ax2 = plt.subplot(gs[1]) -ax3 = plt.subplot(gs[2]) -ax4 = plt.subplot(gs[3]) - -make_ticklabels_invisible(f) -plt.show() - diff --git a/doc/users/plotting/examples/demo_gridspec06.py b/doc/users/plotting/examples/demo_gridspec06.py deleted file mode 100644 index ead2029af251..000000000000 --- a/doc/users/plotting/examples/demo_gridspec06.py +++ /dev/null @@ -1,53 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.gridspec as gridspec -import numpy as np - -try: - from itertools import product -except ImportError: - # product is new in v 2.6 - def product(*args, **kwds): - pools = map(tuple, args) * kwds.get('repeat', 1) - result = [[]] - for pool in pools: - result = [x+[y] for x in result for y in pool] - for prod in result: - yield tuple(prod) - - -def squiggle_xy(a, b, c, d, i=np.arange(0.0, 2*np.pi, 0.05)): - return np.sin(i*a)*np.cos(i*b), np.sin(i*c)*np.cos(i*d) - -fig = plt.figure(figsize=(8, 8)) - -# gridspec inside gridspec -outer_grid = gridspec.GridSpec(4, 4, wspace=0.0, hspace=0.0) - -for i in xrange(16): - inner_grid = gridspec.GridSpecFromSubplotSpec(3, 3, - subplot_spec=outer_grid[i], wspace=0.0, hspace=0.0) - a, b = int(i/4)+1,i%4+1 - for j, (c, d) in enumerate(product(range(1, 4), repeat=2)): - ax = plt.Subplot(fig, inner_grid[j]) - ax.plot(*squiggle_xy(a, b, c, d)) - ax.set_xticks([]) - ax.set_yticks([]) - fig.add_subplot(ax) - -all_axes = fig.get_axes() - -#show only the outside spines -for ax in all_axes: - for sp in ax.spines.values(): - sp.set_visible(False) - if ax.is_first_row(): - ax.spines['top'].set_visible(True) - if ax.is_last_row(): - ax.spines['bottom'].set_visible(True) - if ax.is_first_col(): - ax.spines['left'].set_visible(True) - if ax.is_last_col(): - ax.spines['right'].set_visible(True) - -plt.show() - diff --git a/doc/users/plotting/examples/pgf_fonts.py b/doc/users/plotting/examples/pgf_fonts.py deleted file mode 100644 index ae260b151406..000000000000 --- a/doc/users/plotting/examples/pgf_fonts.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -import matplotlib as mpl -mpl.use("pgf") -pgf_with_rc_fonts = { - "font.family": "serif", - "font.serif": [], # use latex default serif font - "font.sans-serif": ["DejaVu Sans"], # use a specific sans-serif font -} -mpl.rcParams.update(pgf_with_rc_fonts) - -import matplotlib.pyplot as plt -plt.figure(figsize=(4.5,2.5)) -plt.plot(range(5)) -plt.text(0.5, 3., "serif") -plt.text(0.5, 2., "monospace", family="monospace") -plt.text(2.5, 2., "sans-serif", family="sans-serif") -plt.text(2.5, 1., "comic sans", family="Comic Sans MS") -plt.xlabel(u"µ is not $\\mu$") -plt.tight_layout(.5) - -plt.savefig("pgf_fonts.pdf") -plt.savefig("pgf_fonts.png") diff --git a/doc/users/plotting/examples/pgf_preamble.py b/doc/users/plotting/examples/pgf_preamble.py deleted file mode 100644 index f233afbd1db7..000000000000 --- a/doc/users/plotting/examples/pgf_preamble.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import (absolute_import, division, print_function, - unicode_literals) - -import six - -import matplotlib as mpl -mpl.use("pgf") -pgf_with_custom_preamble = { - "font.family": "serif", # use serif/main font for text elements - "text.usetex": True, # use inline math for ticks - "pgf.rcfonts": False, # don't setup fonts from rc parameters - "pgf.preamble": [ - "\\usepackage{units}", # load additional packages - "\\usepackage{metalogo}", - "\\usepackage{unicode-math}", # unicode math setup - r"\setmathfont{xits-math.otf}", - r"\setmainfont{DejaVu Serif}", # serif font via preamble - ] -} -mpl.rcParams.update(pgf_with_custom_preamble) - -import matplotlib.pyplot as plt -plt.figure(figsize=(4.5,2.5)) -plt.plot(range(5)) -plt.xlabel("unicode text: я, ψ, €, ü, \\unitfrac[10]{°}{µm}") -plt.ylabel("\\XeLaTeX") -plt.legend(["unicode math: $λ=∑_i^∞ μ_i^2$"]) -plt.tight_layout(.5) - -plt.savefig("pgf_preamble.pdf") -plt.savefig("pgf_preamble.png") diff --git a/doc/users/plotting/examples/pgf_texsystem.py b/doc/users/plotting/examples/pgf_texsystem.py deleted file mode 100644 index 88231348b5e2..000000000000 --- a/doc/users/plotting/examples/pgf_texsystem.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- - -import matplotlib as mpl -mpl.use("pgf") -pgf_with_pdflatex = { - "pgf.texsystem": "pdflatex", - "pgf.preamble": [ - r"\usepackage[utf8x]{inputenc}", - r"\usepackage[T1]{fontenc}", - r"\usepackage{cmbright}", - ] -} -mpl.rcParams.update(pgf_with_pdflatex) - -import matplotlib.pyplot as plt -plt.figure(figsize=(4.5,2.5)) -plt.plot(range(5)) -plt.text(0.5, 3., "serif", family="serif") -plt.text(0.5, 2., "monospace", family="monospace") -plt.text(2.5, 2., "sans-serif", family="sans-serif") -plt.xlabel(u"µ is not $\\mu$") -plt.tight_layout(.5) - -plt.savefig("pgf_texsystem.pdf") -plt.savefig("pgf_texsystem.png") diff --git a/doc/users/plotting/examples/simple_annotate01.py b/doc/users/plotting/examples/simple_annotate01.py deleted file mode 100644 index 434b09efa22e..000000000000 --- a/doc/users/plotting/examples/simple_annotate01.py +++ /dev/null @@ -1,131 +0,0 @@ - -import matplotlib.pyplot as plt -import matplotlib.patches as mpatches - -x1, y1 = 0.3, 0.3 -x2, y2 = 0.7, 0.7 - -fig = plt.figure(1) -fig.clf() -from mpl_toolkits.axes_grid.axes_grid import Grid -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - -from matplotlib.font_manager import FontProperties - -def add_at(ax, t, loc=2): - fp = dict(size=10) - _at = AnchoredText(t, loc=loc, prop=fp) - ax.add_artist(_at) - return _at - - -grid = Grid(fig, 111, (4, 4), label_mode="1", share_all=True) - -grid[0].set_autoscale_on(False) - -ax = grid[0] -ax.plot([x1, x2], [y1, y2], "o") -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="->")) - -add_at(ax, "A $->$ B", loc=2) - -ax = grid[1] -ax.plot([x1, x2], [y1, y2], "o") -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3,rad=0.3")) - -add_at(ax, "connectionstyle=arc3", loc=2) - - -ax = grid[2] -ax.plot([x1, x2], [y1, y2], "o") -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3,rad=0.3", - shrinkB=5, - ) - ) - -add_at(ax, "shrinkB=5", loc=2) - - -ax = grid[3] -ax.plot([x1, x2], [y1, y2], "o") -el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.5) -ax.add_artist(el) -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3,rad=0.2", - ) - ) - - -ax = grid[4] -ax.plot([x1, x2], [y1, y2], "o") -el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.5) -ax.add_artist(el) -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3,rad=0.2", - patchB=el, - ) - ) - - -add_at(ax, "patchB", loc=2) - - - -ax = grid[5] -ax.plot([x1], [y1], "o") -ax.annotate("Test", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - ha="center", va="center", - bbox=dict(boxstyle="round", - fc="w", - ), - arrowprops=dict(arrowstyle="->", - #connectionstyle="arc3,rad=0.2", - ) - ) - - -add_at(ax, "annotate", loc=2) - - -ax = grid[6] -ax.plot([x1], [y1], "o") -ax.annotate("Test", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - ha="center", va="center", - bbox=dict(boxstyle="round", - fc="w", - ), - arrowprops=dict(arrowstyle="->", - #connectionstyle="arc3,rad=0.2", - relpos=(0., 0.) - ) - ) - - -add_at(ax, "relpos=(0,0)", loc=2) - - - -#ax.set_xlim(0, 1) -#ax.set_ylim(0, 1) -plt.draw() diff --git a/doc/users/plotting/examples/simple_legend01.py b/doc/users/plotting/examples/simple_legend01.py deleted file mode 100644 index a234f970db95..000000000000 --- a/doc/users/plotting/examples/simple_legend01.py +++ /dev/null @@ -1,18 +0,0 @@ -import matplotlib.pyplot as plt - - -plt.subplot(211) -plt.plot([1,2,3], label="test1") -plt.plot([3,2,1], label="test2") -# Place a legend above this legend, expanding itself to -# fully use the given bounding box. -plt.legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, - ncol=2, mode="expand", borderaxespad=0.) - -plt.subplot(223) -plt.plot([1,2,3], label="test1") -plt.plot([3,2,1], label="test2") -# Place a legend to the right of this smaller figure. -plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) - -plt.show() diff --git a/doc/users/plotting/examples/simple_legend02.py b/doc/users/plotting/examples/simple_legend02.py deleted file mode 100644 index dabd2f072e72..000000000000 --- a/doc/users/plotting/examples/simple_legend02.py +++ /dev/null @@ -1,15 +0,0 @@ -import matplotlib.pyplot as plt - -line1, = plt.plot([1,2,3], label="Line 1", linestyle='--') -line2, = plt.plot([3,2,1], label="Line 2", linewidth=4) - -# Create a legend for the first line. -first_legend = plt.legend(handles=[line1], loc=1) - -# Add the legend manually to the current Axes. -ax = plt.gca().add_artist(first_legend) - -# Create another legend for the second line. -plt.legend(handles=[line2], loc=4) - -plt.show() diff --git a/doc/users/prev_whats_new/changelog.rst b/doc/users/prev_whats_new/changelog.rst new file mode 100644 index 000000000000..38da677dedf3 --- /dev/null +++ b/doc/users/prev_whats_new/changelog.rst @@ -0,0 +1,5441 @@ +.. _old_changelog: + +List of changes to Matplotlib prior to 2015 +=========================================== + +This is a list of the changes made to Matplotlib from 2003 to 2015. For more +recent changes, please refer to the `what's new <../whats_new.html>`_ or +the `API changes <../../api/api_changes.html>`_. + +2015-11-16 Levels passed to contour(f) and tricontour(f) must be in increasing + order. + +2015-10-21 Added TextBox widget + + +2015-10-21 Added get_ticks_direction() + +2015-02-27 Added the rcParam 'image.composite_image' to permit users + to decide whether they want the vector graphics backends to combine + all images within a set of axes into a single composite image. + (If images do not get combined, users can open vector graphics files + in Adobe Illustrator or Inkscape and edit each image individually.) + +2015-02-19 Rewrite of C++ code that calculates contours to add support for + corner masking. This is controlled by the 'corner_mask' keyword + in plotting commands 'contour' and 'contourf'. - IMT + +2015-01-23 Text bounding boxes are now computed with advance width rather than + ink area. This may result in slightly different placement of text. + +2014-10-27 Allowed selection of the backend using the `MPLBACKEND` environment + variable. Added documentation on backend selection methods. + +2014-09-27 Overhauled `colors.LightSource`. Added `LightSource.hillshade` to + allow the independent generation of illumination maps. Added new + types of blending for creating more visually appealing shaded relief + plots (e.g. `blend_mode="overlay"`, etc, in addition to the legacy + "hsv" mode). + +2014-06-10 Added Colorbar.remove() + +2014-06-07 Fixed bug so radial plots can be saved as ps in py3k. + +2014-06-01 Changed the fmt kwarg of errorbar to support the + the mpl convention that "none" means "don't draw it", + and to default to the empty string, so that plotting + of data points is done with the plot() function + defaults. Deprecated use of the None object in place + "none". + +2014-05-22 Allow the linscale keyword parameter of symlog scale to be + smaller than one. + +2014-05-20 Added logic to in FontManager to invalidate font-cache if + if font-family rcparams have changed. + +2014-05-16 Fixed the positioning of multi-line text in the PGF backend. + +2014-05-14 Added Axes.add_image() as the standard way to add AxesImage + instances to Axes. This improves the consistency with + add_artist(), add_collection(), add_container(), add_line(), + add_patch(), and add_table(). + +2014-05-02 Added colorblind-friendly colormap, named 'Wistia'. + +2014-04-27 Improved input clean up in Axes.{h|v}lines + Coerce input into a 1D ndarrays (after dealing with units). + +2014-04-27 removed un-needed cast to float in stem + +2014-04-23 Updated references to "ipython -pylab" + The preferred method for invoking pylab is now using the + "%pylab" magic. + -Chris G. + +2014-04-22 Added (re-)generate a simple automatic legend to "Figure Options" + dialog of the Qt4Agg backend. + +2014-04-22 Added an example showing the difference between + interpolation = 'none' and interpolation = 'nearest' in + `imshow()` when saving vector graphics files. + +2014-04-22 Added violin plotting functions. See `Axes.violinplot`, + `Axes.violin`, `cbook.violin_stats` and `mlab.GaussianKDE` for + details. + +2014-04-10 Fixed the triangular marker rendering error. The "Up" triangle was + rendered instead of "Right" triangle and vice-versa. + +2014-04-08 Fixed a bug in parasite_axes.py by making a list out + of a generator at line 263. + +2014-04-02 Added `clipon=False` to patch creation of wedges and shadows + in `pie`. + +2014-02-25 In backend_qt4agg changed from using update -> repaint under + windows. See comment in source near `self._priv_update` for + longer explaination. + +2014-03-27 Added tests for pie ccw parameter. Removed pdf and svg images + from tests for pie linewidth parameter. + +2014-03-24 Changed the behaviour of axes to not ignore leading or trailing + patches of height 0 (or width 0) while calculating the x and y + axis limits. Patches having both height == 0 and width == 0 are + ignored. + +2014-03-24 Added bool kwarg (manage_xticks) to boxplot to enable/disable + the managemnet of the xlimits and ticks when making a boxplot. + Default in True which maintains current behavior by default. + +2014-03-23 Fixed a bug in projections/polar.py by making sure that the theta + value being calculated when given the mouse coordinates stays within + the range of 0 and 2 * pi. + +2014-03-22 Added the keyword arguments wedgeprops and textprops to pie. + Users can control the wedge and text properties of the pie + in more detail, if they choose. + +2014-03-17 Bug was fixed in append_axes from the AxesDivider class would not + append axes in the right location with respect to the reference + locator axes + +2014-03-13 Add parameter 'clockwise' to function pie, True by default. + +2014-02-28 Added 'origin' kwarg to `spy` + +2014-02-27 Implemented separate horizontal/vertical axes padding to the + ImageGrid in the AxesGrid toolkit + +2014-02-27 Allowed markevery property of matplotlib.lines.Line2D to be, an int + numpy fancy index, slice object, or float. The float behaviour + turns on markers at approximately equal display-coordinate-distances + along the line. + +2014-02-25 In backend_qt4agg changed from using update -> repaint under + windows. See comment in source near `self._priv_update` for + longer explaination. + +2014-01-02 `triplot` now returns the artist it adds and support of line and + marker kwargs has been improved. GBY + +2013-12-30 Made streamplot grid size consistent for different types of density + argument. A 30x30 grid is now used for both density=1 and + density=(1, 1). + +2013-12-03 Added a pure boxplot-drawing method that allow a more complete + customization of boxplots. It takes a list of dicts contains stats. + Also created a function (`cbook.boxplot_stats`) that generates the + stats needed. + +2013-11-28 Added qhull extension module to perform Delaunay triangulation more + robustly than before. It is used by tri.Triangulation (and hence + all pyplot.tri* methods) and mlab.griddata. Deprecated + matplotlib.delaunay module. - IMT + +2013-11-05 Add power-law normalization method. This is useful for, + e.g., showing small populations in a "hist2d" histogram. + +2013-10-27 Added get_rlabel_position and set_rlabel_position methods to + PolarAxes to control angular position of radial tick labels. + +2013-10-06 Add stride-based functions to mlab for easy creation of 2D arrays + with less memory. + +2013-10-06 Improve window and detrend functions in mlab, particulart support for + 2D arrays. + +2013-10-06 Improve performance of all spectrum-related mlab functions and plots. + +2013-10-06 Added support for magnitude, phase, and angle spectrums to + axes.specgram, and support for magnitude, phase, angle, and complex + spectrums to mlab-specgram. + +2013-10-06 Added magnitude_spectrum, angle_spectrum, and phase_spectrum plots, + as well as magnitude_spectrum, angle_spectrum, phase_spectrum, + and complex_spectrum functions to mlab + +2013-07-12 Added support for datetime axes to 2d plots. Axis values are passed + through Axes.convert_xunits/Axes.convert_yunits before being used by + contour/contourf, pcolormesh and pcolor. + +2013-07-12 Allowed matplotlib.dates.date2num, matplotlib.dates.num2date, + and matplotlib.dates.datestr2num to accept n-d inputs. Also + factored in support for n-d arrays to matplotlib.dates.DateConverter + and matplotlib.units.Registry. + +2013-06-26 Refactored the axes module: the axes module is now a folder, + containing the following submodule: + - _subplots.py, containing all the subplots helper methods + - _base.py, containing several private methods and a new + _AxesBase class. This _AxesBase class contains all the methods + that are not directly linked to plots of the "old" Axes + - _axes.py contains the Axes class. This class now inherits from + _AxesBase: it contains all "plotting" methods and labelling + methods. + + This refactoring should not affect the API. Only private methods + are not importable from the axes module anymore. + +2013-05-18 Added support for arbitrary rasterization resolutions to the + SVG backend. Previously the resolution was hard coded to 72 + dpi. Now the backend class takes a image_dpi argument for + its constructor, adjusts the image bounding box accordingly + and forwards a magnification factor to the image renderer. + The code and results now resemble those of the PDF backend. + - MW + +2013-05-08 Changed behavior of hist when given stacked=True and normed=True. + Histograms are now stacked first, then the sum is normalized. + Previously, each histogram was normalized, then they were stacked. + +2013-04-25 Changed all instances of: + + from matplotlib import MatplotlibDeprecationWarning as mplDeprecation + to: + + from cbook import mplDeprecation + + and removed the import into the matplotlib namespace in __init__.py + Thomas Caswell + +2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default + margins on auto-scaleing. - TAC + +2013-04-16 Added patheffect support for Line2D objects. -JJL + +2013-03-31 Added support for arbitrary unstructured user-specified + triangulations to Axes3D.tricontour[f] - Damon McDougall + +2013-03-19 Added support for passing `linestyle` kwarg to `step` so all `plot` + kwargs are passed to the underlying `plot` call. -TAC + +2013-02-25 Added classes CubicTriInterpolator, UniformTriRefiner, TriAnalyzer + to matplotlib.tri module. - GBy + +2013-01-23 Add 'savefig.directory' to rcParams to remember and fill in the last + directory saved to for figure save dialogs - Martin Spacek + +2013-01-13 Add eventplot method to axes and pyplot and EventCollection class + to collections. + +2013-01-08 Added two extra titles to axes which are flush with the left and + right edges of the plot respectively. + Andrew Dawson + +2013-01-07 Add framealpha keyword argument to legend - PO + +2013-01-16 Till Stensitzki added a baseline feature to stackplot + +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-11-08 Replaced plt.figure and plt.subplot calls by the newer, more + convenient single call to plt.subplots() in the documentation + examples - 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 + only if get_closed() is True. Thanks to Jacob Vanderplas. - EF + +2012-08-05 When a norm is passed to contourf, either or both of the + vmin, vmax attributes of that norm are now respected. + Formerly they were respected only if both were + specified. In addition, vmin and/or vmax can now + be passed to contourf directly as kwargs. - EF + +2012-07-24 Contourf handles the extend kwarg by mapping the extended + ranges outside the normed 0-1 range so that they are + handled by colormap colors determined by the set_under + and set_over methods. Previously the extended ranges + were mapped to 0 or 1 so that the "under" and "over" + colormap colors were ignored. This change also increases + slightly the color contrast for a given set of contour + levels. - EF + +2012-06-24 Make use of mathtext in tick labels configurable - DSD + +2012-06-05 Images loaded through PIL are now ordered correctly - CG + +2012-06-02 Add new Axes method and pyplot function, hist2d. - PO + +2012-05-31 Remove support for 'cairo.' style of backend specification. + Deprecate 'cairo.format' and 'savefig.extension' rcParams and + replace with 'savefig.format'. - Martin Spacek + +2012-05-29 pcolormesh now obeys the passed in "edgecolor" kwarg. + To support this, the "shading" argument to pcolormesh now only + takes "flat" or "gouraud". To achieve the old "faceted" behavior, + pass "edgecolors='k'". - MGD + +2012-05-22 Added radius kwarg to pie charts. - HH + +2012-05-22 Collections now have a setting "offset_position" to select whether + the offsets are given in "screen" coordinates (default, + following the old behavior) or "data" coordinates. This is currently + used internally to improve the performance of hexbin. + + As a result, the "draw_path_collection" backend methods have grown + a new argument "offset_position". - MGD + +2012-05-04 Add a new argument to pie charts - startingangle - that + allows one to specify the angle offset for the first wedge + of the chart. - EP + +2012-05-03 symlog scale now obeys the logarithmic base. Previously, it was + completely ignored and always treated as base e. - MGD + +2012-05-03 Allow linscalex/y keyword to symlog scale that allows the size of + the linear portion relative to the logarithmic portion to be + adjusted. - MGD + +2012-04-14 Added new plot style: stackplot. This new feature supports stacked + area plots. - Damon McDougall + +2012-04-06 When path clipping changes a LINETO to a MOVETO, it also + changes any CLOSEPOLY command to a LINETO to the initial + point. This fixes a problem with pdf and svg where the + CLOSEPOLY would then draw a line to the latest MOVETO + position instead of the intended initial position. - JKS + +2012-03-27 Add support to ImageGrid for placing colorbars only at + one edge of each column/row. - RMM + +2012-03-07 Refactor movie writing into useful classes that make use + of pipes to write image data to ffmpeg or mencoder. Also + improve settings for these and the ability to pass custom + options. - RMM + +2012-02-29 errorevery keyword added to errorbar to enable errorbar + subsampling. fixes issue #600. + +2012-02-28 Added plot_trisurf to the mplot3d toolkit. This supports plotting + three dimensional surfaces on an irregular grid. - Damon McDougall + +2012-01-23 The radius labels in polar plots no longer use a fixed + padding, but use a different alignment depending on the + quadrant they are in. This fixes numerical problems when + (rmax - rmin) gets too small. - MGD + +2012-01-08 Add axes.streamplot to plot streamlines of a velocity field. + Adapted from Tom Flannaghan streamplot implementation. -TSY + +2011-12-29 ps and pdf markers are now stroked only if the line width + is nonzero for consistency with agg, fixes issue #621. - JKS + +2011-12-27 Work around an EINTR bug in some versions of subprocess. - JKS + +2011-10-25 added support for \operatorname to mathtext, + including the ability to insert spaces, such as + $\operatorname{arg\,max}$ - PI + +2011-08-18 Change api of Axes.get_tightbbox and add an optional + keyword parameter *call_axes_locator*. - JJL + +2011-07-29 A new rcParam "axes.formatter.use_locale" was added, that, + when True, will use the current locale to format tick + labels. This means that, for example, in the fr_FR locale, + ',' will be used as a decimal separator. - MGD + +2011-07-15 The set of markers available in the plot() and scatter() + commands has been unified. In general, this gives more + options to both than were previously available, however, + there is one backward-incompatible change to the markers in + scatter: + + "d" used to mean "diamond", it now means "narrow + diamond". "D" can be used for a "diamond". + + -MGD + +2011-07-13 Fix numerical problems in symlog scale, particularly when + linthresh <= 1.0. Symlog plots may look different if one + was depending on the old broken behavior - MGD + +2011-07-10 Fixed argument handling error in tripcolor/triplot/tricontour, + issue #203. - IMT + +2011-07-08 Many functions added to mplot3d.axes3d to bring Axes3D + objects more feature-parity with regular Axes objects. + Significant revisions to the documentation as well. + - BVR + +2011-07-07 Added compatibility with IPython strategy for picking + a version of Qt4 support, and an rcParam for making + the choice explicitly: backend.qt4. - EF + +2011-07-07 Modified AutoMinorLocator to improve automatic choice of + the number of minor intervals per major interval, and + to allow one to specify this number via a kwarg. - EF + +2011-06-28 3D versions of scatter, plot, plot_wireframe, plot_surface, + bar3d, and some other functions now support empty inputs. - BVR + +2011-06-22 Add set_theta_offset, set_theta_direction and + set_theta_zero_location to polar axes to control the + location of 0 and directionality of theta. - MGD + +2011-06-22 Add axes.labelweight parameter to set font weight to axis + labels - MGD. + +2011-06-20 Add pause function to pyplot. - EF + +2011-06-16 Added *bottom* keyword parameter for the stem command. + Also, implemented a legend handler for the stem plot. + - JJL + +2011-06-16 Added legend.frameon rcParams. - Mike Kaufman + +2011-05-31 Made backend_qt4 compatible with PySide . - Gerald Storer + +2011-04-17 Disable keyboard auto-repeat in qt4 backend by ignoring + key events resulting from auto-repeat. This makes + constrained zoom/pan work. - EF + +2011-04-14 interpolation="nearest" always interpolate images. A new + mode "none" is introduced for no interpolation - JJL + +2011-04-03 Fixed broken pick interface to AsteriskCollection objects + used by scatter. - EF + +2011-04-01 The plot directive Sphinx extension now supports all of the + features in the Numpy fork of that extension. These + include doctest formatting, an 'include-source' option, and + a number of new configuration options. - MGD + +2011-03-29 Wrapped ViewVCCachedServer definition in a factory function. + This class now inherits from urllib2.HTTPSHandler in order + to fetch data from github, but HTTPSHandler is not defined + if python was built without SSL support. - DSD + +2011-03-10 Update pytz version to 2011c, thanks to Simon Cross. - JKS + +2011-03-06 Add standalone tests.py test runner script. - JKS + +2011-03-06 Set edgecolor to 'face' for scatter asterisk-type + symbols; this fixes a bug in which these symbols were + not responding to the c kwarg. The symbols have no + face area, so only the edgecolor is visible. - EF + +2011-02-27 Support libpng version 1.5.x; suggestion by Michael + Albert. Changed installation specification to a + minimum of libpng version 1.2. - EF + +2011-02-20 clabel accepts a callable as an fmt kwarg; modified + patch by Daniel Hyams. - EF + +2011-02-18 scatter([], []) is now valid. Also fixed issues + with empty collections - BVR + +2011-02-07 Quick workaround for dviread bug #3175113 - JKS + +2011-02-05 Add cbook memory monitoring for Windows, using + tasklist. - EF + +2011-02-05 Speed up Normalize and LogNorm by using in-place + operations and by using float32 for float32 inputs + and for ints of 2 bytes or shorter; based on + patch by Christoph Gohlke. - EF + +2011-02-04 Changed imshow to use rgba as uint8 from start to + finish, instead of going through an intermediate + step as double precision; thanks to Christoph Gohlke. - EF + +2011-01-13 Added zdir and offset arguments to contourf3d to + bring contourf3d in feature parity with contour3d. - BVR + +2011-01-04 Tag 1.0.1 for release at r8896 + +2011-01-03 Added display of ticker offset to 3d plots. - BVR + +2011-01-03 Turn off tick labeling on interior subplots for + pyplots.subplots when sharex/sharey is True. - JDH + +2010-12-29 Implement axes_divider.HBox and VBox. -JJL + + +2010-11-22 Fixed error with Hammer projection. - BVR + +2010-11-12 Fixed the placement and angle of axis labels in 3D plots. - BVR + +2010-11-07 New rc parameters examples.download and examples.directory + allow bypassing the download mechanism in get_sample_data. + - JKS + +2010-10-04 Fix JPEG saving bug: only accept the kwargs documented + by PIL for JPEG files. - JKS + +2010-09-15 Remove unused _wxagg extension and numerix.h. - EF + +2010-08-25 Add new framework for doing animations with examples.- RM + +2010-08-21 Remove unused and inappropriate methods from Tick classes: + set_view_interval, get_minpos, and get_data_interval are + properly found in the Axis class and don't need to be + duplicated in XTick and YTick. - EF + +2010-08-21 Change Axis.set_view_interval() so that when updating an + existing interval, it respects the orientation of that + interval, and can enlarge but not reduce the interval. + This fixes a bug in which Axis.set_ticks would + change the view limits of an inverted axis. Whether + set_ticks should be affecting the viewLim at all remains + an open question. - EF + +2010-08-16 Handle NaN's correctly in path analysis routines. Fixes a + bug where the best location for a legend was not calculated + correctly when the line contains NaNs. - MGD + +2010-08-14 Fix bug in patch alpha handling, and in bar color kwarg - EF + +2010-08-12 Removed all traces of numerix module after 17 months of + deprecation warnings. - EF + +2010-08-05 Added keyword arguments 'thetaunits' and 'runits' for polar + plots. Fixed PolarAxes so that when it set default + Formatters, it marked them as such. Fixed semilogx and + semilogy to no longer blindly reset the ticker information + on the non-log axis. Axes.arrow can now accept unitized + data. - JRE + +2010-08-03 Add support for MPLSETUPCFG variable for custom setup.cfg + filename. Used by sage buildbot to build an mpl w/ no gui + support - JDH + +2010-08-01 Create directory specified by MPLCONFIGDIR if it does + not exist. - ADS + +2010-07-20 Return Qt4's default cursor when leaving the canvas - DSD + +2010-07-06 Tagging for mpl 1.0 at r8502 + + +2010-07-05 Added Ben Root's patch to put 3D plots in arbitrary axes, + allowing you to mix 3d and 2d in different axes/subplots or + to have multiple 3D plots in one figure. See + examples/mplot3d/subplot3d_demo.py - JDH + +2010-07-05 Preferred kwarg names in set_xlim are now 'left' and + 'right'; in set_ylim, 'bottom' and 'top'; original + kwargs are still accepted without complaint. - EF + +2010-07-05 TkAgg and FltkAgg backends are now consistent with other + interactive backends: when used in scripts from the + command line (not from ipython -pylab), show blocks, + and can be called more than once. - EF + +2010-07-02 Modified CXX/WrapPython.h to fix "swab bug" on solaris so + mpl can compile on Solaris with CXX6 in the trunk. Closes + tracker bug 3022815 - JDH + +2010-06-30 Added autoscale convenience method and corresponding + pyplot function for simplified control of autoscaling; + and changed axis, set_xlim, and set_ylim so that by + default, they turn off the autoscaling on the relevant + axis or axes. Therefore one can call set_xlim before + plotting a line, for example, and the limits will be + retained. - EF + +2010-06-20 Added Axes.tick_params and corresponding pyplot function + to control tick and tick label appearance after an Axes + has been created. - EF + +2010-06-09 Allow Axes.grid to control minor gridlines; allow + Axes.grid and Axis.grid to control major and minor + gridlines in the same method call. - EF + +2010-06-06 Change the way we do split/dividend adjustments in + finance.py to handle dividends and fix the zero division bug reported + in sf bug 2949906 and 2123566. Note that volume is not adjusted + because the Yahoo CSV does not distinguish between share + split and dividend adjustments making it near impossible to + get volume adjustement right (unless we want to guess based + on the size of the adjustment or scrape the html tables, + which we don't) - JDH + +2010-06-06 Updated dateutil to 1.5 and pytz to 2010h. + +2010-06-02 Add error_kw kwarg to Axes.bar(). - EF + +2010-06-01 Fix pcolormesh() and QuadMesh to pass on kwargs as + appropriate. - RM + +2010-05-18 Merge mpl_toolkits.gridspec into the main tree. - JJL + +2010-05-04 Improve backend_qt4 so it displays figures with the + correct size - DSD + +2010-04-20 Added generic support for connecting to a timer for events. This + adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to + the backends and a new_timer() method to each backend's + canvas to allow ease of creating a new timer. - RM + +2010-04-20 Added margins() Axes method and pyplot function. - EF + +2010-04-18 update the axes_grid documentation. -JJL + +2010-04-18 Control MaxNLocator parameters after instantiation, + and via Axes.locator_params method, with corresponding + pyplot function. -EF + +2010-04-18 Control ScalarFormatter offsets directly and via the + Axes.ticklabel_format() method, and add that to pyplot. -EF + +2010-04-16 Add a close_event to the backends. -RM + +2010-04-06 modify axes_grid examples to use axes_grid1 and axisartist. -JJL + +2010-04-06 rebase axes_grid using axes_grid1 and axisartist modules. -JJL + +2010-04-06 axes_grid toolkit is splitted into two separate modules, + axes_grid1 and axisartist. -JJL + +2010-04-05 Speed up import: import pytz only if and when it is + needed. It is not needed if the rc timezone is UTC. - EF + +2010-04-03 Added color kwarg to Axes.hist(), based on work by + Jeff Klukas. - EF + +2010-03-24 refactor colorbar code so that no cla() is necessary when + mappable is changed. -JJL + +2010-03-22 fix incorrect rubber band during the zoom mode when mouse + leaves the axes. -JJL + +2010-03-21 x/y key during the zoom mode only changes the x/y limits. -JJL + +2010-03-20 Added pyplot.sca() function suggested by JJL. - EF + +2010-03-20 Added conditional support for new Tooltip API in gtk backend. - EF + +2010-03-20 Changed plt.fig_subplot() to plt.subplots() after discussion on + list, and changed its API to return axes as a numpy object array + (with control of dimensions via squeeze keyword). FP. + +2010-03-13 Manually brought in commits from branch:: + + ------------------------------------------------------------------------ + r8191 | leejjoon | 2010-03-13 17:27:57 -0500 (Sat, 13 Mar 2010) | 1 line + + fix the bug that handles for scatter are incorrectly set when dpi!=72. + Thanks to Ray Speth for the bug report. + + +2010-03-03 Manually brought in commits from branch via diff/patch (svnmerge is broken):: + + ------------------------------------------------------------------------ + r8175 | leejjoon | 2010-03-03 10:03:30 -0800 (Wed, 03 Mar 2010) | 1 line + + fix arguments of allow_rasterization.draw_wrapper + ------------------------------------------------------------------------ + r8174 | jdh2358 | 2010-03-03 09:15:58 -0800 (Wed, 03 Mar 2010) | 1 line + + added support for favicon in docs build + ------------------------------------------------------------------------ + r8173 | jdh2358 | 2010-03-03 08:56:16 -0800 (Wed, 03 Mar 2010) | 1 line + + applied Mattias get_bounds patch + ------------------------------------------------------------------------ + r8172 | jdh2358 | 2010-03-03 08:31:42 -0800 (Wed, 03 Mar 2010) | 1 line + + fix svnmerge download instructions + ------------------------------------------------------------------------ + r8171 | jdh2358 | 2010-03-03 07:47:48 -0800 (Wed, 03 Mar 2010) | 1 line + + + +2010-02-25 add annotation_demo3.py that demonstrates new functionality. -JJL + +2010-02-25 refactor Annotation to support arbitrary Transform as xycoords + or textcoords. Also, if a tuple of two coordinates is provided, + they are interpreted as coordinates for each x and y position. + -JJL + +2010-02-24 Added pyplot.fig_subplot(), to create a figure and a group of + subplots in a single call. This offers an easier pattern than + manually making figures and calling add_subplot() multiple times. FP + +2010-02-17 Added Gokhan's and Mattias' customizable keybindings patch + for the toolbar. You can now set the keymap.* properties + in the matplotlibrc file. Newbindings were added for + toggling log scaling on the x-axis. JDH + +2010-02-16 Committed TJ's filled marker patch for + left|right|bottom|top|full filled markers. See + examples/pylab_examples/filledmarker_demo.py. JDH + +2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap + estimates of median confidence intervals. Based on an + initial patch by Paul Hobson. - ADS + +2010-02-06 Added setup.cfg "basedirlist" option to override setting + in setupext.py "basedir" dictionary; added "gnu0" + platform requested by Benjamin Drung. - EF + +2010-02-06 Added 'xy' scaling option to EllipseCollection. - EF + +2010-02-03 Made plot_directive use a custom PlotWarning category, so that + warnings can be turned into fatal errors easily if desired. - FP + +2010-01-29 Added draggable method to Legend to allow mouse drag + placement. Thanks Adam Fraser. JDH + +2010-01-25 Fixed a bug reported by Olle Engdegard, when using + histograms with stepfilled and log=True - MM + +2010-01-16 Upgraded CXX to 6.1.1 - JDH + +2009-01-16 Don't create minor ticks on top of existing major + ticks. Patch by Neil Crighton. -ADS + +2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch + by Neil Crighton. -ADS + +2010-01-16 Applied patch by Ian Thomas to fix two contouring + problems: now contourf handles interior masked regions, + and the boundaries of line and filled contours coincide. - EF + +2009-01-11 The color of legend patch follows the rc parameters + axes.facecolor and axes.edgecolor. -JJL + +2009-01-11 adjustable of Axes can be "box-forced" which allow + sharing axes. -JJL + +2009-01-11 Add add_click and pop_click methods in + BlockingContourLabeler. -JJL + + +2010-01-03 Added rcParams['axes.color_cycle'] - EF + +2010-01-03 Added Pierre's qt4 formlayout editor and toolbar button - JDH + +2009-12-31 Add support for using math text as marker symbols (Thanks to tcb) + - MGD + +2009-12-31 Commit a workaround for a regression in PyQt4-4.6.{0,1} - DSD + +2009-12-22 Fix cmap data for gist_earth_r, etc. -JJL + +2009-12-20 spines: put spines in data coordinates, add set_bounds() + call. -ADS + +2009-12-18 Don't limit notch size in boxplot to q1-q3 range, as this + is effectively making the data look better than it is. - ADS + +2009-12-18 mlab.prctile handles even-length data, such that the median + is the mean of the two middle values. - ADS + +2009-12-15 Add raw-image (unsampled) support for the ps backend. - JJL + +2009-12-14 Add patch_artist kwarg to boxplot, but keep old default. + Convert boxplot_demo2.py to use the new patch_artist. - ADS + +2009-12-06 axes_grid: reimplemented AxisArtist with FloatingAxes support. + Added new examples. - JJL + +2009-12-01 Applied Laurent Dufrechou's patch to improve blitting with + the qt4 backend - DSD + +2009-11-13 The pdf backend now allows changing the contents of + a pdf file's information dictionary via PdfPages.infodict. - JKS + +2009-11-12 font_manager.py should no longer cause EINTR on Python 2.6 + (but will on the 2.5 version of subprocess). Also the + fc-list command in that file was fixed so now it should + actually find the list of fontconfig fonts. - JKS + +2009-11-10 Single images, and all images in renderers with + option_image_nocomposite (i.e. agg, macosx and the svg + backend when rcParams['svg.image_noscale'] is True), are + now drawn respecting the zorder relative to other + artists. (Note that there may now be inconsistencies across + backends when more than one image is drawn at varying + zorders, but this change introduces correct behavior for + the backends in which it's easy to do so.) + +2009-10-21 Make AutoDateLocator more configurable by adding options + to control the maximum and minimum number of ticks. Also + add control of the intervals to be used for ticking. This + does not change behavior but opens previously hard-coded + behavior to runtime modification`. - RMM + +2009-10-19 Add "path_effects" support for Text and Patch. See + examples/pylab_examples/patheffect_demo.py -JJL + +2009-10-19 Add "use_clabeltext" option to clabel. If True, clabels + will be created with ClabelText class, which recalculates + rotation angle of the label during the drawing time. -JJL + +2009-10-16 Make AutoDateFormatter actually use any specified + timezone setting.This was only working correctly + when no timezone was specified. - RMM + +2009-09-27 Beginnings of a capability to test the pdf backend. - JKS + +2009-09-27 Add a savefig.extension rcparam to control the default + filename extension used by savefig. - JKS + +=============================================== + +2009-09-21 Tagged for release 0.99.1 + +2009-09-20 Fix usetex spacing errors in pdf backend. - JKS + +2009-09-20 Add Sphinx extension to highlight IPython console sessions, + originally authored (I think) by Michael Droetboom. - FP + +2009-09-20 Fix off-by-one error in dviread.Tfm, and additionally protect + against exceptions in case a dvi font is missing some metrics. - JKS + +2009-09-15 Implement draw_text and draw_tex method of backend_base using + the textpath module. Implement draw_tex method of the svg + backend. - JJL + +2009-09-15 Don't fail on AFM files containing floating-point bounding boxes - JKS + +2009-09-13 AxesGrid : add modified version of colorbar. Add colorbar + location howto. - JJL + +2009-09-07 AxesGrid : implemented axisline style. + Added a demo examples/axes_grid/demo_axisline_style.py- JJL + +2009-09-04 Make the textpath class as a separate moduel + (textpath.py). Add support for mathtext and tex.- JJL + +2009-09-01 Added support for Gouraud interpolated triangles. + pcolormesh now accepts shading='gouraud' as an option. - MGD + +2009-08-29 Added matplotlib.testing package, which contains a Nose + plugin and a decorator that lets tests be marked as + KnownFailures - ADS + +2009-08-20 Added scaled dict to AutoDateFormatter for customized + scales - JDH + +2009-08-15 Pyplot interface: the current image is now tracked at the + figure and axes level, addressing tracker item 1656374. - EF + +2009-08-15 Docstrings are now manipulated with decorators defined + in a new module, docstring.py, thanks to Jason Coombs. - EF + +2009-08-14 Add support for image filtering for agg back end. See the example + demo_agg_filter.py. -JJL + +2009-08-09 AnnotationBbox added. Similar to Annotation, but works with + OffsetBox instead of Text. See the example + demo_annotation_box.py. -JJL + +2009-08-07 BboxImage implemented. Two examples, demo_bboximage.py and + demo_ribbon_box.py added. - JJL + +2009-08-07 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) + + becomes: + + 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) + + becomes: + + 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) + + becomes: + + draw_image(self, gc, x, y, im) + + - MGD + +2009-08-06 Tagging the 0.99.0 release at svn r7397 - JDH + + * fixed an alpha colormapping bug posted on sf 2832575 + + * fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py + (patch by Christoph Gohlke) + + * remove dup gui event in enter/leave events in gtk + + * lots of fixes for os x binaries (Thanks Russell Owen) + + * attach gtk events to mpl events -- fixes sf bug 2816580 + + * applied sf patch 2815064 (middle button events for wx) and + patch 2818092 (resize events for wx) + + * fixed boilerplate.py so it doesn't break the ReST docs. + + * removed a couple of cases of mlab.load + + * fixed rec2csv win32 file handle bug from sf patch 2831018 + + * added two examples from Josh Hemann: examples/pylab_examples/barchart_demo2.py + and examples/pylab_examples/boxplot_demo2.py + + * handled sf bugs 2831556 and 2830525; better bar error messages and + backend driver configs + + * added miktex win32 patch from sf patch 2820194 + + * apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel + +2009-08-04 Made cbook.get_sample_data make use of the ETag and Last-Modified + headers of mod_dav_svn. - JKS + +2009-08-03 Add PathCollection; modify contourf to use complex + paths instead of simple paths with cuts. - EF + + +2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS + +2009-08-03 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. - JDH + +2009-07-31 Added cbook.get_sample_data for urllib enabled fetching and + cacheing of data needed for examples. See + examples/misc/sample_data_demo.py - JDH + +2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD + +2009-07-30 Add set_cmap and register_cmap, and improve get_cmap, + to provide convenient handling of user-generated + colormaps. Reorganized _cm and cm modules. - EF + +2009-07-28 Quiver speed improved, thanks to tip by Ray Speth. -EF + +2009-07-27 Simplify argument handling code for plot method. -EF + +2009-07-25 Allow "plot(1, 2, 'r*')" to work. - EF + +2009-07-22 Added an 'interp' keyword to griddata so the faster linear + interpolation method can be chosen. Default is 'nn', so + default behavior (using natural neighbor method) is unchanged (JSW) + +2009-07-22 Improved boilerplate.py so that it generates the correct + signatures for pyplot functions. - JKS + +2009-07-19 Fixed the docstring of Axes.step to reflect the correct + meaning of the kwargs "pre" and "post" - See SF bug + https://sourceforge.net/tracker/index.php?func=detail&aid=2823304&group_id=80706&atid=560720 + - JDH + +2009-07-18 Fix support for hatches without color fills to pdf and svg + backends. Add an example of that to hatch_demo.py. - JKS + +2009-07-17 Removed fossils from swig version of agg backend. - EF + +2009-07-14 initial submission of the annotation guide. -JJL + +2009-07-14 axes_grid : minor improvements in anchored_artists and + inset_locator. -JJL + +2009-07-14 Fix a few bugs in ConnectionStyle algorithms. Add + ConnectionPatch class. -JJL + +2009-07-11 Added a fillstyle Line2D property for half filled markers + -- see examples/pylab_examples/fillstyle_demo.py JDH + +2009-07-08 Attempt to improve performance of qt4 backend, do not call + qApp.processEvents while processing an event. Thanks Ole + Streicher for tracking this down - DSD + +2009-06-24 Add withheader option to mlab.rec2csv and changed + use_mrecords default to False in mlab.csv2rec since this is + partially broken - JDH + +2009-06-24 backend_agg.draw_marker quantizes the main path (as in the + draw_path). - JJL + +2009-06-24 axes_grid: floating axis support added. - JJL + +2009-06-14 Add new command line options to backend_driver.py to support + running only some directories of tests - JKS + +2009-06-13 partial cleanup of mlab and its importation in pylab - EF + +2009-06-13 Introduce a rotation_mode property for the Text artist. See + examples/pylab_examples/demo_text_rotation_mode.py -JJL + +2009-06-07 add support for bz2 files per sf support request 2794556 - + JDH + +2009-06-06 added a properties method to the artist and inspector to + return a dict mapping property name -> value; see sf + feature request 2792183 - JDH + +2009-06-06 added Neil's auto minor tick patch; sf patch #2789713 - JDH + +2009-06-06 do not apply alpha to rgba color conversion if input is + already rgba - JDH + +2009-06-03 axes_grid : Initial check-in of curvelinear grid support. See + examples/axes_grid/demo_curvelinear_grid.py - JJL + +2009-06-01 Add set_color method to Patch - EF + +2009-06-01 Spine is now derived from Patch - ADS + +2009-06-01 use cbook.is_string_like() instead of isinstance() for spines - ADS + +2009-06-01 cla() support for spines - ADS + +2009-06-01 Removed support for gtk < 2.4. - EF + +2009-05-29 Improved the animation_blit_qt4 example, which was a mix + of the object-oriented and pylab interfaces. It is now + strictly object-oriented - DSD + +2009-05-28 Fix axes_grid toolkit to work with spine patch by ADS. - JJL + +2009-05-28 Applied fbianco's patch to handle scroll wheel events in + the qt4 backend - DSD + +2009-05-26 Add support for "axis spines" to have arbitrary location. -ADS + +2009-05-20 Add an empty matplotlibrc to the tests/ directory so that running + tests will use the default set of rcparams rather than the user's + config. - RMM + +2009-05-19 Axis.grid(): allow use of which='major,minor' to have grid + on major and minor ticks. -ADS + +2009-05-18 Make psd(), csd(), and cohere() wrap properly for complex/two-sided + versions, like specgram() (SF #2791686) - RMM + +2009-05-18 Fix the linespacing bug of multiline text (#1239682). See + examples/pylab_examples/multiline.py -JJL + +2009-05-18 Add *annotation_clip* attr. for text.Annotation class. + If True, annotation is only drawn when the annotated point is + inside the axes area. -JJL + +2009-05-17 Fix bug(#2749174) that some properties of minor ticks are + not conserved -JJL + +2009-05-17 applied Michiel's sf patch 2790638 to turn off gtk event + loop in setupext for pygtk>=2.15.10 - JDH + +2009-05-17 applied Michiel's sf patch 2792742 to speed up Cairo and + macosx collections; speedups can be 20x. Also fixes some + bugs in which gc got into inconsistent state + +----------------------- + +2008-05-17 Release 0.98.5.3 at r7107 from the branch - JDH + +2009-05-13 An optional offset and bbox support in restore_bbox. + Add animation_blit_gtk2.py. -JJL + +2009-05-13 psfrag in backend_ps now uses baseline-alignment + when preview.sty is used ((default is + bottom-alignment). Also, a small api imporvement + in OffsetBox-JJL + +2009-05-13 When the x-coordinate of a line is monotonically + increasing, it is now automatically clipped at + the stage of generating the transformed path in + the draw method; this greatly speeds up zooming and + panning when one is looking at a short segment of + a long time series, for example. - EF + +2009-05-11 aspect=1 in log-log plot gives square decades. -JJL + +2009-05-08 clabel takes new kwarg, rightside_up; if False, labels + will not be flipped to keep them rightside-up. This + allows the use of clabel to make streamfunction arrows, + as requested by Evan Mason. - EF + +2009-05-07 'labelpad' can now be passed when setting x/y labels. This + allows controlling the spacing between the label and its + axis. - RMM + +2009-05-06 print_ps now uses mixed-mode renderer. Axes.draw rasterize + artists whose zorder smaller than rasterization_zorder. + -JJL + +2009-05-06 Per-artist Rasterization, originally by Eric Bruning. -JJ + +2009-05-05 Add an example that shows how to make a plot that updates + using data from another process. Thanks to Robert + Cimrman - RMM + +2009-05-05 Add Axes.get_legend_handles_labels method. - JJL + +2009-05-04 Fix bug that Text.Annotation is still drawn while set to + not visible. - JJL + +2009-05-04 Added TJ's fill_betweenx patch - JDH + +2009-05-02 Added options to plotfile based on question from + Joseph Smidt and patch by Matthias Michler. - EF + + +2009-05-01 Changed add_artist and similar Axes methods to + return their argument. - EF + +2009-04-30 Incorrect eps bbox for landscape mode fixed - JJL + +2009-04-28 Fixed incorrect bbox of eps output when usetex=True. - JJL + +2009-04-24 Changed use of os.open* to instead use subprocess.Popen. + os.popen* are deprecated in 2.6 and are removed in 3.0. - RMM + +2009-04-20 Worked on axes_grid documentation. Added + axes_grid.inset_locator. - JJL + +2009-04-17 Initial check-in of the axes_grid toolkit. - JJL + +2009-04-17 Added a support for bbox_to_anchor in + offsetbox.AnchoredOffsetbox. Improved a documentation. + - JJL + +2009-04-16 Fixed a offsetbox bug that multiline texts are not + correctly aligned. - JJL + +2009-04-16 Fixed a bug in mixed mode renderer that images produced by + an rasterizing backend are placed with incorrect size. + - JJL + +2009-04-14 Added Jonathan Taylor's Reinier Heeres' port of John + Porters' mplot3d to svn trunk. Package in + mpl_toolkits.mplot3d and demo is examples/mplot3d/demo.py. + Thanks Reiner + +2009-04-06 The pdf backend now escapes newlines and linefeeds in strings. + Fixes sf bug #2708559; thanks to Tiago Pereira for the report. + +2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to + create an output file. Thanks to Joao Luis Silva for reporting + this. - JKS + +2009-04-05 _png.read_png() reads 12 bit PNGs (patch from + Tobias Wood) - ADS + +2009-04-04 Allow log axis scale to clip non-positive values to + small positive value; this is useful for errorbars. - EF + +2009-03-28 Make images handle nan in their array argument. + A helper, cbook.safe_masked_invalid() was added. - EF + +2009-03-25 Make contour and contourf handle nan in their Z argument. - EF + +2009-03-20 Add AuxTransformBox in offsetbox.py to support some transformation. + anchored_text.py example is enhanced and renamed + (anchored_artists.py). - JJL + +2009-03-20 Add "bar" connection style for annotation - JJL + +2009-03-17 Fix bugs in edge color handling by contourf, found + by Jae-Joon Lee. - EF + +2009-03-14 Added 'LightSource' class to colors module for + creating shaded relief maps. shading_example.py + added to illustrate usage. - JSW + +2009-03-11 Ensure wx version >= 2.8; thanks to Sandro Tosi and + Chris Barker. - EF + +2009-03-10 Fix join style bug in pdf. - JKS + +2009-03-07 Add pyplot access to figure number list - EF + +2009-02-28 hashing of FontProperties accounts current rcParams - JJL + +2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF + +2009-02-26 Add optional bbox_to_anchor argument for legend class - JJL + +2009-02-26 Support image clipping in pdf backend. - JKS + +2009-02-25 Improve tick location subset choice in FixedLocator. - EF + +2009-02-24 Deprecate numerix, and strip out all but the numpy + part of the code. - EF + +2009-02-21 Improve scatter argument handling; add an early error + message, allow inputs to have more than one dimension. - EF + +2009-02-16 Move plot_directive.py to the installed source tree. Add + support for inline code content - MGD + +2009-02-16 Move mathmpl.py to the installed source tree so it is + available to other projects. - MGD + +2009-02-14 Added the legend title support - JJL + +2009-02-10 Fixed a bug in backend_pdf so it doesn't break when the setting + pdf.use14corefonts=True is used. Added test case in + unit/test_pdf_use14corefonts.py. - NGR + +2009-02-08 Added a new imsave function to image.py and exposed it in + the pyplot interface - GR + +2009-02-04 Some reorgnization of the legend code. anchored_text.py + added as an example. - JJL + +2009-02-04 Add extent keyword arg to hexbin - ADS + +2009-02-04 Fix bug in mathtext related to \dots and \ldots - MGD + +2009-02-03 Change default joinstyle to round - MGD + +2009-02-02 Reduce number of marker XObjects in pdf output - JKS + +2009-02-02 Change default resolution on polar plot to 1 - MGD + +2009-02-02 Avoid malloc errors in ttconv for fonts that don't have + e.g., PostName (a version of Tahoma triggered this) - JKS + +2009-01-30 Remove support for pyExcelerator in exceltools -- use xlwt + instead - JDH + +2009-01-29 Document 'resolution' kwarg for polar plots. Support it + when using pyplot.polar, not just Figure.add_axes. - MGD + +2009-01-29 Rework the nan-handling/clipping/quantizing/simplification + framework so each is an independent part of a pipeline. + Expose the C++-implementation of all of this so it can be + used from all Python backends. Add rcParam + "path.simplify_threshold" to control the threshold of + similarity below which vertices will be removed. + +2009-01-26 Improved tight bbox option of the savefig. - JJL + +2009-01-26 Make curves and NaNs play nice together - MGD + +2009-01-21 Changed the defaults of acorr and xcorr to use + usevlines=True, maxlags=10 and normed=True since these are + the best defaults + +2009-01-19 Fix bug in quiver argument handling. - EF + +2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF + +2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is + "tight", try to determine the tight bounding box. - JJL + +2009-01-16 Fix bug in is_string_like so it doesn't raise an + unnecessary exception. - EF + +2009-01-16 Fix an infinite recursion in the unit registry when searching + for a converter for a sequence of strings. Add a corresponding + test. - RM + +2009-01-16 Bugfix of C typedef of MPL_Int64 that was failing on + Windows XP 64 bit, as reported by George Goussard on numpy + mailing list. - ADS + +2009-01-16 Added helper function LinearSegmentedColormap.from_list to + facilitate building simple custom colomaps. See + examples/pylab_examples/custom_cmap_fromlist.py - JDH + +2009-01-16 Applied Michiel's patch for macosx backend to fix rounding + bug. Closed sf bug 2508440 - JSW + +2009-01-10 Applied Michiel's hatch patch for macosx backend and + draw_idle patch for qt. Closes sf patched 2497785 and + 2468809 - JDH + +2009-01-10 Fix bug in pan/zoom with log coordinates. - EF + +2009-01-06 Fix bug in setting of dashed negative contours. - EF + +2009-01-06 Be fault tolerant when len(linestyles)>NLev in contour. - MM + +2009-01-06 Added marginals kwarg to hexbin to plot marginal densities + JDH + +2009-01-06 Change user-visible multipage pdf object to PdfPages to + avoid accidents with the file-like PdfFile. - JKS + +2009-01-05 Fix a bug in pdf usetex: allow using non-embedded fonts. - JKS + +2009-01-05 optional use of preview.sty in usetex mode. - JJL + +2009-01-02 Allow multipage pdf files. - JKS + +2008-12-31 Improve pdf usetex by adding support for font effects + (slanting and extending). - JKS + +2008-12-29 Fix a bug in pdf usetex support, which occurred if the same + Type-1 font was used with different encodings, e.g., with + Minion Pro and MnSymbol. - JKS + +2008-12-20 fix the dpi-dependent offset of Shadow. - JJL + +2008-12-20 fix the hatch bug in the pdf backend. minor update + in docs and example - JJL + +2008-12-19 Add axes_locator attribute in Axes. Two examples are added. + - JJL + +2008-12-19 Update Axes.legend documnetation. /api/api_changes.rst is also + updated to describe chages in keyword parameters. + Issue a warning if old keyword parameters are used. - JJL + +2008-12-18 add new arrow style, a line + filled triangles. -JJL + +---------------- + +2008-12-18 Re-Released 0.98.5.2 from v0_98_5_maint at r6679 + Released 0.98.5.2 from v0_98_5_maint at r6667 + +2008-12-18 Removed configobj, experimental traits and doc/mpl_data link - JDH + +2008-12-18 Fix bug where a line with NULL data limits prevents + subsequent data limits from calculating correctly - MGD + +2008-12-17 Major documentation generator changes - MGD + +2008-12-17 Applied macosx backend patch with support for path + collections, quadmesh, etc... - JDH + +2008-12-17 fix dpi-dependent behavior of text bbox and arrow in annotate + -JJL + +2008-12-17 Add group id support in artist. Two examples which + demostrate svg filter are added. -JJL + +2008-12-16 Another attempt to fix dpi-dependent behavior of Legend. -JJL + +2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text. + +2008-12-16 Added markevery property to Line2D to support subsampling + of markers - JDH +2008-12-15 Removed mpl_data symlink in docs. On platforms that do not + support symlinks, these become copies, and the font files + are large, so the distro becomes unneccessarily bloaded. + Keeping the mpl_examples dir because relative links are + harder for the plot directive and the \*.py files are not so + large. - JDH + +2008-12-15 Fix \$ in non-math text with usetex off. Document + differences between usetex on/off - MGD + +2008-12-15 Fix anti-aliasing when auto-snapping - MGD + +2008-12-15 Fix grid lines not moving correctly during pan and zoom - MGD + +2008-12-12 Preparations to eliminate maskedarray rcParams key: its + use will now generate a warning. Similarly, importing + the obsolote numerix.npyma will generate a warning. - EF + +2008-12-12 Added support for the numpy.histogram() weights parameter + to the axes hist() method. Docs taken from numpy - MM + +2008-12-12 Fixed warning in hist() with numpy 1.2 - MM + +2008-12-12 Removed external packages: configobj and enthought.traits + which are only required by the experimental traited config + and are somewhat out of date. If needed, install them + independently, see: + + http://code.enthought.com/projects/traits + + and: + + http://www.voidspace.org.uk/python/configobj.html + +2008-12-12 Added support to asign labels to histograms of multiple + data. - MM + +------------------------- + +2008-12-11 Released 0.98.5 at svn r6573 + +2008-12-11 Use subprocess.Popen instead of os.popen in dviread + (Windows problem reported by Jorgen Stenarson) - JKS + +2008-12-10 Added Michael's font_manager fix and Jae-Joon's + figure/subplot fix. Bumped version number to 0.98.5 - JDH + +---------------------------- + +2008-12-09 Released 0.98.4 at svn r6536 + +2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH + +2008-12-08 Removed the prints in the set_*style commands. Return the + list of pprinted strings instead - JDH + +2008-12-08 Some of the changes Michael made to improve the output of + the property tables in the rest docs broke of made + difficult to use some of the interactive doc helpers, e.g., + setp and getp. Having all the rest markup in the ipython + shell also confused the docstrings. I added a new rc param + docstring.harcopy, to format the docstrings differently for + hardcopy and other use. Ther ArtistInspector could use a + little refactoring now since there is duplication of effort + between the rest out put and the non-rest output - JDH + +2008-12-08 Updated spectral methods (psd, csd, etc.) to scale one-sided + densities by a factor of 2 and, optionally, scale all densities + by the sampling frequency. This gives better MatLab + compatibility. -RM + +2008-12-08 Fixed alignment of ticks in colorbars. -MGD + +2008-12-07 drop the deprecated "new" keyword of np.histogram() for + numpy 1.2 or later. -JJL + +2008-12-06 Fixed a bug in svg backend that new_figure_manager() + ignores keywords arguments such as figsize, etc. -JJL + +2008-12-05 Fixed a bug that the handlelength of the new legend class + set too short when numpoints=1 -JJL + +2008-12-04 Added support for data with units (e.g., dates) to + Axes.fill_between. -RM + +2008-12-04 Added fancybox keyword to legend. Also applied some changes + for better look, including baseline adjustment of the + multiline texts so that it is center aligned. -JJL + +2008-12-02 The transmuter classes in the patches.py are reorganized as + subclasses of the Style classes. A few more box and arrow + styles are added. -JJL + +2008-12-02 Fixed a bug in the new legend class that didn't allowed + a tuple of coordinate vlaues as loc. -JJL + +2008-12-02 Improve checks for external dependencies, using subprocess + (instead of deprecated popen*) and distutils (for version + checking) - DSD + +2008-11-30 Reimplementation of the legend which supports baseline alignement, + multi-column, and expand mode. - JJL + +2008-12-01 Fixed histogram autoscaling bug when bins or range are given + explicitly (fixes Debian bug 503148) - MM + +2008-11-25 Added rcParam axes.unicode_minus which allows plain hypen + for minus when False - JDH + +2008-11-25 Added scatterpoints support in Legend. patch by Erik + Tollerud - JJL + +2008-11-24 Fix crash in log ticking. - MGD + +2008-11-20 Added static helper method BrokenHBarCollection.span_where + and Axes/pyplot method fill_between. See + examples/pylab/fill_between.py - JDH + +2008-11-12 Add x_isdata and y_isdata attributes to Artist instances, + and use them to determine whether either or both + coordinates are used when updating dataLim. This is + used to fix autoscaling problems that had been triggered + by axhline, axhspan, axvline, axvspan. - EF + +2008-11-11 Update the psd(), csd(), cohere(), and specgram() methods + of Axes and the csd() cohere(), and specgram() functions + in mlab to be in sync with the changes to psd(). + In fact, under the hood, these all call the same core + to do computations. - RM + +2008-11-11 Add 'pad_to' and 'sides' parameters to mlab.psd() to + allow controlling of zero padding and returning of + negative frequency components, respecitively. These are + added in a way that does not change the API. - RM + +2008-11-10 Fix handling of c kwarg by scatter; generalize + is_string_like to accept numpy and numpy.ma string + array scalars. - RM and EF + +2008-11-09 Fix a possible EINTR problem in dviread, which might help + when saving pdf files from the qt backend. - JKS + +2008-11-05 Fix bug with zoom to rectangle and twin axes - MGD + +2008-10-24 Added Jae Joon's fancy arrow, box and annotation + enhancements -- see + examples/pylab_examples/annotation_demo2.py + +2008-10-23 Autoscaling is now supported with shared axes - EF + +2008-10-23 Fixed exception in dviread that happened with Minion - JKS + +2008-10-21 set_xlim, ylim now return a copy of the viewlim array to + avoid modify inplace surprises + +2008-10-20 Added image thumbnail generating function + matplotlib.image.thumbnail. See + examples/misc/image_thumbnail.py - JDH + +2008-10-20 Applied scatleg patch based on ideas and work by Erik + Tollerud and Jae-Joon Lee. - MM + +2008-10-11 Fixed bug in pdf backend: if you pass a file object for + output instead of a filename, e.g., in a wep app, we now + flush the object at the end. - JKS + +2008-10-08 Add path simplification support to paths with gaps. - EF + +2008-10-05 Fix problem with AFM files that don't specify the font's + full name or family name. - JKS + +2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel_format() method, + for easy access to the set_powerlimits method of the + major ScalarFormatter. - EF + +2008-10-04 Experimental new kwarg borderpad to replace pad in legend, + based on suggestion by Jae-Joon Lee. - EF + +2008-09-27 Allow spy to ignore zero values in sparse arrays, based + on patch by Tony Yu. Also fixed plot to handle empty + data arrays, and fixed handling of markers in figlegend. - EF + +2008-09-24 Introduce drawstyles for lines. Transparently split linestyles + like 'steps--' into drawstyle 'steps' and linestyle '--'. + Legends always use drawstyle 'default'. - MM + +2008-09-18 Fixed quiver and quiverkey bugs (failure to scale properly + when resizing) and added additional methods for determining + the arrow angles - EF + +2008-09-18 Fix polar interpolation to handle negative values of theta - MGD + +2008-09-14 Reorganized cbook and mlab methods related to numerical + calculations that have little to do with the goals of those two + modules into a separate module numerical_methods.py + Also, added ability to select points and stop point selection + with keyboard in ginput and manual contour labeling code. + Finally, fixed contour labeling bug. - DMK + +2008-09-11 Fix backtick in Postscript output. - MGD + +2008-09-10 [ 2089958 ] Path simplification for vector output backends + Leverage the simplification code exposed through + path_to_polygons to simplify certain well-behaved paths in + the vector backends (PDF, PS and SVG). "path.simplify" + must be set to True in matplotlibrc for this to work. - + MGD + +2008-09-10 Add "filled" kwarg to Path.intersects_path and + Path.intersects_bbox. - MGD + +2008-09-07 Changed full arrows slightly to avoid an xpdf rendering + problem reported by Friedrich Hagedorn. - JKS + +2008-09-07 Fix conversion of quadratic to cubic Bezier curves in PDF + and PS backends. Patch by Jae-Joon Lee. - JKS + +2008-09-06 Added 5-point star marker to plot command - EF + +2008-09-05 Fix hatching in PS backend - MGD + +2008-09-03 Fix log with base 2 - MGD + +2008-09-01 Added support for bilinear interpolation in + NonUniformImage; patch by Gregory Lielens. - EF + +2008-08-28 Added support for multiple histograms with data of + different length - MM + +2008-08-28 Fix step plots with log scale - MGD + +2008-08-28 Fix masked arrays with markers in non-Agg backends - MGD + +2008-08-28 Fix clip_on kwarg so it actually works correctly - MGD + +2008-08-25 Fix locale problems in SVG backend - MGD + +2008-08-22 fix quiver so masked values are not plotted - JSW + +2008-08-18 improve interactive pan/zoom in qt4 backend on windows - DSD + +2008-08-11 Fix more bugs in NaN/inf handling. In particular, path simplification + (which does not handle NaNs or infs) will be turned off automatically + when infs or NaNs are present. Also masked arrays are now converted + to arrays with NaNs for consistent handling of masks and NaNs + - MGD and EF + +------------------------ + +2008-08-03 Released 0.98.3 at svn r5947 + +2008-08-01 Backported memory leak fixes in _ttconv.cpp - MGD + +2008-07-31 Added masked array support to griddata. - JSW + +2008-07-26 Added optional C and reduce_C_function arguments to + axes.hexbin(). This allows hexbin to accumulate the values + of C based on the x,y coordinates and display in hexagonal + bins. - ADS + +2008-07-24 Deprecated (raise NotImplementedError) all the mlab2 + functions from matplotlib.mlab out of concern that some of + them were not clean room implementations. JDH + +2008-07-24 Rewrite of a significant portion of the clabel code (class + ContourLabeler) to improve inlining. - DMK + +2008-07-22 Added Barbs polygon collection (similar to Quiver) for plotting + wind barbs. Added corresponding helpers to Axes and pyplot as + well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM + +2008-07-21 Added scikits.delaunay as matplotlib.delaunay. Added griddata + function in matplotlib.mlab, with example (griddata_demo.py) in + pylab_examples. griddata function will use mpl_toolkits._natgrid + if installed. - JSW + +2008-07-21 Re-introduced offset_copy that works in the context of the + new transforms. - MGD + +2008-07-21 Committed patch by Ryan May to add get_offsets and + set_offsets to Collections base class - EF + +2008-07-21 Changed the "asarray" strategy in image.py so that + colormapping of masked input should work for all + image types (thanks Klaus Zimmerman) - EF + +2008-07-20 Rewrote cbook.delete_masked_points and corresponding + unit test to support rgb color array inputs, datetime + inputs, etc. - EF + +2008-07-20 Renamed unit/axes_unit.py to cbook_unit.py and modified + in accord with Ryan's move of delete_masked_points from + axes to cbook. - EF + +2008-07-18 Check for nan and inf in axes.delete_masked_points(). + This should help hexbin and scatter deal with nans. - ADS + +2008-07-17 Added ability to manually select contour label locations. + Also added a waitforbuttonpress function. - DMK + +2008-07-17 Fix bug with NaNs at end of path (thanks, Andrew Straw for + the report) - MGD + +2008-07-16 Improve error handling in texmanager, thanks to Ian Henry + for reporting - DSD + +2008-07-12 Added support for external backends with the + "module://my_backend" syntax - JDH + +2008-07-11 Fix memory leak related to shared axes. Grouper should + store weak references. - MGD + +2008-07-10 Bugfix: crash displaying fontconfig pattern - MGD + +2008-07-10 Bugfix: [ 2013963 ] update_datalim_bounds in Axes not works - MGD + +2008-07-10 Bugfix: [ 2014183 ] multiple imshow() causes gray edges - MGD + +2008-07-09 Fix rectangular axes patch on polar plots bug - MGD + +2008-07-09 Improve mathtext radical rendering - MGD + +2008-07-08 Improve mathtext superscript placement - MGD + +2008-07-07 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD + +2008-07-03 Implemented findobj method for artist and pyplot - see + examples/pylab_examples/findobj_demo.py - JDH + +2008-06-30 Another attempt to fix TextWithDash - DSD + +2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to + have been unnecessary and caused a bug reported by P. + Raybaut - DSD + +2008-06-27 Fixed tick positioning bug - MM + +2008-06-27 Fix dashed text bug where text was at the wrong end of the + dash - MGD + +2008-06-26 Fix mathtext bug for expressions like $x_{\leftarrow}$ - MGD + +2008-06-26 Fix direction of horizontal/vertical hatches - MGD + +2008-06-25 Figure.figurePatch renamed Figure.patch, Axes.axesPatch + renamed Axes.patch, Axes.axesFrame renamed Axes.frame, + Axes.get_frame, which returns Axes.patch, is deprecated. + Examples and users guide updated - JDH + +2008-06-25 Fix rendering quality of pcolor - MGD + +---------------------------- + +2008-06-24 Released 0.98.2 at svn r5667 - (source only for debian) JDH + +2008-06-24 Added "transparent" kwarg to savefig. - MGD + +2008-06-24 Applied Stefan's patch to draw a single centered marker over + a line with numpoints==1 - JDH + +2008-06-23 Use splines to render circles in scatter plots - MGD + +---------------------------- + +2008-06-22 Released 0.98.1 at revision 5637 + +2008-06-22 Removed axes3d support and replaced it with a + NotImplementedError for one release cycle + +2008-06-21 fix marker placement bug in backend_ps - DSD + +2008-06-20 [ 1978629 ] scale documentation missing/incorrect for log - MGD + +2008-06-20 Added closed kwarg to PolyCollection. Fixes bug [ 1994535 + ] still missing lines on graph with svn (r 5548). - MGD + +2008-06-20 Added set/get_closed method to Polygon; fixes error + in hist - MM + +2008-06-19 Use relative font sizes (e.g., 'medium' and 'large') in + rcsetup.py and matplotlibrc.template so that text will + be scaled by default when changing rcParams['font.size'] - + EF + +2008-06-17 Add a generic PatchCollection class that can contain any + kind of patch. - MGD + +2008-06-13 Change pie chart label alignment to avoid having labels + overwrite the pie - MGD + +2008-06-12 Added some helper functions to the mathtext parser to + return bitmap arrays or write pngs to make it easier to use + mathtext outside the context of an mpl figure. modified + the mathpng sphinxext to use the mathtext png save + functionality - see examples/api/mathtext_asarray.py - JDH + +2008-06-11 Use matplotlib.mathtext to render math expressions in + online docs - MGD + +2008-06-11 Move PNG loading/saving to its own extension module, and + remove duplicate code in _backend_agg.cpp and _image.cpp + that does the same thing - MGD + +2008-06-11 Numerous mathtext bugfixes, primarily related to + dpi-independence - MGD + +2008-06-10 Bar now applies the label only to the first patch only, and + sets '_nolegend_' for the other patch labels. This lets + autolegend work as expected for hist and bar - see + https://sourceforge.net/tracker/index.php?func=detail&aid=1986597&group_id=80706&atid=560720 + JDH + +2008-06-10 Fix text baseline alignment bug. [ 1985420 ] Repair of + baseline alignment in Text._get_layout. Thanks Stan West - + MGD + +2008-06-09 Committed Gregor's image resample patch to downsampling + images with new rcparam image.resample - JDH + +2008-06-09 Don't install Enthought.Traits along with matplotlib. For + matplotlib developers convenience, it can still be + installed by setting an option in setup.cfg while we figure + decide if there is a future for the traited config - DSD + +2008-06-09 Added range keyword arg to hist() - MM + +2008-06-07 Moved list of backends to rcsetup.py; made use of lower + case for backend names consistent; use validate_backend + when importing backends subpackage - EF + +2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and + Olle Engdegard: make histtype='step' unfilled by default + and introduce histtype='stepfilled'; use default color + cycle; introduce reverse cumulative histogram; new align + keyword - MM + +2008-06-06 Fix closed polygon patch and also provide the option to + not close the polygon - MGD + +2008-06-05 Fix some dpi-changing-related problems with PolyCollection, + as called by Axes.scatter() - MGD + +2008-06-05 Fix image drawing so there is no extra space to the right + or bottom - MGD + +2006-06-04 Added a figure title command suptitle as a Figure method + and pyplot command -- see examples/figure_title.py - JDH + +2008-06-02 Added support for log to hist with histtype='step' and fixed + a bug for log-scale stacked histograms - MM + +----------------------------- + +2008-05-29 Released 0.98.0 at revision 5314 + +2008-05-29 matplotlib.image.imread now no longer always returns RGBA + -- 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. + +2008-05-29 Implement path clipping in PS backend - JDH + +2008-05-29 Fixed two bugs in texmanager.py: + improved comparison of dvipng versions + fixed a bug introduced when get_grey method was added + - DSD + +2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte + characters are used with Type 3 fonts - MGD + +2008-05-28 Allow keyword args to configure widget properties as + requested in + http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722 + - JDH + +2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in + http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720 + +2008-05-28 zero width/height Rectangles no longer influence the + autoscaler. Useful for log histograms with empty bins - + JDH + +2008-05-28 Fix rendering of composite glyphs in Type 3 conversion + (particularly as evidenced in the Eunjin.ttf Korean font) + Thanks Jae-Joon Lee for finding this! + +2008-05-27 Rewrote the cm.ScalarMappable callback infrastructure to + use cbook.CallbackRegistry rather than custom callback + handling. Amy users of add_observer/notify of the + cm.ScalarMappable should uae the + cm.ScalarMappable.callbacksSM CallbackRegistry instead. JDH + +2008-05-27 Fix TkAgg build on Ubuntu 8.04 (and hopefully a more + general solution for other platforms, too.) + +2008-05-24 Added PIL support for loading images to imread (if PIL is + available) - JDH + +2008-05-23 Provided a function and a method for controlling the + plot color cycle. - EF + +2008-05-23 Major revision of hist(). Can handle 2D arrays and create + stacked histogram plots; keyword 'width' deprecated and + rwidth (relative width) introduced; align='edge' changed + to center of bin - MM + +2008-05-22 Added support for ReST-based doumentation using Sphinx. + Documents are located in doc/, and are broken up into + a users guide and an API reference. To build, run the + make.py files. Sphinx-0.4 is needed to build generate xml, + which will be useful for rendering equations with mathml, + use sphinx from svn until 0.4 is released - DSD + +2008-05-21 Fix segfault in TkAgg backend - MGD + +2008-05-21 Fix a "local variable unreferenced" bug in plotfile - MM + +2008-05-19 Fix crash when Windows can not access the registry to + determine font path [Bug 1966974, thanks Patrik Simons] - MGD + +2008-05-16 removed some unneeded code w/ the python 2.4 requirement. + cbook no longer provides compatibility for reversed, + enumerate, set or izip. removed lib/subprocess, mpl1, + sandbox/units, and the swig code. This stuff should remain + on the maintenance branch for archival purposes. JDH + +2008-05-16 Reorganized examples dir - JDH + +2008-05-16 Added 'elinewidth' keyword arg to errorbar, based on patch + by Christopher Brown - MM + +2008-05-16 Added 'cumulative' keyword arg to hist to plot cumulative + histograms. For normed hists, this is normalized to one - MM + +2008-05-15 Fix Tk backend segfault on some machines - MGD + +2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD + +2008-05-09 Fix /singlequote (') in Postscript backend - MGD + +2008-05-08 Fix kerning in SVG when embedding character outlines - MGD + +2008-05-07 Switched to future numpy histogram semantic in hist - MM + +2008-05-06 Fix strange colors when blitting in QtAgg and Qt4Agg - MGD + +2008-05-05 pass notify_axes_change to the figure's add_axobserver + in the qt backends, like we do for the other backends. + Thanks Glenn Jones for the report - DSD + +2008-05-02 Added step histograms, based on patch by Erik Tollerud. - MM + +2008-05-02 On PyQt <= 3.14 there is no way to determine the underlying + Qt version. [1851364] - MGD + +2008-05-02 Don't call sys.exit() when pyemf is not found [1924199] - + MGD + +2008-05-02 Update _subprocess.c from upstream Python 2.5.2 to get a + few memory and reference-counting-related bugfixes. See + bug 1949978. - MGD + +2008-04-30 Added some record array editing widgets for gtk -- see + examples/rec_edit*.py - JDH + +2008-04-29 Fix bug in mlab.sqrtm - MM + +2008-04-28 Fix bug in SVG text with Mozilla-based viewers (the symbol + tag is not supported) - MGD + +2008-04-27 Applied patch by Michiel de Hoon to add hexbin + axes method and pyplot function - EF + +2008-04-25 Enforce python >= 2.4; remove subprocess build - EF + +2008-04-25 Enforce the numpy requirement at build time - JDH + +2008-04-24 Make numpy 1.1 and python 2.3 required when importing + matplotlib - EF + +2008-04-24 Fix compilation issues on VS2003 (Thanks Martin Spacek for + all the help) - MGD + +2008-04-24 Fix sub/superscripts when the size of the font has been + changed - MGD + +2008-04-22 Use "svg.embed_char_paths" consistently everywhere - MGD + +2008-04-20 Add support to MaxNLocator for symmetric axis autoscaling. - EF + +2008-04-20 Fix double-zoom bug. - MM + +2008-04-15 Speed up color mapping. - EF + +2008-04-12 Speed up zooming and panning of dense images. - EF + +2008-04-11 Fix global font rcParam setting after initialization + time. - MGD + +2008-04-11 Revert commits 5002 and 5031, which were intended to + avoid an unnecessary call to draw(). 5002 broke saving + figures before show(). 5031 fixed the problem created in + 5002, but broke interactive plotting. Unnecessary call to + draw still needs resolution - DSD + +2008-04-07 Improve color validation in rc handling, suggested + by Lev Givon - EF + +2008-04-02 Allow to use both linestyle definition arguments, '-' and + 'solid' etc. in plots/collections - MM + +2008-03-27 Fix saving to Unicode filenames with Agg backend + (other backends appear to already work...) + (Thanks, Christopher Barker) - MGD + +2008-03-26 Fix SVG backend bug that prevents copying and pasting in + Inkscape (thanks Kaushik Ghose) - MGD + +2008-03-24 Removed an unnecessary call to draw() in the backend_qt* + mouseReleaseEvent. Thanks to Ted Drain - DSD + +2008-03-23 Fix a pdf backend bug which sometimes caused the outermost + gsave to not be balanced with a grestore. - JKS + +2008-03-20 Fixed a minor bug in ContourSet._process_linestyles when + len(linestyles)==Nlev - MM + +2008-03-19 Changed ma import statements to "from numpy import ma"; + this should work with past and future versions of + numpy, whereas "import numpy.ma as ma" will work only + with numpy >= 1.05, and "import numerix.npyma as ma" + is obsolete now that maskedarray is replacing the + earlier implementation, as of numpy 1.05. + +2008-03-14 Removed an apparently unnecessary call to + FigureCanvasAgg.draw in backend_qt*agg. Thanks to Ted + Drain - DSD + +2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a + buffer width/bbox width mismatch in _backend_agg's + copy_from_bbox - DSD + +2008-02-29 Fix class Wx toolbar pan and zoom functions (Thanks Jeff + Peery) - MGD + +2008-02-16 Added some new rec array functionality to mlab + (rec_summarize, rec2txt and rec_groupby). See + examples/rec_groupby_demo.py. Thanks to Tim M for rec2txt. + +2008-02-12 Applied Erik Tollerud's span selector patch - JDH + +2008-02-11 Update plotting() doc string to refer to getp/setp. - JKS + +2008-02-10 Fixed a problem with square roots in the pdf backend with + usetex. - JKS + +2008-02-08 Fixed minor __str__ bugs so getp(gca()) works. - JKS + +2008-02-05 Added getters for title, xlabel, ylabel, as requested + by Brandon Kieth - EF + +2008-02-05 Applied Gael's ginput patch and created + examples/ginput_demo.py - JDH + +2008-02-03 Expose interpnames, a list of valid interpolation + methods, as an AxesImage class attribute. - EF + +2008-02-03 Added BoundaryNorm, with examples in colorbar_only.py + and image_masked.py. - EF + +2008-02-03 Force dpi=72 in pdf backend to fix picture size bug. - JKS + +2008-02-01 Fix doubly-included font problem in Postscript backend - MGD + +2008-02-01 Fix reference leak in ft2font Glyph objects. - MGD + +2008-01-31 Don't use unicode strings with usetex by default - DSD + +2008-01-31 Fix text spacing problems in PDF backend with *some* fonts, + such as STIXGeneral. + +2008-01-31 Fix \sqrt with radical number (broken by making [ and ] + work below) - MGD + +2008-01-27 Applied Martin Teichmann's patch to improve the Qt4 + backend. Uses Qt's builtin toolbars and statusbars. + See bug 1828848 - DSD + +2008-01-10 Moved toolkits to mpl_toolkits, made mpl_toolkits + a namespace package - JSWHIT + +2008-01-10 Use setup.cfg to set the default parameters (tkagg, + numpy) when building windows installers - DSD + +2008-01-10 Fix bug displaying [ and ] in mathtext - MGD + +2008-01-10 Fix bug when displaying a tick value offset with scientific + notation. (Manifests itself as a warning that the \times + symbol can not be found). - MGD + +2008-01-10 Use setup.cfg to set the default parameters (tkagg, + numpy) when building windows installers - DSD + +-------------------- + +2008-01-06 Released 0.91.2 at revision 4802 + +2007-12-26 Reduce too-late use of matplotlib.use() to a warning + instead of an exception, for backwards compatibility - EF + +2007-12-25 Fix bug in errorbar, identified by Noriko Minakawa - EF + +2007-12-25 Changed masked array importing to work with the upcoming + numpy 1.05 (now the maskedarray branch) as well as with + earlier versions. - EF + +2007-12-16 rec2csv saves doubles without losing precision. Also, it + does not close filehandles passed in open. - JDH,ADS + +2007-12-13 Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel + to matplotlib.toolkits.exceltools - JDH + +2007-12-12 Support alpha-blended text in the Agg and Svg backends - + MGD + +2007-12-10 Fix SVG text rendering bug. - MGD + +2007-12-10 Increase accuracy of circle and ellipse drawing by using an + 8-piece bezier approximation, rather than a 4-piece one. + Fix PDF, SVG and Cairo backends so they can draw paths + (meaning ellipses as well). - MGD + +2007-12-07 Issue a warning when drawing an image on a non-linear axis. - MGD + +2007-12-06 let widgets.Cursor initialize to the lower x and y bounds + rather than 0,0, which can cause havoc for dates and other + transforms - DSD + +2007-12-06 updated references to mpl data directories for py2exe - DSD + +2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD + +2007-12-05 Fix how fonts are cached to avoid loading the same one multiple times. + (This was a regression since 0.90 caused by the refactoring of + font_manager.py) - MGD + +2007-12-05 Support arbitrary rotation of usetex text in Agg backend. - MGD + +2007-12-04 Support '|' as a character in mathtext - MGD + +----------------------------------------------------- + +2007-11-27 Released 0.91.1 at revision 4517 + +----------------------------------------------------- + +2007-11-27 Released 0.91.0 at revision 4478 + +2007-11-13 All backends now support writing to a file-like object, not + just a regular file. savefig() can be passed a file-like + object in place of a file path. - MGD + +2007-11-13 Improved the default backend selection at build time: + SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable + backend in this progression will be chosen in the default + config file. If a backend is defined in setup.cfg, that will + be the default backend - DSD + +2007-11-13 Improved creation of default config files at build time for + traited config package - DSD + +2007-11-12 Exposed all the build options in setup.cfg. These options are + read into a dict called "options" by setupext.py. Also, added + "-mpl" tags to the version strings for packages provided by + matplotlib. Versions provided by mpl will be identified and + updated on subsequent installs - DSD + +2007-11-12 Added support for STIX fonts. A new rcParam, + mathtext.fontset, can be used to choose between: + + 'cm': + The TeX/LaTeX Computer Modern fonts + + 'stix': + The STIX fonts (see stixfonts.org) + + 'stixsans': + The STIX fonts, using sans-serif glyphs by default + + 'custom': + A generic Unicode font, in which case the mathtext font + must be specified using mathtext.bf, mathtext.it, + mathtext.sf etc. + + Added a new example, stix_fonts_demo.py to show how to access + different fonts and unusual symbols. + + - MGD + +2007-11-12 Options to disable building backend extension modules moved + from setup.py to setup.cfg - DSD + +2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in + paintEvent, which has to be destroyed using the method end(). If + matplotlib raises an exception before the call to end - and it + does if you feed it with bad data - this method end() is never + called and Qt4 will start spitting error messages + +2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use + system pyparsing, API is too variable from one release + to the next - DSD + +2007-11-08 Made pylab use straight numpy instead of oldnumeric + by default - EF + +2007-11-08 Added additional record array utilites to mlab (rec2excel, + rec2gtk, rec_join, rec_append_field, rec_drop_field) - JDH + +2007-11-08 Updated pytz to version 2007g - DSD + +2007-11-08 Updated pyparsing to version 1.4.8 - DSD + +2007-11-08 Moved csv2rec to recutils and added other record array + utilities - JDH + +2007-11-08 If available, use existing pyparsing installation - DSD + +2007-11-07 Removed old enthought.traits from lib/matplotlib, added + Gael Varoquaux's enthought.traits-2.6b1, which is stripped + of setuptools. The package is installed to site-packages + if not already available - DSD + +2007-11-05 Added easy access to minor tick properties; slight mod + of patch by Pierre G-M - EF + +2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg + backend and qt4 blitting demo - DSD + +2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg + backend and qt4 blitting demo - DSD + +2007-10-31 Made log color scale easier to use with contourf; + automatic level generation now works. - EF + +2007-10-29 TRANSFORMS REFACTORING + + The primary goal of this refactoring was to make it easier + to extend matplotlib to support new kinds of projections. + This is primarily an internal improvement, and the possible + user-visible changes it allows are yet to come. + + The transformation framework was completely rewritten in + Python (with Numpy). This will make it easier to add news + kinds of transformations without writing C/C++ code. + + Transforms are composed into a 'transform tree', made of + transforms whose value depends on other transforms (their + children). When the contents of children change, their + parents are automatically updated to reflect those changes. + To do this an "invalidation" method is used: when children + change, all of their ancestors are marked as "invalid". + When the value of a transform is accessed at a later time, + its value is recomputed only if it is invalid, otherwise a + cached value may be used. This prevents unnecessary + recomputations of transforms, and contributes to better + interactive performance. + + The framework can be used for both affine and non-affine + transformations. However, for speed, we want use the + backend renderers to perform affine transformations + whenever possible. Therefore, it is possible to perform + just the affine or non-affine part of a transformation on a + set of data. The affine is always assumed to occur after + the non-affine. For any transform: + + full transform == non-affine + affine + + Much of the drawing has been refactored in terms of + compound paths. Therefore, many methods have been removed + from the backend interface and replaced with a a handful to + draw compound paths. This will make updating the backends + easier, since there is less to update. It also should make + the backends more consistent in terms of functionality. + + User visible changes: + + - POLAR PLOTS: Polar plots are now interactively zoomable, + and the r-axis labels can be interactively rotated. + Straight line segments are now interpolated to follow the + curve of the r-axis. + + - Non-rectangular clipping works in more backends and with + more types of objects. + + - Sharing an axis across figures is now done in exactly + the same way as sharing an axis between two axes in the + same figure:: + + fig1 = figure() + fig2 = figure() + + ax1 = fig1.add_subplot(111) + ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1) + + - linestyles now include steps-pre, steps-post and + steps-mid. The old step still works and is equivalent to + step-pre. + + - Multiple line styles may be provided to a collection. + + See API_CHANGES for more low-level information about this + refactoring. + +2007-10-24 Added ax kwarg to Figure.colorbar and pyplot.colorbar - EF + +2007-10-19 Removed a gsave/grestore pair surrounding _draw_ps, which + was causing a loss graphics state info (see "EPS output + problem - scatter & edgecolors" on mpl-dev, 2007-10-29) + - DSD + +2007-10-15 Fixed a bug in patches.Ellipse that was broken for + aspect='auto'. Scale free ellipses now work properly for + equal and auto on Agg and PS, and they fall back on a + polygonal approximation for nonlinear transformations until + we convince oursleves that the spline approximation holds + for nonlinear transformations. Added + unit/ellipse_compare.py to compare spline with vertex + approx for both aspects. JDH + +2007-10-05 remove generator expressions from texmanager and mpltraits. + generator expressions are not supported by python-2.3 - DSD + +2007-10-01 Made matplotlib.use() raise an exception if called after + backends has been imported. - EF + +2007-09-30 Modified update* methods of Bbox and Interval so they + work with reversed axes. Prior to this, trying to + set the ticks on a reversed axis failed with an + uninformative error message. - EF + +2007-09-30 Applied patches to axes3d to fix index error problem - EF + +2007-09-24 Applied Eike Welk's patch reported on mpl-dev on 2007-09-22 + Fixes a bug with multiple plot windows in the qt backend, + ported the changes to backend_qt4 as well - DSD + +2007-09-21 Changed cbook.reversed to yield the same result as the + python reversed builtin - DSD + +2007-09-13 The usetex support in the pdf backend is more usable now, + so I am enabling it. - JKS + +2007-09-12 Fixed a Axes.bar unit bug - JDH + +2007-09-10 Made skiprows=1 the default on csv2rec - JDH + +2007-09-09 Split out the plotting part of pylab and put it in + pyplot.py; removed numerix from the remaining pylab.py, + which imports everything from pyplot.py. The intention + is that apart from cleanups, the result of importing + from pylab is nearly unchanged, but there is the + new alternative of importing from pyplot to get + the state-engine graphics without all the numeric + functions. + Numpified examples; deleted two that were obsolete; + modified some to use pyplot. - EF + +2007-09-08 Eliminated gd and paint backends - EF + +2007-09-06 .bmp file format is now longer an alias for .raw + +2007-09-07 Added clip path support to pdf backend. - JKS + +2007-09-06 Fixed a bug in the embedding of Type 1 fonts in PDF. + Now it doesn't crash Preview.app. - JKS + +2007-09-06 Refactored image saving code so that all GUI backends can + save most image types. See FILETYPES for a matrix of + backends and their supported file types. + Backend canvases should no longer write their own print_figure() + method -- instead they should write a print_xxx method for + each filetype they can output and add an entry to their + class-scoped filetypes dictionary. - MGD + +2007-09-05 Fixed Qt version reporting in setupext.py - DSD + +2007-09-04 Embedding Type 1 fonts in PDF, and thus usetex support + via dviread, sort of works. To test, enable it by + renaming _draw_tex to draw_tex. - JKS + +2007-09-03 Added ability of errorbar show limits via caret or + arrowhead ends on the bars; patch by Manual Metz. - EF + +2007-09-03 Created type1font.py, added features to AFM and FT2Font + (see API_CHANGES), started work on embedding Type 1 fonts + in pdf files. - JKS + +2007-09-02 Continued work on dviread.py. - JKS + +2007-08-16 Added a set_extent method to AxesImage, allow data extent + to be modified after initial call to imshow - DSD + +2007-08-14 Fixed a bug in pyqt4 subplots-adjust. Thanks to + Xavier Gnata for the report and suggested fix - DSD + +2007-08-13 Use pickle to cache entire fontManager; change to using + font_manager module-level function findfont wrapper for + the fontManager.findfont method - EF + +2007-08-11 Numpification and cleanup of mlab.py and some examples - EF + +2007-08-06 Removed mathtext2 + +2007-07-31 Refactoring of distutils scripts. + - Will not fail on the entire build if an optional Python + package (e.g., Tkinter) is installed but its development + headers are not (e.g., tk-devel). Instead, it will + continue to build all other extensions. + - Provide an overview at the top of the output to display + what dependencies and their versions were found, and (by + extension) what will be built. + - Use pkg-config, when available, to find freetype2, since + this was broken on Mac OS-X when using MacPorts in a non- + standard location. + +2007-07-30 Reorganized configuration code to work with traited config + objects. The new config system is located in the + matplotlib.config package, but it is disabled by default. + To enable it, set NEWCONFIG=True in matplotlib.__init__.py. + The new configuration system will still use the old + matplotlibrc files by default. To switch to the experimental, + traited configuration, set USE_TRAITED_CONFIG=True in + config.__init__.py. + +2007-07-29 Changed default pcolor shading to flat; added aliases + to make collection kwargs agree with setter names, so + updating works; related minor cleanups. + Removed quiver_classic, scatter_classic, pcolor_classic. - EF + +2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model. + + There is one (known) backward incompatible change. The + 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, + e.g., $\mathcal{R}$. + + Other new features include: + + - Math may be interspersed with non-math text. Any text + with an even number of $'s (non-escaped) will be sent to + the mathtext parser for layout. + + - Sub/superscripts are less likely to accidentally overlap. + + - Support for sub/superscripts in either order, e.g., $x^i_j$ + and $x_j^i$ are equivalent. + + - Double sub/superscripts (e.g., $x_i_j$) are considered + ambiguous and raise an exception. Use braces to disambiguate. + + - $\frac{x}{y}$ can be used for displaying fractions. + + - $\sqrt[3]{x}$ can be used to display the radical symbol + with a root number and body. + + - $\left(\frac{x}{y}\right)$ may be used to create + parentheses and other delimiters that automatically + resize to the height of their contents. + + - Spacing around operators etc. is now generally more like + TeX. + + - Added support (and fonts) for boldface (\bf) and + sans-serif (\sf) symbols. + + - Log-like function name shortcuts are supported. For + example, $\sin(x)$ may be used instead of ${\rm sin}(x)$ + + - Limited use of kerning for the easy case (same font) + + Behind the scenes, the pyparsing.py module used for doing + the math parsing was updated to the latest stable version + (1.4.6). A lot of duplicate code was refactored out of the + Font classes. + + - MGD + +2007-07-19 completed numpification of most trivial cases - NN + +2007-07-19 converted non-numpy relicts throughout the code - NN + +2007-07-19 replaced the Python code in numerix/ by a minimal wrapper around + numpy that explicitly mentions all symbols that need to be + addressed for further numpification - NN + +2007-07-18 make usetex respect changes to rcParams. texmanager used to + only configure itself when it was created, now it + reconfigures when rcParams are changed. Thank you Alexander + Schmolck for contributing a patch - DSD + +2007-07-17 added validation to setting and changing rcParams - DSD + +2007-07-17 bugfix segfault in transforms module. Thanks Ben North for + the patch. - ADS + +2007-07-16 clean up some code in ticker.ScalarFormatter, use unicode to + render multiplication sign in offset ticklabel - DSD + +2007-07-16 fixed a formatting bug in ticker.ScalarFormatter's scientific + notation (10^0 was being rendered as 10 in some cases) - DSD + +2007-07-13 Add MPL_isfinite64() and MPL_isinf64() for testing + doubles in (the now misnamed) MPL_isnan.h. - ADS + +2007-07-13 The matplotlib._isnan module removed (use numpy.isnan) - ADS + +2007-07-13 Some minor cleanups in _transforms.cpp - ADS + +2007-07-13 Removed the rest of the numerix extension code detritus, + numpified axes.py, and cleaned up the imports in axes.py + - JDH + +2007-07-13 Added legend.loc as configurable option that could in + future default to 'best'. - NN + +2007-07-12 Bugfixes in mlab.py to coerce inputs into numpy arrays. -ADS + +2007-07-11 Added linespacing kwarg to text.Text - EF + +2007-07-11 Added code to store font paths in SVG files. - MGD + +2007-07-10 Store subset of TTF font as a Type 3 font in PDF files. - MGD + +2007-07-09 Store subset of TTF font as a Type 3 font in PS files. - MGD + +2007-07-09 Applied Paul's pick restructure pick and add pickers, + sourceforge patch 1749829 - JDH + + +2007-07-09 Applied Allan's draw_lines agg optimization. JDH + + +2007-07-08 Applied Carl Worth's patch to fix cairo draw_arc - SC + +2007-07-07 fixed bug 1712099: xpdf distiller on windows - DSD + +2007-06-30 Applied patches to tkagg, gtk, and wx backends to reduce + memory leakage. Patches supplied by Mike Droettboom; + see tracker numbers 1745400, 1745406, 1745408. + Also made unit/memleak_gui.py more flexible with + command-line options. - EF + +2007-06-30 Split defaultParams into separate file rcdefaults (together with + validation code). Some heavy refactoring was necessary to do so, + but the overall behavior should be the same as before. - NN + +2007-06-27 Added MPLCONFIGDIR for the default location for mpl data + and configuration. useful for some apache installs where + HOME is not writable. Tried to clean up the logic in + _get_config_dir to support non-writable HOME where are + writable HOME/.matplotlib already exists - JDH + +2007-06-27 Fixed locale bug reported at + http://sourceforge.net/tracker/index.php?func=detail&aid=1744154&group_id=80706&atid=560720 + by adding a cbook.unicode_safe function - JDH + +2007-06-27 Applied Micheal's tk savefig bugfix described at + http://sourceforge.net/tracker/index.php?func=detail&aid=1716732&group_id=80706&atid=560720 + Thanks Michael! + + +2007-06-27 Patch for get_py2exe_datafiles() to work with new directory + layout. (Thanks Tocer and also Werner Bruhin.) -ADS + + +2007-06-27 Added a scroll event to the mpl event handling system and + implemented it for backends GTK* -- other backend + users/developers/maintainers, please add support for your + backend. - JDH + +2007-06-25 Changed default to clip=False in colors.Normalize; + modified ColorbarBase for easier colormap display - EF + +2007-06-13 Added maskedarray option to rc, numerix - EF + +2007-06-11 Python 2.5 compatibility fix for mlab.py - EF + +2007-06-10 In matplotlibrc file, use 'dashed' | 'solid' instead + of a pair of floats for contour.negative_linestyle - EF + +2007-06-08 Allow plot and fill fmt string to be any mpl string + colorspec - EF + +2007-06-08 Added gnuplot file plotfile function to pylab -- see + examples/plotfile_demo.py - JDH + +2007-06-07 Disable build of numarray and Numeric extensions for + internal MPL use and the numerix layer. - ADS + +2007-06-07 Added csv2rec to matplotlib.mlab to support automatically + converting csv files to record arrays using type + introspection, and turned on native datetime support using + the new units support in matplotlib.dates. See + examples/loadrec.py ! JDH + +2007-06-07 Simplified internal code of _auto_legend_data - NN + +2007-06-04 Added labeldistance arg to Axes.pie to control the raidal + distance of the wedge labels - JDH + +2007-06-03 Turned mathtext in SVG into single with multiple + objects (easier to edit in inkscape). - NN + +---------------------------- + +2007-06-02 Released 0.90.1 at revision 3352 + +2007-06-02 Display only meaningful labels when calling legend() + without args. - NN + +2007-06-02 Have errorbar follow the color cycle even if line is not plotted. + Suppress plotting of errorbar caps for capsize=0. - NN + +2007-06-02 Set markers to same alpha value as line. - NN + +2007-06-02 Fix mathtext position in svg backend. - NN + +2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to + Travis -- job well done. - ADS + +2007-05-18 Added LaTeX unicode support. Enable with the + 'text.latex.unicode' rcParam. This requires the ucs and + inputenc LaTeX packages. - ADS + +2007-04-23 Fixed some problems with polar -- added general polygon + clipping to clip the lines a nd grids to the polar axes. + Added support for set_rmax to easily change the maximum + radial grid. Added support for polar legend - JDH + +2007-04-16 Added Figure.autofmt_xdate to handle adjusting the bottom + and rotating the tick labels for date plots when the ticks + often overlap - JDH + +2007-04-09 Beginnings of usetex support for pdf backend. -JKS + +2007-04-07 Fixed legend/LineCollection bug. Added label support + to collections. - EF + +2007-04-06 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. - EF + +2007-04-06 Fixed rotation of ellipses in pdf backend + (sf bug #1690559) -JKS + +2007-04-04 More matshow tweaks; documentation updates; new method + set_bounds() for formatters and locators. - EF + +2007-04-02 Fixed problem with imshow and matshow of integer arrays; + fixed problems with changes to color autoscaling. - EF + +2007-04-01 Made image color autoscaling work correctly with + a tracking colorbar; norm.autoscale now scales + unconditionally, while norm.autoscale_None changes + only None-valued vmin, vmax. - EF + +2007-03-31 Added a qt-based subplot-adjustment dialog - DSD + +2007-03-30 Fixed a bug in backend_qt4, reported on mpl-dev - DSD + +2007-03-26 Removed colorbar_classic from figure.py; fixed bug in + Figure.clf() in which _axobservers was not getting + cleared. Modernization and cleanups. - EF + +2007-03-26 Refactored some of the units support -- units now live in + the respective x and y Axis instances. See also + API_CHANGES for some alterations to the conversion + interface. JDH + +2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric + and numarray support for masked arrays is broken in other + ways when using quiver. I didn't pursue that.) - ADS + +2007-03-23 Made font_manager.py close opened files. - JKS + +2007-03-22 Made imshow default extent match matshow - EF + +2007-03-22 Some more niceties for xcorr -- a maxlags option, normed + now works for xcorr as well as axorr, usevlines is + supported, and a zero correlation hline is added. See + examples/xcorr_demo.py. Thanks Sameer for the patch. - + JDH + +2007-03-21 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. + Modified Axes.errorbar which uses vlines and hlines. See + API_CHANGES; the return signature for these three functions + is now different + +2007-03-20 Refactored units support and added new examples - JDH + +2007-03-19 Added Mike's units patch - JDH + +2007-03-18 Matshow as an Axes method; test version matshow1() in + pylab; added 'integer' Boolean kwarg to MaxNLocator + initializer to force ticks at integer locations. - EF + +2007-03-17 Preliminary support for clipping to paths agg - JDH + +2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF + +2007-03-14 Add masked-array support to hist. - EF + +2007-03-03 Change barh to take a kwargs dict and pass it to bar. + Fixes sf bug #1669506. + +2007-03-02 Add rc parameter pdf.inheritcolor, which disables all + color-setting operations in the pdf backend. The idea is + that you include the resulting file in another program and + set the colors (both stroke and fill color) there, so you + can use the same pdf file for e.g., a paper and a + presentation and have them in the surrounding color. You + will probably not want to draw figure and axis frames in + that case, since they would be filled in the same color. - JKS + +2007-02-26 Prevent building _wxagg.so with broken Mac OS X wxPython. - ADS + +2007-02-23 Require setuptools for Python 2.3 - ADS + +2007-02-22 WXAgg accelerator updates - KM + WXAgg's C++ accelerator has been fixed to use the correct wxBitmap + constructor. + + The backend has been updated to use new wxPython functionality to + provide fast blit() animation without the C++ accelerator. This + requires wxPython 2.8 or later. Previous versions of wxPython can + use the C++ acclerator or the old pure Python routines. + + setup.py no longer builds the C++ accelerator when wxPython >= 2.8 + is present. + + The blit() method is now faster regardless of which agg/wxPython + conversion routines are used. + +2007-02-21 Applied the PDF backend patch by Nicolas Grilly. + This impacts several files and directories in matplotlib: + + - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts, + holding AFM files for the 14 PDF core fonts. These fonts are + embedded in every PDF viewing application. + + - setup.py: Added the directory pdfcorefonts to package_data. + + - lib/matplotlib/__init__.py: Added the default parameter + 'pdf.use14corefonts'. When True, the PDF backend uses + only the 14 PDF core fonts. + + - lib/matplotlib/afm.py: Added some keywords found in + recent AFM files. Added a little workaround to handle + Euro symbol. + + - lib/matplotlib/fontmanager.py: Added support for the 14 + PDF core fonts. These fonts have a dedicated cache (file + pdfcorefont.cache), not the same as for other AFM files + (file .afmfont.cache). Also cleaned comments to conform + to CODING_GUIDE. + + - lib/matplotlib/backends/backend_pdf.py: + Added support for 14 PDF core fonts. + Fixed some issues with incorrect character widths and + encodings (works only for the most common encoding, + WinAnsiEncoding, defined by the official PDF Reference). + Removed parameter 'dpi' because it causes alignment issues. + + -JKS (patch by Nicolas Grilly) + +2007-02-17 Changed ft2font.get_charmap, and updated all the files where + get_charmap is mentioned - ES + +2007-02-13 Added barcode demo- JDH + +2007-02-13 Added binary colormap to cm - JDH + +2007-02-13 Added twiny to pylab - JDH + +2007-02-12 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 - ADS + +2007-02-07 Committed Rob Hetland's patch for qt4: remove + references to text()/latin1(), plus some improvements + to the toolbar layout - DSD + +--------------------------- + +2007-02-06 Released 0.90.0 at revision 3003 + +2007-01-22 Extended the new picker API to text, patches and patch + collections. Added support for user customizable pick hit + testing and attribute tagging of the PickEvent - Details + and examples in examples/pick_event_demo.py - JDH + +2007-01-16 Begun work on a new pick API using the mpl event handling + frameowrk. Artists will define their own pick method with + a configurable epsilon tolerance and return pick attrs. + All artists that meet the tolerance threshold will fire a + PickEvent with artist dependent attrs; e.g., a Line2D can set + the indices attribute that shows the indices into the line + that are within epsilon of the pick point. See + examples/pick_event_demo.py. The implementation of pick + for the remaining Artists remains to be done, but the core + infrastructure at the level of event handling is in place + with a proof-of-concept implementation for Line2D - JDH + +2007-01-16 src/_image.cpp: update to use Py_ssize_t (for 64-bit systems). + Use return value of fread() to prevent warning messages - SC. + +2007-01-15 src/_image.cpp: combine buffer_argb32() and buffer_bgra32() into + a new method color_conv(format) - SC + +2007-01-14 backend_cairo.py: update draw_arc() so that + examples/arctest.py looks correct - SC + +2007-01-12 backend_cairo.py: enable clipping. Update draw_image() so that + examples/contour_demo.py looks correct - SC + +2007-01-12 backend_cairo.py: fix draw_image() so that examples/image_demo.py + now looks correct - SC + +2007-01-11 Added Axes.xcorr and Axes.acorr to plot the cross + correlation of x vs y or the autocorrelation of x. pylab + wrappers also provided. See examples/xcorr_demo.py - JDH + +2007-01-10 Added "Subplot.label_outer" method. It will set the + visibility of the ticklabels so that yticklabels are only + visible in the first column and xticklabels are only + visible in the last row - JDH + +2007-01-02 Added additional kwarg documentation - JDH + +2006-12-28 Improved error message for nonpositive input to log + transform; added log kwarg to bar, barh, and hist, + and modified bar method to behave sensibly by default + when the ordinate has a log scale. (This only works + if the log scale is set before or by the call to bar, + hence the utility of the log kwarg.) - EF + +2006-12-27 backend_cairo.py: update draw_image() and _draw_mathtext() to work + with numpy - SC + +2006-12-20 Fixed xpdf dependency check, which was failing on windows. + Removed ps2eps dependency check. - DSD + +2006-12-19 Added Tim Leslie's spectral patch - JDH + +2006-12-17 Added rc param 'axes.formatter.limits' to control + the default threshold for switching to scientific + notation. Added convenience method + Axes.ticklabel_format() for turning scientific notation + on or off on either or both axes. - EF + +2006-12-16 Added ability to turn control scientific notation + in ScalarFormatter - EF + +2006-12-16 Enhanced boxplot to handle more flexible inputs - EF + +2006-12-13 Replaced calls to where() in colors.py with much faster + clip() and putmask() calls; removed inappropriate + uses of getmaskorNone (which should be needed only + very rarely); all in response to profiling by + David Cournapeau. Also fixed bugs in my 2-D + array support from 12-09. - EF + +2006-12-09 Replaced spy and spy2 with the new spy that combines + marker and image capabilities - EF + +2006-12-09 Added support for plotting 2-D arrays with plot: + columns are plotted as in Matlab - EF + +2006-12-09 Added linewidth kwarg to bar and barh; fixed arg + checking bugs - EF + +2006-12-07 Made pcolormesh argument handling match pcolor; + fixed kwarg handling problem noted by Pierre GM - EF + +2006-12-06 Made pcolor support vector X and/or Y instead of + requiring 2-D arrays - EF + +2006-12-05 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 - JDH + +2006-12-03 Added LogNorm to colors.py as illustrated by + examples/pcolor_log.py, based on suggestion by + Jim McDonald. Colorbar modified to handle LogNorm. + Norms have additional "inverse" method. - EF + +2006-12-02 Changed class names in colors.py to match convention: + normalize -> Normalize, no_norm -> NoNorm. Old names + are still available. + Changed __init__.py rc defaults to match those in + matplotlibrc - EF + +2006-11-22 Fixed bug in set_*lim that I had introduced on 11-15 - EF + +2006-11-22 Added examples/clippedline.py, which shows how to clip line + data based on view limits -- it also changes the marker + style when zoomed in - JDH + +2006-11-21 Some spy bug-fixes and added precision arg per Robert C's + suggestion - JDH + +2006-11-19 Added semi-automatic docstring generation detailing all the + kwargs that functions take using the artist introspection + tools; e.g., 'help text now details the scatter kwargs + that control the Text properties - JDH + +2006-11-17 Removed obsolete scatter_classic, leaving a stub to + raise NotImplementedError; same for pcolor_classic - EF + +2006-11-15 Removed obsolete pcolor_classic - EF + +2006-11-15 Fixed 1588908 reported by Russel Owen; factored + nonsingular method out of ticker.py, put it into + transforms.py as a function, and used it in + set_xlim and set_ylim. - EF + +2006-11-14 Applied patch 1591716 by Ulf Larssen to fix a bug in + apply_aspect. Modified and applied patch + 1594894 by mdehoon to fix bugs and improve + formatting in lines.py. Applied patch 1573008 + by Greg Willden to make psd etc. plot full frequency + range for complex inputs. - EF + +2006-11-14 Improved the ability of the colorbar to track + changes in corresponding image, pcolor, or + contourf. - EF + +2006-11-11 Fixed bug that broke Numeric compatibility; + added support for alpha to colorbar. The + alpha information is taken from the mappable + object, not specified as a kwarg. - EF + +2006-11-05 Added broken_barh function for makring a sequence of + horizontal bars broken by gaps -- see examples/broken_barh.py + +2006-11-05 Removed lineprops and markerprops from the Annotation code + and replaced them with an arrow configurable with kwarg + arrowprops. See examples/annotation_demo.py - JDH + +2006-11-02 Fixed a pylab subplot bug that was causing axes to be + deleted with hspace or wspace equals zero in + subplots_adjust - JDH + +2006-10-31 Applied axes3d patch 1587359 + http://sourceforge.net/tracker/index.php?func=detail&aid=1587359&group_id=80706&atid=560722 + JDH + +------------------------- + +2006-10-26 Released 0.87.7 at revision 2835 + +2006-10-25 Made "tiny" kwarg in Locator.nonsingular much smaller - EF + +2006-10-17 Closed sf bug 1562496 update line props dash/solid/cap/join + styles - JDH + +2006-10-17 Complete overhaul of the annotations API and example code - + See matplotlib.text.Annotation and + examples/annotation_demo.py JDH + +2006-10-12 Committed Manuel Metz's StarPolygon code and + examples/scatter_star_poly.py - JDH + + +2006-10-11 commented out all default values in matplotlibrc.template + Default values should generally be taken from defaultParam in + __init__.py - the file matplotlib should only contain those values + that the user wants to explicitly change from the default. + (see thread "marker color handling" on matplotlib-devel) + +2006-10-10 Changed default comment character for load to '#' - JDH + +2006-10-10 deactivated rcfile-configurability of markerfacecolor + and markeredgecolor. Both are now hardcoded to the special value + 'auto' to follow the line color. Configurability at run-time + (using function arguments) remains functional. - NN + +2006-10-07 introduced dummy argument magnification=1.0 to + FigImage.make_image to satisfy unit test figimage_demo.py + The argument is not yet handled correctly, which should only + show up when using non-standard DPI settings in PS backend, + introduced by patch #1562394. - NN + +2006-10-06 add backend-agnostic example: simple3d.py - NN + +2006-09-29 fix line-breaking for SVG-inline images (purely cosmetic) - NN + +2006-09-29 reworked set_linestyle and set_marker + markeredgecolor and markerfacecolor now default to + a special value "auto" that keeps the color in sync with + the line color + further, the intelligence of axes.plot is cleaned up, + improved and simplified. Complete compatibility cannot be + guaranteed, but the new behavior should be much more predictable + (see patch #1104615 for details) - NN + +2006-09-29 changed implementation of clip-path in SVG to work around a + limitation in inkscape - NN + +2006-09-29 added two options to matplotlibrc: + svg.image_inline + svg.image_noscale + see patch #1533010 for details - NN + +2006-09-29 axes.py: cleaned up kwargs checking - NN + +2006-09-29 setup.py: cleaned up setup logic - NN + +2006-09-29 setup.py: check for required pygtk versions, fixes bug #1460783 - SC + +--------------------------------- + +2006-09-27 Released 0.87.6 at revision 2783 + +2006-09-24 Added line pointers to the Annotation code, and a pylab + interface. See matplotlib.text.Annotation, + examples/annotation_demo.py and + examples/annotation_demo_pylab.py - JDH + +2006-09-18 mathtext2.py: The SVG backend now supports the same things that + the AGG backend does. Fixed some bugs with rendering, and out of + bounds errors in the AGG backend - ES. Changed the return values + of math_parse_s_ft2font_svg to support lines (fractions etc.) + +2006-09-17 Added an Annotation class to facilitate annotating objects + and an examples file examples/annotation_demo.py. I want + to add dash support as in TextWithDash, but haven't decided + yet whether inheriting from TextWithDash is the right base + class or if another approach is needed - JDH + +------------------------------ + +2006-09-05 Released 0.87.5 at revision 2761 + +2006-09-04 Added nxutils for some numeric add-on extension code -- + specifically a better/more efficient inside polygon tester (see + unit/inside_poly_*.py) - JDH + +2006-09-04 Made bitstream fonts the rc default - JDH + +2006-08-31 Fixed alpha-handling bug in ColorConverter, affecting + collections in general and contour/contourf in + particular. - EF + +2006-08-30 ft2font.cpp: Added draw_rect_filled method (now used by mathtext2 + to draw the fraction bar) to FT2Font - ES + +2006-08-29 setupext.py: wrap calls to tk.getvar() with str(). On some + systems, getvar returns a Tcl_Obj instead of a string - DSD + +2006-08-28 mathtext2.py: Sub/superscripts can now be complex (i.e. + fractions etc.). The demo is also updated - ES + +2006-08-28 font_manager.py: Added /usr/local/share/fonts to list of + X11 font directories - DSD + +2006-08-28 mahtext2.py: Initial support for complex fractions. Also, + rendering is now completely separated from parsing. The + sub/superscripts now work better. + Updated the mathtext2_demo.py - ES + +2006-08-27 qt backends: don't create a QApplication when backend is + imported, do it when the FigureCanvasQt is created. Simplifies + applications where mpl is embedded in qt. Updated + embedding_in_qt* examples - DSD + +2006-08-27 mahtext2.py: Now the fonts are searched in the OS font dir and + in the mpl-data dir. Also env is not a dict anymore. - ES + +2006-08-26 minor changes to __init__.py, mathtex2_demo.py. Added matplotlibrc + key "mathtext.mathtext2" (removed the key "mathtext2") - ES + +2006-08-21 mathtext2.py: Initial support for fractions + Updated the mathtext2_demo.py + _mathtext_data.py: removed "\" from the unicode dicts + mathtext.py: Minor modification (because of _mathtext_data.py)- ES + +2006-08-20 Added mathtext2.py: Replacement for mathtext.py. Supports _ ^, + \rm, \cal etc., \sin, \cos etc., unicode, recursive nestings, + inline math mode. The only backend currently supported is Agg + __init__.py: added new rc params for mathtext2 + added mathtext2_demo.py example - ES + +2006-08-19 Added embedding_in_qt4.py example - DSD + +2006-08-11 Added scale free Ellipse patch for Agg - CM + +2006-08-10 Added converters to and from julian dates to matplotlib.dates + (num2julian and julian2num) - JDH + +2006-08-08 Fixed widget locking so multiple widgets could share the + event handling - JDH + +2006-08-07 Added scale free Ellipse patch to SVG and PS - CM + +2006-08-05 Re-organized imports in numerix for numpy 1.0b2 -- TEO + +2006-08-04 Added draw_markers to PDF backend. - JKS + +2006-08-01 Fixed a bug in postscript's rendering of dashed lines - DSD + +2006-08-01 figure.py: savefig() update docstring to add support for 'format' + argument. + backend_cairo.py: print_figure() add support 'format' argument. - SC + +2006-07-31 Don't let postscript's xpdf distiller compress images - DSD + +2006-07-31 Added shallowcopy() methods to all Transformations; + removed copy_bbox_transform and copy_bbox_transform_shallow + from transforms.py; + added offset_copy() function to transforms.py to + facilitate positioning artists with offsets. + See examples/transoffset.py. - EF + +2006-07-31 Don't let postscript's xpdf distiller compress images - DSD + +2006-07-29 Fixed numerix polygon bug reported by Nick Fotopoulos. + Added inverse_numerix_xy() transform method. + Made autoscale_view() preserve axis direction + (e.g., increasing down).- EF + +2006-07-28 Added shallow bbox copy routine for transforms -- mainly + useful for copying transforms to apply offset to. - JDH + +2006-07-28 Added resize method to FigureManager class + for Qt and Gtk backend - CM + +2006-07-28 Added subplots_adjust button to Qt backend - CM + +2006-07-26 Use numerix more in collections. + Quiver now handles masked arrays. - EF + +2006-07-22 Fixed bug #1209354 - DSD + +2006-07-22 make scatter() work with the kwarg "color". Closes bug + 1285750 - DSD + +2006-07-20 backend_cairo.py: require pycairo 1.2.0. + print_figure() update to output SVG using cairo. + +2006-07-19 Added blitting for Qt4Agg - CM + +2006-07-19 Added lasso widget and example examples/lasso_demo.py - JDH + +2006-07-18 Added blitting for QtAgg backend - CM + +2006-07-17 Fixed bug #1523585: skip nans in semilog plots - DSD + +2006-07-12 Add support to render the scientific notation label + over the right-side y-axis - DSD + +------------------------------ + +2006-07-11 Released 0.87.4 at revision 2558 + +2006-07-07 Fixed a usetex bug with older versions of latex - DSD + +2006-07-07 Add compatibility for NumPy 1.0 - TEO + +2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD + +2006-06-26 Fixed a usetex bug. On windows, usetex will prcess + postscript output in the current directory rather than + in a temp directory. This is due to the use of spaces + and tildes in windows paths, which cause problems with + latex. The subprocess module is no longer used. - DSD + +2006-06-22 Various changes to bar(), barh(), and hist(). + Added 'edgecolor' keyword arg to bar() and barh(). + The x and y args in barh() have been renamed to width + and bottom respectively, and their order has been swapped + to maintain a (position, value) order ala matlab. left, + height, width and bottom args can now all be scalars or + sequences. barh() now defaults to edge alignment instead + of center alignment. Added a keyword arg 'align' to bar(), + barh() and hist() that controls between edge or center bar + alignment. Fixed ignoring the rcParams['patch.facecolor'] + for bar color in bar() and barh(). Fixed ignoring the + rcParams['lines.color'] for error bar color in bar() + and barh(). Fixed a bug where patches would be cleared + when error bars were plotted if rcParams['axes.hold'] + was False. - MAS + +2006-06-22 Added support for numerix 2-D arrays as alternatives to + a sequence of (x,y) tuples for specifying paths in + collections, quiver, contour, pcolor, transforms. + Fixed contour bug involving setting limits for + color mapping. Added numpy-style all() to numerix. - EF + +2006-06-20 Added custom FigureClass hook to pylab interface - see + examples/custom_figure_class.py + +2006-06-16 Added colormaps from gist (gist_earth, gist_stern, + gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW + +2006-06-16 Added a pointer to parent in figure canvas so you can + access the container with fig.canvas.manager. Useful if + you want to set the window title, e.g., in gtk + fig.canvas.manager.window.set_title, though a GUI neutral + method would be preferable JDH + +2006-06-16 Fixed colorbar.py to handle indexed colors (i.e., + norm = no_norm()) by centering each colored region + on its index. - EF + +2006-06-15 Added scalex and scaley to Axes.autoscale_view to support + selective autoscaling just the x or y axis, and supported + these command in plot so you can say plot(something, + scaley=False) and just the x axis will be autoscaled. + Modified axvline and axhline to support this, so for + example axvline will no longer autoscale the y axis. JDH + +2006-06-13 Fix so numpy updates are backward compatible - TEO + +2006-06-12 Updated numerix to handle numpy restructuring of + oldnumeric - TEO + +2006-06-12 Updated numerix.fft to handle numpy restructuring + Added ImportError to numerix.linear_algebra for numpy -TEO + +2006-06-11 Added quiverkey command to pylab and Axes, using + QuiverKey class in quiver.py. Changed pylab and Axes + to use quiver2 if possible, but drop back to the + newly-renamed quiver_classic if necessary. Modified + examples/quiver_demo.py to illustrate the new quiver + and quiverkey. Changed LineCollection implementation + slightly to improve compatibility with PolyCollection. - EF + +2006-06-11 Fixed a usetex bug for windows, running latex on files + with spaces in their names or paths was failing - DSD + +2006-06-09 Made additions to numerix, changes to quiver to make it + work with all numeric flavors. - EF + +2006-06-09 Added quiver2 function to pylab and method to axes, + with implementation via a Quiver class in quiver.py. + quiver2 will replace quiver before the next release; + it is placed alongside it initially to facilitate + testing and transition. See also + examples/quiver2_demo.py. - EF + +2006-06-08 Minor bug fix to make ticker.py draw proper minus signs + with usetex - DSD + +----------------------- + +2006-06-06 Released 0.87.3 at revision 2432 + +2006-05-30 More partial support for polygons with outline or fill, + but not both. Made LineCollection inherit from + ScalarMappable. - EF + +2006-05-29 Yet another revision of aspect-ratio handling. - EF + +2006-05-27 Committed a patch to prevent stroking zero-width lines in + the svg backend - DSD + +2006-05-24 Fixed colorbar positioning bug identified by Helge + Avlesen, and improved the algorithm; added a 'pad' + kwarg to control the spacing between colorbar and + parent axes. - EF + +2006-05-23 Changed color handling so that collection initializers + can take any mpl color arg or sequence of args; deprecated + float as grayscale, replaced by string representation of + float. - EF + +2006-05-19 Fixed bug: plot failed if all points were masked - EF + +2006-05-19 Added custom symbol option to scatter - JDH + +2006-05-18 New example, multi_image.py; colorbar fixed to show + offset text when the ScalarFormatter is used; FixedFormatter + augmented to accept and display offset text. - EF + +2006-05-14 New colorbar; old one is renamed to colorbar_classic. + New colorbar code is in colorbar.py, with wrappers in + figure.py and pylab.py. + Fixed aspect-handling bug reported by Michael Mossey. + Made backend_bases.draw_quad_mesh() run.- EF + +2006-05-08 Changed handling of end ranges in contourf: replaced + "clip-ends" kwarg with "extend". See docstring for + details. -EF + +2006-05-08 Added axisbelow to rc - JDH + +2006-05-08 If using PyGTK require version 2.2+ - SC + +2006-04-19 Added compression support to PDF backend, controlled by + new pdf.compression rc setting. - JKS + +2006-04-19 Added Jouni's PDF backend + +2006-04-18 Fixed a bug that caused agg to not render long lines + +2006-04-16 Masked array support for pcolormesh; made pcolormesh support the + same combinations of X,Y,C dimensions as pcolor does; + improved (I hope) description of grid used in pcolor, + pcolormesh. - EF + +2006-04-14 Reorganized axes.py - EF + +2006-04-13 Fixed a bug Ryan found using usetex with sans-serif fonts and + exponential tick labels - DSD + +2006-04-11 Refactored backend_ps and backend_agg to prevent module-level + texmanager imports. Now these imports only occur if text.usetex + rc setting is true - DSD + +2006-04-10 Committed changes required for building mpl on win32 + platforms with visual studio. This allows wxpython + blitting for fast animations. - CM + +2006-04-10 Fixed an off-by-one bug in Axes.change_geometry. + +2006-04-10 Fixed bug in pie charts where wedge wouldn't have label in + legend. Submitted by Simon Hildebrandt. - ADS + +2006-05-06 Usetex makes temporary latex and dvi files in a temporary + directory, rather than in the user's current working + directory - DSD + +2006-04-05 Apllied Ken's wx deprecation warning patch closing sf patch + #1465371 - JDH + +2006-04-05 Added support for the new API in the postscript backend. + Allows values to be masked using nan's, and faster file + creation - DSD + +2006-04-05 Use python's subprocess module for usetex calls to + external programs. subprocess catches when they exit + abnormally so an error can be raised. - DSD + +2006-04-03 Fixed the bug in which widgets would not respond to + events. This regressed the twinx functionality, so I + also updated subplots_adjust to update axes that share + an x or y with a subplot instance. - CM + +2006-04-02 Moved PBox class to transforms and deleted pbox.py; + made pylab axis command a thin wrapper for Axes.axis; + more tweaks to aspect-ratio handling; fixed Axes.specgram + to account for the new imshow default of unit aspect + ratio; made contour set the Axes.dataLim. - EF + +2006-03-31 Fixed the Qt "Underlying C/C++ object deleted" bug. - JRE + +2006-03-31 Applied Vasily Sulatskov's Qt Navigation Toolbar enhancement. - JRE + +2006-03-31 Ported Norbert's rewriting of Halldor's stineman_interp + algorithm to make it numerix compatible and added code to + matplotlib.mlab. See examples/interp_demo.py - JDH + +2006-03-30 Fixed a bug in aspect ratio handling; blocked potential + crashes when panning with button 3; added axis('image') + support. - EF + +2006-03-28 More changes to aspect ratio handling; new PBox class + in new file pbox.py to facilitate resizing and repositioning + axes; made PolarAxes maintain unit aspect ratio. - EF + +2006-03-23 Refactored TextWithDash class to inherit from, rather than + delegate to, the Text class. Improves object inspection + and closes bug # 1357969 - DSD + +2006-03-22 Improved aspect ratio handling, including pylab interface. + Interactive resizing, pan, zoom of images and plots + (including panels with a shared axis) should work. + Additions and possible refactoring are still likely. - EF + +2006-03-21 Added another colorbrewer colormap (RdYlBu) - JSWHIT + +2006-03-21 Fixed tickmarks for logscale plots over very large ranges. + Closes bug # 1232920 - DSD + +2006-03-21 Added Rob Knight's arrow code; see examples/arrow_demo.py - JDH + +2006-03-20 Added support for masking values with nan's, using ADS's + isnan module and the new API. Works for \*Agg backends - DSD + +2006-03-20 Added contour.negative_linestyle rcParam - ADS + +2006-03-20 Added _isnan extension module to test for nan with Numeric + - ADS + +2006-03-17 Added Paul and Alex's support for faceting with quadmesh + in sf patch 1411223 - JDH + +2006-03-17 Added Charle Twardy's pie patch to support colors=None. + Closes sf patch 1387861 - JDH + +2006-03-17 Applied sophana's patch to support overlapping axes with + toolbar navigation by toggling activation with the 'a' key. + Closes sf patch 1432252 - JDH + +2006-03-17 Applied Aarre's linestyle patch for backend EMF; closes sf + patch 1449279 - JDH + +2006-03-17 Applied Jordan Dawe's patch to support kwarg properties + for grid lines in the grid command. Closes sf patch + 1451661 - JDH + +2006-03-17 Center postscript output on page when using usetex - DSD + +2006-03-17 subprocess module built if Python <2.4 even if subprocess + can be imported from an egg - ADS + +2006-03-17 Added _subprocess.c from Python upstream and hopefully + enabled building (without breaking) on Windows, although + not tested. - ADS + +2006-03-17 Updated subprocess.py to latest Python upstream and + reverted name back to subprocess.py - ADS + +2006-03-16 Added John Porter's 3D handling code + + +------------------------ + +2006-03-16 Released 0.87.2 at revision 2150 + +2006-03-15 Fixed bug in MaxNLocator revealed by daigos@infinito.it. + The main change is that Locator.nonsingular now adjusts + vmin and vmax if they are nearly the same, not just if + they are equal. A new kwarg, "tiny", sets the threshold. - + EF + +2006-03-14 Added import of compatibility library for newer numpy + linear_algebra - TEO + +2006-03-12 Extended "load" function to support individual columns and + moved "load" and "save" into matplotlib.mlab so they can be + used outside of pylab -- see examples/load_converter.py - + JDH + +2006-03-12 Added AutoDateFormatter and AutoDateLocator submitted + by James Evans. Try the load_converter.py example for a + demo. - ADS + +2006-03-11 Added subprocess module from python-2.4 - DSD + +2006-03-11 Fixed landscape orientation support with the usetex + option. The backend_ps print_figure method was + getting complicated, I added a _print_figure_tex + method to maintain some degree of sanity - DSD + +2006-03-11 Added "papertype" savefig kwarg for setting + postscript papersizes. papertype and ps.papersize + rc setting can also be set to "auto" to autoscale + pagesizes - DSD + +2006-03-09 Apply P-J's patch to make pstoeps work on windows + patch report # 1445612 - DSD + +2006-03-09 Make backend rc parameter case-insensitive - DSD + +2006-03-07 Fixed bug in backend_ps related to C0-C6 papersizes, + which were causing problems with postscript viewers. + Supported page sizes include letter, legal, ledger, + A0-A10, and B0-B10 - DSD + +------------------------------------ + +2006-03-07 Released 0.87.1 + +2006-03-04 backend_cairo.py: + fix get_rgb() bug reported by Keith Briggs. + Require pycairo 1.0.2. + Support saving png to file-like objects. - SC + +2006-03-03 Fixed pcolor handling of vmin, vmax - EF + +2006-03-02 improve page sizing with usetex with the latex + geometry package. Closes bug # 1441629 - DSD + +2006-03-02 Fixed dpi problem with usetex png output. Accepted a + modified version of patch # 1441809 - DSD + +2006-03-01 Fixed axis('scaled') to deal with case xmax < xmin - JSWHIT + +2006-03-01 Added reversed colormaps (with '_r' appended to name) - JSWHIT + +2006-02-27 Improved eps bounding boxes with usetex - DSD + +2006-02-27 Test svn commit, again! + +2006-02-27 Fixed two dependency checking bugs related to usetex + on Windows - DSD + +2006-02-27 Made the rc deprecation warnings a little more human + readable. + +2006-02-26 Update the previous gtk.main_quit() bug fix to use gtk.main_level() + - SC + +2006-02-24 Implemented alpha support in contour and contourf - EF + +2006-02-22 Fixed gtk main quit bug when quit was called before + mainloop. - JDH + +2006-02-22 Small change to colors.py to workaround apparent + bug in numpy masked array module - JSWHIT + +2006-02-22 Fixed bug in ScalarMappable.to_rgba() reported by + Ray Jones, and fixed incorrect fix found by Jeff + Whitaker - EF + +-------------------------------- + +2006-02-22 Released 0.87 + +2006-02-21 Fixed portrait/landscape orientation in postscript backend - DSD + +2006-02-21 Fix bug introduced in yesterday's bug fix - SC + +2006-02-20 backend_gtk.py FigureCanvasGTK.draw(): fix bug reported by + David Tremouilles - SC + +2006-02-20 Remove the "pygtk.require('2.4')" error from + examples/embedding_in_gtk2.py - SC + +2006-02-18 backend_gtk.py FigureCanvasGTK.draw(): simplify to use (rather than + duplicate) the expose_event() drawing code - SC + +2006-02-12 Added stagger or waterfall plot capability to LineCollection; + illustrated in examples/collections.py. - EF + +2006-02-11 Massive cleanup of the usetex code in the postscript backend. Possibly + fixed the clipping issue users were reporting with older versions of + ghostscript - DSD + +2006-02-11 Added autolim kwarg to axes.add_collection. Changed + collection get_verts() methods accordingly. - EF + +2006-02-09 added a temporary rc parameter text.dvipnghack, to allow Mac users to get nice + results with the usetex option. - DSD + +2006-02-09 Fixed a bug related to setting font sizes with the usetex option. - DSD + +2006-02-09 Fixed a bug related to usetex's latex code. - DSD + +2006-02-09 Modified behavior of font.size rc setting. You should define font.size in pts, + which will set the "medium" or default fontsize. Special text sizes like axis + labels or tick labels can be given relative font sizes like small, large, + x-large, etc. and will scale accordingly. - DSD + +2006-02-08 Added py2exe specific datapath check again. Also added new + py2exe helper function get_py2exe_datafiles for use in py2exe + setup.py scripts. - CM + +2006-02-02 Added box function to pylab + +2006-02-02 Fixed a problem in setupext.py, tk library formatted in unicode + caused build problems - DSD + +2006-02-01 Dropped TeX engine support in usetex to focus on LaTeX. - DSD + +2006-01-29 Improved usetex option to respect the serif, sans-serif, monospace, + and cursive rc settings. Removed the font.latex.package rc setting, + it is no longer required - DSD + +2006-01-29 Fixed tex's caching to include font.family rc information - DSD + +2006-01-29 Fixed subpixel rendering bug in \*Agg that was causing + uneven gridlines - JDH + +2006-01-28 Added fontcmd to backend_ps's RendererPS.draw_tex, to support other + font families in eps output - DSD + +2006-01-28 Added MaxNLocator to ticker.py, and changed contour.py to + use it by default. - EF + +2006-01-28 Added fontcmd to backend_ps's RendererPS.draw_tex, to support other + font families in eps output - DSD + +2006-01-27 Buffered reading of matplotlibrc parameters in order to allow + 'verbose' settings to be processed first (allows verbose.report + during rc validation process) - DSD + +2006-01-27 Removed setuptools support from setup.py and created a + separate setupegg.py file to replace it. - CM + +2006-01-26 Replaced the ugly datapath logic with a cleaner approach from + http://wiki.python.org/moin/DistutilsInstallDataScattered. + Overrides the install_data command. - CM + +2006-01-24 Don't use character typecodes in cntr.c --- changed to use + defined typenumbers instead. - TEO + +2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency + +2006-01-24 Added masked array support to scatter - EF + +2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency + checking - DSD + +------------------------------- + +2006-01-24 Released 0.86.2 + +2006-01-20 Added a converters dict to pylab load to convert selected + coloumns to float -- especially useful for files with date + strings, uses a datestr2num converter - JDH + +2006-01-20 Added datestr2num to matplotlib dates to convert a string + or sequence of strings to a matplotlib datenum + +2006-01-18 Added quadrilateral pcolormesh patch 1409190 by Alex Mont + and Paul Kienzle -- this is \*Agg only for now. See + examples/quadmesh_demo.py - JDH + +2006-01-18 Added Jouni's boxplot patch - JDH + +2006-01-18 Added comma delimiter for pylab save - JDH + +2006-01-12 Added Ryan's legend patch - JDH + + +2006-1-12 Fixed numpy / numeric to use .dtype.char to keep in SYNC with numpy SVN + +--------------------------- + +2006-1-11 Released 0.86.1 + +2006-1-11 Fixed setup.py for win32 build and added rc template to the MANIFEST.in + +2006-1-10 Added xpdf distiller option. matplotlibrc ps.usedistiller can now be + none, false, ghostscript, or xpdf. Validation checks for + dependencies. This needs testing, but the xpdf option should produce + the highest-quality output and small file sizes - DSD + +2006-01-10 For the usetex option, backend_ps now does all the LaTeX work in the + os's temp directory - DSD + +2006-1-10 Added checks for usetex dependencies. - DSD + +--------------------------------- + +2006-1-9 Released 0.86 + +2006-1-4 Changed to support numpy (new name for scipy_core) - TEO + +2006-1-4 Added Mark's scaled axes patch for shared axis + +2005-12-28 Added Chris Barker's build_wxagg patch - JDH + +2005-12-27 Altered numerix/scipy to support new scipy package + structure - TEO + +2005-12-20 Fixed Jame's Boyles date tick reversal problem - JDH + +2005-12-20 Added Jouni's rc patch to support lists of keys to set on - + JDH + +2005-12-12 Updated pyparsing and mathtext for some speed enhancements + (Thanks Paul McGuire) and minor fixes to scipy numerix and + setuptools + +2005-12-12 Matplotlib data is now installed as package_data in + the matplotlib module. This gets rid of checking the + many possibilities in matplotlib._get_data_path() - CM + +2005-12-11 Support for setuptools/pkg_resources to build and use + matplotlib as an egg. Still allows matplotlib to exist + using a traditional distutils install. - ADS + +2005-12-03 Modified setup to build matplotlibrc based on compile time + findings. It will set numerix in the order of scipy, + numarray, Numeric depending on which are founds, and + backend as in preference order GTKAgg, WXAgg, TkAgg, GTK, + Agg, PS + +2005-12-03 Modified scipy patch to support Numeric, scipy and numarray + Some work remains to be done because some of the scipy + imports are broken if only the core is installed. e.g., + apparently we need from scipy.basic.fftpack import * rather + than from scipy.fftpack import * + +2005-12-03 Applied some fixes to Nicholas Young's nonuniform image + patch + +2005-12-01 Applied Alex Gontmakher hatch patch - PS only for now + +2005-11-30 Added Rob McMullen's EMF patch + +2005-11-30 Added Daishi's patch for scipy + +2005-11-30 Fixed out of bounds draw markers segfault in agg + +2005-11-28 Got TkAgg blitting working 100% (cross fingers) correctly. - CM + +2005-11-27 Multiple changes in cm.py, colors.py, figure.py, image.py, + contour.py, contour_demo.py; new _cm.py, examples/image_masked.py. + 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. Also added + some line breaks to the color data dictionaries. 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. Reworked color + handling in contour.py, especially in the ContourLabeller + mixin. + - EF + +2005-11-25 Changed text.py to ensure color is hashable. EF + +-------------------------------- + +2005-11-16 Released 0.85 + +2005-11-16 Changed the default default linewidth in rc to 1.0 + +2005-11-16 Replaced agg_to_gtk_drawable with pure pygtk pixbuf code in + backend_gtkagg. When the equivalent is doe for blit, the + agg extension code will no longer be needed + +2005-11-16 Added a maxdict item to cbook to prevent caches from + growing w/o bounds + +2005-11-15 Fixed a colorup/colordown reversal bug in finance.py -- + Thanks Gilles + +2005-11-15 Applied Jouni K Steppanen's boxplot patch SF patch#1349997 + - JDH + + +2005-11-09 added axisbelow attr for Axes to determine whether ticks and such + are above or below the actors + +2005-11-08 Added Nicolas' irregularly spaced image patch + + +2005-11-08 Deprecated HorizontalSpanSelector and replaced with + SpanSelection that takes a third arg, direction. The + new SpanSelector supports horizontal and vertical span + selection, and the appropriate min/max is returned. - CM + +2005-11-08 Added lineprops dialog for gtk + +2005-11-03 Added FIFOBuffer class to mlab to support real time feeds + and examples/fifo_buffer.py + +2005-11-01 Contributed Nickolas Young's patch for afm mathtext to + support mathtext based upon the standard postscript Symbol + font when ps.usetex = True. + +2005-10-26 Added support for scatter legends - thanks John Gill + +2005-10-20 Fixed image clipping bug that made some tex labels + disappear. JDH + +2005-10-14 Removed sqrt from dvipng 1.6 alpha channel mask. + +2005-10-14 Added width kwarg to hist function + +2005-10-10 Replaced all instances of os.rename with shutil.move + +2005-10-05 Added Michael Brady's ydate patch + +2005-10-04 Added rkern's texmanager patch + +2005-09-25 contour.py modified to use a single ContourSet class + that handles filled contours, line contours, and labels; + added keyword arg (clip_ends) to contourf. + Colorbar modified to work with new ContourSet object; + if the ContourSet has lines rather than polygons, the + colorbar will follow suit. Fixed a bug introduced in + 0.84, in which contourf(...,colors=...) was broken - EF + +------------------------------- + +2005-09-19 Released 0.84 + +2005-09-14 Added a new 'resize_event' which triggers a callback with a + backend_bases.ResizeEvent object - JDH + +2005-09-14 font_manager.py: removed chkfontpath from x11FontDirectory() - SC + +2005-09-14 Factored out auto date locator/formatter factory code into + matplotlib.date.date_ticker_factory; applies John Bryne's + quiver patch. + +2005-09-13 Added Mark's axes positions history patch #1286915 + +2005-09-09 Added support for auto canvas resizing with + fig.set_figsize_inches(9,5,forward=True) # inches + OR + fig.resize(400,300) # pixels + +2005-09-07 figure.py: update Figure.draw() to use the updated + renderer.draw_image() so that examples/figimage_demo.py works again. + examples/stock_demo.py: remove data_clipping (which no longer + exists) - SC + +2005-09-06 Added Eric's tick.direction patch: in or out in rc + +2005-09-06 Added Martin's rectangle selector widget + +2005-09-04 Fixed a logic err in text.py that was preventing rgxsuper + from matching - JDH + +2005-08-29 Committed Ken's wx blit patch #1275002 + +2005-08-26 colorbar modifications - now uses contourf instead of imshow + so that colors used by contourf are displayed correctly. + Added two new keyword args (cspacing and clabels) that are + only relevant for ContourMappable images - JSWHIT + +2005-08-24 Fixed a PS image bug reported by Darren - JDH + +2005-08-23 colors.py: change hex2color() to accept unicode strings as well as + normal strings. Use isinstance() instead of types.IntType etc - SC + +2005-08-16 removed data_clipping line and rc property - JDH + +2005-08-22 backend_svg.py: Remove redundant "x=0.0 y=0.0" from svg element. + Increase svg version from 1.0 to 1.1. Add viewBox attribute to svg + element to allow SVG documents to scale-to-fit into an arbitrary + viewport - SC + +2005-08-16 Added Eric's dot marker patch - JDH + +2005-08-08 Added blitting/animation for TkAgg - CM + +2005-08-05 Fixed duplicate tickline bug - JDH + +2005-08-05 Fixed a GTK animation bug that cropped up when doing + animations in gtk//gtkagg canvases that had widgets packed + above them + +2005-08-05 Added Clovis Goldemberg patch to the tk save dialog + +2005-08-04 Removed origin kwarg from backend.draw_image. origin is + handled entirely by the frontend now. + +2005-07-03 Fixed a bug related to TeX commands in backend_ps + +2005-08-03 Fixed SVG images to respect upper and lower origins. + +2005-08-03 Added flipud method to image and removed it from to_str. + +2005-07-29 Modified figure.figaspect to take an array or number; + modified backend_svg to write utf-8 - JDH + +2005-07-30 backend_svg.py: embed png image files in svg rather than linking + to a separate png file, fixes bug #1245306 (thanks to Norbert Nemec + for the patch) - SC + +--------------------------- + +2005-07-29 Released 0.83.2 + +2005-07-27 Applied SF patch 1242648: minor rounding error in + IndexDateFormatter in dates.py + +2005-07-27 Applied sf patch 1244732: Scale axis such that circle + looks like circle - JDH + +2005-07-29 Improved message reporting in texmanager and backend_ps - DSD + +2005-07-28 backend_gtk.py: update FigureCanvasGTK.draw() (needed due to the + recent expose_event() change) so that examples/anim.py works in the + usual way - SC + +2005-07-26 Added new widgets Cursor and HorizontalSpanSelector to + matplotlib.widgets. See examples/widgets/cursor.py and + examples/widgets/span_selector.py - JDH + +2005-07-26 added draw event to mpl event hierarchy -- triggered on + figure.draw + +2005-07-26 backend_gtk.py: allow 'f' key to toggle window fullscreen mode + +2005-07-26 backend_svg.py: write "<.../>" elements all on one line and remove + surplus spaces - SC + +2005-07-25 backend_svg.py: simplify code by deleting GraphicsContextSVG and + RendererSVG.new_gc(), and moving the gc.get_capstyle() code into + RendererSVG._get_gc_props_svg() - SC + +2005-07-24 backend_gtk.py: call FigureCanvasBase.motion_notify_event() on + all motion-notify-events, not just ones where a modifier key or + button has been pressed (fixes bug report from Niklas Volbers) - SC + +2005-07-24 backend_gtk.py: modify print_figure() use own pixmap, fixing + problems where print_figure() overwrites the display pixmap. + return False from all button/key etc events - to allow the event + to propagate further - SC + +2005-07-23 backend_gtk.py: change expose_event from using set_back_pixmap(); + clear() to draw_drawable() - SC + +2005-07-23 backend_gtk.py: removed pygtk.require() + matplotlib/__init__.py: delete 'FROZEN' and 'McPLError' which are + no longer used - SC + +2005-07-22 backend_gdk.py: removed pygtk.require() - SC + +2005-07-21 backend_svg.py: Remove unused imports. Remove methods doc strings + which just duplicate the docs from backend_bases.py. Rename + draw_mathtext to _draw_mathtext. - SC + +2005-07-17 examples/embedding_in_gtk3.py: new example demonstrating placing + a FigureCanvas in a gtk.ScrolledWindow - SC + +2005-07-14 Fixed a Windows related bug (#1238412) in texmanager - DSD + +2005-07-11 Fixed color kwarg bug, setting color=1 or 0 caused an + exception - DSD + +2005-07-07 Added Eric's MA set_xdata Line2D fix - JDH + +2005-07-06 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. e.g., the new names are matplotlibrc + tex.cache 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. Also fixed + texmanager to put all files, including temp files in + ~/.matplotlib/tex.cache, which allows you to usetex in + non-writable dirs. + +2005-07-05 Fixed bug #1231611 in subplots adjust layout. The problem + was that the text cacheing mechanism was not using the + transformation affine in the key. - JDH + +2005-07-05 Fixed default backend import problem when using API (SF bug + # 1209354 - see API_CHANGES for more info - JDH + +2005-07-04 backend_gtk.py: require PyGTK version 2.0.0 or higher - SC + +2005-06-30 setupext.py: added numarray_inc_dirs for building against + numarray when not installed in standard location - ADS + +2005-06-27 backend_svg.py: write figure width, height as int, not float. + Update to fix some of the pychecker warnings - SC + +2005-06-23 Updated examples/agg_test.py to demonstrate curved paths + and fills - JDH + +2005-06-21 Moved some texmanager and backend_agg tex caching to class + level rather than instance level - JDH + +2005-06-20 setupext.py: fix problem where _nc_backend_gdk is installed to the + wrong directory - SC + +2005-06-19 Added 10.4 support for CocoaAgg. - CM + +2005-06-18 Move Figure.get_width_height() to FigureCanvasBase and return + int instead of float. - SC + +2005-06-18 Applied Ted Drain's QtAgg patch: 1) Changed the toolbar to + be a horizontal bar of push buttons instead of a QToolbar + and updated the layout algorithms in the main window + accordingly. This eliminates the ability to drag and drop + the toolbar and detach it from the window. 2) Updated the + resize algorithm in the main window to show the correct + size for the plot widget as requested. This works almost + correctly right now. It looks to me like the final size of + the widget is off by the border of the main window but I + haven't figured out a way to get that information yet. We + could just add a small margin to the new size but that + seems a little hacky. 3) Changed the x/y location label to + be in the toolbar like the Tk backend instead of as a + status line at the bottom of the widget. 4) Changed the + toolbar pixmaps to use the ppm files instead of the png + files. I noticed that the Tk backend buttons looked much + nicer and it uses the ppm files so I switched them. + +2005-06-17 Modified the gtk backend to not queue mouse motion events. + This allows for live updates when dragging a slider. - CM + +2005-06-17 Added starter CocoaAgg backend. Only works on OS 10.3 for + now and requires PyObjC. (10.4 is high priority) - CM + +2005-06-17 Upgraded pyparsing and applied Paul McGuire's suggestions + for speeding things up. This more than doubles the speed + of mathtext in my simple tests. JDH + +2005-06-16 Applied David Cooke's subplot make_key patch + +---------------------------------- + +2005-06-15 0.82 released + +2005-06-15 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 + +2005-06-15 backend_cairo.py: updated to use pycairo 0.5.0 - SC + +2005-06-14 Wrote some GUI neutral widgets (Button, Slider, + RadioButtons, CheckButtons) in matplotlib.widgets. See + examples/widgets/\*.py - JDH + +2005-06-14 Exposed subplot parameters as rc vars and as the fig + SubplotParams instance subplotpars. See + figure.SubplotParams, figure.Figure.subplots_adjust and the + pylab method subplots_adjust and + examples/subplots_adjust.py . Also added a GUI neutral + widget for adjusting subplots, see + examples/subplot_toolbar.py - JDH + +2005-06-13 Exposed cap and join style for lines with new rc params and + line properties + + lines.dash_joinstyle : miter # miter|round|bevel + lines.dash_capstyle : butt # butt|round|projecting + lines.solid_joinstyle : miter # miter|round|bevel + lines.solid_capstyle : projecting # butt|round|projecting + + +2005-06-13 Added kwargs to Axes init + +2005-06-13 Applied Baptiste's tick patch - JDH + +2005-06-13 Fixed rc alias 'l' bug reported by Fernando by removing + aliases for mainlevel rc options. - JDH + +2005-06-10 Fixed bug #1217637 in ticker.py - DSD + +2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed - DSD + +2005-06-08 Added Sean Richard's hist binning fix -- see API_CHANGES - JDH + +2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed + - DSD + + +---------------------- + +2005-06-07 matplotlib-0.81 released + +2005-06-06 Added autoscale_on prop to axes + +2005-06-06 Added Nick's picker "among" patch - JDH + +2005-06-05 Fixed a TeX/LaTeX font discrepency in backend_ps. - DSD + +2005-06-05 Added a ps.distill option in rc settings. If True, postscript + output will be distilled using ghostscript, which should trim + the file size and allow it to load more quickly. Hopefully this + will address the issue of large ps files due to font + definitions. Tested with gnu-ghostscript-8.16. - DSD + +2005-06-03 Improved support for tex handling of text in backend_ps. - DSD + +2005-06-03 Added rc options to render text with tex or latex, and to select + the latex font package. - DSD + +2005-06-03 Fixed a bug in ticker.py causing a ZeroDivisionError + +2005-06-02 backend_gtk.py remove DBL_BUFFER, add line to expose_event to + try to fix pygtk 2.6 redraw problem - SC + +2005-06-01 The default behavior of ScalarFormatter now renders scientific + notation and large numerical offsets in a label at the end of + the axis. - DSD + +2005-06-01 Added Nicholas' frombyte image patch - JDH + +2005-05-31 Added vertical TeX support for agg - JDH + +2005-05-31 Applied Eric's cntr patch - JDH + +2005-05-27 Finally found the pesky agg bug (which Maxim was kind + enough to fix within hours) that was causing a segfault in + the win32 cached marker drawing. Now windows users can get + the enormouse performance benefits of caced markers w/o + those occasional pesy screenshots. - JDH + +2005-05-27 Got win32 build system working again, using a more recent + version of gtk and pygtk in the win32 build, gtk 2.6 from + http://www.gimp.org/~tml/gimp/win32/downloads.html (you + will also need libpng12.dll to use these). I haven't + tested whether this binary build of mpl for win32 will work + with older gtk runtimes, so you may need to upgrade. + +2005-05-27 Fixed bug where 2nd wxapp could be started if using wxagg + backend. - ADS + +2005-05-26 Added Daishi text with dash patch -- see examples/dashtick.py + +2005-05-26 Moved backend_latex functionality into backend_ps. If + text.usetex=True, the PostScript backend will use LaTeX to + generate the .ps or .eps file. Ghostscript is required for + eps output. - DSD + +2005-05-24 Fixed alignment and color issues in latex backend. - DSD + +2005-05-21 Fixed raster problem for small rasters with dvipng -- looks + like it was a premultipled alpha problem - JDH + +2005-05-20 Added linewidth and faceted kwarg to scatter to control + edgewidth and color. Also added autolegend patch to + inspect line segments. + +2005-05-18 Added Orsay and JPL qt fixes - JDH + +2005-05-17 Added a psfrag latex backend -- some alignment issues need + to be worked out. Run with -dLaTeX and a *.tex file and + *.eps file are generated. latex and dvips the generated + latex file to get ps output. Note xdvi *does* not work, + you must generate ps.- JDH + +2005-05-13 Added Florent Rougon's Axis set_label1 + patch + +2005-05-17 pcolor optimization, fixed bug in previous pcolor patch - JSWHIT + +2005-05-16 Added support for masked arrays in pcolor - JSWHIT + + +2005-05-12 Started work on TeX text for antigrain using pngdvi -- see + examples/tex_demo.py and the new module + matplotlib.texmanager. Rotated text not supported and + rendering small glyps is not working right yet. BUt large + fontsizes and/or high dpi saved figs work great. + +2005-05-10 New image resize options interpolation options. New values + for the interp kwarg are + + 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', + 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', + 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', + 'lanczos', 'blackman' + + See help(imshow) for details, particularly the + interpolation, filternorm and filterrad kwargs + + +2005-05-10 Applied Eric's contour mem leak fixes - JDH + +2005-05-10 Extended python agg wrapper and started implementing + backend_agg2, an agg renderer based on the python wrapper. + This will be more flexible and easier to extend than the + current backend_agg. See also examples/agg_test.py - JDH + +2005-05-09 Added Marcin's no legend patch to exclude lines from the + autolegend builder + + plot(x, y, label='nolegend') + +2005-05-05 Upgraded to agg23 + +2005-05-05 Added newscalarformatter_demo.py to examples. -DSD + +2005-05-04 Added NewScalarFormatter. Improved formatting of ticklabels, + scientific notation, and the ability to plot large large + numbers with small ranges, by determining a numerical offset. + See ticker.NewScalarFormatter for more details. -DSD + +2005-05-03 Added the option to specify a delimiter in pylab.load -DSD + +2005-04-28 Added Darren's line collection example + +2005-04-28 Fixed aa property in agg - JDH + +2005-04-27 Set postscript page size in .matplotlibrc - DSD + +2005-04-26 Added embedding in qt example. - JDH + +2005-04-14 Applied Michael Brady's qt backend patch: 1) fix a bug + where keyboard input was grabbed by the figure and not + released 2) turn on cursor changes 3) clean up a typo + and commented-out print statement. - JDH + + +2005-04-14 Applied Eric Firing's masked data lines patch and contour + patch. 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. + - see examples/masked_demo.py - JDH + +2005-04-13 Applied Tim Leslie's arrow key event handling patch - JDH + + +--------------------------- + +0.80 released + +2005-04-11 Applied a variant of rick's xlim/ylim/axis patch. These + functions now take kwargs to let you selectively alter only + the min or max if desired. e.g., xlim(xmin=2) or + axis(ymax=3). They always return the new lim. - JDH + + +2005-04-11 Incorporated Werner's wx patch -- wx backend should be + compatible with wxpython2.4 and recent versions of 2.5. + Some early versions of wxpython 2.5 will not work because + there was a temporary change in the dc API that was rolled + back to make it 2.4 compliant + +2005-04-11 modified tkagg show so that new figure window pops up on + call to figure + +2005-04-11 fixed wxapp init bug + +2005-04-02 updated backend_ps.draw_lines, draw_markers for use with the + new API - DSD + +2005-04-01 Added editable polygon example + +------------------------------ + +2005-03-31 0.74 released + +2005-03-30 Fixed and added checks for floating point inaccuracy in + ticker.Base - DSD + +2005-03-30 updated /ellipse definition in backend_ps.py to address bug + #1122041 - DSD + +2005-03-29 Added unicode support for Agg and PS - JDH + +2005-03-28 Added Jarrod's svg patch for text - JDH + +2005-03-28 Added Ludal's arrow and quiver patch - JDH + +2005-03-28 Added label kwarg to Axes to facilitate forcing the + creation of new Axes with otherwise identical attributes + +2005-03-28 Applied boxplot and OSX font search patches + +2005-03-27 Added ft2font NULL check to fix Japanase font bug - JDH + +2005-03-27 Added sprint legend patch plus John Gill's tests and fix -- + see examples/legend_auto.py - JDH + +--------------------------- + +2005-03-19 0.73.1 released + +2005-03-19 Reverted wxapp handling because it crashed win32 - JDH + +2005-03-18 Add .number attribute to figure objects returned by figure() - FP + +--------------------------- + +2005-03-18 0.73 released + +2005-03-16 Fixed labelsep bug + +2005-03-16 Applied Darren's ticker fix for small ranges - JDH + +2005-03-16 Fixed tick on horiz colorbar - JDH + +2005-03-16 Added Japanses winreg patch - JDH + +2005-03-15 backend_gtkagg.py: changed to use double buffering, this fixes + the problem reported Joachim Berdal Haga - "Parts of plot lagging + from previous frame in animation". Tested with anim.py and it makes + no noticable difference to performance (23.7 before, 23.6 after) + - SC + +2005-03-14 add src/_backend_gdk.c extension to provide a substitute function + for pixbuf.get_pixels_array(). Currently pixbuf.get_pixels_array() + only works with Numeric, and then only works if pygtk has been + compiled with Numeric support. The change provides a function + pixbuf_get_pixels_array() which works with Numeric and numarray and + is always available. It means that backend_gtk should be able to + display images and mathtext in all circumstances. - SC + +2005-03-11 Upgraded CXX to 5.3.1 + +2005-03-10 remove GraphicsContextPS.set_linestyle() + and GraphicsContextSVG.set_linestyle() since they do no more than + the base class GraphicsContext.set_linestyle() - SC + +2005-03-09 Refactored contour functionality into dedicated module + +2005-03-09 Added Eric's contourf updates and Nadia's clabel functionality + +2005-03-09 Moved colorbar to figure.Figure to expose it for API developers + - JDH + +2005-03-09 backend_cairo.py: implemented draw_markers() - SC + +2005-03-09 cbook.py: only use enumerate() (the python version) if the builtin + version is not available. + Add new function 'izip' which is set to itertools.izip if available + and the python equivalent if not available. - SC + +2005-03-07 backend_gdk.py: remove PIXELS_PER_INCH from points_to_pixels(), but + still use it to adjust font sizes. This allows the GTK version of + line_styles.py to more closely match GTKAgg, previously the markers + were being drawn too large. - SC + +2005-03-01 Added Eric's contourf routines + +2005-03-01 Added start of proper agg SWIG wrapper. I would like to + expose agg functionality directly a the user level and this + module will serve that purpose eventually, and will + hopefully take over most of the functionality of the + current _image and _backend_agg modules. - JDH + +2005-02-28 Fixed polyfit / polyval to convert input args to float + arrays - JDH + + +2005-02-25 Add experimental feature to backend_gtk.py to enable/disable + double buffering (DBL_BUFFER=True/False) - SC + +2005-02-24 colors.py change ColorConverter.to_rgb() so it always returns rgb + (and not rgba), allow cnames keys to be cached, change the exception + raised from RuntimeError to ValueError (like hex2color()) + hex2color() use a regular expression to check the color string is + valid - SC + + +2005-02-23 Added rc param ps.useafm so backend ps can use native afm + fonts or truetype. afme breaks mathtext but causes much + smaller font sizes and may result in images that display + better in some contexts (e.g., pdfs incorporated into latex + docs viewed in acrobat reader). I would like to extend + this approach to allow the user to use truetype only for + mathtext, which should be easy. + +2005-02-23 Used sequence protocol rather than tuple in agg collection + drawing routines for greater flexibility - JDH + + +-------------------------------- + +2005-02-22 0.72.1 released + +2005-02-21 fixed linestyles for collections -- contour now dashes for + levels <0 + +2005-02-21 fixed ps color bug - JDH + +2005-02-15 fixed missing qt file + +2005-02-15 banished error_msg and report_error. Internal backend + methods like error_msg_gtk are preserved. backend writers, + check your backends, and diff against 0.72 to make sure I + did the right thing! - JDH + + +2005-02-14 Added enthought traits to matplotlib tree - JDH + +------------------------ + +2005-02-14 0.72 released + +2005-02-14 fix bug in cbook alltrue() and onetrue() - SC + +2005-02-11 updated qtagg backend from Ted - JDH + +2005-02-11 matshow fixes for figure numbering, return value and docs - FP + +2005-02-09 new zorder example for fine control in zorder_demo.py - FP + +2005-02-09 backend renderer draw_lines now has transform in backend, + as in draw_markers; use numerix in _backend_agg, aded small + line optimization to agg + +2005-02-09 subplot now deletes axes that it overlaps + +2005-02-08 Added transparent support for gzipped files in load/save - Fernando + Perez (FP from now on). + +2005-02-08 Small optimizations in PS backend. They may have a big impact for + large plots, otherwise they don't hurt - FP + +2005-02-08 Added transparent support for gzipped files in load/save - Fernando + Perez (FP from now on). + +2005-02-07 Added newstyle path drawing for markers - only implemented + in agg currently - JDH + +2005-02-05 Some superscript text optimizations for ticking log plots + +2005-02-05 Added some default key press events to pylab figures: 'g' + toggles grid - JDH + +2005-02-05 Added some support for handling log switching for lines + that have nonpos data - JDH + +2005-02-04 Added Nadia's contour patch - contour now has matlab + compatible syntax; this also fixed an unequal sized contour + array bug- JDH + +2005-02-04 Modified GTK backends to allow the FigureCanvas to be resized + smaller than its original size - SC + +2005-02-02 Fixed a bug in dates mx2num - JDH + +2005-02-02 Incorporated Fernando's matshow - JDH + +2005-02-01 Added Fernando's figure num patch, including experemental + support for pylab backend switching, LineCOllection.color + warns, savefig now a figure method, fixed a close(fig) bug + - JDH + +2005-01-31 updated datalim in contour - JDH + +2005-01-30 Added backend_qtagg.py provided by Sigve Tjora - SC + +2005-01-28 Added tk.inspect rc param to .matplotlibrc. IDLE users + should set tk.pythoninspect:True and interactive:True and + backend:TkAgg + +2005-01-28 Replaced examples/interactive.py with an updated script from + Fernando Perez - SC + +2005-01-27 Added support for shared x or y axes. See + examples/shared_axis_demo.py and examples/ganged_plots.py + +2005-01-27 Added Lee's patch for missing symbols \leq and \LEFTbracket + to _mathtext_data - JDH + +2005-01-26 Added Baptiste's two scales patch -- see help(twinx) in the + pylab interface for more info. See also + examples/two_scales.py + +2005-01-24 Fixed a mathtext parser bug that prevented font changes in + sub/superscripts - JDH + +2005-01-24 Fixed contour to work w/ interactive changes in colormaps, + clim, etc - JDH + +----------------------------- + +2005-01-21 matplotlib-0.71 released + +2005-01-21 Refactored numerix to solve vexing namespace issues - JDH + +2005-01-21 Applied Nadia's contour bug fix - JDH + +2005-01-20 Made some changes to the contour routine - particularly + region=1 seems t fix a lot of the zigzag strangeness. + Added colormaps as default for contour - JDH + +2005-01-19 Restored builtin names which were overridden (min, max, + abs, round, and sum) in pylab. This is a potentially + significant change for those who were relying on an array + version of those functions that previously overrode builtin + function names. - ADS + +2005-01-18 Added accents to mathtext: \hat, \breve, \grave, \bar, + \acute, \tilde, \vec, \dot, \ddot. All of them have the + same syntax, e.g., to make an overbar you do \bar{o} or to + make an o umlaut you do \ddot{o}. The shortcuts are also + provided, e.g., \"o \'e \`e \~n \.x \^y - JDH + +2005-01-18 Plugged image resize memory leaks - JDH + +2005-01-18 Fixed some mathtext parser problems relating to superscripts + +2005-01-17 Fixed a yticklabel problem for colorbars under change of + clim - JDH + +2005-01-17 Cleaned up Destroy handling in wx reducing memleak/fig from + approx 800k to approx 6k- JDH + +2005-01-17 Added kappa to latex_to_bakoma - JDH + +2005-01-15 Support arbitrary colorbar axes and horizontal colorbars - JDH + +2005-01-15 Fixed colormap number of colors bug so that the colorbar + has the same discretization as the image - JDH + +2005-01-15 Added Nadia's x,y contour fix - JDH + +2005-01-15 backend_cairo: added PDF support which requires pycairo 0.1.4. + Its not usable yet, but is ready for when the Cairo PDF backend + matures - SC + +2005-01-15 Added Nadia's x,y contour fix + +2005-01-12 Fixed set clip_on bug in artist - JDH + +2005-01-11 Reverted pythoninspect in tkagg - JDH + +2005-01-09 Fixed a backend_bases event bug caused when an event is + triggered when location is None - JDH + +2005-01-07 Add patch from Stephen Walton to fix bug in pylab.load() + when the % character is included in a comment. - ADS + +2005-01-07 Added markerscale attribute to Legend class. This allows + the marker size in the legend to be adjusted relative to + that in the plot. - ADS + +2005-01-06 Add patch from Ben Vanhaeren to make the FigureManagerGTK vbox a + public attribute - SC + +---------------------------- + +2004-12-30 Release 0.70 + +2004-12-28 Added coord location to key press and added a + examples/picker_demo.py + +2004-12-28 Fixed coords notification in wx toolbar - JDH + +2004-12-28 Moved connection and disconnection event handling to the + FigureCanvasBase. Backends now only need to connect one + time for each of the button press, button release and key + press/release functions. The base class deals with + callbacks and multiple connections. This fixes flakiness + on some backends (tk, wx) in the presence of multiple + connections and/or disconnect - JDH + +2004-12-27 Fixed PS mathtext bug where color was not set - Jochen + please verify correct - JDH + +2004-12-27 Added Shadow class and added shadow kwarg to legend and pie + for shadow effect - JDH + +2004-12-27 Added pie charts and new example/pie_demo.py + +2004-12-23 Fixed an agg text rotation alignment bug, fixed some text + kwarg processing bugs, and added examples/text_rotation.py + to explain and demonstrate how text rotations and alignment + work in matplotlib. - JDH + +----------------------- + +2004-12-22 0.65.1 released - JDH + +2004-12-22 Fixed colorbar bug which caused colorbar not to respond to + changes in colormap in some instances - JDH + +2004-12-22 Refactored NavigationToolbar in tkagg to support app + embedding , init now takes (canvas, window) rather than + (canvas, figman) - JDH + +2004-12-21 Refactored axes and subplot management - removed + add_subplot and add_axes from the FigureManager. classic + toolbar updates are done via an observer pattern on the + figure using add_axobserver. Figure now maintains the axes + stack (for gca) and supports axes deletion. Ported changes + to GTK, Tk, Wx, and FLTK. Please test! Added delaxes - JDH + +2004-12-21 Lots of image optimizations - 4x performance boost over + 0.65 JDH + +2004-12-20 Fixed a figimage bug where the axes is shown and modified + tkagg to move the destroy binding into the show method. + +2004-12-18 Minor refactoring of NavigationToolbar2 to support + embedding in an application - JDH + +2004-12-14 Added linestyle to collections (currently broken) - JDH + +2004-12-14 Applied Nadia's setupext patch to fix libstdc++ link + problem with contour and solaris -JDH + +2004-12-14 A number of pychecker inspired fixes, including removal of + True and False from cbook which I erroneously thought was + needed for python2.2 - JDH + +2004-12-14 Finished porting doc strings for set introspection. + Used silent_list for many get funcs that return + lists. JDH + +2004-12-13 dates.py: removed all timezone() calls, except for UTC - SC + +---------------------------- + +2004-12-13 0.65 released - JDH + +2004-12-13 colors.py: rgb2hex(), hex2color() made simpler (and faster), also + rgb2hex() - added round() instead of integer truncation + hex2color() - changed 256.0 divisor to 255.0, so now + '#ffffff' becomes (1.0,1.0,1.0) not (0.996,0.996,0.996) - SC + +2004-12-11 Added ion and ioff to pylab interface - JDH + +2004-12-11 backend_template.py: delete FigureCanvasTemplate.realize() - most + backends don't use it and its no longer needed + + backend_ps.py, backend_svg.py: delete show() and + draw_if_interactive() - they are not needed for image backends + + backend_svg.py: write direct to file instead of StringIO + - SC + +2004-12-10 Added zorder to artists to control drawing order of lines, + patches and text in axes. See examples/zoder_demo.py - JDH + +2004-12-10 Fixed colorbar bug with scatter - JDH + +2004-12-10 Added Nadia Dencheva contour code - JDH + +2004-12-10 backend_cairo.py: got mathtext working - SC + +2004-12-09 Added Norm Peterson's svg clipping patch + +2004-12-09 Added Matthew Newville's wx printing patch + +2004-12-09 Migrated matlab to pylab - JDH + +2004-12-09 backend_gtk.py: split into two parts + - backend_gdk.py - an image backend + - backend_gtk.py - A GUI backend that uses GDK - SC + +2004-12-08 backend_gtk.py: remove quit_after_print_xvfb(\*args), show_xvfb(), + Dialog_MeasureTool(gtk.Dialog) one month after sending mail to + matplotlib-users asking if anyone still uses these functions - SC + +2004-12-02 backend_bases.py, backend_template.py: updated some of the method + documentation to make them consistent with each other - SC + +2004-12-04 Fixed multiple bindings per event for TkAgg mpl_connect and + mpl_disconnect. Added a "test_disconnect" command line + parameter to coords_demo.py JTM + +2004-12-04 Fixed some legend bugs JDH + +2004-11-30 Added over command for oneoff over plots. e.g., over(plot, x, + y, lw=2). Works with any plot function. + +2004-11-30 Added bbox property to text - JDH + +2004-11-29 Zoom to rect now respect reversed axes limits (for both + linear and log axes). - GL + +2004-11-29 Added the over command to the matlab interface. over + allows you to add an overlay plot regardless of hold + state. - JDH + +2004-11-25 Added Printf to mplutils for printf style format string + formatting in C++ (should help write better exceptions) + +2004-11-24 IMAGE_FORMAT: remove from agg and gtkagg backends as its no longer + used - SC + +2004-11-23 Added matplotlib compatible set and get introspection. See + set_and_get.py + +2004-11-23 applied Norbert's patched and exposed legend configuration + to kwargs - JDH + +2004-11-23 backend_gtk.py: added a default exception handler - SC + +2004-11-18 backend_gtk.py: change so that the backend knows about all image + formats and does not need to use IMAGE_FORMAT in other backends - SC + +2004-11-18 Fixed some report_error bugs in string interpolation as + reported on SF bug tracker- JDH + +2004-11-17 backend_gtkcairo.py: change so all print_figure() calls render using + Cairo and get saved using backend_gtk.print_figure() - SC + +2004-11-13 backend_cairo.py: Discovered the magic number (96) required for + Cairo PS plots to come out the right size. Restored Cairo PS output + and added support for landscape mode - SC + +2004-11-13 Added ishold - JDH + +2004-11-12 Added many new matlab colormaps - autumn bone cool copper + flag gray hot hsv jet pink prism spring summer winter - PG + +2004-11-11 greatly simplify the emitted postscript code - JV + +2004-11-12 Added new plotting functions spy, spy2 for sparse matrix + visualization - JDH + +2004-11-11 Added rgrids, thetragrids for customizing the grid + locations and labels for polar plots - JDH + +2004-11-11 make the Gtk backends build without an X-server connection - JV + +2004-11-10 matplotlib/__init__.py: Added FROZEN to signal we are running under + py2exe (or similar) - is used by backend_gtk.py - SC + +2004-11-09 backend_gtk.py: Made fix suggested by maffew@cat.org.au + to prevent problems when py2exe calls pygtk.require(). - SC + +2004-11-09 backend_cairo.py: Added support for printing to a fileobject. + Disabled cairo PS output which is not working correctly. - SC + +---------------------------------- + +2004-11-08 matplotlib-0.64 released + +2004-11-04 Changed -dbackend processing to only use known backends, so + we don't clobber other non-matplotlib uses of -d, like -debug. + +2004-11-04 backend_agg.py: added IMAGE_FORMAT to list the formats that the + backend can save to. + backend_gtkagg.py: added support for saving JPG files by using the + GTK backend - SC + +2004-10-31 backend_cairo.py: now produces png and ps files (although the figure + sizing needs some work). pycairo did not wrap all the necessary + functions, so I wrapped them myself, they are included in the + backend_cairo.py doc string. - SC + +2004-10-31 backend_ps.py: clean up the generated PostScript code, use + the PostScript stack to hold itermediate values instead of + storing them in the dictionary. - JV + +2004-10-30 backend_ps.py, ft2font.cpp, ft2font.h: fix the position of + text in the PostScript output. The new FT2Font method + get_descent gives the distance between the lower edge of + the bounding box and the baseline of a string. In + backend_ps the text is shifted upwards by this amount. - JV + +2004-10-30 backend_ps.py: clean up the code a lot. Change the + PostScript output to be more DSC compliant. All + definitions for the generated PostScript are now in a + PostScript dictionary 'mpldict'. Moved the long comment + about drawing ellipses from the PostScript output into a + Python comment. - JV + +2004-10-30 backend_gtk.py: removed FigureCanvasGTK.realize() as its no longer + needed. Merged ColorManager into GraphicsContext + backend_bases.py: For set_capstyle/joinstyle() only set cap or + joinstyle if there is no error. - SC + +2004-10-30 backend_gtk.py: tidied up print_figure() and removed some of the + dependency on widget events - SC + +2004-10-28 backend_cairo.py: The renderer is complete except for mathtext, + draw_image() and clipping. gtkcairo works reasonably well. cairo + does not yet create any files since I can't figure how to set the + 'target surface', I don't think pycairo wraps the required functions + - SC + +2004-10-28 backend_gtk.py: Improved the save dialog (GTK 2.4 only) so it + presents the user with a menu of supported image formats - SC + +2004-10-28 backend_svg.py: change print_figure() to restore original face/edge + color + backend_ps.py : change print_figure() to ensure original face/edge + colors are restored even if there's an IOError - SC + +2004-10-27 Applied Norbert's errorbar patch to support barsabove kwarg + +2004-10-27 Applied Norbert's legend patch to support None handles + +2004-10-27 Added two more backends: backend_cairo.py, backend_gtkcairo.py + They are not complete yet, currently backend_gtkcairo just renders + polygons, rectangles and lines - SC + +2004-10-21 Added polar axes and plots - JDH + +2004-10-20 Fixed corrcoef bug exposed by corrcoef(X) where X is matrix + - JDH + +2004-10-19 Added kwarg support to xticks and yticks to set ticklabel + text properties -- thanks to T. Edward Whalen for the suggestion + +2004-10-19 Added support for PIL images in imshow(), image.py - ADS + +2004-10-19 Re-worked exception handling in _image.py and _transforms.py + to avoid masking problems with shared libraries. - JTM + +2004-10-16 Streamlined the matlab interface wrapper, removed the + noplot option to hist - just use mlab.hist instead. + +2004-09-30 Added Andrew Dalke's strftime code to extend the range of + dates supported by the DateFormatter - JDH + +2004-09-30 Added barh - JDH + +2004-09-30 Removed fallback to alternate array package from numerix + so that ImportErrors are easier to debug. JTM + +2004-09-30 Add GTK+ 2.4 support for the message in the toolbar. SC + +2004-09-30 Made some changes to support python22 - lots of doc + fixes. - JDH + +2004-09-29 Added a Verbose class for reporting - JDH + +------------------------------------ + +2004-09-28 Released 0.63.0 + +2004-09-28 Added save to file object for agg - see + examples/print_stdout.py + +2004-09-24 Reorganized all py code to lib subdir + +2004-09-24 Fixed axes resize image edge effects on interpolation - + required upgrade to agg22 which fixed an agg bug related to + this problem + +2004-09-20 Added toolbar2 message display for backend_tkagg. JTM + + +2004-09-17 Added coords formatter attributes. These must be callable, + and return a string for the x or y data. These will be used + to format the x and y data for the coords box. Default is + the axis major formatter. e.g.: + + # format the coords message box + def price(x): return '$%1.2f'%x + ax.format_xdata = DateFormatter('%Y-%m-%d') + ax.format_ydata = price + + +2004-09-17 Total rewrite of dates handling to use python datetime with + num2date, date2num and drange. pytz for timezone handling, + dateutils for spohisticated ticking. date ranges from + 0001-9999 are supported. rrules allow arbitrary date + ticking. examples/date_demo*.py converted to show new + usage. new example examples/date_demo_rrule.py shows how + to use rrules in date plots. The date locators are much + more general and almost all of them have different + constructors. See matplotlib.dates for more info. + +2004-09-15 Applied Fernando's backend __init__ patch to support easier + backend maintenance. Added his numutils to mlab. JDH + +2004-09-16 Re-designated all files in matplotlib/images as binary and + w/o keyword substitution using "cvs admin -kb \*.svg ...". + See binary files in "info cvs" under Linux. This was messing + up builds from CVS on windows since CVS was doing lf -> cr/lf + and keyword substitution on the bitmaps. - JTM + +2004-09-15 Modified setup to build array-package-specific extensions + for those extensions which are array-aware. Setup builds + extensions automatically for either Numeric, numarray, or + both, depending on what you have installed. Python proxy + modules for the array-aware extensions import the version + optimized for numarray or Numeric determined by numerix. + - JTM + +2004-09-15 Moved definitions of infinity from mlab to numerix to avoid + divide by zero warnings for numarray - JTM + +2004-09-09 Added axhline, axvline, axhspan and axvspan + +------------------------------- + +2004-08-30 matplotlib 0.62.4 released + +2004-08-30 Fixed a multiple images with different extent bug, + Fixed markerfacecolor as RGB tuple + +2004-08-27 Mathtext now more than 5x faster. Thanks to Paul Mcguire + for fixes both to pyparsing and to the matplotlib grammar! + mathtext broken on python2.2 + +2004-08-25 Exposed Darren's and Greg's log ticking and formatting + options to semilogx and friends + +2004-08-23 Fixed grid w/o args to toggle grid state - JDH + +2004-08-11 Added Gregory's log patches for major and minor ticking + +2004-08-18 Some pixel edge effects fixes for images + +2004-08-18 Fixed TTF files reads in backend_ps on win32. + +2004-08-18 Added base and subs properties for logscale plots, user + modifiable using + set_[x,y]scale('log',base=b,subs=[mt1,mt2,...]) - GL + +2004-08-18 fixed a bug exposed by trying to find the HOME dir on win32 + thanks to Alan Issac for pointing to the light - JDH + +2004-08-18 fixed errorbar bug in setting ecolor - JDH + +2004-08-12 Added Darren Dale's exponential ticking patch + +2004-08-11 Added Gregory's fltkagg backend + +------------------------------ + +2004-08-09 matplotlib-0.61.0 released + +2004-08-08 backend_gtk.py: get rid of the final PyGTK deprecation warning by + replacing gtkOptionMenu with gtkMenu in the 2.4 version of the + classic toolbar. + +2004-08-06 Added Tk zoom to rect rectangle, proper idle drawing, and + keybinding - JDH + +2004-08-05 Updated installing.html and INSTALL - JDH + +2004-08-01 backend_gtk.py: move all drawing code into the expose_event() + +2004-07-28 Added Greg's toolbar2 and backend_*agg patches - JDH + +2004-07-28 Added image.imread with support for loading png into + numerix arrays + +2004-07-28 Added key modifiers to events - implemented dynamic updates + and rubber banding for interactive pan/zoom - JDH + +2004-07-27 did a readthrough of SVG, replacing all the string + additions with string interps for efficiency, fixed some + layout problems, added font and image support (through + external pngs) - JDH + +2004-07-25 backend_gtk.py: modify toolbar2 to make it easier to support GTK+ + 2.4. Add GTK+ 2.4 toolbar support. - SC + +2004-07-24 backend_gtk.py: Simplified classic toolbar creation - SC + +2004-07-24 Added images/matplotlib.svg to be used when GTK+ windows are + minimised - SC + +2004-07-22 Added right mouse click zoom for NavigationToolbar2 panning + mode. - JTM + +2004-07-22 Added NavigationToolbar2 support to backend_tkagg. + Minor tweak to backend_bases. - JTM + +2004-07-22 Incorporated Gergory's renderer cache and buffer object + cache - JDH + +2004-07-22 Backend_gtk.py: Added support for GtkFileChooser, changed + FileSelection/FileChooser so that only one instance pops up, + and made them both modal. - SC + +2004-07-21 Applied backend_agg memory leak patch from hayden - + jocallo@online.no. Found and fixed a leak in binary + operations on transforms. Moral of the story: never incref + where you meant to decref! Fixed several leaks in ft2font: + moral of story: almost always return Py::asObject over + Py::Object - JDH + +2004-07-21 Fixed a to string memory allocation bug in agg and image + modules - JDH + +2004-07-21 Added mpl_connect and mpl_disconnect to matlab interface - + JDH + +2004-07-21 Added beginnings of users_guide to CVS - JDH + +2004-07-20 ported toolbar2 to wx + +2004-07-20 upgraded to agg21 - JDH + +2004-07-20 Added new icons for toolbar2 - JDH + +2004-07-19 Added vertical mathtext for \*Agg and GTK - thanks Jim + Benson! - JDH + +2004-07-16 Added ps/eps/svg savefig options to wx and gtk JDH + +2004-07-15 Fixed python framework tk finder in setupext.py - JDH + +2004-07-14 Fixed layer images demo which was broken by the 07/12 image + extent fixes - JDH + +2004-07-13 Modified line collections to handle arbitrary length + segments for each line segment. - JDH + +2004-07-13 Fixed problems with image extent and origin - + set_image_extent deprecated. Use imshow(blah, blah, + extent=(xmin, xmax, ymin, ymax) instead - JDH + +2004-07-12 Added prototype for new nav bar with codifed event + handling. Use mpl_connect rather than connect for + matplotlib event handling. toolbar style determined by rc + toolbar param. backend status: gtk: prototype, wx: in + progress, tk: not started - JDH + +2004-07-11 backend_gtk.py: use builtin round() instead of redefining it. + - SC + +2004-07-10 Added embedding_in_wx3 example - ADS + +2004-07-09 Added dynamic_image_wxagg to examples - ADS + +2004-07-09 added support for embedding TrueType fonts in PS files - PEB + +2004-07-09 fixed a sfnt bug exposed if font cache is not built + +2004-07-09 added default arg None to matplotlib.matlab grid command to + toggle current grid state + +--------------------- + +2004-07-08 0.60.2 released + +2004-07-08 fixed a mathtext bug for '6' + +2004-07-08 added some numarray bug workarounds + +-------------------------- + +2004-07-07 0.60 released + +2004-07-07 Fixed a bug in dynamic_demo_wx + + +2004-07-07 backend_gtk.py: raise SystemExit immediately if + 'import pygtk' fails - SC + +2004-07-05 Added new mathtext commands \over{sym1}{sym2} and + \under{sym1}{sym2} + +2004-07-05 Unified image and patch collections colormapping and + scaling args. Updated docstrings for all - JDH + +2004-07-05 Fixed a figure legend bug and added + examples/figlegend_demo.py - JDH + +2004-07-01 Fixed a memory leak in image and agg to string methods + +2004-06-25 Fixed fonts_demo spacing problems and added a kwargs + version of the fonts_demo fonts_demo_kw.py - JDH + +2004-06-25 finance.py: handle case when urlopen() fails - SC + +2004-06-24 Support for multiple images on axes and figure, with + blending. Support for upper and lower image origins. + clim, jet and gray functions in matlab interface operate on + current image - JDH + +2004-06-23 ported code to Perry's new colormap and norm scheme. Added + new rc attributes image.aspect, image.interpolation, + image.cmap, image.lut, image.origin + +2004-06-20 backend_gtk.py: replace gtk.TRUE/FALSE with True/False. + simplified _make_axis_menu(). - SC + +2004-06-19 anim_tk.py: Updated to use TkAgg by default (not GTK) + backend_gtk_py: Added '_' in front of private widget + creation functions - SC + +2004-06-17 backend_gtk.py: Create a GC once in realise(), not every + time draw() is called. - SC + +2004-06-16 Added new py2exe FAQ entry and added frozen support in + get_data_path for py2exe - JDH + +2004-06-16 Removed GTKGD, which was always just a proof-of-concept + backend - JDH + +2004-06-16 backend_gtk.py updates to replace deprecated functions + gtk.mainquit(), gtk.mainloop(). + Update NavigationToolbar to use the new GtkToolbar API - SC + +2004-06-15 removed set_default_font from font_manager to unify font + customization using the new function rc. See API_CHANGES + for more info. The examples fonts_demo.py and + fonts_demo_kw.py are ported to the new API - JDH + +2004-06-15 Improved (yet again!) axis scaling to properly handle + singleton plots - JDH + +2004-06-15 Restored the old FigureCanvasGTK.draw() - SC + +2004-06-11 More memory leak fixes in transforms and ft2font - JDH + +2004-06-11 Eliminated numerix .numerix file and environment variable + NUMERIX. Fixed bug which prevented command line overrides: + --numarray or --numeric. - JTM + +2004-06-10 Added rc configuration function rc; deferred all rc param + setting until object creation time; added new rc attrs: + lines.markerfacecolor, lines.markeredgecolor, + lines.markeredgewidth, patch.linewidth, patch.facecolor, + patch.edgecolor, patch.antialiased; see + examples/customize_rc.py for usage - JDH + + +--------------------------------------------------------------- + +2004-06-09 0.54.2 released + +2004-06-08 Rewrote ft2font using CXX as part of general memory leak + fixes; also fixed transform memory leaks - JDH + +2004-06-07 Fixed several problems with log ticks and scaling - JDH + +2004-06-07 Fixed width/height issues for images - JDH + +2004-06-03 Fixed draw_if_interactive bug for semilogx; + +2004-06-02 Fixed text clipping to clip to axes - JDH + +2004-06-02 Fixed leading newline text and multiple newline text - JDH + +2004-06-02 Fixed plot_date to return lines - JDH + +2004-06-01 Fixed plot to work with x or y having shape N,1 or 1,N - JDH + +2004-05-31 Added renderer markeredgewidth attribute of Line2D. - ADS + +2004-05-29 Fixed tick label clipping to work with navigation. + +2004-05-28 Added renderer grouping commands to support groups in + SVG/PS. - JDH + +2004-05-28 Fixed, this time I really mean it, the singleton plot + plot([0]) scaling bug; Fixed Flavio's shape = N,1 bug - JDH + +2004-05-28 added colorbar - JDH + +2004-05-28 Made some changes to the matplotlib.colors.Colormap to + propertly support clim - JDH + +----------------------------------------------------------------- + +2004-05-27 0.54.1 released + +2004-05-27 Lots of small bug fixes: rotated text at negative angles, + errorbar capsize and autoscaling, right tick label + position, gtkagg on win98, alpha of figure background, + singleton plots - JDH + +2004-05-26 Added Gary's errorbar stuff and made some fixes for length + one plots and constant data plots - JDH + +2004-05-25 Tweaked TkAgg backend so that canvas.draw() works + more like the other backends. Fixed a bug resulting + in 2 draws per figure mangager show(). - JTM + +------------------------------------------------------------ + +2004-05-19 0.54 released + +2004-05-18 Added newline separated text with rotations to text.Text + layout - JDH + +2004-05-16 Added fast pcolor using PolyCollections. - JDH + +2004-05-14 Added fast polygon collections - changed scatter to use + them. Added multiple symbols to scatter. 10x speedup on + large scatters using \*Agg and 5X speedup for ps. - JDH + +2004-05-14 On second thought... created an "nx" namespace in + in numerix which maps type names onto typecodes + the same way for both numarray and Numeric. This + undoes my previous change immediately below. To get a + typename for Int16 useable in a Numeric extension: + say nx.Int16. - JTM + +2004-05-15 Rewrote transformation class in extension code, simplified + all the artist constructors - JDH + +2004-05-14 Modified the type definitions in the numarray side of + numerix so that they are Numeric typecodes and can be + used with Numeric compilex extensions. The original + numarray types were renamed to type. - JTM + +2004-05-06 Gary Ruben sent me a bevy of new plot symbols and markers. + See matplotlib.matlab.plot - JDH + +2004-05-06 Total rewrite of mathtext - factored ft2font stuff out of + layout engine and defined abstract class for font handling + to lay groundwork for ps mathtext. Rewrote parser and made + layout engine much more precise. Fixed all the layout + hacks. Added spacing commands \/ and \hspace. Added + composite chars and defined angstrom. - JDH + +2004-05-05 Refactored text instances out of backend; aligned + text with arbitrary rotations is now supported - JDH + +2004-05-05 Added a Matrix capability for numarray to numerix. JTM + +2004-05-04 Updated whats_new.html.template to use dictionary and + template loop, added anchors for all versions and items; + updated goals.txt to use those for links. PG + +2004-05-04 Added fonts_demo.py to backend_driver, and AFM and TTF font + caches to font_manager.py - PEB + +2004-05-03 Redid goals.html.template to use a goals.txt file that + has a pseudo restructured text organization. PG + +2004-05-03 Removed the close buttons on all GUIs and added the python + #! bang line to the examples following Steve Chaplin's + advice on matplotlib dev + +2004-04-29 Added CXX and rewrote backend_agg using it; tracked down + and fixed agg memory leak - JDH + +2004-04-29 Added stem plot command - JDH + +2004-04-28 Fixed PS scaling and centering bug - JDH + +2004-04-26 Fixed errorbar autoscale problem - JDH + +2004-04-22 Fixed copy tick attribute bug, fixed singular datalim + ticker bug; fixed mathtext fontsize interactive bug. - JDH + +2004-04-21 Added calls to draw_if_interactive to axes(), legend(), + and pcolor(). Deleted duplicate pcolor(). - JTM + +------------------------------------------------------------ + +2004-04-21 matplotlib 0.53 release + +2004-04-19 Fixed vertical alignment bug in PS backend - JDH + +2004-04-17 Added support for two scales on the "same axes" with tick + different ticking and labeling left right or top bottom. + See examples/two_scales.py - JDH + +2004-04-17 Added default dirs as list rather than single dir in + setupext.py - JDH + +2004-04-16 Fixed wx exception swallowing bug (and there was much + rejoicing!) - JDH + +2004-04-16 Added new ticker locator a formatter, fixed default font + return - JDH + +2004-04-16 Added get_name method to FontProperties class. Fixed font lookup + in GTK and WX backends. - PEB + +2004-04-16 Added get- and set_fontstyle msethods. - PEB + +2004-04-10 Mathtext fixes: scaling with dpi, - JDH + +2004-04-09 Improved font detection algorithm. - PEB + +2004-04-09 Move deprecation warnings from text.py to __init__.py - PEB + +2004-04-09 Added default font customization - JDH + +2004-04-08 Fixed viewlim set problem on axes and axis. - JDH + +2004-04-07 Added validate_comma_sep_str and font properties paramaters to + __init__. Removed font families and added rcParams to + FontProperties __init__ arguments in font_manager. Added + default font property parameters to .matplotlibrc file with + descriptions. Added deprecation warnings to the get\_ - and + set_fontXXX methods of the Text object. - PEB + +2004-04-06 Added load and save commands for ASCII data - JDH + +2004-04-05 Improved font caching by not reading AFM fonts until needed. + Added better documentation. Changed the behaviour of the + get_family, set_family, and set_name methods of FontProperties. + - PEB + +2004-04-05 Added WXAgg backend - JDH + +2004-04-04 Improved font caching in backend_agg with changes to + font_manager - JDH + +2004-03-29 Fixed fontdicts and kwargs to work with new font manager - + JDH + +-------------------------------------------- + +This is the Old, stale, never used changelog + +2002-12-10 - Added a TODO file and CHANGELOG. Lots to do -- get + crackin'! + + - Fixed y zoom tool bug + + - Adopted a compromise fix for the y data clipping problem. + The problem was that for solid lines, the y data clipping + (as opposed to the gc clipping) caused artifactual + horizontal solid lines near the ylim boundaries. I did a + 5% offset hack in Axes set_ylim functions which helped, + but didn't cure the problem for very high gain y zooms. + So I disabled y data clipping for connected lines . If + you need extensive y clipping, either plot(y,x) because x + data clipping is always enabled, or change the _set_clip + code to 'if 1' as indicated in the lines.py src. See + _set_clip in lines.py and set_ylim in figure.py for more + information. + + +2002-12-11 - Added a measurement dialog to the figure window to + measure axes position and the delta x delta y with a left + mouse drag. These defaults can be overridden by deriving + from Figure and overrriding button_press_event, + button_release_event, and motion_notify_event, + and _dialog_measure_tool. + + - fixed the navigation dialog so you can check the axes the + navigation buttons apply to. + + + +2003-04-23 Released matplotlib v0.1 + +2003-04-24 Added a new line style PixelLine2D which is the plots the + markers as pixels (as small as possible) with format + symbol ',' + + Added a new class Patch with derived classes Rectangle, + RegularPolygon and Circle + +2003-04-25 Implemented new functions errorbar, scatter and hist + + Added a new line type '|' which is a vline. syntax is + plot(x, Y, '|') where y.shape = len(x),2 and each row gives + the ymin,ymax for the respective values of x. Previously I + had implemented vlines as a list of lines, but I needed the + efficientcy of the numeric clipping for large numbers of + vlines outside the viewport, so I wrote a dedicated class + Vline2D which derives from Line2D + + +2003-05-01 + + Fixed ytick bug where grid and tick show outside axis viewport with gc clip + +2003-05-14 + + Added new ways to specify colors 1) matlab format string 2) + html-style hex string, 3) rgb tuple. See examples/color_demo.py + +2003-05-28 + + Changed figure rendering to draw form a pixmap to reduce flicker. + See examples/system_monitor.py for an example where the plot is + continusouly updated w/o flicker. This example is meant to + simulate a system monitor that shows free CPU, RAM, etc... + +2003-08-04 + + Added Jon Anderson's GTK shell, which doesn't require pygtk to + have threading built-in and looks nice! + +2003-08-25 + + Fixed deprecation warnings for python2.3 and pygtk-1.99.18 + +2003-08-26 + + Added figure text with new example examples/figtext.py + + +2003-08-27 + + Fixed bugs i figure text with font override dictionairies and fig + text that was placed outside the window bounding box + +2003-09-1 thru 2003-09-15 + + Added a postscript and a GD module backend + +2003-09-16 + + Fixed font scaling and point scaling so circles, squares, etc on + lines will scale with DPI as will fonts. Font scaling is not fully + implemented on the gtk backend because I have not figured out how + to scale fonts to arbitrary sizes with GTK + +2003-09-17 + + Fixed figure text bug which crashed X windows on long figure text + extending beyond display area. This was, I believe, due to the + vestigial erase functionality that was no longer needed since I + began rendering to a pixmap + +2003-09-30 Added legend + +2003-10-01 Fixed bug when colors are specified with rgb tuple or hex + string. + + +2003-10-21 Andrew Straw provided some legend code which I modified + and incorporated. Thanks Andrew! + +2003-10-27 Fixed a bug in axis.get_view_distance that affected zoom in + versus out with interactive scrolling, and a bug in the axis text + reset system that prevented the text from being redrawn on a + interactive gtk view lim set with the widget + + Fixed a bug in that prevented the manual setting of ticklabel + strings from working properly + +2003-11-02 - Do a nearest neighbor color pick on GD when + allocate fails + +2003-11-02 + - Added pcolor plot + - Added MRI example + - Fixed bug that screwed up label position if xticks or yticks were + empty + - added nearest neighbor color picker when GD max colors exceeded + - fixed figure background color bug in GD backend + +2003-11-10 - 2003-11-11 + - major refactoring. + + * Ticks (with labels, lines and grid) handled by dedicated class + * Artist now know bounding box and dpi + * Bounding boxes and transforms handled by dedicated classes + * legend in dedicated class. Does a better job of alignment and + bordering. Can be initialized with specific line instances. + See examples/legend_demo2.py + + +2003-11-14 Fixed legend positioning bug and added new position args + +2003-11-16 Finsihed porting GD to new axes API + + +2003-11-20 - add TM for matlab on website and in docs + + +2003-11-20 - make a nice errorbar and scatter screenshot + +2003-11-20 - auto line style cycling for multiple line types + broken + +2003-11-18 (using inkrect) :logical rect too big on gtk backend + +2003-11-18 ticks don't reach edge of axes in gtk mode -- + rounding error? + +2003-11-20 - port Gary's errorbar code to new API before 0.40 + +2003-11-20 - problem with stale _set_font. legend axes box + doesn't resize on save in GTK backend -- see htdocs legend_demo.py + +2003-11-21 - make a dash-dot dict for the GC + +2003-12-15 - fix install path bug diff --git a/doc/users/prev_whats_new/whats_new_0.98.4.rst b/doc/users/prev_whats_new/whats_new_0.98.4.rst new file mode 100644 index 000000000000..c10f15743f0e --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_0.98.4.rst @@ -0,0 +1,300 @@ +.. _whats-new-0-98-4: + +New in matplotlib 0.98.4 +======================== + +.. contents:: Table of Contents + :depth: 2 + + + +It's been four months since the last matplotlib release, and there are +a lot of new features and bug-fixes. + +Thanks to Charlie Moad for testing and preparing the source release, +including binaries for OS X and Windows for python 2.4 and 2.5 (2.6 +and 3.0 will not be available until numpy is available on those +releases). Thanks to the many developers who contributed to this +release, with contributions from Jae-Joon Lee, Michael Droettboom, +Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppänen, Jeff Whitaker, +Darren Dale, David Kaplan, Michiel de Hoon and many others who +submitted patches + +.. _legend-refactor: + +Legend enhancements +-------------------- + +Jae-Joon has rewritten the legend class, and added support for +multiple columns and rows, as well as fancy box drawing. See +:func:`~matplotlib.pyplot.legend` and +:class:`matplotlib.legend.Legend`. + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_98_4_legend_001.png + :target: ../../gallery/pyplots/whats_new_98_4_legend.html + :align: center + :scale: 50 + + Whats New 98 4 Legend + +.. _fancy-annotations: + +Fancy annotations and arrows +----------------------------- + +Jae-Joon has added lots of support to annotations for drawing fancy +boxes and connectors in annotations. See +:func:`~matplotlib.pyplot.annotate` and +:class:`~matplotlib.patches.BoxStyle`, +:class:`~matplotlib.patches.ArrowStyle`, and +:class:`~matplotlib.patches.ConnectionStyle`. + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_98_4_fancy_001.png + :target: ../../gallery/pyplots/whats_new_98_4_fancy.html + :align: center + :scale: 50 + + Whats New 98 4 Fancy + +.. _psd-amplitude: + + +Native OS X backend +-------------------- + +Michiel de Hoon has provided a native Mac OSX backend that is almost +completely implemented in C. The backend can therefore use Quartz +directly and, depending on the application, can be orders of magnitude +faster than the existing backends. In addition, no third-party +libraries are needed other than Python and NumPy. The backend is +interactive from the usual terminal application on Mac using regular +Python. It hasn't been tested with ipython yet, but in principle it +should to work there as well. Set 'backend : macosx' in your +matplotlibrc file, or run your script with:: + + > python myfile.py -dmacosx + +psd amplitude scaling +------------------------- + +Ryan May did a lot of work to rationalize the amplitude scaling of +:func:`~matplotlib.pyplot.psd` and friends. See +:ref:`sphx_glr_gallery_lines_bars_and_markers_psd_demo.py`. +The changes should increase MATLAB +compatibility and increase scaling options. + +.. _fill-between: + +Fill between +------------------ + +Added a :func:`~matplotlib.pyplot.fill_between` function to make it +easier to do shaded region plots in the presence of masked data. You +can pass an *x* array and a *ylower* and *yupper* array to fill +between, and an optional *where* argument which is a logical mask +where you want to do the filling. + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_98_4_fill_between_001.png + :target: ../../gallery/pyplots/whats_new_98_4_fill_between.html + :align: center + :scale: 50 + + Whats New 98 4 Fill Between + +Lots more +----------- + +Here are the 0.98.4 notes from the CHANGELOG:: + + Added mdehoon's native macosx backend from sf patch 2179017 - JDH + + Removed the prints in the set_*style commands. Return the list of + pretty-printed strings instead - JDH + + Some of the changes Michael made to improve the output of the + property tables in the rest docs broke of made difficult to use + some of the interactive doc helpers, e.g., setp and getp. Having all + the rest markup in the ipython shell also confused the docstrings. + I added a new rc param docstring.harcopy, to format the docstrings + differently for hardcopy and other use. The ArtistInspector + could use a little refactoring now since there is duplication of + effort between the rest out put and the non-rest output - JDH + + Updated spectral methods (psd, csd, etc.) to scale one-sided + densities by a factor of 2 and, optionally, scale all densities by + the sampling frequency. This gives better MATLAB + compatibility. -RM + + Fixed alignment of ticks in colorbars. -MGD + + drop the deprecated "new" keyword of np.histogram() for numpy 1.2 + or later. -JJL + + Fixed a bug in svg backend that new_figure_manager() ignores + keywords arguments such as figsize, etc. -JJL + + Fixed a bug that the handlelength of the new legend class set too + short when numpoints=1 -JJL + + Added support for data with units (e.g., dates) to + Axes.fill_between. -RM + + Added fancybox keyword to legend. Also applied some changes for + better look, including baseline adjustment of the multiline texts + so that it is center aligned. -JJL + + The transmuter classes in the patches.py are reorganized as + subclasses of the Style classes. A few more box and arrow styles + are added. -JJL + + Fixed a bug in the new legend class that didn't allowed a tuple of + coordinate values as loc. -JJL + + Improve checks for external dependencies, using subprocess + (instead of deprecated popen*) and distutils (for version + checking) - DSD + + Reimplementation of the legend which supports baseline alignment, + multi-column, and expand mode. - JJL + + Fixed histogram autoscaling bug when bins or range are given + explicitly (fixes Debian bug 503148) - MM + + Added rcParam axes.unicode_minus which allows plain hyphen for + minus when False - JDH + + Added scatterpoints support in Legend. patch by Erik Tollerud - + JJL + + Fix crash in log ticking. - MGD + + Added static helper method BrokenHBarCollection.span_where and + Axes/pyplot method fill_between. See + examples/pylab/fill_between.py - JDH + + Add x_isdata and y_isdata attributes to Artist instances, and use + them to determine whether either or both coordinates are used when + updating dataLim. This is used to fix autoscaling problems that + had been triggered by axhline, axhspan, axvline, axvspan. - EF + + Update the psd(), csd(), cohere(), and specgram() methods of Axes + and the csd() cohere(), and specgram() functions in mlab to be in + sync with the changes to psd(). In fact, under the hood, these + all call the same core to do computations. - RM + + Add 'pad_to' and 'sides' parameters to mlab.psd() to allow + controlling of zero padding and returning of negative frequency + components, respectively. These are added in a way that does not + change the API. - RM + + Fix handling of c kwarg by scatter; generalize is_string_like to + accept numpy and numpy.ma string array scalars. - RM and EF + + Fix a possible EINTR problem in dviread, which might help when + saving pdf files from the qt backend. - JKS + + Fix bug with zoom to rectangle and twin axes - MGD + + Added Jae Joon's fancy arrow, box and annotation enhancements -- + see examples/pylab_examples/annotation_demo2.py + + Autoscaling is now supported with shared axes - EF + + Fixed exception in dviread that happened with Minion - JKS + + set_xlim, ylim now return a copy of the viewlim array to avoid + modify inplace surprises + + Added image thumbnail generating function + matplotlib.image.thumbnail. See examples/misc/image_thumbnail.py + - JDH + + Applied scatleg patch based on ideas and work by Erik Tollerud and + Jae-Joon Lee. - MM + + Fixed bug in pdf backend: if you pass a file object for output + instead of a filename, e.g., in a wep app, we now flush the object + at the end. - JKS + + Add path simplification support to paths with gaps. - EF + + Fix problem with AFM files that don't specify the font's full name + or family name. - JKS + + Added 'scilimits' kwarg to Axes.ticklabel_format() method, for + easy access to the set_powerlimits method of the major + ScalarFormatter. - EF + + Experimental new kwarg borderpad to replace pad in legend, based + on suggestion by Jae-Joon Lee. - EF + + Allow spy to ignore zero values in sparse arrays, based on patch + by Tony Yu. Also fixed plot to handle empty data arrays, and + fixed handling of markers in figlegend. - EF + + Introduce drawstyles for lines. Transparently split linestyles + like 'steps--' into drawstyle 'steps' and linestyle '--'. Legends + always use drawstyle 'default'. - MM + + Fixed quiver and quiverkey bugs (failure to scale properly when + resizing) and added additional methods for determining the arrow + angles - EF + + Fix polar interpolation to handle negative values of theta - MGD + + Reorganized cbook and mlab methods related to numerical + calculations that have little to do with the goals of those two + modules into a separate module numerical_methods.py Also, added + ability to select points and stop point selection with keyboard in + ginput and manual contour labeling code. Finally, fixed contour + labeling bug. - DMK + + Fix backtick in Postscript output. - MGD + + [ 2089958 ] Path simplification for vector output backends + Leverage the simplification code exposed through path_to_polygons + to simplify certain well-behaved paths in the vector backends + (PDF, PS and SVG). "path.simplify" must be set to True in + matplotlibrc for this to work. - MGD + + Add "filled" kwarg to Path.intersects_path and + Path.intersects_bbox. - MGD + + Changed full arrows slightly to avoid an xpdf rendering problem + reported by Friedrich Hagedorn. - JKS + + Fix conversion of quadratic to cubic Bezier curves in PDF and PS + backends. Patch by Jae-Joon Lee. - JKS + + Added 5-point star marker to plot command q- EF + + Fix hatching in PS backend - MGD + + Fix log with base 2 - MGD + + Added support for bilinear interpolation in + NonUniformImage; patch by Gregory Lielens. - EF + + Added support for multiple histograms with data of + different length - MM + + Fix step plots with log scale - MGD + + Fix masked arrays with markers in non-Agg backends - MGD + + Fix clip_on kwarg so it actually works correctly - MGD + + Fix locale problems in SVG backend - MGD + + fix quiver so masked values are not plotted - JSW + + improve interactive pan/zoom in qt4 backend on windows - DSD + + Fix more bugs in NaN/inf handling. In particular, path + simplification (which does not handle NaNs or infs) will be turned + off automatically when infs or NaNs are present. Also masked + arrays are now converted to arrays with NaNs for consistent + handling of masks and NaNs - MGD and EF + + Added support for arbitrary rasterization resolutions to the SVG + backend. - MW diff --git a/doc/users/prev_whats_new/whats_new_0.99.rst b/doc/users/prev_whats_new/whats_new_0.99.rst new file mode 100644 index 000000000000..8ae2055a751e --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_0.99.rst @@ -0,0 +1,76 @@ +.. _whats-new-0-99: + +New in matplotlib 0.99 +====================== + +.. contents:: Table of Contents + :depth: 2 + + + +New documentation +----------------- + +Jae-Joon Lee has written two new guides :ref:`sphx_glr_tutorials_intermediate_legend_guide.py` +and :ref:`plotting-guide-annotation`. Michael Sarahan has written +:ref:`sphx_glr_tutorials_introductory_images.py`. John Hunter has written two new tutorials on +working with paths and transformations: :ref:`sphx_glr_tutorials_advanced_path_tutorial.py` and +:ref:`sphx_glr_tutorials_advanced_transforms_tutorial.py`. + +.. _whats-new-mplot3d: + +mplot3d +-------- + + +Reinier Heeres has ported John Porter's mplot3d over to the new +matplotlib transformations framework, and it is now available as a +toolkit mpl_toolkits.mplot3d (which now comes standard with all mpl +installs). See :ref:`mplot3d-examples-index` and +:ref:`toolkit_mplot3d-tutorial` + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_99_mplot3d_001.png + :target: ../../gallery/pyplots/whats_new_99_mplot3d.html + :align: center + :scale: 50 + + Whats New 99 Mplot3d + +.. _whats-new-axes-grid: + +axes grid toolkit +----------------- + +Jae-Joon Lee has added a new toolkit to ease displaying multiple images in +matplotlib, as well as some support for curvilinear grids to support +the world coordinate system. The toolkit is included standard with all +new mpl installs. See :ref:`axes_grid1-examples-index`, +:ref:`axisartist-examples-index`, :ref:`axes_grid1_users-guide-index` and +:ref:`axisartist_users-guide-index` + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_99_axes_grid_001.png + :target: ../../gallery/pyplots/whats_new_99_axes_grid.html + :align: center + :scale: 50 + + Whats New 99 Axes Grid + +.. _whats-new-spine: + +Axis spine placement +-------------------- + +Andrew Straw has added the ability to place "axis spines" -- the lines +that denote the data limits -- in various arbitrary locations. No +longer are your axis lines constrained to be a simple rectangle around +the figure -- you can turn on or off left, bottom, right and top, as +well as "detach" the spine to offset it away from the data. See +:ref:`sphx_glr_gallery_ticks_and_spines_spine_placement_demo.py` and +:class:`matplotlib.spines.Spine`. + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_99_spines_001.png + :target: ../../gallery/pyplots/whats_new_99_spines.html + :align: center + :scale: 50 + + Whats New 99 Spines diff --git a/doc/users/prev_whats_new/whats_new_1.0.rst b/doc/users/prev_whats_new/whats_new_1.0.rst new file mode 100644 index 000000000000..2f1185bbeb92 --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_1.0.rst @@ -0,0 +1,149 @@ +.. _whats-new-1-0: + +New in matplotlib 1.0 +====================== + +.. contents:: Table of Contents + :depth: 2 + +.. _whats-new-html5: + +HTML5/Canvas backend +--------------------- + +Simon Ratcliffe and Ludwig Schwardt have released an `HTML5/Canvas +`__ backend for matplotlib. The +backend is almost feature complete, and they have done a lot of work +comparing their html5 rendered images with our core renderer Agg. The +backend features client/server interactive navigation of matplotlib +figures in an html5 compliant browser. + +Sophisticated subplot grid layout +--------------------------------- + +Jae-Joon Lee has written :mod:`~matplotlib.gridspec`, a new module for +doing complex subplot layouts, featuring row and column spans and +more. See :ref:`sphx_glr_tutorials_intermediate_gridspec.py` for a tutorial overview. + +.. figure:: ../../gallery/userdemo/images/sphx_glr_demo_gridspec01_000.png + :target: ../../gallery/userdemo/demo_gridspec01.html + :align: center + :scale: 50 + + Demo Gridspec01 + +Easy pythonic subplots +----------------------- + +Fernando Perez got tired of all the boilerplate code needed to create a +figure and multiple subplots when using the matplotlib API, and wrote +a :func:`~matplotlib.pyplot.subplots` helper function. Basic usage +allows you to create the figure and an array of subplots with numpy +indexing (starts with 0). e.g.:: + + fig, axarr = plt.subplots(2, 2) + axarr[0,0].plot([1,2,3]) # upper, left + +See :ref:`sphx_glr_gallery_subplots_axes_and_figures_subplot_demo.py` for several code examples. + +Contour fixes and and triplot +--------------------------------- + +Ian Thomas has fixed a long-standing bug that has vexed our most +talented developers for years. :func:`~matplotlib.pyplot.contourf` +now handles interior masked regions, and the boundaries of line and +filled contours coincide. + +Additionally, he has contributed a new module :mod:`~matplotlib.tri` and +helper function :func:`~matplotlib.pyplot.triplot` for creating and +plotting unstructured triangular grids. + +.. figure:: ../../gallery/images_contours_and_fields/images/sphx_glr_triplot_demo_001.png + :target: ../../gallery/images_contours_and_fields/triplot_demo.html + :align: center + :scale: 50 + + Triplot Demo + +multiple calls to show supported +--------------------------------- + +A long standing request is to support multiple calls to +:func:`~matplotlib.pyplot.show`. This has been difficult because it +is hard to get consistent behavior across operating systems, user +interface toolkits and versions. Eric Firing has done a lot of work +on rationalizing show across backends, with the desired behavior to +make show raise all newly created figures and block execution until +they are closed. Repeated calls to show should raise newly created +figures since the last call. Eric has done a lot of testing on the +user interface toolkits and versions and platforms he has access to, +but it is not possible to test them all, so please report problems to +the `mailing list +`__ +and `bug tracker +`__. + + +mplot3d graphs can be embedded in arbitrary axes +------------------------------------------------- + +You can now place an mplot3d graph into an arbitrary axes location, +supporting mixing of 2D and 3D graphs in the same figure, and/or +multiple 3D graphs in a single figure, using the "projection" keyword +argument to add_axes or add_subplot. Thanks Ben Root. + +.. figure:: ../../gallery/pyplots/images/sphx_glr_whats_new_1_subplot3d_001.png + :target: ../../gallery/pyplots/whats_new_1_subplot3d.html + :align: center + :scale: 50 + + Whats New 1 Subplot3d + +tick_params +------------ + +Eric Firing wrote tick_params, a convenience method for changing the +appearance of ticks and tick labels. See pyplot function +:func:`~matplotlib.pyplot.tick_params` and associated Axes method +:meth:`~matplotlib.axes.Axes.tick_params`. + +Lots of performance and feature enhancements +--------------------------------------------- + + +* Faster magnification of large images, and the ability to zoom in to + a single pixel + +* Local installs of documentation work better + +* Improved "widgets" -- mouse grabbing is supported + +* More accurate snapping of lines to pixel boundaries + +* More consistent handling of color, particularly the alpha channel, + throughout the API + +Much improved software carpentry +--------------------------------- + +The matplotlib trunk is probably in as good a shape as it has ever +been, thanks to improved `software carpentry +`__. We now have a `buildbot +`__ which runs a suite of `nose +`__ regression tests on every +svn commit, auto-generating a set of images and comparing them against +a set of known-goods, sending emails to developers on failures with a +pixel-by-pixel image comparison. Releases and release +bugfixes happen in branches, allowing active new feature development +to happen in the trunk while keeping the release branches stable. +Thanks to Andrew Straw, Michael Droettboom and other matplotlib +developers for the heavy lifting. + +Bugfix marathon +---------------- + +Eric Firing went on a bug fixing and closing marathon, closing over +100 bugs on the `bug tracker +`__ with +help from Jae-Joon Lee, Michael Droettboom, Christoph Gohlke and +Michiel de Hoon. diff --git a/doc/users/prev_whats_new/whats_new_1.1.rst b/doc/users/prev_whats_new/whats_new_1.1.rst new file mode 100644 index 000000000000..489b8b6ab60a --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_1.1.rst @@ -0,0 +1,230 @@ +.. _whats-new-1-1: + +New in matplotlib 1.1 +===================== + +.. contents:: Table of Contents + :depth: 2 + + +.. note:: + + matplotlib 1.1 supports Python 2.4 to 2.7 + + +Sankey Diagrams +--------------- + +Kevin Davies has extended Yannick Copin's original Sankey example into a module +(:mod:`~matplotlib.sankey`) and provided new examples +(:ref:`sphx_glr_gallery_api_sankey_basics.py`, :ref:`sphx_glr_gallery_api_sankey_links.py`, +:ref:`sphx_glr_gallery_api_sankey_rankine.py`). + +.. figure:: ../../gallery/api/images/sphx_glr_sankey_rankine_001.png + :target: ../../gallery/api/sankey_rankine.html + :align: center + :scale: 50 + + Sankey Rankine + + +Animation +--------- + +Ryan May has written a backend-independent framework for creating +animated figures. The :mod:`~matplotlib.animation` module is intended +to replace the backend-specific examples formerly in the +:ref:`examples-index` listings. Examples using the new framework are +in :ref:`animation-examples-index`; see the entrancing :ref:`double +pendulum ` which uses +:meth:`matplotlib.animation.Animation.save` to create the movie below. + +.. raw:: html + + + +This should be considered as a beta release of the framework; +please try it and provide feedback. + + +Tight Layout +------------ + +A frequent issue raised by users of matplotlib is the lack of a layout +engine to nicely space out elements of the plots. While matplotlib still +adheres to the philosophy of giving users complete control over the placement +of plot elements, Jae-Joon Lee created the :mod:`~matplotlib.tight_layout` +module and introduced a new +command :func:`~matplotlib.pyplot.tight_layout` +to address the most common layout issues. + +.. plot:: + + plt.rcParams['savefig.facecolor'] = "0.8" + plt.rcParams['figure.figsize'] = 4, 3 + + fig, axes_list = plt.subplots(2, 1) + for ax in axes_list.flat: + ax.set(xlabel="x-label", ylabel="y-label", title="before tight_layout") + ax.locator_params(nbins=3) + + plt.show() + + plt.rcParams['savefig.facecolor'] = "0.8" + plt.rcParams['figure.figsize'] = 4, 3 + + fig, axes_list = plt.subplots(2, 1) + for ax in axes_list.flat: + ax.set(xlabel="x-label", ylabel="y-label", title="after tight_layout") + ax.locator_params(nbins=3) + + plt.tight_layout() + plt.show() + +The usage of this functionality can be as simple as :: + + plt.tight_layout() + +and it will adjust the spacing between subplots +so that the axis labels do not overlap with neighboring subplots. A +:ref:`sphx_glr_tutorials_intermediate_tight_layout_guide.py` has been created to show how to use +this new tool. + +PyQT4, PySide, and IPython +-------------------------- + +Gerald Storer made the Qt4 backend compatible with PySide as +well as PyQT4. At present, however, PySide does not support +the PyOS_InputHook mechanism for handling gui events while +waiting for text input, so it cannot be used with the new +version 0.11 of `IPython `__. Until this +feature appears in PySide, IPython users should use +the PyQT4 wrapper for QT4, which remains the matplotlib default. + +An rcParam entry, "backend.qt4", has been added to allow users +to select PyQt4, PyQt4v2, or PySide. The latter two use the +Version 2 Qt API. In most cases, users can ignore this rcParam +variable; it is available to aid in testing, and to provide control +for users who are embedding matplotlib in a PyQt4 or PySide app. + + +Legend +------ + +Jae-Joon Lee has improved plot legends. First, +legends for complex plots such as :meth:`~matplotlib.pyplot.stem` plots +will now display correctly. Second, the 'best' placement of a legend has +been improved in the presence of NANs. + +See the :ref:`sphx_glr_tutorials_intermediate_legend_guide.py` for more detailed explanation and +examples. + +.. figure:: ../../gallery/text_labels_and_annotations/images/sphx_glr_legend_demo_004.png + :target: ../../gallery/text_labels_and_annotations/legend_demo.html + :align: center + :scale: 50 + + Legend Demo4 + +mplot3d +------- + +In continuing the efforts to make 3D plotting in matplotlib just as easy +as 2D plotting, Ben Root has made several improvements to the +:mod:`~mpl_toolkits.mplot3d` module. + +* :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` has been + improved to bring the class towards feature-parity with regular + Axes objects + +* Documentation for :ref:`toolkit_mplot3d-tutorial` was significantly expanded + +* Axis labels and orientation improved + +* Most 3D plotting functions now support empty inputs + +* Ticker offset display added: + +.. figure:: ../../gallery/mplot3d/images/sphx_glr_offset_001.png + :target: ../../gallery/mplot3d/offset.html + :align: center + :scale: 50 + + Offset + +* :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf` + gains *zdir* and *offset* kwargs. You can now do this: + +.. figure:: ../../gallery/mplot3d/images/sphx_glr_contourf3d_2_001.png + :target: ../../gallery/mplot3d/contourf3d_2.html + :align: center + :scale: 50 + + Contourf3d 2 + +Numerix support removed +----------------------- + +After more than two years of deprecation warnings, Numerix support has +now been completely removed from matplotlib. + +Markers +------- + +The list of available markers for :meth:`~matplotlib.pyplot.plot` and +:meth:`~matplotlib.pyplot.scatter` has now been merged. While they +were mostly similar, some markers existed for one function, but not +the other. This merge did result in a conflict for the 'd' diamond +marker. Now, 'd' will be interpreted to always mean "thin" diamond +while 'D' will mean "regular" diamond. + +Thanks to Michael Droettboom for this effort. + +Other improvements +------------------ + +* Unit support for polar axes and :func:`~matplotlib.axes.Axes.arrow` + +* :class:`~matplotlib.projections.polar.PolarAxes` gains getters and setters for + "theta_direction", and "theta_offset" to allow for theta to go in + either the clock-wise or counter-clockwise direction and to specify where zero + degrees should be placed. + :meth:`~matplotlib.projections.polar.PolarAxes.set_theta_zero_location` is an + added convenience function. + +* Fixed error in argument handling for tri-functions such as + :meth:`~matplotlib.pyplot.tripcolor` + +* ``axes.labelweight`` parameter added to rcParams. + +* For :meth:`~matplotlib.pyplot.imshow`, *interpolation='nearest'* will + now always perform an interpolation. A "none" option has been added to + indicate no interpolation at all. + +* An error in the Hammer projection has been fixed. + +* *clabel* for :meth:`~matplotlib.pyplot.contour` now accepts a callable. + Thanks to Daniel Hyams for the original patch. + +* Jae-Joon Lee added the :class:`~mpl_toolkits.axes_grid1.axes_divider.HBox` + and :class:`~mpl_toolkits.axes_grid1.axes_divider.VBox` classes. + +* Christoph Gohlke reduced memory usage in :meth:`~matplotlib.pyplot.imshow`. + +* :meth:`~matplotlib.pyplot.scatter` now accepts empty inputs. + +* The behavior for 'symlog' scale has been fixed, but this may result + in some minor changes to existing plots. This work was refined by + ssyr. + +* Peter Butterworth added named figure support to + :func:`~matplotlib.pyplot.figure`. + +* Michiel de Hoon has modified the MacOSX backend to make + its interactive behavior consistent with the other backends. + +* Pim Schellart added a new colormap called "cubehelix". + Sameer Grover also added a colormap called "coolwarm". See it and all + other colormaps :ref:`here `. + +* Many bug fixes and documentation improvements. diff --git a/doc/users/prev_whats_new/whats_new_1.2.2.rst b/doc/users/prev_whats_new/whats_new_1.2.2.rst new file mode 100644 index 000000000000..51c43403d22c --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_1.2.2.rst @@ -0,0 +1,22 @@ +.. _whats-new-1-2-2: + +New in matplotlib 1.2.2 +======================= + +.. contents:: Table of Contents + :depth: 2 + + + +Improved collections +-------------------- + +The individual items of a collection may now have different alpha +values and be rendered correctly. This also fixes a bug where +collections were always filled in the PDF backend. + +Multiple images on same axes are correctly transparent +------------------------------------------------------ + +When putting multiple images onto the same axes, the background color +of the axes will now show through correctly. diff --git a/doc/users/prev_whats_new/whats_new_1.2.rst b/doc/users/prev_whats_new/whats_new_1.2.rst new file mode 100644 index 000000000000..495d674a3e00 --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_1.2.rst @@ -0,0 +1,229 @@ +.. _whats-new-1-2: + + +New in matplotlib 1.2 +===================== + +.. contents:: Table of Contents + :depth: 2 + + +.. note:: + + matplotlib 1.2 supports Python 2.6, 2.7, and 3.1 + +Python 3.x support +------------------ + +Matplotlib 1.2 is the first version to support Python 3.x, +specifically Python 3.1 and 3.2. To make this happen in a reasonable +way, we also had to drop support for Python versions earlier than 2.6. + +This work was done by Michael Droettboom, the Cape Town Python Users' +Group, many others and supported financially in part by the SAGE +project. + +The following GUI backends work under Python 3.x: Gtk3Cairo, Qt4Agg, +TkAgg and MacOSX. The other GUI backends do not yet have adequate +bindings for Python 3.x, but continue to work on Python 2.6 and 2.7, +particularly the Qt and QtAgg backends (which have been +deprecated). The non-GUI backends, such as PDF, PS and SVG, work on +both Python 2.x and 3.x. + +Features that depend on the Python Imaging Library, such as JPEG +handling, do not work, since the version of PIL for Python 3.x is not +sufficiently mature. + +PGF/TikZ backend +---------------- +Peter Würtz wrote a backend that allows matplotlib to export figures as +drawing commands for LaTeX. These can be processed by PdfLaTeX, XeLaTeX or +LuaLaTeX using the PGF/TikZ package. Usage examples and documentation are +found in :ref:`sphx_glr_tutorials_text_pgf.py`. + +.. image:: /_static/pgf_preamble.* + +Locator interface +----------------- + +Philip Elson exposed the intelligence behind the tick Locator classes with a +simple interface. For instance, to get no more than 5 sensible steps which +span the values 10 and 19.5:: + + >>> import matplotlib.ticker as mticker + >>> locator = mticker.MaxNLocator(nbins=5) + >>> print(locator.tick_values(10, 19.5)) + [ 10. 12. 14. 16. 18. 20.] + +Tri-Surface Plots +----------------- + +Damon McDougall added a new plotting method for the +:mod:`~mpl_toolkits.mplot3d` toolkit called +:meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. + +.. figure:: ../../gallery/mplot3d/images/sphx_glr_trisurf3d_001.png + :target: ../../gallery/mplot3d/trisurf3d.html + :align: center + :scale: 50 + + Trisurf3d + +Control the lengths of colorbar extensions +------------------------------------------ + +Andrew Dawson added a new keyword argument *extendfrac* to +:meth:`~matplotlib.pyplot.colorbar` to control the length of +minimum and maximum colorbar extensions. + +.. plot:: + + import matplotlib.pyplot as plt + import numpy as np + + x = y = np.linspace(0., 2*np.pi, 100) + X, Y = np.meshgrid(x, y) + Z = np.cos(X) * np.sin(0.5*Y) + + clevs = [-.75, -.5, -.25, 0., .25, .5, .75] + cmap = plt.cm.get_cmap(name='jet', lut=8) + + ax1 = plt.subplot(211) + cs1 = plt.contourf(x, y, Z, clevs, cmap=cmap, extend='both') + cb1 = plt.colorbar(orientation='horizontal', extendfrac=None) + cb1.set_label('Default length colorbar extensions') + + ax2 = plt.subplot(212) + cs2 = plt.contourf(x, y, Z, clevs, cmap=cmap, extend='both') + cb2 = plt.colorbar(orientation='horizontal', extendfrac='auto') + cb2.set_label('Custom length colorbar extensions') + + plt.show() + + +Figures are picklable +--------------------- + +Philip Elson added an experimental feature to make figures picklable +for quick and easy short-term storage of plots. Pickle files +are not designed for long term storage, are unsupported when restoring a pickle +saved in another matplotlib version and are insecure when restoring a pickle +from an untrusted source. Having said this, they are useful for short term +storage for later modification inside matplotlib. + + +Set default bounding box in matplotlibrc +------------------------------------------ + +Two new defaults are available in the matplotlibrc configuration file: +``savefig.bbox``, which can be set to 'standard' or 'tight', and +``savefig.pad_inches``, which controls the bounding box padding. + + +New Boxplot Functionality +------------------------- + +Users can now incorporate their own methods for computing the median and its +confidence intervals into the :meth:`~matplotlib.axes.boxplot` method. For +every column of data passed to boxplot, the user can specify an accompanying +median and confidence interval. + +.. figure:: ../../gallery/statistics/images/sphx_glr_boxplot_demo_003.png + :target: ../../gallery/statistics/boxplot_demo.html + :align: center + :scale: 50 + + Boxplot Demo3 + + +New RC parameter functionality +------------------------------ + +Matthew Emmett added a function and a context manager to help manage RC +parameters: :func:`~matplotlib.rc_file` and :class:`~matplotlib.rc_context`. +To load RC parameters from a file:: + + >>> mpl.rc_file('mpl.rc') + +To temporarily use RC parameters:: + + >>> with mpl.rc_context(fname='mpl.rc', rc={'text.usetex': True}): + >>> ... + + +Streamplot +---------- + +Tom Flannaghan and Tony Yu have added a new +:meth:`~matplotlib.pyplot.streamplot` function to plot the streamlines of +a vector field. This has been a long-requested feature and complements the +existing :meth:`~matplotlib.pyplot.quiver` function for plotting vector fields. +In addition to simply plotting the streamlines of the vector field, +:meth:`~matplotlib.pyplot.streamplot` allows users to map the colors and/or +line widths of the streamlines to a separate parameter, such as the speed or +local intensity of the vector field. + +.. figure:: ../../gallery/images_contours_and_fields/images/sphx_glr_plot_streamplot_001.png + :target: ../../gallery/images_contours_and_fields/plot_streamplot.html + :align: center + :scale: 50 + + Plot Streamplot + + +New hist functionality +---------------------- + +Nic Eggert added a new `stacked` kwarg to :meth:`~matplotlib.pyplot.hist` that +allows creation of stacked histograms using any of the histogram types. +Previously, this functionality was only available by using the `barstacked` +histogram type. Now, when `stacked=True` is passed to the function, any of the +histogram types can be stacked. The `barstacked` histogram type retains its +previous functionality for backwards compatibility. + +Updated shipped dependencies +---------------------------- + +The following dependencies that ship with matplotlib and are +optionally installed alongside it have been updated: + + - `pytz ` 2012d + + - `dateutil ` 1.5 on Python 2.x, + and 2.1 on Python 3.x + + +Face-centred colors in tripcolor plots +-------------------------------------- + +Ian Thomas extended :meth:`~matplotlib.pyplot.tripcolor` to allow one color +value to be specified for each triangular face rather than for each point in +a triangulation. + +.. figure:: ../../gallery/images_contours_and_fields/images/sphx_glr_tripcolor_demo_001.png + :target: ../../gallery/images_contours_and_fields/tripcolor_demo.html + :align: center + :scale: 50 + + Tripcolor Demo + +Hatching patterns in filled contour plots, with legends +------------------------------------------------------- + +Phil Elson added support for hatching to +:func:`~matplotlib.pyplot.contourf`, together with the ability +to use a legend to identify contoured ranges. + +.. figure:: ../../gallery/images_contours_and_fields/images/sphx_glr_contourf_hatching_001.png + :target: ../../gallery/images_contours_and_fields/contourf_hatching.html + :align: center + :scale: 50 + + Contourf Hatching + +Known issues in the matplotlib 1.2 release +------------------------------------------ + +- When using the Qt4Agg backend with IPython 0.11 or later, the save + dialog will not display. This should be fixed in a future version + of IPython. diff --git a/doc/users/prev_whats_new/whats_new_1.3.rst b/doc/users/prev_whats_new/whats_new_1.3.rst new file mode 100644 index 000000000000..2f7aba728851 --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_1.3.rst @@ -0,0 +1,402 @@ +.. _whats-new-1-3: + +New in matplotlib 1.3 +===================== + +.. contents:: Table of Contents + :depth: 2 + +.. note:: + + matplotlib 1.3 supports Python 2.6, 2.7, 3.2, and 3.3 + +New in 1.3.1 +------------ + +1.3.1 is a bugfix release, primarily dealing with improved setup and +handling of dependencies, and correcting and enhancing the +documentation. + +The following changes were made in 1.3.1 since 1.3.0. + +Enhancements +```````````` + +- Added a context manager for creating multi-page pdfs (see + `matplotlib.backends.backend_pdf.PdfPages`). + +- The WebAgg backend should now have lower latency over heterogeneous + Internet connections. + +Bug fixes +````````` + +- Histogram plots now contain the endline. + +- Fixes to the Molleweide projection. + +- Handling recent fonts from Microsoft and Macintosh-style fonts with + non-ascii metadata is improved. + +- Hatching of fill between plots now works correctly in the PDF + backend. + +- Tight bounding box support now works in the PGF backend. + +- Transparent figures now display correctly in the Qt4Agg backend. + +- Drawing lines from one subplot to another now works. + +- Unit handling on masked arrays has been improved. + +Setup and dependencies +`````````````````````` + +- Now works with any version of pyparsing 1.5.6 or later, without displaying + hundreds of warnings. + +- Now works with 64-bit versions of Ghostscript on MS-Windows. + +- When installing from source into an environment without Numpy, Numpy + will first be downloaded and built and then used to build + matplotlib. + +- Externally installed backends are now always imported using a + fully-qualified path to the module. + +- Works with newer version of wxPython. + +- Can now build with a PyCXX installed globally on the system from source. + +- Better detection of Gtk3 dependencies. + +Testing +``````` + +- Tests should now work in non-English locales. + +- PEP8 conformance tests now report on locations of issues. + + +New plotting features +--------------------- + +`xkcd`-style sketch plotting +```````````````````````````` +To give your plots a sense of authority that they may be missing, +Michael Droettboom (inspired by the work of many others in +:ghpull:`1329`) has added an `xkcd-style `__ sketch +plotting mode. To use it, simply call :func:`matplotlib.pyplot.xkcd` +before creating your plot. For really fine control, it is also possible +to modify each artist's sketch parameters individually with +:meth:`matplotlib.artist.Artist.set_sketch_params`. + +.. figure:: ../../gallery/showcase/images/sphx_glr_xkcd_001.png + :target: ../../gallery/showcase/xkcd.html + :align: center + :scale: 50 + + Xkcd + +Updated Axes3D.contour methods +------------------------------ +Damon McDougall updated the +:meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.tricontour` and +:meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf` methods to allow 3D +contour plots on abitrary unstructured user-specified triangulations. + +.. figure:: ../../gallery/mplot3d/images/sphx_glr_tricontour3d_001.png + :target: ../../gallery/mplot3d/tricontour3d.html + :align: center + :scale: 50 + + Tricontour3d + +New eventplot plot type +``````````````````````` +Todd Jennings added a :func:`~matplotlib.pyplot.eventplot` function to +create multiple rows or columns of identical line segments + +.. figure:: ../../gallery/lines_bars_and_markers/images/sphx_glr_eventplot_demo_001.png + :target: ../../gallery/lines_bars_and_markers/eventplot_demo.html + :align: center + :scale: 50 + + Eventplot Demo + +As part of this feature, there is a new +:class:`~matplotlib.collections.EventCollection` class that allows for +plotting and manipulating rows or columns of identical line segments. + +Triangular grid interpolation +````````````````````````````` +Geoffroy Billotey and Ian Thomas added classes to perform +interpolation within triangular grids: +(:class:`~matplotlib.tri.LinearTriInterpolator` and +:class:`~matplotlib.tri.CubicTriInterpolator`) and a utility class to +find the triangles in which points lie +(:class:`~matplotlib.tri.TrapezoidMapTriFinder`). A helper class to +perform mesh refinement and smooth contouring was also added +(:class:`~matplotlib.tri.UniformTriRefiner`). Finally, a class +implementing some basic tools for triangular mesh improvement was +added (:class:`~matplotlib.tri.TriAnalyzer`). + +.. figure:: ../../gallery/images_contours_and_fields/images/sphx_glr_tricontour_smooth_user_001.png + :target: ../../gallery/images_contours_and_fields/tricontour_smooth_user.html + :align: center + :scale: 50 + + Tricontour Smooth User + +Baselines for stackplot +``````````````````````` +Till Stensitzki added non-zero baselines to +:func:`~matplotlib.pyplot.stackplot`. They may be symmetric or +weighted. + +.. figure:: ../../gallery/lines_bars_and_markers/images/sphx_glr_stackplot_demo_001.png + :target: ../../gallery/lines_bars_and_markers/stackplot_demo.html + :align: center + :scale: 50 + + Stackplot Demo2 + +Rectangular colorbar extensions +``````````````````````````````` +Andrew Dawson added a new keyword argument *extendrect* to +:meth:`~matplotlib.pyplot.colorbar` to optionally make colorbar +extensions rectangular instead of triangular. + +More robust boxplots +```````````````````` +Paul Hobson provided a fix to the :func:`~matplotlib.pyplot.boxplot` +method that prevent whiskers from being drawn inside the box for +oddly distributed data sets. + +Calling subplot() without arguments +``````````````````````````````````` +A call to :func:`~matplotlib.pyplot.subplot` without any arguments now +acts the same as `subplot(111)` or `subplot(1,1,1)` -- it creates one +axes for the whole figure. This was already the behavior for both +:func:`~matplotlib.pyplot.axes` and +:func:`~matplotlib.pyplot.subplots`, and now this consistency is +shared with :func:`~matplotlib.pyplot.subplot`. + +Drawing +------- + +Independent alpha values for face and edge colors +````````````````````````````````````````````````` +Wes Campaigne modified how :class:`~matplotlib.patches.Patch` objects are +drawn such that (for backends supporting transparency) you can set different +alpha values for faces and edges, by specifying their colors in RGBA format. +Note that if you set the alpha attribute for the patch object (e.g. using +:meth:`~matplotlib.patches.Patch.set_alpha` or the ``alpha`` keyword +argument), that value will override the alpha components set in both the +face and edge colors. + +Path effects on lines +````````````````````` +Thanks to Jae-Joon Lee, path effects now also work on plot lines. + +.. figure:: ../../gallery/misc/images/sphx_glr_patheffect_demo_001.png + :target: ../../gallery/misc/patheffect_demo.html + :align: center + :scale: 50 + + Patheffect Demo + +Easier creation of colormap and normalizer for levels with colors +````````````````````````````````````````````````````````````````` +Phil Elson added the :func:`matplotlib.colors.from_levels_and_colors` +function to easily create a colormap and normalizer for representation +of discrete colors for plot types such as +:func:`matplotlib.pyplot.pcolormesh`, with a similar interface to that +of :func:`contourf`. + +Full control of the background color +```````````````````````````````````` +Wes Campaigne and Phil Elson fixed the Agg backend such that PNGs are +now saved with the correct background color when +:meth:`fig.patch.get_alpha` is not 1. + +Improved ``bbox_inches="tight"`` functionality +`````````````````````````````````````````````` +Passing ``bbox_inches="tight"`` through to :func:`plt.save` now takes +into account *all* artists on a figure - this was previously not the +case and led to several corner cases which did not function as +expected. + +Initialize a rotated rectangle +`````````````````````````````` +Damon McDougall extended the :class:`~matplotlib.patches.Rectangle` +constructor to accept an `angle` kwarg, specifying the rotation of a +rectangle in degrees. + +Text +---- + +Anchored text support +````````````````````` +The `svg` and `pgf` backends are now able to save text alignment +information to their output formats. This allows to edit text elements +in saved figures, using Inkscape for example, while preserving their +intended position. For `svg` please note that you'll have to disable +the default text-to-path conversion (``mpl.rc('svg', +fonttype='none')``). + +Better vertical text alignment and multi-line text +`````````````````````````````````````````````````` +The vertical alignment of text is now consistent across backends. You +may see small differences in text placement, particularly with rotated +text. + +If you are using a custom backend, note that the `draw_text` renderer +method is now passed the location of the baseline, not the location of +the bottom of the text bounding box. + +Multi-line text will now leave enough room for the height of very tall +or very low text, such as superscripts and subscripts. + +Left and right side axes titles +``````````````````````````````` +Andrew Dawson added the ability to add axes titles flush with the left +and right sides of the top of the axes using a new keyword argument +`loc` to :func:`~matplotlib.pyplot.title`. + +Improved manual contour plot label positioning +`````````````````````````````````````````````` +Brian Mattern modified the manual contour plot label positioning code +to interpolate along line segments and find the actual closest point +on a contour to the requested position. Previously, the closest path +vertex was used, which, in the case of straight contours was sometimes +quite distant from the requested location. Much more precise label +positioning is now possible. + +Configuration (rcParams) +------------------------ + +Quickly find rcParams +````````````````````` +Phil Elson made it easier to search for rcParameters by passing a +valid regular expression to :func:`matplotlib.RcParams.find_all`. +:class:`matplotlib.RcParams` now also has a pretty repr and str +representation so that search results are printed prettily: + + >>> import matplotlib + >>> print(matplotlib.rcParams.find_all('\.size')) + RcParams({'font.size': 12, + 'xtick.major.size': 4, + 'xtick.minor.size': 2, + 'ytick.major.size': 4, + 'ytick.minor.size': 2}) + +``axes.xmargin`` and ``axes.ymargin`` added to rcParams +``````````````````````````````````````````````````````` +``rcParam`` values (``axes.xmargin`` and ``axes.ymargin``) were added +to configure the default margins used. Previously they were +hard-coded to default to 0, default value of both rcParam values is 0. + +Changes to font rcParams +```````````````````````` +The `font.*` rcParams now affect only text objects created after the +rcParam has been set, and will not retroactively affect already +existing text objects. This brings their behavior in line with most +other rcParams. + +``savefig.jpeg_quality`` added to rcParams +`````````````````````````````````````````` +rcParam value ``savefig.jpeg_quality`` was added so that the user can +configure the default quality used when a figure is written as a JPEG. +The default quality is 95; previously, the default quality was 75. +This change minimizes the artifacting inherent in JPEG images, +particularly with images that have sharp changes in color as plots +often do. + +Backends +-------- + +WebAgg backend +`````````````` +Michael Droettboom, Phil Elson and others have developed a new +backend, WebAgg, to display figures in a web browser. It works with +animations as well as being fully interactive. + +.. image:: /_static/webagg_screenshot.png + +Future versions of matplotlib will integrate this backend with the +IPython notebook for a fully web browser based plotting frontend. + +Remember save directory +``````````````````````` +Martin Spacek made the save figure dialog remember the last directory +saved to. The default is configurable with the new `savefig.directory` +rcParam in `matplotlibrc`. + +Documentation and examples +-------------------------- + +Numpydoc docstrings +``````````````````` +Nelle Varoquaux has started an ongoing project to convert matplotlib's +docstrings to numpydoc format. See `MEP10 +`__ for more +information. + +Example reorganization +`````````````````````` +Tony Yu has begun work reorganizing the examples into more meaningful +categories. The new gallery page is the fruit of this ongoing work. +See `MEP12 `__ for +more information. + +Examples now use subplots() +``````````````````````````` +For the sake of brevity and clarity, most of the :ref:`examples +` now use the newer +:func:`~matplotlib.pyplot.subplots`, which creates a figure and one +(or multiple) axes object(s) in one call. The old way involved a call +to :func:`~matplotlib.pyplot.figure`, followed by one (or multiple) +:func:`~matplotlib.pyplot.subplot` calls. + +Infrastructure +-------------- + +Housecleaning +````````````` +A number of features that were deprecated in 1.2 or earlier, or have +not been in a working state for a long time have been removed. +Highlights include removing the Qt version 3 backends, and the FltkAgg +and Emf backends. See :ref:`changes_in_1_3` for a complete list. + +New setup script +```````````````` +matplotlib 1.3 includes an entirely rewritten setup script. We now +ship fewer dependencies with the tarballs and installers themselves. +Notably, `pytz`, `dateutil`, `pyparsing` and `six` are no longer +included with matplotlib. You can either install them manually first, +or let `pip` install them as dependencies along with matplotlib. It +is now possible to not include certain subcomponents, such as the unit +test data, in the install. See `setup.cfg.template` for more +information. + +XDG base directory support +`````````````````````````` +On Linux, matplotlib now uses the `XDG base directory specification +` +to find the `matplotlibrc` configuration file. `matplotlibrc` should +now be kept in `~/.config/matplotlib`, rather than `~/.matplotlib`. +If your configuration is found in the old location, it will still be +used, but a warning will be displayed. + +Catch opening too many figures using pyplot +``````````````````````````````````````````` +Figures created through `pyplot.figure` are retained until they are +explicitly closed. It is therefore common for new users of matplotlib +to run out of memory when creating a large series of figures in a loop +without closing them. + +matplotlib will now display a `RuntimeWarning` when too many figures +have been opened at once. By default, this is displayed for 20 or +more figures, but the exact number may be controlled using the +``figure.max_open_warning`` rcParam. diff --git a/doc/users/prev_whats_new/whats_new_1.4.rst b/doc/users/prev_whats_new/whats_new_1.4.rst new file mode 100644 index 000000000000..ffbd1701754b --- /dev/null +++ b/doc/users/prev_whats_new/whats_new_1.4.rst @@ -0,0 +1,429 @@ +.. _whats-new-1-4: + + +New in matplotlib 1.4 +===================== + +Thomas A. Caswell served as the release manager for the 1.4 release. + + +.. contents:: Table of Contents + :depth: 2 + + +.. note:: + + matplotlib 1.4 supports Python 2.6, 2.7, 3.3, and 3.4 + + +New colormap +------------ +In heatmaps, a green-to-red spectrum is often used to indicate intensity of +activity, but this can be problematic for the red/green colorblind. A new, +colorblind-friendly colormap is now available at :class:`matplotlib.cm.Wistia`. +This colormap maintains the red/green symbolism while achieving deuteranopic +legibility through brightness variations. See +`here `__ +for more information. + +The nbagg backend +----------------- +Phil Elson added a new backend, named "nbagg", which enables interactive +figures in a live IPython notebook session. The backend makes use of the +infrastructure developed for the webagg backend, which itself gives +standalone server backed interactive figures in the browser, however nbagg +does not require a dedicated matplotlib server as all communications are +handled through the IPython Comm machinery. + +As with other backends nbagg can be enabled inside the IPython notebook with:: + + import matplotlib + matplotlib.use('nbagg') + +Once figures are created and then subsequently shown, they will placed in an +interactive widget inside the notebook allowing panning and zooming in the +same way as any other matplotlib backend. Because figures require a connection +to the IPython notebook server for their interactivity, once the notebook is +saved, each figure will be rendered as a static image - thus allowing +non-interactive viewing of figures on services such as +`nbviewer `__. + + + +New plotting features +--------------------- + +Power-law normalization +``````````````````````` +Ben Gamari added a power-law normalization method, +:class:`~matplotlib.colors.PowerNorm`. This class maps a range of +values to the interval [0,1] with power-law scaling with the exponent +provided by the constructor's `gamma` argument. Power law normalization +can be useful for, e.g., emphasizing small populations in a histogram. + +Fully customizable boxplots +``````````````````````````` +Paul Hobson overhauled the :func:`~matplotlib.pyplot.boxplot` method such +that it is now completely customizable in terms of the styles and positions +of the individual artists. Under the hood, :func:`~matplotlib.pyplot.boxplot` +relies on a new function (:func:`~matplotlib.cbook.boxplot_stats`), which +accepts any data structure currently compatible with +:func:`~matplotlib.pyplot.boxplot`, and returns a list of dictionaries +containing the positions for each element of the boxplots. Then +a second method, :func:`~matplotlib.Axes.bxp` is called to draw the boxplots +based on the stats. + +The :func:`~matplotlib.pyplot.boxplot` function can be used as before to +generate boxplots from data in one step. But now the user has the +flexibility to generate the statistics independently, or to modify the +output of :func:`~matplotlib.cbook.boxplot_stats` prior to plotting +with :func:`~matplotlib.Axes.bxp`. + +Lastly, each artist (e.g., the box, outliers, cap, notches) can now be +toggled on or off and their styles can be passed in through individual +kwargs. See the examples: +:ref:`sphx_glr_gallery_statistics_boxplot.py` and +:ref:`sphx_glr_gallery_statistics_bxp.py` + +Added a bool kwarg, :code:`manage_xticks`, which if False disables the management +of the ticks and limits on the x-axis by :func:`~matplotlib.axes.Axes.bxp`. + +Support for datetime axes in 2d plots +````````````````````````````````````` +Andrew Dawson added support for datetime axes to +:func:`~matplotlib.pyplot.contour`, :func:`~matplotlib.pyplot.contourf`, +:func:`~matplotlib.pyplot.pcolormesh` and :func:`~matplotlib.pyplot.pcolor`. + +Support for additional spectrum types +````````````````````````````````````` +Todd Jennings added support for new types of frequency spectrum plots: +:func:`~matplotlib.pyplot.magnitude_spectrum`, +:func:`~matplotlib.pyplot.phase_spectrum`, and +:func:`~matplotlib.pyplot.angle_spectrum`, as well as corresponding functions +in mlab. + +He also added these spectrum types to :func:`~matplotlib.pyplot.specgram`, +as well as adding support for linear scaling there (in addition to the +existing dB scaling). Support for additional spectrum types was also added to +:func:`~matplotlib.mlab.specgram`. + +He also increased the performance for all of these functions and plot types. + +Support for detrending and windowing 2D arrays in mlab +`````````````````````````````````````````````````````` +Todd Jennings added support for 2D arrays in the +:func:`~matplotlib.mlab.detrend_mean`, :func:`~matplotlib.mlab.detrend_none`, +and :func:`~matplotlib.mlab.detrend`, as well as adding +:func:`~matplotlib.mlab.apply_window` which support windowing 2D arrays. + +Support for strides in mlab +``````````````````````````` +Todd Jennings added some functions to mlab to make it easier to use numpy +strides to create memory-efficient 2D arrays. This includes +:func:`~matplotlib.mlab.stride_repeat`, which repeats an array to create a 2D +array, and :func:`~matplotlib.mlab.stride_windows`, which uses a moving window +to create a 2D array from a 1D array. + +Formatter for new-style formatting strings +`````````````````````````````````````````` +Added `FormatStrFormatterNewStyle` which does the same job as +`FormatStrFormatter`, but accepts new-style formatting strings +instead of printf-style formatting strings + +Consistent grid sizes in streamplots +```````````````````````````````````` +:func:`~matplotlib.pyplot.streamplot` uses a base grid size of 30x30 for both +`density=1` and `density=(1, 1)`. Previously a grid size of 30x30 was used for +`density=1`, but a grid size of 25x25 was used for `density=(1, 1)`. + +Get a list of all tick labels (major and minor) +``````````````````````````````````````````````` +Added the `kwarg` 'which' to :func:`~matplotlib.Axes.get_xticklabels`, +:func:`~matplotlib.Axes.get_yticklabels` and +:func:`~matplotlib.Axis.get_ticklabels`. 'which' can be 'major', 'minor', or +'both' select which ticks to return, like +:func:`~matplotlib.Axis.set_ticks_position`. If 'which' is `None` then the old +behaviour (controlled by the bool `minor`). + +Separate horizontal/vertical axes padding support in ImageGrid +`````````````````````````````````````````````````````````````` +The `kwarg` 'axes_pad' to :class:`mpl_toolkits.axes_grid1.ImageGrid` can now +be a tuple if separate horizontal/vertical padding is needed. +This is supposed to be very helpful when you have a labelled legend next to +every subplot and you need to make some space for legend's labels. + +Support for skewed transformations +`````````````````````````````````` +The :class:`~matplotlib.transforms.Affine2D` gained additional methods +`skew` and `skew_deg` to create skewed transformations. Additionally, +matplotlib internals were cleaned up to support using such transforms in +:class:`~matplotlib.Axes`. This transform is important for some plot types, +specifically the Skew-T used in meteorology. + +.. figure:: ../../gallery/api/images/sphx_glr_skewt_001.png + :target: ../../gallery/api/skewt.html + :align: center + :scale: 50 + + Skewt + +Support for specifying properties of wedge and text in pie charts. +`````````````````````````````````````````````````````````````````` +Added the `kwargs` 'wedgeprops' and 'textprops' to :func:`~matplotlib.Axes.pie` +to accept properties for wedge and text objects in a pie. For example, one can +specify wedgeprops = {'linewidth':3} to specify the width of the borders of +the wedges in the pie. For more properties that the user can specify, look at +the docs for the wedge and text objects. + +Fixed the direction of errorbar upper/lower limits +`````````````````````````````````````````````````` +Larry Bradley fixed the :func:`~matplotlib.pyplot.errorbar` method such +that the upper and lower limits (*lolims*, *uplims*, *xlolims*, +*xuplims*) now point in the correct direction. + +More consistent add-object API for Axes +``````````````````````````````````````` +Added the Axes method `~matplotlib.axes.Axes.add_image` to put image +handling on a par with artists, collections, containers, lines, patches, +and tables. + +Violin Plots +```````````` +Per Parker, Gregory Kelsie, Adam Ortiz, Kevin Chan, Geoffrey Lee, Deokjae +Donald Seo, and Taesu Terry Lim added a basic implementation for violin +plots. Violin plots can be used to represent the distribution of sample data. +They are similar to box plots, but use a kernel density estimation function to +present a smooth approximation of the data sample used. The added features are: + +:func:`~matplotlib.Axes.violin` - Renders a violin plot from a collection of +statistics. +:func:`~matplotlib.cbook.violin_stats` - Produces a collection of statistics +suitable for rendering a violin plot. +:func:`~matplotlib.pyplot.violinplot` - Creates a violin plot from a set of +sample data. This method makes use of :func:`~matplotlib.cbook.violin_stats` +to process the input data, and :func:`~matplotlib.cbook.violin_stats` to +do the actual rendering. Users are also free to modify or replace the output of +:func:`~matplotlib.cbook.violin_stats` in order to customize the violin plots +to their liking. + +This feature was implemented for a software engineering course at the +University of Toronto, Scarborough, run in Winter 2014 by Anya Tafliovich. + +More `markevery` options to show only a subset of markers +````````````````````````````````````````````````````````` +Rohan Walker extended the `markevery` property in +:class:`~matplotlib.lines.Line2D`. You can now specify a subset of markers to +show with an int, slice object, numpy fancy indexing, or float. Using a float +shows markers at approximately equal display-coordinate-distances along the +line. + +Added size related functions to specialized `Collections` +````````````````````````````````````````````````````````` + +Added the `get_size` and `set_size` functions to control the size of +elements of specialized collections ( +:class:`~matplotlib.collections.AsteriskPolygonCollection` +:class:`~matplotlib.collections.BrokenBarHCollection` +:class:`~matplotlib.collections.CircleCollection` +:class:`~matplotlib.collections.PathCollection` +:class:`~matplotlib.collections.PolyCollection` +:class:`~matplotlib.collections.RegularPolyCollection` +:class:`~matplotlib.collections.StarPolygonCollection`). + + +Fixed the mouse coordinates giving the wrong theta value in Polar graph +``````````````````````````````````````````````````````````````````````` +Added code to +:func:`~matplotlib.InvertedPolarTransform.transform_non_affine` +to ensure that the calculated theta value was between the range of 0 and 2 * pi +since the problem was that the value can become negative after applying the +direction and rotation to the theta calculation. + +Simple quiver plot for mplot3d toolkit +`````````````````````````````````````` +A team of students in an *Engineering Large Software Systems* course, taught +by Prof. Anya Tafliovich at the University of Toronto, implemented a simple +version of a quiver plot in 3D space for the mplot3d toolkit as one of their +term project. This feature is documented in :func:`~mpl_toolkits.mplot3d.Axes3D.quiver`. +The team members are: Ryan Steve D'Souza, Victor B, xbtsw, Yang Wang, David, +Caradec Bisesar and Vlad Vassilovski. + +.. figure:: ../../gallery/mplot3d/images/sphx_glr_quiver3d_001.png + :target: ../../gallery/mplot3d/quiver3d.html + :align: center + :scale: 50 + + Quiver3d + +polar-plot r-tick locations +``````````````````````````` +Added the ability to control the angular position of the r-tick labels +on a polar plot via :func:`~matplotlib.Axes.axes.set_rlabel_position`. + + +Date handling +------------- + +n-d array support for date conversion +`````````````````````````````````````` +Andrew Dawson added support for n-d array handling to +:func:`matplotlib.dates.num2date`, :func:`matplotlib.dates.date2num` +and :func:`matplotlib.dates.datestr2num`. Support is also added to the unit +conversion interfaces :class:`matplotlib.dates.DateConverter` and +:class:`matplotlib.units.Registry`. + + +Configuration (rcParams) +------------------------ + + +``savefig.transparent`` added +````````````````````````````` +Controls whether figures are saved with a transparent +background by default. Previously `savefig` always defaulted +to a non-transparent background. + + +``axes.titleweight`` +```````````````````` +Added rcParam to control the weight of the title + +``axes.formatter.useoffset`` added +`````````````````````````````````` +Controls the default value of `useOffset` in `ScalarFormatter`. If +`True` and the data range is much smaller than the data average, then +an offset will be determined such that the tick labels are +meaningful. If `False` then the full number will be formatted in all +conditions. + +``nbagg.transparent`` added +````````````````````````````` +Controls whether nbagg figures have a transparent +background. ``nbagg.transparent`` is ``True`` by default. + + +XDG compliance +`````````````` +Matplotlib now looks for configuration files (both rcparams and style) in XDG +compliant locations. + +``style`` package added +----------------------- +You can now easily switch between different styles using the new ``style`` +package:: + + >>> from matplotlib import style + >>> style.use('dark_background') + +Subsequent plots will use updated colors, sizes, etc. To list all available +styles, use:: + + >>> print style.available + +You can add your own custom ``" ).appendTo( body ); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) { + this._storedOpacity = this.helper.css("opacity"); + } + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) { + this._storedZIndex = this.helper.css("zIndex"); + } + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { + this.overflowOffset = this.scrollParent.offset(); + } + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) { + this._cacheHelperProportions(); + } + + + //Post "activate" events to possible containers + if( !noActivation ) { + for ( i = this.containers.length - 1; i >= 0; i-- ) { + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); + } + } + + //Prepare possible droppables + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + var i, item, itemElement, intersection, + o = this.options, + scrolled = false; + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) { + scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed); + } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) { + scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed); + } + + if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) { + scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed); + } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) { + scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + + //Rearrange + for (i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + item = this.items[i]; + itemElement = item.item[0]; + intersection = this._intersectsWithPointer(item); + if (!intersection) { + continue; + } + + // Only put the placeholder inside the current Container, skip all + // items from other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this, moving items in "sub-sortables" can cause + // the placeholder to jitter between the outer and inner container. + if (item.instance !== this.currentContainer) { + continue; + } + + // cannot intersect with itself + // no useless actions that have been done before + // no action if the item moved is the parent of the item checked + if (itemElement !== this.currentItem[0] && + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && + !$.contains(this.placeholder[0], itemElement) && + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection === 1 ? "down" : "up"; + + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + //Call callbacks + this._trigger("sort", event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) { + return; + } + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) { + $.ui.ddmanager.drop(this, event); + } + + if(this.options.revert) { + var that = this, + cur = this.placeholder.offset(), + axis = this.options.axis, + animation = {}; + + if ( !axis || axis === "x" ) { + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft); + } + if ( !axis || axis === "y" ) { + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop); + } + this.reverting = true; + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper === "original") { + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) { + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + } + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { + this.helper.remove(); + } + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + str = []; + o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); + if (res) { + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); + } + }); + + if(!str.length && o.key) { + str.push(o.key + "="); + } + + return str.join("&"); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + ret = []; + + o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height, + l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height, + dyClick = this.offset.click.top, + dxClick = this.offset.click.left, + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; + + if ( this.options.tolerance === "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) && // Right Half + x2 - (this.helperProportions.width / 2) < r && // Left Half + t < y1 + (this.helperProportions.height / 2) && // Bottom Half + y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) { + return false; + } + + return this.floating ? + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta !== 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta !== 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this._setHandleClassName(); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var i, j, cur, inst, + items = [], + queries = [], + connectWith = this._connectWith(); + + if(connectWith && connected) { + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i], this.document[0]); + for ( j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); + } + } + } + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); + + function addItems() { + items.push( this ); + } + for (i = queries.length - 1; i >= 0; i--){ + queries[i][0].each( addItems ); + } + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] === item.item[0]) { + return false; + } + } + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + + var i, j, cur, inst, targetData, _queries, item, queriesLength, + items = this.items, + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], + connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i], this.document[0]); + for (j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + } + } + } + + for (i = queries.length - 1; i >= 0; i--) { + targetData = queries[i][1]; + _queries = queries[i][0]; + + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { + item = $(_queries[j]); + + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + } + } + + }, + + refreshPositions: function(fast) { + + // Determine whether items are being displayed horizontally + this.floating = this.items.length ? + this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : + false; + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + var i, item, t, p; + + for (i = this.items.length - 1; i >= 0; i--){ + item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { + continue; + } + + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + p = t.offset(); + item.left = p.left; + item.top = p.top; + } + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (i = this.containers.length - 1; i >= 0; i--){ + p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + } + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var className, + o = that.options; + + if(!o.placeholder || o.placeholder.constructor === String) { + className = o.placeholder; + o.placeholder = { + element: function() { + + var nodeName = that.currentItem[0].nodeName.toLowerCase(), + element = $( "<" + nodeName + ">", that.document[0] ) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper"); + + if ( nodeName === "tbody" ) { + that._createTrPlaceholder( + that.currentItem.find( "tr" ).eq( 0 ), + $( "", that.document[ 0 ] ).appendTo( element ) + ); + } else if ( nodeName === "tr" ) { + that._createTrPlaceholder( that.currentItem, element ); + } else if ( nodeName === "img" ) { + element.attr( "src", that.currentItem.attr( "src" ) ); + } + + if ( !className ) { + element.css( "visibility", "hidden" ); + } + + return element; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) { + return; + } + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _createTrPlaceholder: function( sourceTr, targetTr ) { + var that = this; + + sourceTr.children().each(function() { + $( " ", that.document[ 0 ] ) + .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) + .appendTo( targetTr ); + }); + }, + + _contactContainers: function(event) { + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis, + innermostContainer = null, + innermostIndex = null; + + // get innermost container that intersects with item + for (i = this.containers.length - 1; i >= 0; i--) { + + // never consider a container that's located within the item itself + if($.contains(this.currentItem[0], this.containers[i].element[0])) { + continue; + } + + if(this._intersectsWith(this.containers[i].containerCache)) { + + // if we've already found a container and it's more "inner" than this, then continue + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { + continue; + } + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) { + return; + } + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + if (!this.containers[innermostIndex].containerCache.over) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + } else { + + //When entering a new container, we will find the item with the least distance and append our item near it + dist = 10000; + itemWithLeastDistance = null; + floating = innermostContainer.floating || this._isFloating(this.currentItem); + posProperty = floating ? "left" : "top"; + sizeProperty = floating ? "width" : "height"; + axis = floating ? "clientX" : "clientY"; + + for (j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { + continue; + } + if(this.items[j].item[0] === this.currentItem[0]) { + continue; + } + + cur = this.items[j].item.offset()[posProperty]; + nearBottom = false; + if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { + nearBottom = true; + } + + if ( Math.abs( event[ axis ] - cur ) < dist ) { + dist = Math.abs( event[ axis ] - cur ); + itemWithLeastDistance = this.items[ j ]; + this.direction = nearBottom ? "up": "down"; + } + } + + //Check if dropOnEmpty is enabled + if(!itemWithLeastDistance && !this.options.dropOnEmpty) { + return; + } + + if(this.currentContainer === this.containers[innermostIndex]) { + if ( !this.currentContainer.containerCache.over ) { + this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); + this.currentContainer.containerCache.over = 1; + } + return; + } + + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + this.currentContainer = this.containers[innermostIndex]; + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + + //Add the helper to the DOM if that didn't happen already + if(!helper.parents("body").length) { + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + } + + if(helper[0] === this.currentItem[0]) { + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + } + + if(!helper[0].style.width || o.forceHelperSize) { + helper.width(this.currentItem.width()); + } + if(!helper[0].style.height || o.forceHelperSize) { + helper.height(this.currentItem.height()); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + // This needs to be actually done for all browsers, since pageX/pageY includes this information + // with an ugly IE fix + if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var ce, co, over, + o = this.options; + if(o.containment === "parent") { + o.containment = this.helper[0].parentNode; + } + if(o.containment === "document" || o.containment === "window") { + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, + (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + } + + if(!(/^(document|window|parent)$/).test(o.containment)) { + ce = $(o.containment)[0]; + co = $(o.containment).offset(); + over = ($(ce).css("overflow") !== "hidden"); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var top, left, + o = this.options, + pageX = event.pageX, + pageY = event.pageY, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) { + pageX = this.containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < this.containment[1]) { + pageY = this.containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > this.containment[2]) { + pageX = this.containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > this.containment[3]) { + pageY = this.containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter === this.counter) { + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + } + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var i, + delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) { + this.placeholder.before(this.currentItem); + } + this._noFinalSort = null; + + if(this.helper[0] === this.currentItem[0]) { + for(i in this._storedCSS) { + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { + this._storedCSS[i] = ""; + } + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + } + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + } + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + function delayEvent( type, instance, container ) { + return function( event ) { + container._trigger( type, event, instance._uiHash( instance ) ); + }; + } + for (i = this.containers.length - 1; i >= 0; i--){ + if (!noPropagation) { + delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); + } + if(this.containers[i].containerCache.over) { + delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if ( this.storedCursor ) { + this.document.find( "body" ).css( "cursor", this.storedCursor ); + this.storedStylesheet.remove(); + } + if(this._storedOpacity) { + this.helper.css("opacity", this._storedOpacity); + } + if(this._storedZIndex) { + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); + } + + this.dragging = false; + + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if ( !this.cancelHelperRemoval ) { + if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { + this.helper.remove(); + } + this.helper = null; + } + + if(!noPropagation) { + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return !this.cancelHelperRemoval; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + + +/*! + * jQuery UI Spinner 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/spinner/ + */ + + +function spinner_modifier( fn ) { + return function() { + var previous = this.element.val(); + fn.apply( this, arguments ); + this._refresh(); + if ( previous !== this.element.val() ) { + this._trigger( "change" ); + } + }; +} + +var spinner = $.widget( "ui.spinner", { + version: "1.11.4", + defaultElement: "", + widgetEventPrefix: "spin", + options: { + culture: null, + icons: { + down: "ui-icon-triangle-1-s", + up: "ui-icon-triangle-1-n" + }, + incremental: true, + max: null, + min: null, + numberFormat: null, + page: 10, + step: 1, + + change: null, + spin: null, + start: null, + stop: null + }, + + _create: function() { + // handle string values that need to be parsed + this._setOption( "max", this.options.max ); + this._setOption( "min", this.options.min ); + this._setOption( "step", this.options.step ); + + // Only format if there is a value, prevents the field from being marked + // as invalid in Firefox, see #9573. + if ( this.value() !== "" ) { + // Format the value, but don't constrain. + this._value( this.element.val(), true ); + } + + this._draw(); + this._on( this._events ); + this._refresh(); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _getCreateOptions: function() { + var options = {}, + element = this.element; + + $.each( [ "min", "max", "step" ], function( i, option ) { + var value = element.attr( option ); + if ( value !== undefined && value.length ) { + options[ option ] = value; + } + }); + + return options; + }, + + _events: { + keydown: function( event ) { + if ( this._start( event ) && this._keydown( event ) ) { + event.preventDefault(); + } + }, + keyup: "_stop", + focus: function() { + this.previous = this.element.val(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + this._stop(); + this._refresh(); + if ( this.previous !== this.element.val() ) { + this._trigger( "change", event ); + } + }, + mousewheel: function( event, delta ) { + if ( !delta ) { + return; + } + if ( !this.spinning && !this._start( event ) ) { + return false; + } + + this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); + clearTimeout( this.mousewheelTimer ); + this.mousewheelTimer = this._delay(function() { + if ( this.spinning ) { + this._stop( event ); + } + }, 100 ); + event.preventDefault(); + }, + "mousedown .ui-spinner-button": function( event ) { + var previous; + + // We never want the buttons to have focus; whenever the user is + // interacting with the spinner, the focus should be on the input. + // If the input is focused then this.previous is properly set from + // when the input first received focus. If the input is not focused + // then we need to set this.previous based on the value before spinning. + previous = this.element[0] === this.document[0].activeElement ? + this.previous : this.element.val(); + function checkFocus() { + var isActive = this.element[0] === this.document[0].activeElement; + if ( !isActive ) { + this.element.focus(); + this.previous = previous; + // support: IE + // IE sets focus asynchronously, so we need to check if focus + // moved off of the input because the user clicked on the button. + this._delay(function() { + this.previous = previous; + }); + } + } + + // ensure focus is on (or stays on) the text field + event.preventDefault(); + checkFocus.call( this ); + + // support: IE + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + // and check (again) if focus moved off of the input. + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + checkFocus.call( this ); + }); + + if ( this._start( event ) === false ) { + return; + } + + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + "mouseup .ui-spinner-button": "_stop", + "mouseenter .ui-spinner-button": function( event ) { + // button will add ui-state-active if mouse was down while mouseleave and kept down + if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { + return; + } + + if ( this._start( event ) === false ) { + return false; + } + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + // TODO: do we really want to consider this a stop? + // shouldn't we just stop the repeater and wait until mouseup before + // we trigger the stop event? + "mouseleave .ui-spinner-button": "_stop" + }, + + _draw: function() { + var uiSpinner = this.uiSpinner = this.element + .addClass( "ui-spinner-input" ) + .attr( "autocomplete", "off" ) + .wrap( this._uiSpinnerHtml() ) + .parent() + // add buttons + .append( this._buttonHtml() ); + + this.element.attr( "role", "spinbutton" ); + + // button bindings + this.buttons = uiSpinner.find( ".ui-spinner-button" ) + .attr( "tabIndex", -1 ) + .button() + .removeClass( "ui-corner-all" ); + + // IE 6 doesn't understand height: 50% for the buttons + // unless the wrapper has an explicit height + if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && + uiSpinner.height() > 0 ) { + uiSpinner.height( uiSpinner.height() ); + } + + // disable spinner if element was already disabled + if ( this.options.disabled ) { + this.disable(); + } + }, + + _keydown: function( event ) { + var options = this.options, + keyCode = $.ui.keyCode; + + switch ( event.keyCode ) { + case keyCode.UP: + this._repeat( null, 1, event ); + return true; + case keyCode.DOWN: + this._repeat( null, -1, event ); + return true; + case keyCode.PAGE_UP: + this._repeat( null, options.page, event ); + return true; + case keyCode.PAGE_DOWN: + this._repeat( null, -options.page, event ); + return true; + } + + return false; + }, + + _uiSpinnerHtml: function() { + return ""; + }, + + _buttonHtml: function() { + return "" + + "" + + "" + + "" + + "" + + "" + + ""; + }, + + _start: function( event ) { + if ( !this.spinning && this._trigger( "start", event ) === false ) { + return false; + } + + if ( !this.counter ) { + this.counter = 1; + } + this.spinning = true; + return true; + }, + + _repeat: function( i, steps, event ) { + i = i || 500; + + clearTimeout( this.timer ); + this.timer = this._delay(function() { + this._repeat( 40, steps, event ); + }, i ); + + this._spin( steps * this.options.step, event ); + }, + + _spin: function( step, event ) { + var value = this.value() || 0; + + if ( !this.counter ) { + this.counter = 1; + } + + value = this._adjustValue( value + step * this._increment( this.counter ) ); + + if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { + this._value( value ); + this.counter++; + } + }, + + _increment: function( i ) { + var incremental = this.options.incremental; + + if ( incremental ) { + return $.isFunction( incremental ) ? + incremental( i ) : + Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); + } + + return 1; + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _adjustValue: function( value ) { + var base, aboveMin, + options = this.options; + + // make sure we're at a valid step + // - find out where we are relative to the base (min or 0) + base = options.min !== null ? options.min : 0; + aboveMin = value - base; + // - round to the nearest step + aboveMin = Math.round(aboveMin / options.step) * options.step; + // - rounding is based on 0, so adjust back to our base + value = base + aboveMin; + + // fix precision from bad JS floating point math + value = parseFloat( value.toFixed( this._precision() ) ); + + // clamp the value + if ( options.max !== null && value > options.max) { + return options.max; + } + if ( options.min !== null && value < options.min ) { + return options.min; + } + + return value; + }, + + _stop: function( event ) { + if ( !this.spinning ) { + return; + } + + clearTimeout( this.timer ); + clearTimeout( this.mousewheelTimer ); + this.counter = 0; + this.spinning = false; + this._trigger( "stop", event ); + }, + + _setOption: function( key, value ) { + if ( key === "culture" || key === "numberFormat" ) { + var prevValue = this._parse( this.element.val() ); + this.options[ key ] = value; + this.element.val( this._format( prevValue ) ); + return; + } + + if ( key === "max" || key === "min" || key === "step" ) { + if ( typeof value === "string" ) { + value = this._parse( value ); + } + } + if ( key === "icons" ) { + this.buttons.first().find( ".ui-icon" ) + .removeClass( this.options.icons.up ) + .addClass( value.up ); + this.buttons.last().find( ".ui-icon" ) + .removeClass( this.options.icons.down ) + .addClass( value.down ); + } + + this._super( key, value ); + + if ( key === "disabled" ) { + this.widget().toggleClass( "ui-state-disabled", !!value ); + this.element.prop( "disabled", !!value ); + this.buttons.button( value ? "disable" : "enable" ); + } + }, + + _setOptions: spinner_modifier(function( options ) { + this._super( options ); + }), + + _parse: function( val ) { + if ( typeof val === "string" && val !== "" ) { + val = window.Globalize && this.options.numberFormat ? + Globalize.parseFloat( val, 10, this.options.culture ) : +val; + } + return val === "" || isNaN( val ) ? null : val; + }, + + _format: function( value ) { + if ( value === "" ) { + return ""; + } + return window.Globalize && this.options.numberFormat ? + Globalize.format( value, this.options.numberFormat, this.options.culture ) : + value; + }, + + _refresh: function() { + this.element.attr({ + "aria-valuemin": this.options.min, + "aria-valuemax": this.options.max, + // TODO: what should we do with values that can't be parsed? + "aria-valuenow": this._parse( this.element.val() ) + }); + }, + + isValid: function() { + var value = this.value(); + + // null is invalid + if ( value === null ) { + return false; + } + + // if value gets adjusted, it's invalid + return value === this._adjustValue( value ); + }, + + // update the value without triggering change + _value: function( value, allowAny ) { + var parsed; + if ( value !== "" ) { + parsed = this._parse( value ); + if ( parsed !== null ) { + if ( !allowAny ) { + parsed = this._adjustValue( parsed ); + } + value = this._format( parsed ); + } + } + this.element.val( value ); + this._refresh(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-spinner-input" ) + .prop( "disabled", false ) + .removeAttr( "autocomplete" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + this.uiSpinner.replaceWith( this.element ); + }, + + stepUp: spinner_modifier(function( steps ) { + this._stepUp( steps ); + }), + _stepUp: function( steps ) { + if ( this._start() ) { + this._spin( (steps || 1) * this.options.step ); + this._stop(); + } + }, + + stepDown: spinner_modifier(function( steps ) { + this._stepDown( steps ); + }), + _stepDown: function( steps ) { + if ( this._start() ) { + this._spin( (steps || 1) * -this.options.step ); + this._stop(); + } + }, + + pageUp: spinner_modifier(function( pages ) { + this._stepUp( (pages || 1) * this.options.page ); + }), + + pageDown: spinner_modifier(function( pages ) { + this._stepDown( (pages || 1) * this.options.page ); + }), + + value: function( newVal ) { + if ( !arguments.length ) { + return this._parse( this.element.val() ); + } + spinner_modifier( this._value ).call( this, newVal ); + }, + + widget: function() { + return this.uiSpinner; + } +}); + + +/*! + * jQuery UI Tabs 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tabs/ + */ + + +var tabs = $.widget( "ui.tabs", { + version: "1.11.4", + delay: 300, + options: { + active: null, + collapsible: false, + event: "click", + heightStyle: "content", + hide: null, + show: null, + + // callbacks + activate: null, + beforeActivate: null, + beforeLoad: null, + load: null + }, + + _isLocal: (function() { + var rhash = /#.*$/; + + return function( anchor ) { + var anchorUrl, locationUrl; + + // support: IE7 + // IE7 doesn't normalize the href property when set via script (#9317) + anchor = anchor.cloneNode( false ); + + anchorUrl = anchor.href.replace( rhash, "" ); + locationUrl = location.href.replace( rhash, "" ); + + // decoding may throw an error if the URL isn't UTF-8 (#9518) + try { + anchorUrl = decodeURIComponent( anchorUrl ); + } catch ( error ) {} + try { + locationUrl = decodeURIComponent( locationUrl ); + } catch ( error ) {} + + return anchor.hash.length > 1 && anchorUrl === locationUrl; + }; + })(), + + _create: function() { + var that = this, + options = this.options; + + this.running = false; + + this.element + .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-tabs-collapsible", options.collapsible ); + + this._processTabs(); + options.active = this._initialActive(); + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + if ( $.isArray( options.disabled ) ) { + options.disabled = $.unique( options.disabled.concat( + $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { + return that.tabs.index( li ); + }) + ) ).sort(); + } + + // check for length avoids error when initializing empty list + if ( this.options.active !== false && this.anchors.length ) { + this.active = this._findActive( options.active ); + } else { + this.active = $(); + } + + this._refresh(); + + if ( this.active.length ) { + this.load( options.active ); + } + }, + + _initialActive: function() { + var active = this.options.active, + collapsible = this.options.collapsible, + locationHash = location.hash.substring( 1 ); + + if ( active === null ) { + // check the fragment identifier in the URL + if ( locationHash ) { + this.tabs.each(function( i, tab ) { + if ( $( tab ).attr( "aria-controls" ) === locationHash ) { + active = i; + return false; + } + }); + } + + // check for a tab marked active via a class + if ( active === null ) { + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); + } + + // no active tab, set to false + if ( active === null || active === -1 ) { + active = this.tabs.length ? 0 : false; + } + } + + // handle numbers: negative, out of range + if ( active !== false ) { + active = this.tabs.index( this.tabs.eq( active ) ); + if ( active === -1 ) { + active = collapsible ? false : 0; + } + } + + // don't allow collapsible: false and active: false + if ( !collapsible && active === false && this.anchors.length ) { + active = 0; + } + + return active; + }, + + _getCreateEventData: function() { + return { + tab: this.active, + panel: !this.active.length ? $() : this._getPanelForTab( this.active ) + }; + }, + + _tabKeydown: function( event ) { + var focusedTab = $( this.document[0].activeElement ).closest( "li" ), + selectedIndex = this.tabs.index( focusedTab ), + goingForward = true; + + if ( this._handlePageNav( event ) ) { + return; + } + + switch ( event.keyCode ) { + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + selectedIndex++; + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.LEFT: + goingForward = false; + selectedIndex--; + break; + case $.ui.keyCode.END: + selectedIndex = this.anchors.length - 1; + break; + case $.ui.keyCode.HOME: + selectedIndex = 0; + break; + case $.ui.keyCode.SPACE: + // Activate only, no collapsing + event.preventDefault(); + clearTimeout( this.activating ); + this._activate( selectedIndex ); + return; + case $.ui.keyCode.ENTER: + // Toggle (cancel delayed activation, allow collapsing) + event.preventDefault(); + clearTimeout( this.activating ); + // Determine if we should collapse or activate + this._activate( selectedIndex === this.options.active ? false : selectedIndex ); + return; + default: + return; + } + + // Focus the appropriate tab, based on which key was pressed + event.preventDefault(); + clearTimeout( this.activating ); + selectedIndex = this._focusNextTab( selectedIndex, goingForward ); + + // Navigating with control/command key will prevent automatic activation + if ( !event.ctrlKey && !event.metaKey ) { + + // Update aria-selected immediately so that AT think the tab is already selected. + // Otherwise AT may confuse the user by stating that they need to activate the tab, + // but the tab will already be activated by the time the announcement finishes. + focusedTab.attr( "aria-selected", "false" ); + this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); + + this.activating = this._delay(function() { + this.option( "active", selectedIndex ); + }, this.delay ); + } + }, + + _panelKeydown: function( event ) { + if ( this._handlePageNav( event ) ) { + return; + } + + // Ctrl+up moves focus to the current tab + if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { + event.preventDefault(); + this.active.focus(); + } + }, + + // Alt+page up/down moves focus to the previous/next tab (and activates) + _handlePageNav: function( event ) { + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { + this._activate( this._focusNextTab( this.options.active - 1, false ) ); + return true; + } + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { + this._activate( this._focusNextTab( this.options.active + 1, true ) ); + return true; + } + }, + + _findNextTab: function( index, goingForward ) { + var lastTabIndex = this.tabs.length - 1; + + function constrain() { + if ( index > lastTabIndex ) { + index = 0; + } + if ( index < 0 ) { + index = lastTabIndex; + } + return index; + } + + while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { + index = goingForward ? index + 1 : index - 1; + } + + return index; + }, + + _focusNextTab: function( index, goingForward ) { + index = this._findNextTab( index, goingForward ); + this.tabs.eq( index ).focus(); + return index; + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "disabled" ) { + // don't use the widget factory's disabled handling + this._setupDisabled( value ); + return; + } + + this._super( key, value); + + if ( key === "collapsible" ) { + this.element.toggleClass( "ui-tabs-collapsible", value ); + // Setting collapsible: false while collapsed; open first panel + if ( !value && this.options.active === false ) { + this._activate( 0 ); + } + } + + if ( key === "event" ) { + this._setupEvents( value ); + } + + if ( key === "heightStyle" ) { + this._setupHeightStyle( value ); + } + }, + + _sanitizeSelector: function( hash ) { + return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; + }, + + refresh: function() { + var options = this.options, + lis = this.tablist.children( ":has(a[href])" ); + + // get disabled tabs from class attribute from HTML + // this will get converted to a boolean if needed in _refresh() + options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { + return lis.index( tab ); + }); + + this._processTabs(); + + // was collapsed or no tabs + if ( options.active === false || !this.anchors.length ) { + options.active = false; + this.active = $(); + // was active, but active tab is gone + } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { + // all remaining tabs are disabled + if ( this.tabs.length === options.disabled.length ) { + options.active = false; + this.active = $(); + // activate previous tab + } else { + this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); + } + // was active, active tab still exists + } else { + // make sure active index is correct + options.active = this.tabs.index( this.active ); + } + + this._refresh(); + }, + + _refresh: function() { + this._setupDisabled( this.options.disabled ); + this._setupEvents( this.options.event ); + this._setupHeightStyle( this.options.heightStyle ); + + this.tabs.not( this.active ).attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }); + this.panels.not( this._getPanelForTab( this.active ) ) + .hide() + .attr({ + "aria-hidden": "true" + }); + + // Make sure one tab is in the tab order + if ( !this.active.length ) { + this.tabs.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active + .addClass( "ui-tabs-active ui-state-active" ) + .attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + this._getPanelForTab( this.active ) + .show() + .attr({ + "aria-hidden": "false" + }); + } + }, + + _processTabs: function() { + var that = this, + prevTabs = this.tabs, + prevAnchors = this.anchors, + prevPanels = this.panels; + + this.tablist = this._getList() + .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .attr( "role", "tablist" ) + + // Prevent users from focusing disabled tabs via click + .delegate( "> li", "mousedown" + this.eventNamespace, function( event ) { + if ( $( this ).is( ".ui-state-disabled" ) ) { + event.preventDefault(); + } + }) + + // support: IE <9 + // Preventing the default action in mousedown doesn't prevent IE + // from focusing the element, so if the anchor gets focused, blur. + // We don't have to worry about focusing the previously focused + // element since clicking on a non-focusable element should focus + // the body anyway. + .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { + if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { + this.blur(); + } + }); + + this.tabs = this.tablist.find( "> li:has(a[href])" ) + .addClass( "ui-state-default ui-corner-top" ) + .attr({ + role: "tab", + tabIndex: -1 + }); + + this.anchors = this.tabs.map(function() { + return $( "a", this )[ 0 ]; + }) + .addClass( "ui-tabs-anchor" ) + .attr({ + role: "presentation", + tabIndex: -1 + }); + + this.panels = $(); + + this.anchors.each(function( i, anchor ) { + var selector, panel, panelId, + anchorId = $( anchor ).uniqueId().attr( "id" ), + tab = $( anchor ).closest( "li" ), + originalAriaControls = tab.attr( "aria-controls" ); + + // inline tab + if ( that._isLocal( anchor ) ) { + selector = anchor.hash; + panelId = selector.substring( 1 ); + panel = that.element.find( that._sanitizeSelector( selector ) ); + // remote tab + } else { + // If the tab doesn't already have aria-controls, + // generate an id by using a throw-away element + panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; + selector = "#" + panelId; + panel = that.element.find( selector ); + if ( !panel.length ) { + panel = that._createPanel( panelId ); + panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); + } + panel.attr( "aria-live", "polite" ); + } + + if ( panel.length) { + that.panels = that.panels.add( panel ); + } + if ( originalAriaControls ) { + tab.data( "ui-tabs-aria-controls", originalAriaControls ); + } + tab.attr({ + "aria-controls": panelId, + "aria-labelledby": anchorId + }); + panel.attr( "aria-labelledby", anchorId ); + }); + + this.panels + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .attr( "role", "tabpanel" ); + + // Avoid memory leaks (#10056) + if ( prevTabs ) { + this._off( prevTabs.not( this.tabs ) ); + this._off( prevAnchors.not( this.anchors ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + // allow overriding how to find the list for rare usage scenarios (#7715) + _getList: function() { + return this.tablist || this.element.find( "ol,ul" ).eq( 0 ); + }, + + _createPanel: function( id ) { + return $( "
    " ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + }, + + _setupDisabled: function( disabled ) { + if ( $.isArray( disabled ) ) { + if ( !disabled.length ) { + disabled = false; + } else if ( disabled.length === this.anchors.length ) { + disabled = true; + } + } + + // disable tabs + for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { + if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { + $( li ) + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } else { + $( li ) + .removeClass( "ui-state-disabled" ) + .removeAttr( "aria-disabled" ); + } + } + + this.options.disabled = disabled; + }, + + _setupEvents: function( event ) { + var events = {}; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.anchors.add( this.tabs ).add( this.panels ) ); + // Always prevent the default action, even when disabled + this._on( true, this.anchors, { + click: function( event ) { + event.preventDefault(); + } + }); + this._on( this.anchors, events ); + this._on( this.tabs, { keydown: "_tabKeydown" } ); + this._on( this.panels, { keydown: "_panelKeydown" } ); + + this._focusable( this.tabs ); + this._hoverable( this.tabs ); + }, + + _setupHeightStyle: function( heightStyle ) { + var maxHeight, + parent = this.element.parent(); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + maxHeight -= this.element.outerHeight() - this.element.height(); + + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.element.children().not( this.panels ).each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.panels.each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.panels.each(function() { + maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); + }).height( maxHeight ); + } + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + anchor = $( event.currentTarget ), + tab = anchor.closest( "li" ), + clickedIsActive = tab[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : this._getPanelForTab( tab ), + toHide = !active.length ? $() : this._getPanelForTab( active ), + eventData = { + oldTab: active, + oldPanel: toHide, + newTab: collapsing ? $() : tab, + newPanel: toShow + }; + + event.preventDefault(); + + if ( tab.hasClass( "ui-state-disabled" ) || + // tab is already loading + tab.hasClass( "ui-tabs-loading" ) || + // can't switch durning an animation + this.running || + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.tabs.index( tab ); + + this.active = clickedIsActive ? $() : tab; + if ( this.xhr ) { + this.xhr.abort(); + } + + if ( !toHide.length && !toShow.length ) { + $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); + } + + if ( toShow.length ) { + this.load( this.tabs.index( tab ), event ); + } + this._toggle( event, eventData ); + }, + + // handles show/hide for selecting tabs + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel; + + this.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && that.options.show ) { + that._show( toShow, that.options.show, complete ); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && this.options.hide ) { + this._hide( toHide, this.options.hide, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + + toHide.attr( "aria-hidden", "true" ); + eventData.oldTab.attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); + // If we're switching tabs, remove the old tab from the tab order. + // If we're opening from collapsed state, remove the previous tab from the tab order. + // If we're collapsing, then keep the collapsing tab in the tab order. + if ( toShow.length && toHide.length ) { + eventData.oldTab.attr( "tabIndex", -1 ); + } else if ( toShow.length ) { + this.tabs.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow.attr( "aria-hidden", "false" ); + eventData.newTab.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + }, + + _activate: function( index ) { + var anchor, + active = this._findActive( index ); + + // trying to activate the already active panel + if ( active[ 0 ] === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the current active header + if ( !active.length ) { + active = this.active; + } + + anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; + this._eventHandler({ + target: anchor, + currentTarget: anchor, + preventDefault: $.noop + }); + }, + + _findActive: function( index ) { + return index === false ? $() : this.tabs.eq( index ); + }, + + _getIndex: function( index ) { + // meta-function to give users option to provide a href string instead of a numerical index. + if ( typeof index === "string" ) { + index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); + } + + return index; + }, + + _destroy: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); + + this.tablist + .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .removeAttr( "role" ); + + this.anchors + .removeClass( "ui-tabs-anchor" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeUniqueId(); + + this.tablist.unbind( this.eventNamespace ); + + this.tabs.add( this.panels ).each(function() { + if ( $.data( this, "ui-tabs-destroy" ) ) { + $( this ).remove(); + } else { + $( this ) + .removeClass( "ui-state-default ui-state-active ui-state-disabled " + + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-live" ) + .removeAttr( "aria-busy" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "role" ); + } + }); + + this.tabs.each(function() { + var li = $( this ), + prev = li.data( "ui-tabs-aria-controls" ); + if ( prev ) { + li + .attr( "aria-controls", prev ) + .removeData( "ui-tabs-aria-controls" ); + } else { + li.removeAttr( "aria-controls" ); + } + }); + + this.panels.show(); + + if ( this.options.heightStyle !== "content" ) { + this.panels.css( "height", "" ); + } + }, + + enable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === false ) { + return; + } + + if ( index === undefined ) { + disabled = false; + } else { + index = this._getIndex( index ); + if ( $.isArray( disabled ) ) { + disabled = $.map( disabled, function( num ) { + return num !== index ? num : null; + }); + } else { + disabled = $.map( this.tabs, function( li, num ) { + return num !== index ? num : null; + }); + } + } + this._setupDisabled( disabled ); + }, + + disable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === true ) { + return; + } + + if ( index === undefined ) { + disabled = true; + } else { + index = this._getIndex( index ); + if ( $.inArray( index, disabled ) !== -1 ) { + return; + } + if ( $.isArray( disabled ) ) { + disabled = $.merge( [ index ], disabled ).sort(); + } else { + disabled = [ index ]; + } + } + this._setupDisabled( disabled ); + }, + + load: function( index, event ) { + index = this._getIndex( index ); + var that = this, + tab = this.tabs.eq( index ), + anchor = tab.find( ".ui-tabs-anchor" ), + panel = this._getPanelForTab( tab ), + eventData = { + tab: tab, + panel: panel + }, + complete = function( jqXHR, status ) { + if ( status === "abort" ) { + that.panels.stop( false, true ); + } + + tab.removeClass( "ui-tabs-loading" ); + panel.removeAttr( "aria-busy" ); + + if ( jqXHR === that.xhr ) { + delete that.xhr; + } + }; + + // not remote + if ( this._isLocal( anchor[ 0 ] ) ) { + return; + } + + this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); + + // support: jQuery <1.8 + // jQuery <1.8 returns false if the request is canceled in beforeSend, + // but as of 1.8, $.ajax() always returns a jqXHR object. + if ( this.xhr && this.xhr.statusText !== "canceled" ) { + tab.addClass( "ui-tabs-loading" ); + panel.attr( "aria-busy", "true" ); + + this.xhr + .done(function( response, status, jqXHR ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + panel.html( response ); + that._trigger( "load", event, eventData ); + + complete( jqXHR, status ); + }, 1 ); + }) + .fail(function( jqXHR, status ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + complete( jqXHR, status ); + }, 1 ); + }); + } + }, + + _ajaxSettings: function( anchor, event, eventData ) { + var that = this; + return { + url: anchor.attr( "href" ), + beforeSend: function( jqXHR, settings ) { + return that._trigger( "beforeLoad", event, + $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); + } + }; + }, + + _getPanelForTab: function( tab ) { + var id = $( tab ).attr( "aria-controls" ); + return this.element.find( this._sanitizeSelector( "#" + id ) ); + } +}); + + +/*! + * jQuery UI Tooltip 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tooltip/ + */ + + +var tooltip = $.widget( "ui.tooltip", { + version: "1.11.4", + options: { + content: function() { + // support: IE<9, Opera in jQuery <1.7 + // .text() can't accept undefined, so coerce to a string + var title = $( this ).attr( "title" ) || ""; + // Escape title, since we're going from an attribute to raw HTML + return $( "" ).text( title ).html(); + }, + hide: true, + // Disabled elements have inconsistent behavior across browsers (#8661) + items: "[title]:not([disabled])", + position: { + my: "left top+15", + at: "left bottom", + collision: "flipfit flip" + }, + show: true, + tooltipClass: null, + track: false, + + // callbacks + close: null, + open: null + }, + + _addDescribedBy: function( elem, id ) { + var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); + describedby.push( id ); + elem + .data( "ui-tooltip-id", id ) + .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); + }, + + _removeDescribedBy: function( elem ) { + var id = elem.data( "ui-tooltip-id" ), + describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), + index = $.inArray( id, describedby ); + + if ( index !== -1 ) { + describedby.splice( index, 1 ); + } + + elem.removeData( "ui-tooltip-id" ); + describedby = $.trim( describedby.join( " " ) ); + if ( describedby ) { + elem.attr( "aria-describedby", describedby ); + } else { + elem.removeAttr( "aria-describedby" ); + } + }, + + _create: function() { + this._on({ + mouseover: "open", + focusin: "open" + }); + + // IDs of generated tooltips, needed for destroy + this.tooltips = {}; + + // IDs of parent tooltips where we removed the title attribute + this.parents = {}; + + if ( this.options.disabled ) { + this._disable(); + } + + // Append the aria-live region so tooltips announce correctly + this.liveRegion = $( "
    " ) + .attr({ + role: "log", + "aria-live": "assertive", + "aria-relevant": "additions" + }) + .addClass( "ui-helper-hidden-accessible" ) + .appendTo( this.document[ 0 ].body ); + }, + + _setOption: function( key, value ) { + var that = this; + + if ( key === "disabled" ) { + this[ value ? "_disable" : "_enable" ](); + this.options[ key ] = value; + // disable element style changes + return; + } + + this._super( key, value ); + + if ( key === "content" ) { + $.each( this.tooltips, function( id, tooltipData ) { + that._updateContent( tooltipData.element ); + }); + } + }, + + _disable: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, tooltipData ) { + var event = $.Event( "blur" ); + event.target = event.currentTarget = tooltipData.element[ 0 ]; + that.close( event, true ); + }); + + // remove title attributes to prevent native tooltips + this.element.find( this.options.items ).addBack().each(function() { + var element = $( this ); + if ( element.is( "[title]" ) ) { + element + .data( "ui-tooltip-title", element.attr( "title" ) ) + .removeAttr( "title" ); + } + }); + }, + + _enable: function() { + // restore title attributes + this.element.find( this.options.items ).addBack().each(function() { + var element = $( this ); + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + }); + }, + + open: function( event ) { + var that = this, + target = $( event ? event.target : this.element ) + // we need closest here due to mouseover bubbling, + // but always pointing at the same event target + .closest( this.options.items ); + + // No element to show a tooltip for or the tooltip is already open + if ( !target.length || target.data( "ui-tooltip-id" ) ) { + return; + } + + if ( target.attr( "title" ) ) { + target.data( "ui-tooltip-title", target.attr( "title" ) ); + } + + target.data( "ui-tooltip-open", true ); + + // kill parent tooltips, custom or native, for hover + if ( event && event.type === "mouseover" ) { + target.parents().each(function() { + var parent = $( this ), + blurEvent; + if ( parent.data( "ui-tooltip-open" ) ) { + blurEvent = $.Event( "blur" ); + blurEvent.target = blurEvent.currentTarget = this; + that.close( blurEvent, true ); + } + if ( parent.attr( "title" ) ) { + parent.uniqueId(); + that.parents[ this.id ] = { + element: this, + title: parent.attr( "title" ) + }; + parent.attr( "title", "" ); + } + }); + } + + this._registerCloseHandlers( event, target ); + this._updateContent( target, event ); + }, + + _updateContent: function( target, event ) { + var content, + contentOption = this.options.content, + that = this, + eventType = event ? event.type : null; + + if ( typeof contentOption === "string" ) { + return this._open( event, target, contentOption ); + } + + content = contentOption.call( target[0], function( response ) { + + // IE may instantly serve a cached response for ajax requests + // delay this call to _open so the other call to _open runs first + that._delay(function() { + + // Ignore async response if tooltip was closed already + if ( !target.data( "ui-tooltip-open" ) ) { + return; + } + + // jQuery creates a special event for focusin when it doesn't + // exist natively. To improve performance, the native event + // object is reused and the type is changed. Therefore, we can't + // rely on the type being correct after the event finished + // bubbling, so we set it back to the previous value. (#8740) + if ( event ) { + event.type = eventType; + } + this._open( event, target, response ); + }); + }); + if ( content ) { + this._open( event, target, content ); + } + }, + + _open: function( event, target, content ) { + var tooltipData, tooltip, delayedShow, a11yContent, + positionOption = $.extend( {}, this.options.position ); + + if ( !content ) { + return; + } + + // Content can be updated multiple times. If the tooltip already + // exists, then just update the content and bail. + tooltipData = this._find( target ); + if ( tooltipData ) { + tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); + return; + } + + // if we have a title, clear it to prevent the native tooltip + // we have to check first to avoid defining a title if none exists + // (we don't want to cause an element to start matching [title]) + // + // We use removeAttr only for key events, to allow IE to export the correct + // accessible attributes. For mouse events, set to empty string to avoid + // native tooltip showing up (happens only when removing inside mouseover). + if ( target.is( "[title]" ) ) { + if ( event && event.type === "mouseover" ) { + target.attr( "title", "" ); + } else { + target.removeAttr( "title" ); + } + } + + tooltipData = this._tooltip( target ); + tooltip = tooltipData.tooltip; + this._addDescribedBy( target, tooltip.attr( "id" ) ); + tooltip.find( ".ui-tooltip-content" ).html( content ); + + // Support: Voiceover on OS X, JAWS on IE <= 9 + // JAWS announces deletions even when aria-relevant="additions" + // Voiceover will sometimes re-read the entire log region's contents from the beginning + this.liveRegion.children().hide(); + if ( content.clone ) { + a11yContent = content.clone(); + a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" ); + } else { + a11yContent = content; + } + $( "
    " ).html( a11yContent ).appendTo( this.liveRegion ); + + function position( event ) { + positionOption.of = event; + if ( tooltip.is( ":hidden" ) ) { + return; + } + tooltip.position( positionOption ); + } + if ( this.options.track && event && /^mouse/.test( event.type ) ) { + this._on( this.document, { + mousemove: position + }); + // trigger once to override element-relative positioning + position( event ); + } else { + tooltip.position( $.extend({ + of: target + }, this.options.position ) ); + } + + tooltip.hide(); + + this._show( tooltip, this.options.show ); + // Handle tracking tooltips that are shown with a delay (#8644). As soon + // as the tooltip is visible, position the tooltip using the most recent + // event. + if ( this.options.show && this.options.show.delay ) { + delayedShow = this.delayedShow = setInterval(function() { + if ( tooltip.is( ":visible" ) ) { + position( positionOption.of ); + clearInterval( delayedShow ); + } + }, $.fx.interval ); + } + + this._trigger( "open", event, { tooltip: tooltip } ); + }, + + _registerCloseHandlers: function( event, target ) { + var events = { + keyup: function( event ) { + if ( event.keyCode === $.ui.keyCode.ESCAPE ) { + var fakeEvent = $.Event(event); + fakeEvent.currentTarget = target[0]; + this.close( fakeEvent, true ); + } + } + }; + + // Only bind remove handler for delegated targets. Non-delegated + // tooltips will handle this in destroy. + if ( target[ 0 ] !== this.element[ 0 ] ) { + events.remove = function() { + this._removeTooltip( this._find( target ).tooltip ); + }; + } + + if ( !event || event.type === "mouseover" ) { + events.mouseleave = "close"; + } + if ( !event || event.type === "focusin" ) { + events.focusout = "close"; + } + this._on( true, target, events ); + }, + + close: function( event ) { + var tooltip, + that = this, + target = $( event ? event.currentTarget : this.element ), + tooltipData = this._find( target ); + + // The tooltip may already be closed + if ( !tooltipData ) { + + // We set ui-tooltip-open immediately upon open (in open()), but only set the + // additional data once there's actually content to show (in _open()). So even if the + // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in + // the period between open() and _open(). + target.removeData( "ui-tooltip-open" ); + return; + } + + tooltip = tooltipData.tooltip; + + // disabling closes the tooltip, so we need to track when we're closing + // to avoid an infinite loop in case the tooltip becomes disabled on close + if ( tooltipData.closing ) { + return; + } + + // Clear the interval for delayed tracking tooltips + clearInterval( this.delayedShow ); + + // only set title if we had one before (see comment in _open()) + // If the title attribute has changed since open(), don't restore + if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) { + target.attr( "title", target.data( "ui-tooltip-title" ) ); + } + + this._removeDescribedBy( target ); + + tooltipData.hiding = true; + tooltip.stop( true ); + this._hide( tooltip, this.options.hide, function() { + that._removeTooltip( $( this ) ); + }); + + target.removeData( "ui-tooltip-open" ); + this._off( target, "mouseleave focusout keyup" ); + + // Remove 'remove' binding only on delegated targets + if ( target[ 0 ] !== this.element[ 0 ] ) { + this._off( target, "remove" ); + } + this._off( this.document, "mousemove" ); + + if ( event && event.type === "mouseleave" ) { + $.each( this.parents, function( id, parent ) { + $( parent.element ).attr( "title", parent.title ); + delete that.parents[ id ]; + }); + } + + tooltipData.closing = true; + this._trigger( "close", event, { tooltip: tooltip } ); + if ( !tooltipData.hiding ) { + tooltipData.closing = false; + } + }, + + _tooltip: function( element ) { + var tooltip = $( "
    " ) + .attr( "role", "tooltip" ) + .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + + ( this.options.tooltipClass || "" ) ), + id = tooltip.uniqueId().attr( "id" ); + + $( "
    " ) + .addClass( "ui-tooltip-content" ) + .appendTo( tooltip ); + + tooltip.appendTo( this.document[0].body ); + + return this.tooltips[ id ] = { + element: element, + tooltip: tooltip + }; + }, + + _find: function( target ) { + var id = target.data( "ui-tooltip-id" ); + return id ? this.tooltips[ id ] : null; + }, + + _removeTooltip: function( tooltip ) { + tooltip.remove(); + delete this.tooltips[ tooltip.attr( "id" ) ]; + }, + + _destroy: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, tooltipData ) { + // Delegate to close method to handle common cleanup + var event = $.Event( "blur" ), + element = tooltipData.element; + event.target = event.currentTarget = element[ 0 ]; + that.close( event, true ); + + // Remove immediately; destroying an open tooltip doesn't use the + // hide animation + $( "#" + id ).remove(); + + // Restore the title + if ( element.data( "ui-tooltip-title" ) ) { + // If the title attribute has changed since open(), don't restore + if ( !element.attr( "title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + element.removeData( "ui-tooltip-title" ); + } + }); + this.liveRegion.remove(); + } +}); + + + +})); \ No newline at end of file diff --git a/lib/matplotlib/backends/web_backend/jquery/js/jquery-ui.min.js b/lib/matplotlib/backends/web_backend/jquery/js/jquery-ui.min.js index 1365ee1c4179..5824d1292db4 100644 --- a/lib/matplotlib/backends/web_backend/jquery/js/jquery-ui.min.js +++ b/lib/matplotlib/backends/web_backend/jquery/js/jquery-ui.min.js @@ -1,16 +1,13 @@ -/*! - * jQuery UI @VERSION - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!=="map")return!1;h=a("img[usemap=#"+g+"]")[0];return!!h&&d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"@VERSION",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){if(c===b)return g["inner"+d].call(this);return this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){if(typeof b!="number")return g["outer"+d].call(this,b);return this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!!d&&!!a.element[0].parentNode&&a.element[0].parentNode.nodeType!==11)for(var e=0;e0)return!0;b[d]=1,e=b[d]>0,b[d]=0;return e},isOverAxis:function(a,b,c){return a>b&&a",options:{disabled:!1,create:null},_createWidget:function(b,c){c=a(c||this.defaultElement||this)[0],this.element=a(c),this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),c!==this&&(a.data(c,this.widgetName,this),this._bind({remove:"destroy"}),this.document=a(c.style?c.ownerDocument:c.document||c),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create"),this._init()},_getCreateOptions:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled"),this.bindings.unbind("."+this.widgetName),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var e=c,f,g,h;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof c=="string"){e={},f=c.split("."),c=f.shift();if(f.length){g=e[c]=a.widget.extend({},this.options[c]);for(h=0;h=9)&&!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b));return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{version:"@VERSION",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!!this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy();return this}},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return!1;this.handle=this._getHandle(b);if(!this.handle)return!1;a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return!0},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment();if(this._trigger("start",b)===!1){this._clear();return!1}this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b);return!0},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1){this._mouseUp({});return!1}this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper==="original")return!1;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",b)!==!1&&d._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b);return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)});return c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.lefth[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.toph[3]?j-this.offset.click.toph[2]?k-this.offset.click.left=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f=k&&g<=l||h>=k&&h<=l||gl)&&(e>=i&&e<=j||f>=i&&f<=j||ej);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();droppablesLoop:for(var g=0;g
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e
    ');/sw|se|ne|nw/.test(f)&&h.css({zIndex:++c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){c.disabled||(a(this).removeClass("ui-resizable-autohide"),b._handles.show())},function(){c.disabled||b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement);return this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),a.browser.opera&&/relative/.test(f.css("position"))&&f.css({position:"relative",top:"auto",left:"auto"}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b);return!0},_mouseDrag:function(a){var b=this.helper,c=this.options,d={},e=this,f=this.originalMousePosition,g=this.axis,h=a.pageX-f.left||0,i=a.pageY-f.top||0,j=this._change[g];if(!j)return!1;var k=j.apply(this,[a,h,i]);this._updateVirtualBoundaries(a.shiftKey);if(this._aspectRatio||a.shiftKey)k=this._updateRatio(k,a);k=this._respectSize(k,a),this._propagate("resize",a),b.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(k),this._trigger("resize",a,this.ui());return!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),ea.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeight);var p=!a.width&&!a.height;p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null);return a},_proportionallyResize:function(){var b=this.options;if(!!this._proportionallyResizeElements.length){var c=this.helper||this.element;for(var d=0;d
    ');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10),position:b.css("position")})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,e){a(b).each(function(){var b=a(this),f=a(this).data("resizable-alsoresize"),g={},i=e&&e.length?e:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(i,function(a,b){var c=(f[b]||0)+(h[b]||0);c&&c>=0&&(g[b]=c||null)}),a.browser.opera&&/relative/.test(b.css("position"))&&(d._revertToRelativePosition=!0,b.css({position:"absolute",top:"auto",left:"auto"})),b.css(g)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};d._revertToRelativePosition&&(d._revertToRelativePosition=!1,typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)),a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!!i){e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/e.aspectRatio),d.position.left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*e.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{version:"@VERSION",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("
    ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy();return this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(!this.options.disabled){var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element});return!1}})}},_mouseDrag:function(b){var c=this;this.dragged=!0;if(!this.options.disabled){var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var i=h;h=f,f=i}this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!!i&&i.element!=c.element[0]){var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.righth||i.bottome&&i.rightf&&i.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget().toggleClass("ui-sortable-disabled",!!c)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f){e=a(this);return!1}});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}this.currentItem=e,this._removeCurrentsFromItems();return!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b);return!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(b,c){if(!!b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers -[c].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"=");return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+jf&&b+ka[this.floating?"width":"height"]?l:f0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a),this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];e||(b.style.visibility="hidden");return b},update:function(a,b){if(!e||!!d.forcePlaceholderSize)b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!!c)if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.items[i][this.containers[d].floating?"left":"top"];Math.abs(j-h)this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.topthis.containment[3]?h-this.offset.click.topthis.containment[2]?i-this.offset.click.left=0;f--)a.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),b.css("position")==="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e);return d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus());return b},setTransition:function(b,c,d,e){e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])});return e}}),a.fn.extend({effect:function(b,d,e,f){function m(b){function f(){a.isFunction(d)&&d.call(c[0]),a.isFunction(b)&&b()}var c=a(this),d=g.complete,e=g.mode;(c.is(":hidden")?e==="hide":e==="show")?f():j.call(c[0],g,f)}var g=l.apply(this,arguments),h=g.mode,i=g.queue,j=a.effects.effect[g.effect],k=!j&&c&&a.effects[g.effect];if(a.fx.off||!j&&!k)return h?this[h](g.duration,g.complete):this.each(function(){g.complete&&g.complete.call(this)});return j?i===!1?this.each(m):this.queue(i||"fx",m):k.call(this,{options:g,duration:g.duration,callback:g.complete,mode:g.mode})},_show:a.fn.show,show:function(a){if(m(a))return this._show.apply(this,arguments);var b=l.apply(this,arguments);b.mode="show";return this.effect.call(this,b)},_hide:a.fn.hide,hide:function(a){if(m(a))return this._hide.apply(this,arguments);var b=l.apply(this,arguments);b.mode="hide";return this.effect.call(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(m(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=l.apply(this,arguments);c.mode="toggle";return this.effect.call(this,c)},cssUnit:function(b){var c=this.css(b),d=[];a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])});return d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=e*.3,h=d;if(b==0)return c;if((b/=e)==1)return c+d;h1&&t.splice.apply(t,[1,0].concat(t.splice(u,l+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.clip=function(b,c){var d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g=f==="show",h=b.direction||"vertical",i=h==="vertical",j=i?"height":"width",k=i?"top":"left",l={},m,n,o;a.effects.save(d,e),d.show(),m=a.effects.createWrapper(d).css({overflow:"hidden"}),n=d[0].tagName==="IMG"?m:d,o=n[j](),g&&(n.css(j,0),n.css(k,o/2)),l[j]=g?o:0,l[k]=g?0:o/2,n.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){g||d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.drop=function(b,c){var d=a(this),e=["position","top","bottom","left","right","opacity","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g=f==="show",h=b.direction||"left",i=h==="up"||h==="down"?"top":"left",j=h==="up"||h==="left"?"pos":"neg",k={opacity:g?1:0},l;a.effects.save(d,e),d.show(),a.effects.createWrapper(d),l=b.distance||d[i=="top"?"outerHeight":"outerWidth"]({margin:!0})/2,g&&d.css("opacity",0).css(i,j=="pos"?-l:l),k[i]=(g?j==="pos"?"+=":"-=":j==="pos"?"-=":"+=")+l,d.animate(k,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){f=="hide"&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.explode=function(b,c){function t(){f.css({visibility:"visible"}),a(l).remove(),h||f.hide(),c()}function s(){l.push(this),l.length==d*e&&t()}var d=b.pieces?Math.round(Math.sqrt(b.pieces)):3,e=d,f=a(this),g=a.effects.setMode(f,b.mode||"hide"),h=g==="show",i=f.show().css("visibility","hidden").offset(),j=Math.ceil(f.outerWidth()/e),k=Math.ceil(f.outerHeight()/d),l=[],m,n,o,p,q,r;for(m=0;m
    ").css({position:"absolute",visibility:"visible",left:-n*j,top:-m*k}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:j,height:k,left:o+(h?q*j:0),top:p+(h?r*k:0),opacity:h?0:1}).animate({left:o+(h?0:q*j),top:p+(h?0:r*k),opacity:h?1:0},b.duration||500,b.easing,s)}}}(jQuery),function(a,b){a.effects.effect.fade=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"toggle"),f=e==="hide";d.show(),d.animate({opacity:f?0:1},{queue:!1,duration:b.duration,easing:b.easing,complete:function(){f&&d.hide(),c()}})}}(jQuery),function(a,b){a.effects.effect.fold=function(b,c){var d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g=f==="show",h=f==="hide",i=b.size||15,j=/([0-9]+)%/.exec(i),k=!!b.horizFirst,l=g!=k,m=l?["width","height"]:["height","width"],n=b.duration/2,o,p,q={},r={};a.effects.save(d,e),d.show(),o=a.effects.createWrapper(d).css({overflow:"hidden"}),p=l?[o.width(),o.height()]:[o.height(),o.width()],j&&(i=parseInt(j[1],10)/100*p[h?0:1]),g&&o.css(k?{height:0,width:i}:{height:i,width:0}),q[m[0]]=g?p[0]:i,r[m[1]]=g?p[1]:0,o.animate(q,n,b.easing).animate(r,n,b.easing,function(){h&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()})}}(jQuery),function(a,b){a.effects.effect.highlight=function(b,c){var d=a(this),e=["backgroundImage","backgroundColor","opacity"],f= -a.effects.setMode(d,b.mode||"show"),g={backgroundColor:d.css("backgroundColor")};f==="hide"&&(g.opacity=0),a.effects.save(d,e),d.show().css({backgroundImage:"none",backgroundColor:b.color||"#ffff99"}).animate(g,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){f==="hide"&&d.hide(),a.effects.restore(d,e),c()}})}}(jQuery),function(a,b){a.effects.effect.pulsate=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"show"),f=e==="show",g=e==="hide",h=f||e==="hide",i=(b.times||5)*2+(h?1:0),j=b.duration/i,k=0,l=d.queue(),m=l.length,n;if(f||!d.is(":visible"))d.css("opacity",0).show(),k=1;for(n=1;n1&&l.splice.apply(l,[1,0].concat(l.splice(m,i+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.puff=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"hide"),f=e==="hide",g=parseInt(b.percent,10)||150,h=g/100,i={height:d.height(),width:d.width()};a.extend(b,{effect:"scale",queue:!1,fade:!0,mode:e,complete:c,percent:f?g:100,from:f?i:{height:i.height*h,width:i.width*h}}),d.effect(b)},a.effects.effect.scale=function(b,c){var d=a(this),e=a.extend(!0,{},b),f=a.effects.setMode(d,b.mode||"effect"),g=parseInt(b.percent,10)||(parseInt(b.percent,10)==0?0:f=="hide"?0:100),h=b.direction||"both",i=b.origin,j={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},k={y:h!="horizontal"?g/100:1,x:h!="vertical"?g/100:1};e.effect="size",e.queue=!1,e.complete=c,f!="effect"&&(e.origin=i||["middle","center"],e.restore=!0),e.from=b.from||(f=="show"?{height:0,width:0}:j),e.to={height:j.height*k.y,width:j.width*k.x,outerHeight:j.outerHeight*k.y,outerWidth:j.outerWidth*k.x},e.fade&&(f=="show"&&(e.from.opacity=0,e.to.opacity=1),f=="hide"&&(e.from.opacity=1,e.to.opacity=0)),d.effect(e)},a.effects.effect.size=function(b,c){var d=a(this),e=["position","top","bottom","left","right","width","height","overflow","opacity"],f=["position","top","bottom","left","right","overflow","opacity"],g=["width","height","overflow"],h=["fontSize"],i=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],j=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],k=a.effects.setMode(d,b.mode||"effect"),l=b.restore||k!=="effect",m=b.scale||"both",n=b.origin||["middle","center"],o,p,q,r=d.css("position");k==="show"&&d.show(),o={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},d.from=b.from||o,d.to=b.to||o,q={from:{y:d.from.height/o.height,x:d.from.width/o.width},to:{y:d.to.height/o.height,x:d.to.width/o.width}};if(m=="box"||m=="both")q.from.y!==q.to.y&&(e=e.concat(i),d.from=a.effects.setTransition(d,i,q.from.y,d.from),d.to=a.effects.setTransition(d,i,q.to.y,d.to)),q.from.x!==q.to.x&&(e=e.concat(j),d.from=a.effects.setTransition(d,j,q.from.x,d.from),d.to=a.effects.setTransition(d,j,q.to.x,d.to));(m=="content"||m=="both")&&q.from.y!==q.to.y&&(e=e.concat(h),d.from=a.effects.setTransition(d,h,q.from.y,d.from),d.to=a.effects.setTransition(d,h,q.to.y,d.to)),a.effects.save(d,l?e:f),d.show(),a.effects.createWrapper(d),d.css("overflow","hidden").css(d.from),n&&(p=a.effects.getBaseline(n,o),d.from.top=(o.outerHeight-d.outerHeight())*p.y,d.from.left=(o.outerWidth-d.outerWidth())*p.x,d.to.top=(o.outerHeight-d.to.outerHeight)*p.y,d.to.left=(o.outerWidth-d.to.outerWidth)*p.x),d.css(d.from);if(m=="content"||m=="both")i=i.concat(["marginTop","marginBottom"]).concat(h),j=j.concat(["marginLeft","marginRight"]),g=e.concat(i).concat(j),d.find("*[width]").each(function(){var c=a(this),d={height:c.height(),width:c.width()};l&&a.effects.save(c,g),c.from={height:d.height*q.from.y,width:d.width*q.from.x},c.to={height:d.height*q.to.y,width:d.width*q.to.x},q.from.y!=q.to.y&&(c.from=a.effects.setTransition(c,i,q.from.y,c.from),c.to=a.effects.setTransition(c,i,q.to.y,c.to)),q.from.x!=q.to.x&&(c.from=a.effects.setTransition(c,j,q.from.x,c.from),c.to=a.effects.setTransition(c,j,q.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.easing,function(){l&&a.effects.restore(c,g)})});d.animate(d.to,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){d.to.opacity===0&&d.css("opacity",d.from.opacity),k=="hide"&&d.hide(),a.effects.restore(d,l?e:f),l||(r==="static"?d.css({position:"relative",top:d.to.top,left:d.to.left}):a.each(["top","left"],function(a,b){d.css(b,function(c,e){var f=parseInt(e,10),g=a?d.to.left:d.to.top,h=a?d.to.outerWidth-d.from.outerWidth:d.to.outerHeight-d.from.outerHeight,i=n[a]===b,j=n[a]==="middle"||n[a]==="center";if(e==="auto")return g+"px";return f+g+"px"})})),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.shake=function(b,c){var d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g=b.direction||"left",h=b.distance||20,i=b.times||3,j=i*2+1,k=b.duration,l=g=="up"||g=="down"?"top":"left",m=g=="up"||g=="left",n={},o={},p={},q,r=d.queue(),s=r.length;a.effects.save(d,e),d.show(),a.effects.createWrapper(d),n[l]=(m?"-=":"+=")+h,o[l]=(m?"+=":"-=")+h*2,p[l]=(m?"-=":"+=")+h*2,d.animate(n,k,b.easing);for(q=1;q1&&r.splice.apply(r,[1,0].concat(r.splice(s,j+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.slide=function(b,c){var d=a(this),e=["position","top","bottom","left","right","width","height"],f=a.effects.setMode(d,b.mode||"show"),g=f==="show",h=b.direction||"left",i=h=="up"||h=="down"?"top":"left",j=h=="up"||h=="left",k,l={},m;a.effects.save(d,e),d.show(),k=b.distance||d[i==="top"?"outerHeight":"outerWidth"]({margin:!0}),a.effects.createWrapper(d).css({overflow:"hidden"}),g&&d.css(i,j?isNaN(k)?"-"+k:-k:k),l[i]=(g?j?"+=":"-=":j?"-=":"+=")+k,d.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){f==="hide"&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.transfer=function(b,c){var d=a(this),e=a(b.to),f=e.css("position")==="fixed",g=a("body"),h=f?g.scrollTop():0,i=f?g.scrollLeft():0,j=e.offset(),k={top:j.top-h,left:j.left-i,height:e.innerHeight(),width:e.innerWidth()},l=d.offset(),m=a('
    ').appendTo(document.body).addClass(b.className).css({top:l.top-h,left:l.left-i,height:d.innerHeight(),width:d.innerWidth(),position:f?"fixed":"absolute"}).animate(k,b.duration,b.easing,function(){m.remove(),c()})}}(jQuery),function(a,b){a.widget("ui.accordion",{version:"@VERSION",options:{active:0,animated:"slide",collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var b=this,c=b.options;b.lastToggle={},b.element.addClass("ui-accordion ui-widget ui-helper-reset"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),b._hoverable(b.headers),b._focusable(b.headers),b.headers.find(":first-child").addClass("ui-accordion-heading"),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"),!c.collapsible&&c.active===!1&&(c.active=0),c.active<0&&(c.active+=this.headers.length),b.active=b._findActive(c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.refresh(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",a.proxy(b,"_keydown")).next().attr("role","tabpanel"),b.headers.not(b.active).attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),this._setupEvents(c.event)},_createIcons:function(){var b=this.options.icons;b&&(a("").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-accordion-header-icon").remove(),this.element.removeClass("ui-accordion-icons")},_destroy:function(){this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex").find("a").removeAttr("tabIndex").end().find(".ui-accordion-heading").removeClass("ui-accordion-heading"),this._destroyIcons();var a=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");this.options.heightStyle!=="content"&&a.css("height","")},_setOption:function(a,b){a==="active"?this._activate(b):(a==="event"&&(this.options.event&&this.headers.unbind(this.options.event+".accordion",this._eventHandler),this._setupEvents(b)),this._super(a,b),a==="collapsible"&&!b&&this.options.active===!1&&this._activate(0),a==="icons"&&(this._destroyIcons(),b&&this._createIcons()),a==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-accordion-disabled ui-state-disabled",!!b))},_keydown:function(b){if(!(this.options.disabled||b.altKey||b.ctrlKey)){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b)}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},refresh:function(){var b=this.options,c=this.element.parent(),d,e;b.heightStyle==="fill"?(a.support.minHeight||(e=c.css("overflow"),c.css("overflow","hidden")),d=c.height(),this.element.siblings(":visible").each(function(){var b=a(this),c=b.css("position");c!=="absolute"&&c!=="fixed"&&(d-=b.outerHeight(!0))}),e&&c.css("overflow",e),this.headers.each(function(){d-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,d-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):b.heightStyle==="auto"&&(d=0,this.headers.next().each(function(){d=Math.max(d,a(this).height("").height())}).height(d));return this},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return typeof b=="number"?this.headers.eq(b):a()},_setupEvents:function(b){b&&this.headers.bind(b.split(" ").join(".accordion ")+".accordion",a.proxy(this,"_eventHandler"))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldContent:i,newHeader:g?a():e,newContent:h};b.preventDefault();c.disabled||f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=g?!1:this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){function g(){c._completed(b)}var c=this,d=c.options,e=b.newContent,f=b.oldContent;if(d.animated){var h=a.ui.accordion.animations,i=d.animated,j;h[i]||(j={easing:a.easing[i]?i:"slide",duration:700},i="slide"),h[i]({widget:c,toShow:e,toHide:f,prevShow:c.lastToggle.toShow,prevHide:c.lastToggle.toHide,complete:g,down:e.length&&(!f.length||e.index()",options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var b=this,c,d,e;this.isMultiLine=this.element.is("textarea,[contenteditable]"),this.valueMethod=this.element[this.element.is("input,textarea")?"val":"text"],this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(f){if(b.options.disabled||b.element.prop("readOnly"))c=!0,e=!0,d=!0;else{c=!1,e=!1,d=!1;var g=a.ui.keyCode;switch(f.keyCode){case g.PAGE_UP:c=!0,b._move("previousPage",f);break;case g.PAGE_DOWN:c=!0,b._move("nextPage",f);break;case g.UP:c=!0,b._keyEvent("previous",f);break;case g.DOWN:c=!0,b._keyEvent("next",f);break;case g.ENTER:case g.NUMPAD_ENTER:b.menu.active&&(c=!0,f.preventDefault());case g.TAB:if(!b.menu.active)return;b.menu.select(f);break;case g.ESCAPE:b.menu.element.is(":visible")&&(b._value(b.term),b.close(f));break;default:d=!0,b._searchTimeout(f)}}}).bind("keypress.autocomplete",function(e){if(c)c=!1,e.preventDefault();else{if(d)return;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b._move("previousPage",e);break;case f.PAGE_DOWN:b._move("nextPage",e);break;case f.UP:b._keyEvent("previous",e);break;case f.DOWN:b._keyEvent("next",e)}}}).bind("input.autocomplete",function(a){e?(e=!1,a.preventDefault()):b._searchTimeout(a)}).bind("focus.autocomplete",function(){b.options.disabled||(b.selectedItem=null,b.previous=b._value())}).bind("blur.autocomplete",function(a){b.options.disabled||(clearTimeout(b.searching),b.cancelSearch=!0,b.closing=setTimeout(function(){b.close(a),b._change(a)},150))}),this._initSource(),this.response=function(){return b._response.apply(b,arguments)},this.menu=a("
      ").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo||"body")[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){b.document.one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.contains(d,c.target)&&b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({input:a(),focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&&/^key/.test(a.originalEvent.type)&&b._value(d.value)},select:function(a,c){var d=c.item.data("item.autocomplete"),e=b.previous;b.element[0]!==b.document[0].activeElement&&(b.element.focus(),b.previous=e,setTimeout(function(){b.previous=e,b.selectedItem=d},1)),!1!==b._trigger("select",a,{item:d})&&b._value(d.value),b.term=b._value(),b.close(a),b.selectedItem=d}}).zIndex(this.element.zIndex()+1).hide().data("menu"),a.fn.bgiframe&&this.menu.element.bgiframe(),this._bind(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove()},_setOption:function(a,b){this._super(a,b),a==="source"&&this._initSource(),a==="appendTo"&&this.menu.element.appendTo(this.document.find(b||"body")[0]),a==="disabled"&&b&&this.xhr&&this.xhr.abort()},_initSource:function(){var b=this,d,e;a.isArray(this.options.source)?(d=this.options.source,this.source=function(b,c){c(a.ui.autocomplete.filter(d,b.term))}):typeof this.options.source=="string"?(e=this.options.source,this.source=function(d,f){b.xhr&&b.xhr.abort(),b.xhr=a.ajax({url:e,data:d,dataType:"json",autocompleteRequest:++c,success:function(a,b){this.autocompleteRequest===c&&f(a)},error:function(){this.autocompleteRequest===c&&f([])}})}):this.source=this.options.source},_searchTimeout:function(a){var b=this;clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!==b._value()&&(b.selectedItem=null,b.search(null,a))},b.options.delay)},search:function(a,b){a=a!=null?a:this._value(),this.term=this._value();if(a.length").data("item.autocomplete",c).append(a("
      ").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible"))this.search(null,b);else{if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)){this._value(this.term),this.menu.blur();return}this.menu[a](b)}},widget:function(){return this.menu.element},_value:function(a){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})}(jQuery),function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);c&&(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form}));return e};a.widget("ui.button",{version:"@VERSION",defaultElement:"').addClass(this._triggerClass).html(g==""?f:$("").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){$.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._showDatepicker(a[0]);return!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;db&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&&this._disableDatepicker(a),b.dpDiv.css("display","block"))},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$(''),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&&b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f);return this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!!b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!!b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})}},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!!b.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&&($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(a){$.datepicker.log(a)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=$("input",a.parentNode)[0]);if(!$.datepicker._isDisabledDatepicker(a)&&$.datepicker._lastInput!=a){var b=$.datepicker._getInst(a);$.datepicker._curInst&&$.datepicker._curInst!=b&&($.datepicker._curInst.dpDiv.stop(!0,!0),b&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&&(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){e|=$(this).css("position")=="fixed";return!e}),e&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&($.effects.effect[g]||$.effects[g])?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&&i(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),$.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+$(document).scrollLeft(),i=document.documentElement.clientHeight+$(document).scrollTop();b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0);return b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=$.data(a,PROP_NAME))&&this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=this,f=function(){$.datepicker._tidyDialog(b),e._curInst=null};$.effects&&($.effects.effect[c]||$.effects[c])?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,f):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,f),c||f(),this._datepickerShowing=!1;var g=this._get(b,"onClose");g&&g.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!!$.datepicker._curInst){var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=c)&&$.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);this._isDisabledDatepicker(d[0])||(this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if(!$(d).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(e[0])){var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&&d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&&d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&&d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();b.setMonth(0),b.setDate(1);return Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1-1){j=1,k=l;for(;;){var v=this._getDaysInMonth(i,j-1);if(k<=v)break;j++,k-=v}}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+112?a.getHours()+2:0);return a},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n<0&&(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&pp)n--,n<0&&(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?''+q+"":e?"":''+q+"",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?''+s+"":e?"":''+s+"",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'",x=d?'
      '+(c?w:"")+(this._isInRange(a,v)?'":"")+(c?"":w)+"
      ":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='">'}Q+='
      '+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'
      '+"";var R=z?'":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="=5?' class="ui-datepicker-week-end"':"")+">"+''+C[T]+""}Q+=R+"";var U=this._getDaysInMonth(o,n);o==a.selectedYear&&n==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z";var _=z?'":"";for(var S=0;S<7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&&!H||!ba[0]||l&&Ym;_+='",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+""}n++,n>11&&(n=0,o++),Q+="
      '+this._get(a,"weekHeader")+"
      '+this._get(a,"calculateWeek")(Y)+""+(bb&&!G?" ":bc?''+Y.getDate()+"":''+Y.getDate()+"")+"
      "+(j?"
      "+(g[0]>0&&N==g[1]-1?'
      ':""):""),M+=Q}K+=M}K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'':""),a._keyEvent=!1;return K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
      ',m="";if(f||!i)m+=''+g[b]+"";else{var n=d&&d.getFullYear()==c,o=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+=''+c+"";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='",l+=a.yearshtml,a.yearshtml=null}}l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
      ";return l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&bd?d:e;return e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth()));return this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth -,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return $.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return $.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)})},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="@VERSION",window["DP_jQuery_"+dpuuid]=$}(jQuery),function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"@VERSION",options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&&(this.originalTitle=""),this.oldPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||" ",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("
      ")).addClass(c+d.dialogClass).css({display:"none",outline:0,zIndex:d.zIndex}).attr("tabIndex",-1).keydown(function(c){d.closeOnEscape&&!c.isDefaultPrevented()&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE&&(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}).appendTo("body"),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("
      ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a("").addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").click(function(a){a.preventDefault(),b.close(a)}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);i.find("*").add(i).disableSelection(),this._hoverable(j),this._focusable(j),d.draggable&&a.fn.draggable&&b._makeDraggable(),d.resizable&&a.fn.resizable&&b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},_destroy:function(){var a=this,b,c=this.oldPosition;a.overlay&&a.overlay.destroy(),a.uiDialog.hide(),a.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&&a.element.attr("title",a.originalTitle),b=c.parent.children().eq(c.index),b.length?b.before(a.element):c.parent.append(a.element)},widget:function(){return this.uiDialog},close:function(b){if(!this._isOpen)return c;var c=this,d,e;if(!1!==c._trigger("beforeClose",b)){c._isOpen=!1,c.overlay&&c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&&(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&&(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d);return c}},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;if(e.modal&&!b||!e.stack&&!e.modal)return d._trigger("focus",c);e.zIndex>a.ui.dialog.maxZ&&(a.ui.dialog.maxZ=e.zIndex),d.overlay&&(a.ui.dialog.maxZ+=1,a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c);return d},open:function(){if(!this._isOpen){var b=this,c=b.options,d=b.uiDialog;b._size(),b._position(c.position),d.show(c.show),b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b.moveToTop(!0),c.modal&&d.bind("keydown.ui-dialog",function(b){if(b.keyCode===a.ui.keyCode.TAB){var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey){d.focus(1);return!1}if(b.target===d[0]&&b.shiftKey){e.focus(1);return!1}}});var e=b.element.find(":tabbable");e.length||(e=d.find(".ui-dialog-buttonpane :tabbable"),e.length||(e=d)),e.eq(0).focus(),b._isOpen=!0,b._trigger("open");return b}},_createButtons:function(b){var c=this,d=!1;c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&&b!==null&&a.each(b,function(){return!(d=!0)});if(d){var e=a("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),f=a("
      ").addClass("ui-dialog-buttonset").appendTo(e);a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a("").addClass(this._triggerClass).html(a?e("").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e(""),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target); +return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,C,N,A,P,I,H,z,F,E,O,j,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?""+i+"":J?"":""+i+"",n=this._get(e,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?""+n+"":J?"":""+n+"",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"",l=B?"
      "+(Y?h:"")+(this._isInRange(e,r)?"":"")+(Y?"":h)+"
      ":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;K[0]>w;w++){for(k="",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",Q){if(M+="
      "}for(M+="
      "+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"
      "+"",C=d?"":"",x=0;7>x;x++)N=(x+u)%7,C+="";for(M+=C+"",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((P+A)/7),H=Q?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-P)),F=0;H>F;F++){for(M+="",E=d?"":"",x=0;7>x;x++)O=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],j=z.getMonth()!==Z,W=j&&!y||!O[0]||X&&X>z||$&&z>$,E+="",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);M+=E+""}Z++,Z>11&&(Z=0,et++),M+="
      "+this._get(e,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+""+p[N]+"
      "+this._get(e,"calculateWeek")(z)+""+(j&&!v?" ":W?""+z.getDate()+"":""+z.getDate()+"")+"
      "+(Q?"
      "+(K[0]>0&&T===K[1]-1?"
      ":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="
      ",_="";if(a||!g)_+=""+o[t]+"";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+=""}if(y||(b+=_+(!a&&g&&v?"":" ")),!e.yearshtml)if(e.yearshtml="",a||!v)b+=""+i+"";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":" ")+_),b+="
      "},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("
      ").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0) +},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("
      ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("
      "),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidthe.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("
      "),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=l-t.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("
      ").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0; +if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("
      ").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("
      ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("
      ").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("
      ").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("
      ").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable;var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("

      ")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("

      ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("
      ").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()}; +f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("
      ").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})},e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("
      ").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("
      ").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
      ")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""+""+""+""+""},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels; +this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("
      ").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),s._trigger("load",i,r),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("
      ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(t,s),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){n._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=a),this._open(t,e,i))})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,o.is(":hidden")||o.position(l)}var a,o,r,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr("id").find("[id]").removeAttr("id")):h=s,e("
      ").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(l.of),clearInterval(r))},e.fx.interval)),this._trigger("open",t,{tooltip:o})}},_registerCloseHandlers:function(t,i){var s={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(s.mouseleave="close"),t&&"focusin"!==t.type||(s.focusout="close"),this._on(!0,i,s)},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);return a?(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=e("
      ").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("
      ").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}); \ No newline at end of file diff --git a/lib/matplotlib/backends/web_backend/jquery/js/jquery.autogrow.js b/lib/matplotlib/backends/web_backend/jquery/js/jquery.autogrow.js deleted file mode 100644 index 15f0d352563d..000000000000 --- a/lib/matplotlib/backends/web_backend/jquery/js/jquery.autogrow.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Auto Grow Textarea Plugin - * by Jevin 5/11/2010 - * http://www.technoreply.com/autogrow-textarea-plugin/ - * - * Modified by Rob G (aka Fudgey/Mottie) - * - Converted into a plugin - * - Added ability to calculate approximate # cols when textarea is set to 100% - * - * Simplified by Brian Granger on 5/2/2011 - */ - -(function($) { - $.fn.autogrow = function() { - - var grow = function(d) { - var linesCount = 0; - // modified split rule from - // http://stackoverflow.com/questions/2035910/how-to-get-the-number-of-lines-in-a-textarea/2036424#2036424 - var lines = d.txt.value.split(/\r|\r\n|\n/); - linesCount = lines.length; - if (linesCount >= d.rowsDefault) { - d.txt.rows = linesCount; - } else { - d.txt.rows = d.rowsDefault; - } - }; - - return this.each(function() { - var d = { - colsDefault : 0, - rowsDefault : 1, - txt : this, - $txt : $(this) - }; - d.txt.onkeyup = function() { - grow(d); - }; - grow(d); - }); -}; -})(jQuery); diff --git a/lib/matplotlib/backends/web_backend/js/nbagg_mpl.js b/lib/matplotlib/backends/web_backend/js/nbagg_mpl.js new file mode 100644 index 000000000000..46dff85a2535 --- /dev/null +++ b/lib/matplotlib/backends/web_backend/js/nbagg_mpl.js @@ -0,0 +1,164 @@ + + +define(['jupyter-js-widgets', '/nbextensions/matplotlib/mpl.js'], function(widgets, mpl) { + + var MPLCanvasView = widgets.WidgetView.extend({ + + render: function() { + var that = this; + + var id = this.model.get('_id'); + + var element = this.$el; + + this.ws_proxy = this.comm_websocket_adapter(this.model.comm); + + function ondownload(figure, format) { + window.open(figure.imageObj.src); + } + + mpl.toolbar_items = this.model.get('_toolbar_items') + + var fig = new mpl.figure(id, this.ws_proxy, + ondownload, + element.get(0)); + + // Call onopen now - mpl needs it, as it is assuming we've passed it a real + // web socket which is closed, not our websocket->open comm proxy. + this.ws_proxy.onopen(); + + fig.parent_element = element.get(0); + + // subscribe to incoming messages from the MPLCanvasWidget + this.model.on('msg:custom', this.ws_proxy.onmessage, this); + + this.send(JSON.stringify({ type: 'initialized' })); + }, + + comm_websocket_adapter: function(comm) { + // Create a "websocket"-like object which calls the given IPython comm + // object with the appropriate methods. Currently this is a non binary + // socket, so there is still some room for performance tuning. + var ws = {}; + var that = this; + + ws.close = function() { + comm.close() + }; + ws.send = function(m) { + that.send(m); + }; + return ws; + } + + }); + + mpl.figure.prototype.handle_close = function(fig, msg) { + var width = fig.canvas.width/mpl.ratio + fig.root.unbind('remove') + + // Re-enable the keyboard manager in IPython - without this line, in FF, + // the notebook keyboard shortcuts fail. + IPython.keyboard_manager.enable() + fig.close_ws(fig, msg); + } + + mpl.figure.prototype.close_ws = function(fig, msg){ + fig.send_message('closing', msg); + // fig.ws.close() + } + + mpl.figure.prototype.updated_canvas_event = function() { + // Tell IPython that the notebook contents must change. + IPython.notebook.set_dirty(true); + this.send_message("ack", {}); + } + + mpl.figure.prototype._init_toolbar = function() { + var fig = this; + + var nav_element = $('
      ') + nav_element.attr('style', 'width: 100%'); + this.root.append(nav_element); + + // Define a callback function for later on. + function toolbar_event(event) { + return fig.toolbar_button_onclick(event['data']); + } + function toolbar_mouse_event(event) { + return fig.toolbar_button_onmouseover(event['data']); + } + + for(var toolbar_ind in mpl.toolbar_items){ + var name = mpl.toolbar_items[toolbar_ind][0]; + var tooltip = mpl.toolbar_items[toolbar_ind][1]; + var image = mpl.toolbar_items[toolbar_ind][2]; + var method_name = mpl.toolbar_items[toolbar_ind][3]; + + if (!name) { continue; }; + + var button = $(''); + button.click(method_name, toolbar_event); + button.mouseover(tooltip, toolbar_mouse_event); + nav_element.append(button); + } + + // Add the status bar. + var status_bar = $(''); + nav_element.append(status_bar); + this.message = status_bar[0]; + + // Add the close button to the window. + var buttongrp = $('
      '); + var button = $(''); + button.click(function (evt) { fig.handle_close(fig, {}); } ); + button.mouseover('Stop Interaction', toolbar_mouse_event); + buttongrp.append(button); + var titlebar = this.root.find($('.ui-dialog-titlebar')); + titlebar.prepend(buttongrp); + } + + mpl.figure.prototype._root_extra_style = function(el){ + var fig = this + el.on("remove", function(){ + fig.close_ws(fig, {}); + }); + } + + mpl.figure.prototype._canvas_extra_style = function(el){ + // this is important to make the div 'focusable + el.attr('tabindex', 0) + // reach out to IPython and tell the keyboard manager to turn it's self + // off when our div gets focus + + // location in version 3 + if (IPython.notebook.keyboard_manager) { + IPython.notebook.keyboard_manager.register_events(el); + } + else { + // location in version 2 + IPython.keyboard_manager.register_events(el); + } + + } + + mpl.figure.prototype._key_event_extra = function(event, name) { + var manager = IPython.notebook.keyboard_manager; + if (!manager) + manager = IPython.keyboard_manager; + + // Check for shift+enter + if (event.shiftKey && event.which == 13) { + this.canvas_div.blur(); + event.shiftKey = false; + // select the cell after this one + var index = IPython.notebook.find_cell_index(this.cell_info[0]); + IPython.notebook.select(index + 1); } + } + + mpl.figure.prototype.handle_save = function(fig, msg) { + fig.ondownload(fig, null); + } + + return {MPLCanvasView: MPLCanvasView} +}); diff --git a/lib/matplotlib/backends/web_backend/mpl.js b/lib/matplotlib/backends/web_backend/mpl.js index 6f1cf79364cb..cde766b88f12 100644 --- a/lib/matplotlib/backends/web_backend/mpl.js +++ b/lib/matplotlib/backends/web_backend/mpl.js @@ -1,6 +1,7 @@ /* Put everything inside the global mpl namespace */ window.mpl = {}; + mpl.get_websocket_type = function() { if (typeof(WebSocket) !== 'undefined') { return WebSocket; @@ -40,10 +41,12 @@ mpl.figure = function(figure_id, websocket, ondownload, parent_element) { this.rubberband_context = undefined; this.format_dropdown = undefined; - this.focus_on_mousover = false; + this.image_mode = 'full'; this.root = $('
      '); + this._root_extra_style(this.root) this.root.attr('style', 'display: inline-block'); + $(parent_element).append(this.root); this._init_header(this); @@ -56,16 +59,25 @@ mpl.figure = function(figure_id, websocket, ondownload, parent_element) { this.ws.onopen = function () { fig.send_message("supports_binary", {value: fig.supports_binary}); + fig.send_message("send_image_mode", {}); + if (mpl.ratio != 1) { + fig.send_message("set_dpi_ratio", {'dpi_ratio': mpl.ratio}); + } fig.send_message("refresh", {}); } this.imageObj.onload = function() { + if (fig.image_mode == 'full') { + // Full images could contain transparency (where diff images + // almost always do), so we need to clear the canvas so that + // there is no ghosting. + fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height); + } fig.context.drawImage(fig.imageObj, 0, 0); - fig.waiting = false; }; this.imageObj.onunload = function() { - this.ws.close(); + fig.ws.close(); } this.ws.onmessage = this._make_on_message_function(this); @@ -85,44 +97,95 @@ mpl.figure.prototype._init_header = function() { this.header = titletext[0]; } + + +mpl.figure.prototype._canvas_extra_style = function(canvas_div) { + +} + + +mpl.figure.prototype._root_extra_style = function(canvas_div) { + +} + mpl.figure.prototype._init_canvas = function() { var fig = this; var canvas_div = $('
      '); - canvas_div.resizable({ resize: mpl.debounce_resize( - function(event, ui) { fig.request_resize(ui.size.width, ui.size.height); } - , 50)}); - canvas_div.attr('style', 'position: relative; clear: both;'); - this.root.append(canvas_div); - - var canvas = $(''); - canvas.addClass('mpl-canvas'); - canvas.attr('style', "left: 0; top: 0; z-index: 0;") + canvas_div.attr('style', 'position: relative; clear: both; outline: 0'); function canvas_keyboard_event(event) { return fig.key_event(event, event['data']); } + canvas_div.keydown('key_press', canvas_keyboard_event); + canvas_div.keyup('key_release', canvas_keyboard_event); + this.canvas_div = canvas_div + this._canvas_extra_style(canvas_div) + this.root.append(canvas_div); + + var canvas = $(''); + canvas.addClass('mpl-canvas'); + canvas.attr('style', "left: 0; top: 0; z-index: 0; outline: 0") + this.canvas = canvas[0]; this.context = canvas[0].getContext("2d"); + var backingStore = this.context.backingStorePixelRatio || + this.context.webkitBackingStorePixelRatio || + this.context.mozBackingStorePixelRatio || + this.context.msBackingStorePixelRatio || + this.context.oBackingStorePixelRatio || + this.context.backingStorePixelRatio || 1; + + mpl.ratio = (window.devicePixelRatio || 1) / backingStore; + var rubberband = $(''); rubberband.attr('style', "position: absolute; left: 0; top: 0; z-index: 1;") + + var pass_mouse_events = true; + + canvas_div.resizable({ + start: function(event, ui) { + pass_mouse_events = false; + }, + resize: function(event, ui) { + fig.request_resize(ui.size.width, ui.size.height); + }, + stop: function(event, ui) { + pass_mouse_events = true; + fig.request_resize(ui.size.width, ui.size.height); + }, + }); + function mouse_event_fn(event) { - return fig.mouse_event(event, event['data']); + if (pass_mouse_events) + return fig.mouse_event(event, event['data']); } + rubberband.mousedown('button_press', mouse_event_fn); rubberband.mouseup('button_release', mouse_event_fn); // Throttle sequential mouse events to 1 every 20ms. rubberband.mousemove('motion_notify', mouse_event_fn); + rubberband.mouseenter('figure_enter', mouse_event_fn); + rubberband.mouseleave('figure_leave', mouse_event_fn); + + canvas_div.on("wheel", function (event) { + event = event.originalEvent; + event['data'] = 'scroll' + if (event.deltaY < 0) { + event.step = 1; + } else { + event.step = -1; + } + mouse_event_fn(event); + }); + canvas_div.append(canvas); canvas_div.append(rubberband); - canvas_div.keydown('key_press', canvas_keyboard_event); - canvas_div.keydown('key_release', canvas_keyboard_event); - this.rubberband = rubberband; this.rubberband_canvas = rubberband[0]; this.rubberband_context = rubberband[0].getContext("2d"); @@ -134,8 +197,9 @@ mpl.figure.prototype._init_canvas = function() { canvas_div.css('width', width) canvas_div.css('height', height) - canvas.attr('width', width); - canvas.attr('height', height); + canvas.attr('width', width * mpl.ratio); + canvas.attr('height', height * mpl.ratio); + canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;'); rubberband.attr('width', width); rubberband.attr('height', height); @@ -144,6 +208,18 @@ mpl.figure.prototype._init_canvas = function() { // Set the figure to an initial 600x600px, this will subsequently be updated // upon first draw. this._resize_canvas(600, 600); + + // Disable right mouse context menu. + $(this.rubberband_canvas).bind("contextmenu",function(e){ + return false; + }); + + function set_focus () { + canvas.focus(); + canvas_div.focus(); + } + + window.setTimeout(set_focus, 100); } mpl.figure.prototype._init_toolbar = function() { @@ -161,7 +237,7 @@ mpl.figure.prototype._init_toolbar = function() { return fig.toolbar_button_onmouseover(event['data']); } - for(var toolbar_ind in mpl.toolbar_items){ + for(var toolbar_ind in mpl.toolbar_items) { var name = mpl.toolbar_items[toolbar_ind][0]; var tooltip = mpl.toolbar_items[toolbar_ind][1]; var image = mpl.toolbar_items[toolbar_ind][2]; @@ -239,6 +315,14 @@ mpl.figure.prototype.send_draw_message = function() { } } + +mpl.figure.prototype.handle_save = function(fig, msg) { + var format_dropdown = fig.format_dropdown; + var format = format_dropdown.options[format_dropdown.selectedIndex].value; + fig.ondownload(fig, format); +} + + mpl.figure.prototype.handle_resize = function(fig, msg) { var size = msg['size']; if (size[0] != fig.canvas.width || size[1] != fig.canvas.height) { @@ -248,10 +332,10 @@ mpl.figure.prototype.handle_resize = function(fig, msg) { } mpl.figure.prototype.handle_rubberband = function(fig, msg) { - var x0 = msg['x0']; - var y0 = fig.canvas.height - msg['y0']; - var x1 = msg['x1']; - var y1 = fig.canvas.height - msg['y1']; + var x0 = msg['x0'] / mpl.ratio; + var y0 = (fig.canvas.height - msg['y0']) / mpl.ratio; + var x1 = msg['x1'] / mpl.ratio; + var y1 = (fig.canvas.height - msg['y1']) / mpl.ratio; x0 = Math.floor(x0) + 0.5; y0 = Math.floor(y0) + 0.5; x1 = Math.floor(x1) + 0.5; @@ -301,6 +385,10 @@ mpl.figure.prototype.handle_draw = function(fig, msg) { fig.send_draw_message(); } +mpl.figure.prototype.handle_image_mode = function(fig, msg) { + fig.image_mode = msg['mode']; +} + mpl.figure.prototype.updated_canvas_event = function() { // Called whenever the canvas gets updated. this.send_message("ack", {}); @@ -322,14 +410,17 @@ mpl.figure.prototype._make_on_message_function = function(fig) { (window.URL || window.webkitURL).revokeObjectURL( fig.imageObj.src); } + fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL( evt.data); fig.updated_canvas_event(); + fig.waiting = false; return; } else if (typeof evt.data === 'string' && evt.data.slice(0, 21) == "data:image/png;base64") { fig.imageObj.src = evt.data; fig.updated_canvas_event(); + fig.waiting = false; return; } @@ -378,18 +469,34 @@ mpl.findpos = function(e) { return {"x": x, "y": y}; }; +/* + * return a copy of an object with only non-object keys + * we need this to avoid circular references + * http://stackoverflow.com/a/24161582/3208463 + */ +function simpleKeys (original) { + return Object.keys(original).reduce(function (obj, key) { + if (typeof original[key] !== 'object') + obj[key] = original[key] + return obj; + }, {}); +} + mpl.figure.prototype.mouse_event = function(event, name) { var canvas_pos = mpl.findpos(event) - if (this.focus_on_mouseover && name === 'motion_notify') + if (name === 'button_press') { this.canvas.focus(); + this.canvas_div.focus(); } - var x = canvas_pos.x; - var y = canvas_pos.y; + var x = canvas_pos.x * mpl.ratio; + var y = canvas_pos.y * mpl.ratio; - this.send_message(name, {x: x, y: y, button: event.button}); + this.send_message(name, {x: x, y: y, button: event.button, + step: event.step, + guiEvent: simpleKeys(event)}); /* This prevents the web browser from automatically changing to * the text insertion cursor when the button is pressed. We want @@ -399,30 +506,44 @@ mpl.figure.prototype.mouse_event = function(event, name) { return false; } +mpl.figure.prototype._key_event_extra = function(event, name) { + // Handle any extra behaviour associated with a key event +} + mpl.figure.prototype.key_event = function(event, name) { - /* Don't fire events just when a modifier is changed. Modifiers are - sent along with other keys. */ - if (event.keyCode >= 16 && event.keyCode <= 20) { - return; + + // Prevent repeat events + if (name == 'key_press') + { + if (event.which === this._key) + return; + else + this._key = event.which; } + if (name == 'key_release') + this._key = null; - value = ''; - if (event.ctrlKey) { + var value = ''; + if (event.ctrlKey && event.which != 17) value += "ctrl+"; - } - if (event.altKey) { + if (event.altKey && event.which != 18) value += "alt+"; - } - value += String.fromCharCode(event.keyCode).toLowerCase(); + if (event.shiftKey && event.which != 16) + value += "shift+"; + + value += 'k'; + value += event.which.toString(); - this.send_message(name, {key: value}); + this._key_event_extra(event, name); + + this.send_message(name, {key: value, + guiEvent: simpleKeys(event)}); + return false; } mpl.figure.prototype.toolbar_button_onclick = function(name) { if (name == 'download') { - var format_dropdown = this.format_dropdown; - var format = format_dropdown.options[format_dropdown.selectedIndex].value; - this.ondownload(this, format); + this.handle_save(this, null); } else { this.send_message("toolbar_button", {name: name}); } @@ -431,19 +552,3 @@ mpl.figure.prototype.toolbar_button_onclick = function(name) { mpl.figure.prototype.toolbar_button_onmouseover = function(tooltip) { this.message.textContent = tooltip; }; - -mpl.debounce_event = function(func, time){ - var timer; - return function(event){ - clearTimeout(timer); - timer = setTimeout(function(){ func(event); }, time); - }; -} - -mpl.debounce_resize = function(func, time){ - var timer; - return function(event, ui){ - clearTimeout(timer); - timer = setTimeout(function(){ func(event, ui); }, time); - }; -} diff --git a/lib/matplotlib/backends/web_backend/nbagg_mpl.js b/lib/matplotlib/backends/web_backend/nbagg_mpl.js index caac0c17656d..9471f5340d51 100644 --- a/lib/matplotlib/backends/web_backend/nbagg_mpl.js +++ b/lib/matplotlib/backends/web_backend/nbagg_mpl.js @@ -25,11 +25,17 @@ mpl.mpl_figure_comm = function(comm, msg) { // starts-up an IPython Comm through the "matplotlib" channel. var id = msg.content.data.id; + // Get hold of the div created by the display call when the Comm + // socket was opened in Python. var element = $("#" + id); var ws_proxy = comm_websocket_adapter(comm) + function ondownload(figure, format) { + window.open(figure.imageObj.src); + } + var fig = new mpl.figure(id, ws_proxy, - function() { }, + ondownload, element.get(0)); // Call onopen now - mpl needs it, as it is assuming we've passed it a real @@ -38,29 +44,40 @@ mpl.mpl_figure_comm = function(comm, msg) { fig.parent_element = element.get(0); fig.cell_info = mpl.find_output_cell("
      "); + if (!fig.cell_info) { + console.error("Failed to find cell for figure", id, fig); + return; + } var output_index = fig.cell_info[2] var cell = fig.cell_info[0]; - // Disable right mouse context menu. - $(fig.rubberband_canvas).bind("contextmenu",function(e){ - return false; - }); - }; mpl.figure.prototype.handle_close = function(fig, msg) { + var width = fig.canvas.width/mpl.ratio + fig.root.unbind('remove') + // Update the output cell to use the data from the current canvas. fig.push_to_output(); var dataURL = fig.canvas.toDataURL(); - $(fig.parent_element).html(''); - fig.send_message('closing', {}); - fig.ws.close() + // Re-enable the keyboard manager in IPython - without this line, in FF, + // the notebook keyboard shortcuts fail. + IPython.keyboard_manager.enable() + $(fig.parent_element).html(''); + fig.close_ws(fig, msg); +} + +mpl.figure.prototype.close_ws = function(fig, msg){ + fig.send_message('closing', msg); + // fig.ws.close() } mpl.figure.prototype.push_to_output = function(remove_interactive) { + // Turn the data on the canvas into data in the output cell. + var width = this.canvas.width/mpl.ratio var dataURL = this.canvas.toDataURL(); - this.cell_info[1]['text/html'] = ''; + this.cell_info[1]['text/html'] = ''; } mpl.figure.prototype.updated_canvas_event = function() { @@ -109,14 +126,60 @@ mpl.figure.prototype._init_toolbar = function() { // Add the close button to the window. var buttongrp = $('
      '); - var button = $(''); + var button = $(''); button.click(function (evt) { fig.handle_close(fig, {}); } ); - button.mouseover('Close figure', toolbar_mouse_event); + button.mouseover('Stop Interaction', toolbar_mouse_event); buttongrp.append(button); var titlebar = this.root.find($('.ui-dialog-titlebar')); titlebar.prepend(buttongrp); } +mpl.figure.prototype._root_extra_style = function(el){ + var fig = this + el.on("remove", function(){ + fig.close_ws(fig, {}); + }); +} + +mpl.figure.prototype._canvas_extra_style = function(el){ + // this is important to make the div 'focusable + el.attr('tabindex', 0) + // reach out to IPython and tell the keyboard manager to turn it's self + // off when our div gets focus + + // location in version 3 + if (IPython.notebook.keyboard_manager) { + IPython.notebook.keyboard_manager.register_events(el); + } + else { + // location in version 2 + IPython.keyboard_manager.register_events(el); + } + +} + +mpl.figure.prototype._key_event_extra = function(event, name) { + var manager = IPython.notebook.keyboard_manager; + if (!manager) + manager = IPython.keyboard_manager; + + // Check for shift+enter + if (event.shiftKey && event.which == 13) { + this.canvas_div.blur(); + event.shiftKey = false; + // Send a "J" for go to next cell + event.which = 74; + event.keyCode = 74; + manager.command_mode(); + manager.handle_keydown(event); + } +} + +mpl.figure.prototype.handle_save = function(fig, msg) { + fig.ondownload(fig, null); +} + + mpl.find_output_cell = function(html_output) { // Return the cell and output element which can be found *uniquely* in the notebook. // Note - this is a bit hacky, but it is done because the "notebook_saving.Notebook" @@ -126,12 +189,15 @@ mpl.find_output_cell = function(html_output) { var ncells = cells.length; for (var i=0; i= 3 moved mimebundle to data attribute of output + data = data.data; + } + if (data['text/html'] == html_output) { + return [cell, data, j]; } } } diff --git a/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb b/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb new file mode 100644 index 000000000000..dedefb2d540f --- /dev/null +++ b/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb @@ -0,0 +1,644 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from __future__ import print_function\n", + "from imp import reload" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## UAT for NbAgg backend.\n", + "\n", + "The first line simply reloads matplotlib, uses the nbagg backend and then reloads the backend, just to ensure we have the latest modification to the backend code. Note: The underlying JavaScript will not be updated by this process, so a refresh of the browser after clearing the output and saving is necessary to clear everything fully." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib\n", + "reload(matplotlib)\n", + "\n", + "matplotlib.use('nbagg')\n", + "\n", + "import matplotlib.backends.backend_nbagg\n", + "reload(matplotlib.backends.backend_nbagg)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 1 - Simple figure creation using pyplot\n", + "\n", + "Should produce a figure window which is interactive with the pan and zoom buttons. (Do not press the close button, but any others may be used)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.backends.backend_webagg_core\n", + "reload(matplotlib.backends.backend_webagg_core)\n", + "\n", + "import matplotlib.pyplot as plt\n", + "plt.interactive(False)\n", + "\n", + "fig1 = plt.figure()\n", + "plt.plot(range(10))\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 2 - Creation of another figure, without the need to do plt.figure.\n", + "\n", + "As above, a new figure should be created." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.plot([3, 2, 1])\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 3 - Connection info\n", + "\n", + "The printout should show that there are two figures which have active CommSockets, and no figures pending show." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(matplotlib.backends.backend_nbagg.connection_info())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 4 - Closing figures\n", + "\n", + "Closing a specific figure instance should turn the figure into a plain image - the UI should have been removed. In this case, scroll back to the first figure and assert this is the case." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.close(fig1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 5 - No show without plt.show in non-interactive mode\n", + "\n", + "Simply doing a plt.plot should not show a new figure, nor indeed update an existing one (easily verified in UAT 6).\n", + "The output should simply be a list of Line2D instances." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.plot(range(10))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 6 - Connection information\n", + "\n", + "We just created a new figure, but didn't show it. Connection info should no longer have \"Figure 1\" (as we closed it in UAT 4) and should have figure 2 and 3, with Figure 3 without any connections. There should be 1 figure pending." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(matplotlib.backends.backend_nbagg.connection_info())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 7 - Show of previously created figure\n", + "\n", + "We should be able to show a figure we've previously created. The following should produce two figure windows." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.show()\n", + "plt.figure()\n", + "plt.plot(range(5))\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 8 - Interactive mode\n", + "\n", + "In interactive mode, creating a line should result in a figure being shown." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.interactive(True)\n", + "plt.figure()\n", + "plt.plot([3, 2, 1])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Subsequent lines should be added to the existing figure, rather than creating a new one." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.plot(range(3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Calling connection_info in interactive mode should not show any pending figures." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "print(matplotlib.backends.backend_nbagg.connection_info())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Disable interactive mode again." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.interactive(False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 9 - Multiple shows\n", + "\n", + "Unlike most of the other matplotlib backends, we may want to see a figure multiple times (with or without synchronisation between the views, though the former is not yet implemented). Assert that plt.gcf().canvas.manager.reshow() results in another figure window which is synchronised upon pan & zoom." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plt.gcf().canvas.manager.reshow()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 10 - Saving notebook\n", + "\n", + "Saving the notebook (with CTRL+S or File->Save) should result in the saved notebook having static versions of the figues embedded within. The image should be the last update from user interaction and interactive plotting. (check by converting with ``ipython nbconvert ``)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 11 - Creation of a new figure on second show\n", + "\n", + "Create a figure, show it, then create a new axes and show it. The result should be a new figure.\n", + "\n", + "**BUG: Sometimes this doesn't work - not sure why (@pelson).**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig = plt.figure()\n", + "plt.axes()\n", + "plt.show()\n", + "\n", + "plt.plot([1, 2, 3])\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 12 - OO interface\n", + "\n", + "Should produce a new figure and plot it." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from matplotlib.backends.backend_nbagg import new_figure_manager,show\n", + "\n", + "manager = new_figure_manager(1000)\n", + "fig = manager.canvas.figure\n", + "ax = fig.add_subplot(1,1,1)\n", + "ax.plot([1,2,3])\n", + "fig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## UAT 13 - Animation\n", + "\n", + "The following should generate an animated line:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib.animation as animation\n", + "import numpy as np\n", + "\n", + "fig, ax = plt.subplots()\n", + "\n", + "x = np.arange(0, 2*np.pi, 0.01) # x-array\n", + "line, = ax.plot(x, np.sin(x))\n", + "\n", + "def animate(i):\n", + " line.set_ydata(np.sin(x+i/10.0)) # update the data\n", + " return line,\n", + "\n", + "#Init only required for blitting to give a clean slate.\n", + "def init():\n", + " line.set_ydata(np.ma.array(x, mask=True))\n", + " return line,\n", + "\n", + "ani = animation.FuncAnimation(fig, animate, np.arange(1, 200), init_func=init,\n", + " interval=32., blit=True)\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 14 - Keyboard shortcuts in IPython after close of figure\n", + "\n", + "After closing the previous figure (with the close button above the figure) the IPython keyboard shortcuts should still function.\n", + "\n", + "### UAT 15 - Figure face colours\n", + "\n", + "The nbagg honours all colours appart from that of the figure.patch. The two plots below should produce a figure with a transparent background and a red background respectively (check the transparency by closing the figure, and dragging the resulting image over other content). There should be no yellow figure." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import matplotlib\n", + "matplotlib.rcParams.update({'figure.facecolor': 'red',\n", + " 'savefig.facecolor': 'yellow'})\n", + "plt.figure()\n", + "plt.plot([3, 2, 1])\n", + "\n", + "with matplotlib.rc_context({'nbagg.transparent': False}):\n", + " plt.figure()\n", + "\n", + "plt.plot([3, 2, 1])\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 16 - Events\n", + "\n", + "Pressing any keyboard key or mouse button (or scrolling) should cycle the line line while the figure has focus. The figure should have focus by default when it is created and re-gain it by clicking on the canvas. Clicking anywhere outside of the figure should release focus, but moving the mouse out of the figure should not release focus." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import itertools\n", + "fig, ax = plt.subplots()\n", + "x = np.linspace(0,10,10000)\n", + "y = np.sin(x)\n", + "ln, = ax.plot(x,y)\n", + "evt = []\n", + "colors = iter(itertools.cycle(['r', 'g', 'b', 'k', 'c']))\n", + "def on_event(event):\n", + " if event.name.startswith('key'):\n", + " fig.suptitle('%s: %s' % (event.name, event.key))\n", + " elif event.name == 'scroll_event':\n", + " fig.suptitle('%s: %s' % (event.name, event.step))\n", + " else:\n", + " fig.suptitle('%s: %s' % (event.name, event.button))\n", + " evt.append(event)\n", + " ln.set_color(next(colors))\n", + " fig.canvas.draw()\n", + " fig.canvas.draw_idle()\n", + "\n", + "fig.canvas.mpl_connect('button_press_event', on_event)\n", + "fig.canvas.mpl_connect('button_release_event', on_event)\n", + "fig.canvas.mpl_connect('scroll_event', on_event)\n", + "fig.canvas.mpl_connect('key_press_event', on_event)\n", + "fig.canvas.mpl_connect('key_release_event', on_event)\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT 17 - Timers\n", + "\n", + "Single-shot timers follow a completely different code path in the nbagg backend than regular timers (such as those used in the animation example above.) The next set of tests ensures that both \"regular\" and \"single-shot\" timers work properly.\n", + "\n", + "The following should show a simple clock that updates twice a second:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import time\n", + "\n", + "fig, ax = plt.subplots()\n", + "text = ax.text(0.5, 0.5, '', ha='center')\n", + "\n", + "def update(text):\n", + " text.set(text=time.ctime())\n", + " text.axes.figure.canvas.draw()\n", + " \n", + "timer = fig.canvas.new_timer(500, [(update, [text], {})])\n", + "timer.start()\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "However, the following should only update once and then stop:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig, ax = plt.subplots()\n", + "text = ax.text(0.5, 0.5, '', ha='center') \n", + "timer = fig.canvas.new_timer(500, [(update, [text], {})])\n", + "\n", + "timer.single_shot = True\n", + "timer.start()\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And the next two examples should never show any visible text at all:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig, ax = plt.subplots()\n", + "text = ax.text(0.5, 0.5, '', ha='center')\n", + "timer = fig.canvas.new_timer(500, [(update, [text], {})])\n", + "\n", + "timer.start()\n", + "timer.stop()\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig, ax = plt.subplots()\n", + "text = ax.text(0.5, 0.5, '', ha='center')\n", + "timer = fig.canvas.new_timer(500, [(update, [text], {})])\n", + "\n", + "timer.single_shot = True\n", + "timer.start()\n", + "timer.stop()\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### UAT17 - stoping figure when removed from DOM\n", + "\n", + "When the div that contains from the figure is removed from the DOM the figure should shut down it's comm, and if the python-side figure has no more active comms, it should destroy the figure. Repeatedly running the cell below should always have the same figure number" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig, ax = plt.subplots()\n", + "ax.plot(range(5))\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Running the cell below will re-show the figure. After this, re-running the cell above should result in a new figure number." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fig.canvas.manager.reshow()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.4.3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/lib/matplotlib/backends/web_backend/single_figure.html b/lib/matplotlib/backends/web_backend/single_figure.html index a9b16d759bd2..dd49f13abfbb 100644 --- a/lib/matplotlib/backends/web_backend/single_figure.html +++ b/lib/matplotlib/backends/web_backend/single_figure.html @@ -4,10 +4,10 @@ - + - - + +