Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eccf830

Browse files
author
Vedant Nanda
committed
Revert "Merge branch 'first_try' of https://github.com/nvedant07/matplotlib into first_try"
This reverts commit 85f63e3, reversing changes made to f32377f.
1 parent bc70403 commit eccf830

File tree

150 files changed

+2385
-3660
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+2385
-3660
lines changed

.coveragerc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
[run]
2-
branch = true
3-
source =
2+
source=
43
matplotlib
54
mpl_toolkits
6-
omit = matplotlib/_version.py
75

86
[report]
97
exclude_lines =

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ matrix:
5656
env: MOCK=mock NUMPY=numpy==1.7.1
5757
- python: 3.4
5858
env: PYTHON_ARGS=-OO
59+
- python: 3.5
60+
env: PANDAS=pandas DELETE_FONT_CACHE=1
5961
- python: 3.5
6062
env: BUILD_DOCS=true
6163
- python: 3.5
@@ -152,7 +154,7 @@ script:
152154
# Workaround for pytest-xdist flaky collection order
153155
# https://github.com/pytest-dev/pytest/issues/920
154156
# https://github.com/pytest-dev/pytest/issues/1075
155-
export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 4294967295))')
157+
export PYTHONHASHSEED=$(shuf -i 1-4294967295 -n 1)
156158
echo PYTHONHASHSEED=$PYTHONHASHSEED
157159
158160
echo The following args are passed to pytest $PYTEST_ARGS $RUN_PEP8

INSTALL

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ install matplotlib using pip_::
6464
python -m pip install matplotlib
6565

6666
In case Python 2.7 or 3.4 are not installed for all users,
67-
the Microsoft Visual C++ 2008
68-
(`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=15336>`__
67+
the Microsoft Visual C++ 2008 (
68+
`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=15336>`__
6969
or
7070
`32 bit <https://www.microsoft.com/en-us/download/details.aspx?id=29>`__
71-
for Python 2.7) or Microsoft Visual C++ 2010
72-
(`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=14632>`__
71+
for Python 2.7) or Microsoft Visual C++ 2010 (
72+
`64 bit <https://www.microsoft.com/en-us/download/details.aspx?id=14632>`__
7373
or
7474
`32 bit <https://www.microsoft.com/en-us/download/details.aspx?id=5555>`__
7575
for Python 3.4) redistributable packages need to be installed.
@@ -106,15 +106,14 @@ or example code.
106106
If you want to try the many demos that come in the matplotlib source
107107
distribution, download the :file:`*.tar.gz` file and look in the
108108
:file:`examples` subdirectory.
109-
To run the test suite:
110-
111-
* extract the :file:`lib\\matplotlib\\tests` or
112-
:file:`lib\\mpl_toolkits\\tests` directories from the source distribution;
113-
* install test dependencies: `pytest <https://pypi.python.org/pypi/pytest>`_,
114-
`mock <https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
115-
ffmpeg, avconv, mencoder, ImageMagick, and `Inkscape
116-
<https://inkscape.org/>`_;
117-
* run ``py.test path\\to\\tests\\directory``.
109+
To run the test suite, copy the :file:`lib\\matplotlib\\tests` and
110+
:file:`lib\\mpl_toolkits\\tests` directories from the source
111+
distribution to :file:`sys.prefix\\Lib\\site-packages\\matplotlib` and
112+
:file:`sys.prefix\\Lib\\site-packages\\mpl_toolkits` respectively, and
113+
install `nose <https://pypi.python.org/pypi/nose>`_, `mock
114+
<https://pypi.python.org/pypi/mock>`_, Pillow, MiKTeX, GhostScript,
115+
ffmpeg, avconv, mencoder, ImageMagick, and `Inkscape
116+
<https://inkscape.org/>`_.
118117

119118

120119

@@ -134,15 +133,13 @@ latest git version :ref:`install-from-git`.
134133
The standard environment variables `CC`, `CXX`, `PKG_CONFIG` are respected.
135134
This means you can set them if your toolchain is prefixed. This may be used for
136135
cross compiling.
137-
::
138136

139137
export CC=x86_64-pc-linux-gnu-gcc
140138
export CXX=x86_64-pc-linux-gnu-g++
141139
export PKG_CONFIG=x86_64-pc-linux-gnu-pkg-config
142140

143141
Once you have satisfied the requirements detailed below (mainly
144-
python, numpy, libpng and freetype), you can build matplotlib.
145-
::
142+
python, numpy, libpng and freetype), you can build matplotlib::
146143

147144
cd matplotlib
148145
python setup.py build
@@ -225,7 +222,7 @@ Required Dependencies
225222
Dependencies for python 2
226223
^^^^^^^^^^^^^^^^^^^^^^^^^
227224

228-
`backports.functools_lru_cache <https://pypi.python.org/pypi/backports.functools_lru_cache>`_
225+
`functools32 <https://pypi.python.org/pypi/functools32>`_
229226
Required for compatibility if running on Python 2.7.
230227

