Skip to content

Commit 9cff4e4

Browse files
committed
Merge branch 'master' from upstream into fillstyle_none.
Conflicts: lib/matplotlib/lines.py lib/matplotlib/markers.py
2 parents 9ac0f3d + c92d19f commit 9cff4e4

File tree

291 files changed

+8929
-3831
lines changed

Some content is hidden

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

291 files changed

+8929
-3831
lines changed

INSTALL

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ Next, we need to get matplotlib installed. We provide prebuilt
5454
binaries for OS X and Windows on the matplotlib `download
5555
<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on
5656
the latest release of the "matplotlib" package, choose your python
57-
version (e.g., 2.6 or 2.7) and your platform (macosx or win32).
58-
If you have any problems, please check the :ref:`installing-faq`,
59-
search using Google, and/or post a question to the `mailing list
57+
version (2.6, 2.7 or 3.2) and your platform (macosx or win32). If you
58+
have any problems, please check the :ref:`installing-faq`, search
59+
using Google, and/or post a question the `mailing list
6060
<http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
6161

62-
If you are on Debian/Ubuntu Linux, it suffices to do::
62+
If you are on Debian/Ubuntu linux, it suffices to do::
6363

6464
> sudo apt-get install python-matplotlib
6565

doc/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
nxutils_api.rst
3636
path_api.rst
3737
pyplot_api.rst
38+
sankey_api.rst
3839
spines_api.rst
3940
ticker_api.rst
4041
tight_layout_api.rst

doc/api/sankey_api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
******
2+
sankey
3+
******
4+
5+
6+
:mod:`matplotlib.sankey`
7+
=======================
8+
9+
.. automodule:: matplotlib.sankey
10+
:members:
11+
:undoc-members:
12+
:show-inheritance:

doc/devel/coding_guide.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,7 @@ Requirements
365365

366366
The following software is required to run the tests:
367367

368-
- nose_, version 0.11.1 or later
369-
370-
- `Python Imaging Library
371-
<http://www.pythonware.com/products/pil/>`_ (to compare image
372-
results)
368+
- nose_, version 1.0 or later
373369

374370
- `Ghostscript <http://pages.cs.wisc.edu/~ghost/>`_ (to render PDF
375371
files)
@@ -405,6 +401,9 @@ arguments works from within Python::
405401
.. _`nosetest arguments`: http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html
406402

407403

404+
Running tests by any means other than `matplotlib.test()`
405+
does not load the nose "knownfailureif" (Known failing tests) plugin,
406+
causing known-failing tests to fail for real.
408407

409408
Writing a simple test
410409
---------------------

doc/devel/release_guide.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ need to create a release branch::
4646
On the branch, do any additional testing you want to do, and then build
4747
binaries and source distributions for testing as release candidates.
4848

49+
For each release candidate as well as for the final release version,
50+
please `git tag` the commit you will use for packaging like so::
51+
52+
git tag -a v1.1.0rc1
53+
54+
The `-a` flag will allow you to write a message about the tag, and
55+
affiliate your name with it. A reasonable tag message would be something
56+
like ``v1.1.0 Release Candidate 1 (September 24, 2011)``. To tag a
57+
release after the fact, just track down the commit hash, and::
58+
59+
git tag -a v1.0.1 a9f3f3a50745
60+
61+
Tags allow developers to quickly checkout different releases by name,
62+
and also provides source download via zip and tarball on github.
4963

5064
.. _release-packaging:
5165

@@ -64,7 +78,7 @@ Packaging
6478
OSX, the default backend should be TkAgg. You should also turn on
6579
or off any platform specific build options you need. Importantly,
6680
you also need to make sure that you delete the :file:`build` dir
67-
after any changes to file:`setup.cfg` before rebuilding since cruft
81+
after any changes to :file:`setup.cfg` before rebuilding since cruft
6882
in the :file:`build` dir can get carried along.
6983

7084
* on windows, unix2dos the rc file

doc/make.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env python
2+
3+
from __future__ import print_function
24
import fileinput
35
import glob
46
import os
@@ -169,7 +171,7 @@ def latex():
169171

170172
os.chdir('../..')
171173
else:
172-
print 'latex build has not been tested on windows'
174+
print('latex build has not been tested on windows')
173175

174176
def clean():
175177
shutil.rmtree("build", ignore_errors=True)

doc/pyplots/make.py

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env python
2+
3+
from __future__ import print_function
4+
import sys, os, glob
5+
import matplotlib
6+
import IPython.Shell
7+
#matplotlib.rcdefaults()
8+
matplotlib.use('Agg')
9+
10+
mplshell = IPython.Shell.MatplotlibShell('mpl')
11+
12+
formats = [('png', 100),
13+
('hires.png', 200),
14+
('pdf', 72)]
15+
16+
def figs():
17+
print('making figs')
18+
import matplotlib.pyplot as plt
19+
for fname in glob.glob('*.py'):
20+
if fname.split('/')[-1] == __file__.split('/')[-1]: continue
21+
basename, ext = os.path.splitext(fname)
22+
imagefiles = dict([('%s.%s'%(basename, format), dpi)
23+
for format, dpi in formats])
24+
all_exists = True
25+
for imagefile in imagefiles:
26+
if not os.path.exists(imagefile):
27+
all_exists = False
28+
break
29+
30+
if all_exists:
31+
print(' already have %s'%fname)
32+
else:
33+
print(' building %s'%fname)
34+
plt.close('all') # we need to clear between runs
35+
mplshell.magic_run(basename)
36+
for imagefile, dpi in imagefiles.iteritems():
37+
# todo: this will get called even if the run script
38+
# fails and exits, thus creating a stub pdf and png
39+
# iles preventing them from getting built successfully
40+
# later
41+
plt.savefig(imagefile, dpi=dpi)
42+
print('all figures made')
43+
44+
45+
def clean():
46+
patterns = (['#*', '*~', '*pyc'] +
47+
['*.%s' % format for format, dpi in formats])
48+
for pattern in patterns:
49+
for fname in glob.glob(pattern):
50+
os.remove(fname)
51+
print('all clean')
52+
53+
54+
55+
def all():
56+
figs()
57+
58+
funcd = {'figs':figs,
59+
'clean':clean,
60+
'all':all,
61+
}
62+
63+
if len(sys.argv)>1:
64+
for arg in sys.argv[1:]:
65+
func = funcd.get(arg)
66+
if func is None:
67+
raise SystemExit('Do not know how to handle %s; valid args are'%(
68+
arg, funcd.keys()))
69+
func()
70+
else:
71+
all()
72+
73+
74+
75+