231228
`subprocess32 <https://pypi.python.org/pypi/subprocess32/>`_

README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ Testing
2020

2121
After installation, you can launch the test suite::
2222

23-
py.test
23+
python tests.py
2424

2525
Or from the Python interpreter::
2626

2727
import matplotlib
2828
matplotlib.test()
2929

3030
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
31-
more information. Note that the test suite requires pytest and, on Python 2.7,
32-
mock. Please install with pip or your package manager of choice.
31+
more information. Note that the test suite requires nose and on Python 2.7 mock
32+
which are not installed by default. Please install with pip or your package
33+
manager of choice.
3334

3435
Contact
3536
=======

README.win.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ conda install pyqt
2727
# this package is only available in the conda-forge channel
2828
conda install -c conda-forge msinttypes
2929
# for python 2.7
30-
conda install -c conda-forge backports.functools_lru_cache
30+
conda install -c conda-forge functools32
3131

3232
# copy the libs which have "wrong" names
3333
set LIBRARY_LIB=%CONDA_DEFAULT_ENV%\Library\lib

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ environment:
1414
CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"
1515
# Workaround for https://github.com/conda/conda-build/issues/636
1616
PYTHONIOENCODING: "UTF-8"
17-
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib -m "not network"
17+
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib
1818
USE_PYTEST: no
1919
PYTHONHASHSEED: 0 # Workaround for pytest-xdist flaky collection order
2020
# https://github.com/pytest-dev/pytest/issues/920
@@ -94,7 +94,7 @@ install:
9494
mock sphinx
9595
- activate test-environment
9696
- cmd: echo %PYTHON_VERSION% %TARGET_ARCH%
97-
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache
97+
- cmd: IF %PYTHON_VERSION% == 2.7 conda install -q functools32
9898
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
9999
- conda install -q pytest "pytest-cov>=2.3.1" pytest-timeout pytest-xdist
100100

@@ -140,8 +140,8 @@ test_script:
140140
- if x%USE_PYTEST% == xno python tests.py %PYTEST_ARGS%
141141
# Generate a html for visual tests
142142
- python visual_tests.py
143-
- pip install codecov
144-
- codecov -e PYTHON_VERSION PLATFORM
143+
- if x%USE_PYTEST% == xyes pip install codecov
144+
- if x%USE_PYTEST% == xyes codecov -e PYTHON_VERSION PLATFORM
145145

146146
after_test:
147147
# After the tests were a success, build packages (wheels and conda)

build_alllocal.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:: # this package is only available in the conda-forge channel
88
:: conda install -c conda-forge msinttypes
99
:: if you build on py2.7:
10-
:: conda install -c conda-forge backports.functools_lru_cache
10+
:: conda install -c conda-forge functools32
1111

1212
set TARGET=bdist_wheel
1313
IF [%1]==[] (

ci/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ coverage:
2424
paths: '!lib/.*/tests/.*'
2525

2626
tests:
27-
target: 97.9%
27+
target: 97.7%
2828
paths: 'lib/.*/tests/.*'

ci/conda_recipe/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ requirements:
3030
- freetype 2.6*
3131
- msinttypes # [win]
3232
- cycler >=0.10
33-
- pytest >=3.0.0
33+
- nose
3434
- pyparsing
3535
- pytz
3636
# - py2cairo # [linux and py2k]
@@ -39,7 +39,7 @@ requirements:
3939
- zlib 1.2* # [win]
4040
- pyqt # [not osx]
4141
- tk 8.5* # [linux]
42-
- backports.functools_lru_cache # [py2k]
42+
- functools32 # [py2k]
4343

4444
run:
4545
- python
@@ -54,7 +54,7 @@ requirements:
5454
- libpng >=1.6.21,<1.7
5555
- pyqt # [not osx]
5656
- tk 8.5* # [linux and win]
57-
- backports.functools_lru_cache # [py2k]
57+
- functools32 # [py2k]
5858

5959
test:
6060
imports:

doc/_templates/layout.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ <h3>{{ _('Navigation') }}</h3>
8282
VERSION: '{{ release|e }}',
8383
COLLAPSE_INDEX: false,
8484
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
85-
HAS_SOURCE: {{ has_source|lower }},
86-
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
85+
HAS_SOURCE: {{ has_source|lower }}
8786
};
8887
</script>
8988
{%- for scriptfile in script_files %}

doc/api/api_changes.rst

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,6 @@ out what caused the breakage and how to fix it by updating your code.
1010
For new features that were added to Matplotlib, please see
1111
:ref:`whats-new`.
1212