doc/sphinxext/gen_rst.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
generate the rst files for the examples by iterating over the pylab examples
33
"""
4+
from __future__ import print_function
45
import os, glob
56

67
import os
@@ -152,7 +153,7 @@ def generate_example_rst(app):
152153

153154
fhindex.close()
154155

155-
print
156+
print()
156157

157158
def setup(app):
158159
app.connect('builder-inited', generate_example_rst)

doc/sphinxext/math_symbol_table.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
symbols = [
23
["Lower-case Greek",
34
5,
@@ -141,7 +142,7 @@ def setup(app):
141142
# Do some verification of the tables
142143
from matplotlib import _mathtext_data
143144

144-
print "SYMBOLS NOT IN STIX:"
145+
print("SYMBOLS NOT IN STIX:")
145146
all_symbols = {}
146147
for category, columns, syms in symbols:
147148
if category == "Standard Function Names":
@@ -151,9 +152,9 @@ def setup(app):
151152
if len(sym) > 1:
152153
all_symbols[sym[1:]] = None
153154
if sym[1:] not in _mathtext_data.tex2uni:
154-
print sym
155+
print(sym)
155156

156-
print "SYMBOLS NOT IN TABLE:"
157+
print("SYMBOLS NOT IN TABLE:")
157158
for sym in _mathtext_data.tex2uni:
158159
if sym not in all_symbols:
159-
print sym
160+
print(sym)

doc/utils/pylab_names.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
"""
23
autogenerate some tables for pylab namespace
34
"""
@@ -14,7 +15,7 @@
1415
doc = getattr(o, '__doc__', None)
1516
if doc is not None:
1617
doc = ' - '.join([line for line in doc.split('\n') if line.strip()][:2])
17-
18+
1819
mod = getattr(o, '__module__', None)
1920
if mod is None:
2021
mod = 'unknown'
@@ -25,7 +26,7 @@
2526
k = ':class:`~%s.%s`'%(mod, k)
2627
else:
2728
k = ':func:`~%s.%s`'%(mod, k)
28-
mod = ':mod:`%s`'%mod
29+
mod = ':mod:`%s`'%mod
2930
elif mod.startswith('numpy'):
3031
#k = '`%s <%s>`_'%(k, 'http://scipy.org/Numpy_Example_List_With_Doc#%s'%k)
3132
k = '`%s <%s>`_'%(k, 'http://sd-2116.dedibox.fr/pydocweb/doc/%s.%s'%(mod, k))
@@ -40,21 +41,21 @@
4041
mods.sort()
4142
for mod in mods:
4243
border = '*'*len(mod)
43-
print mod
44-
print border
44+
print(mod)
45+
print(border)
4546

46-
print
47+
print()
4748
funcs, docs = zip(*modd[mod])
4849
maxfunc = max([len(f) for f in funcs])
4950
maxdoc = max(40, max([len(d) for d in docs]) )
5051
border = ' '.join(['='*maxfunc, '='*maxdoc])
51-
print border
52-
print ' '.join(['symbol'.ljust(maxfunc), 'description'.ljust(maxdoc)])
53-
print border
52+
print(border)
53+
print(' '.join(['symbol'.ljust(maxfunc), 'description'.ljust(maxdoc)]))
54+
print(border)
5455
for func, doc in modd[mod]:
5556
row = ' '.join([func.ljust(maxfunc), doc.ljust(maxfunc)])
56-
print row
57+
print(row)
5758

58-
print border
59-
print
59+
print(border)
60+
print()
6061
#break

examples/animation/old_animation/animate_decay_tk_blit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import time, sys
23
import numpy as np
34
import matplotlib.pyplot as plt
@@ -44,7 +45,7 @@ def run(*args):
4445

4546
if run.cnt==1000:
4647
# print the timing info and quit
47-
print 'FPS:' , 1000/(time.time()-tstart)
48+
print('FPS:' , 1000/(time.time()-tstart))
4849
sys.exit()
4950

5051
run.cnt += 1

examples/animation/old_animation/animation_blit_fltk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import sys
23
import fltk
34
import matplotlib
@@ -37,7 +38,7 @@ def update(self,ptr):
3738
self.cnt+=1
3839
if self.cnt==1000:
3940
# print the timing info and quit
40-
print 'FPS:' , 1000/(time.time()-self.tstart)
41+
print('FPS:' , 1000/(time.time()-self.tstart))
4142
sys.exit()
4243
return True
4344

examples/animation/old_animation/animation_blit_gtk.py

100644100755
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python
22

3+
from __future__ import print_function
4+
35
# For detailed comments on animation and the techniques used here, see
46
# the wiki entry
57
# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation
@@ -30,7 +32,7 @@
3032
tstart = time.time()
3133

3234
def update_line(*args):
33-
print 'you are here', update_line.cnt
35+
print('you are here', update_line.cnt)
3436
if update_line.background is None:
3537
update_line.background = canvas.copy_from_bbox(ax.bbox)
3638

@@ -46,7 +48,7 @@ def update_line(*args):
4648

4749
if update_line.cnt==1000:
4850
# print the timing info and quit
49-
print 'FPS:' , 1000/(time.time()-tstart)
51+
print('FPS:' , 1000/(time.time()-tstart))
5052
gtk.mainquit()
5153
raise SystemExit
5254

examples/animation/old_animation/animation_blit_gtk2.py

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python
22

3+
from __future__ import print_function
4+
35
"""
46
This example utlizes restore_region with optional bbox and xy
57
arguments. The plot is continuously shifted to the left. Instead of
@@ -137,7 +139,7 @@ def update_line(self, *args):
137139
dt = (time.time()-tstart)
138140
if dt>15:
139141
# print the timing info and quit
140-
print 'FPS:' , self.cnt/dt
142+
print('FPS:' , self.cnt/dt)
141143
gtk.main_quit()
142144
raise SystemExit
143145

examples/animation/old_animation/animation_blit_qt.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# For detailed comments on animation and the techniqes used here, see
22
# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
33

4+
from __future__ import print_function
5+
46
import os, sys
57
import matplotlib
68
matplotlib.use('QtAgg') # qt3 example
@@ -47,7 +49,7 @@ def timerEvent(self, evt):
4749

4850
if self.cnt==ITERS:
4951
# print the timing info and quit
50-
print 'FPS:' , ITERS/(time.time()-self.tstart)
52+
print('FPS:', ITERS/(time.time()-self.tstart))
5153
sys.exit()
5254

5355
else:

examples/animation/old_animation/animation_blit_qt4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# For detailed comments on animation and the techniqes used here, see
22
# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
33

4+
from __future__ import print_function
5+
46
import os
57
import sys
68

@@ -63,7 +65,7 @@ def timerEvent(self, evt):
6365
self.draw()
6466
if self.cnt==ITERS:
6567
# print the timing info and quit
66-
print 'FPS:' , ITERS/(time.time()-self.tstart)
68+
print('FPS:' , ITERS/(time.time()-self.tstart))
6769
sys.exit()
6870
else:
6971
self.cnt += 1

0 commit comments

Comments
 (0)