13-
API Changes in 2.0.1
14-
====================
15-
16-
Extensions to `matplotlib.backend_bases.GraphicsContextBase`
17-
------------------------------------------------------------
18-
19-
To better support controlling the color of hatches, the method
20-
`matplotlib.backend_bases.GraphicsContextBase.set_hatch_color` was
21-
added to the expected API of ``GraphicsContext`` classes. Calls to
22-
this method are currently wrapped with a ``try:...except Attribute:``
23-
block to preserve back-compatibility with any third-party backends
24-
which do not extend `~matplotlib.backend_bases.GraphicsContextBase`.
25-
26-
This value can be accessed in the backends via
27-
`matplotlib.backend_bases.GraphicsContextBase.get_hatch_color` (which
28-
was added in 2.0 see :ref:`gc_get_hatch_color_wn`) and should be used
29-
to color the hatches.
30-
31-
In the future there may also be ``hatch_linewidth`` and
32-
``hatch_density`` related methods added. It is encouraged, but not
33-
required that third-party backends extend
34-
`~matplotlib.backend_bases.GraphicsContextBase` to make adapting to
35-
these changes easier.
36-
3713

3814
API Changes in 2.0.0
3915
====================

doc/api/api_changes/2017-01-19-BFLC.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

doc/api/api_changes/2017-01-30-AL_negative_bar_height_width.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/api/api_changes/2017-02-12-JKS.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

doc/api/api_changes/2017-02-25-AL_dbackend.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

doc/api/dviread.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,4 @@ dviread
88
.. automodule:: matplotlib.dviread
99
:members:
1010
:undoc-members:
11-
:exclude-members: Dvi
12-
:show-inheritance:
13-
14-
.. autoclass:: matplotlib.dviread.Dvi
15-
:members: __iter__,close
1611
:show-inheritance:

doc/devel/README.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

doc/devel/coding_guide.rst

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,20 @@ Backports
9090
When doing backports please include the branch you backported the
9191
commit to along with the SHA in a comment on the original PR.
9292

93-
We do a backport from master to v2.0.x assuming:
94-
95-
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
96-
97-
* ``DANGER`` is a read/write remote branch of the matplotlib/matplotlib repo
98-
93+
Assuming we have ``matplotlib`` as a read-only remote to the
94+
matplotlib/matplotlib repo and ``DANGER`` as a read/write remote to
95+
the matplotlib/matplotlib repo, we do a backport from master to 2.x.
9996
The ``TARGET_SHA`` is the hash of the merge commit you would like to
10097
backport. This can be read off of the github PR page (in the UI with
10198
the merge notification) or through the git CLI tools.::
10299

103100
git fetch matplotlib
104-
git checkout v2.0.x
105-
git merge --ff-only matplotlib/v2.0.x
101+
git checkout v2.x
102+
git merge --ff-only matplotlib/v2.x
106103
git cherry-pick -m 1 TARGET_SHA
107-
git log --graph --decorate # to look at it
104+
gitk # to look at it
108105
# local tests? (use your judgment)
109-
git push DANGER v2.0.x
106+
git push DANGER v2.x
110107
# leave a comment on PR noting sha of the resulting commit
111108
# from the cherry-pick + branch it was moved to
112109

doc/devel/contributing.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,14 @@ environment is set up properly::
120120
python tests.py
121121

122122

123-
.. _pytest: http://doc.pytest.org/en/latest/
123+
.. _nose: https://nose.readthedocs.io/en/latest/
124124
.. _pep8: https://pep8.readthedocs.io/en/latest/
125-
.. _mock: https://docs.python.org/dev/library/unittest.mock.html
126-
.. _Ghostscript: https://www.ghostscript.com/
127-
.. _Inkscape: https://inkscape.org>
128125

129126
.. note::
130127

131-
**Additional dependencies for testing**: pytest_ (version 3.0 or later),
132-
mock_ (if python < 3.3), Ghostscript_, Inkscape_
128+
**Additional dependencies for testing**: nose_ (version 1.0 or later), `mock
129+
<https://docs.python.org/dev/library/unittest.mock.html>`_ (if python < 3.3), `Ghostscript
130+
<https://www.ghostscript.com/>`_, `Inkscape <https://inkscape.org>`_
133131

134132
.. seealso::
135133

@@ -415,19 +413,24 @@ Developing a new backend
415413

416414
If you are working on a custom backend, the *backend* setting in
417415
:file:`matplotlibrc` (:ref:`customizing-matplotlib`) supports an
418-
external backend via the ``module`` directive. If
416+
external backend via the ``module`` directive. if
419417
:file:`my_backend.py` is a Matplotlib backend in your
420418
:envvar:`PYTHONPATH`, you can set it on one of several ways
421419

422420
* in :file:`matplotlibrc`::
423421

424422
backend : module://my_backend
425423

424+
426425
* with the :envvar:`MPLBACKEND` environment variable::
427426

428427
> export MPLBACKEND="module://my_backend"
429428
> python simple_plot.py
430429

430+
* from the command shell with the `-d` flag::
431+
432+
> python simple_plot.py -dmodule://my_backend
433+
431434
* with the use directive in your script::
432435

433436
import matplotlib

doc/devel/gitwash/branch_dropdown.png

-15.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)