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

Skip to content

Commit 9d369a1

Browse files
Merge branch 'master' into wx-inconsistencies
2 parents deeeeb6 + 254cdac commit 9d369a1

133 files changed

Lines changed: 1670 additions & 2110 deletions

File tree

Some content is hidden

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

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ platforms. Matplotlib can be used in Python scripts, the Python and IPython
3333
shell (à la MATLAB or Mathematica), web application servers, and various
3434
graphical user interface toolkits.
3535

36+
NOTE: The current master branch is now Python 3 only. Python 2 support is
37+
being dropped.
38+
3639
`Home page <http://matplotlib.org/>`_
3740

3841
Installation
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
Deprecations
22
````````````
3-
``cbook.is_numlike`` is deprecated. Use ``isinstance(..., numbers.Number)``
4-
instead.
3+
The following functions and classes are deprecated:
4+
5+
- ``cbook.GetRealpathAndStat`` (which is only a helper for
6+
``get_realpath_and_stat``),
7+
- ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead),
8+
- ``mathtext.unichr_safe`` (use ``chr`` instead),
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
matplotlib.cbook.Bunch deprecated
2+
`````````````````````````````````
3+
The ``matplotlib.cbook.Bunch`` class has been deprecated. Instead, use
4+
`types.SimpleNamespace` from the standard library which provides the same
5+
functionality.

doc/users/whats_new.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,12 @@ Thus, to force usage of PGI when both bindings are installed, import it first.
310310

311311

312312

313-
Cairo rendering for Qt and WX canvases
314-
--------------------------------------
313+
Cairo rendering for Qt, WX, and Tk canvases
314+
-------------------------------------------
315315

316-
The new ``Qt4Cairo``, ``Qt5Cairo``, and ``WXCairo`` backends allow Qt and Wx
317-
canvases to use Cairo rendering instead of Agg.
316+
The new ``Qt4Cairo``, ``Qt5Cairo``, ``WXCairo``, and ``TkCairo``
317+
backends allow Qt, Wx, and Tk canvases to use Cairo rendering instead of
318+
Agg.
318319

319320

320321
Added support for QT in new ToolManager

examples/api/custom_index_formatter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
to leave out days on which there is no data, i.e. weekends. The example
88
below shows how to use an 'index formatter' to achieve the desired plot
99
"""
10-
from __future__ import print_function
1110
import numpy as np
1211
import matplotlib.pyplot as plt
1312
import matplotlib.cbook as cbook

examples/api/custom_projection_example.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
Custom projection
44
=================
55
6-
Showcase Hammer projection by alleviating many features of
7-
matplotlib.
6+
Showcase Hammer projection by alleviating many features of Matplotlib.
87
"""
98

10-
11-
from __future__ import unicode_literals
12-
139
import matplotlib
1410
from matplotlib.axes import Axes
1511
from matplotlib.patches import Circle

examples/api/custom_scale_example.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33
Custom scale
44
============
55
6-
Create a custom scale, by implementing the
7-
scaling use for latitude data in a Mercator Projection.
6+
Create a custom scale, by implementing the scaling use for latitude data in a
7+
Mercator Projection.
88
"""
99

10-
11-
from __future__ import unicode_literals
12-
1310
import numpy as np
1411
from numpy import ma
1512
from matplotlib import scale as mscale

examples/api/engineering_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# `sep` (separator between the number and the prefix/unit).
3636
ax1.set_title('SI-prefix only ticklabels, 1-digit precision & '
3737
'thin space separator')
38-
formatter1 = EngFormatter(places=1, sep=u"\N{THIN SPACE}") # U+2009
38+
formatter1 = EngFormatter(places=1, sep="\N{THIN SPACE}") # U+2009
3939
ax1.xaxis.set_major_formatter(formatter1)
4040
ax1.plot(xs, ys)
4141
ax1.set_xlabel('Frequency [Hz]')

examples/api/filled_step.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import matplotlib.pyplot as plt
1515
import matplotlib.ticker as mticker
1616
from cycler import cycler
17-
from six.moves import zip
1817

1918

2019
def filled_hist(ax, edges, values, bottoms=None, orientation='v',
@@ -150,8 +149,8 @@ def stack_hist(ax, stacked_data, sty_cycle, bottoms=None,
150149
labels = itertools.repeat(None)
151150

152151
if label_data:
153-
loop_iter = enumerate((stacked_data[lab], lab, s) for lab, s in
154-
zip(labels, sty_cycle))
152+
loop_iter = enumerate((stacked_data[lab], lab, s)
153+
for lab, s in zip(labels, sty_cycle))
155154
else:
156155
loop_iter = enumerate(zip(stacked_data, labels, sty_cycle))
157156

examples/api/radar_chart.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ class RadarAxes(PolarAxes):
6060
draw_patch = patch_dict[frame]
6161

6262
def __init__(self, *args, **kwargs):
63-
super(RadarAxes, self).__init__(*args, **kwargs)
63+
super().__init__(*args, **kwargs)
6464
# rotate plot such that the first axis is at the top
6565
self.set_theta_zero_location('N')
6666

6767
def fill(self, *args, **kwargs):
6868
"""Override fill so that line is closed by default"""
6969
closed = kwargs.pop('closed', True)
70-
return super(RadarAxes, self).fill(closed=closed, *args, **kwargs)
70+
return super().fill(closed=closed, *args, **kwargs)
7171

7272
def plot(self, *args, **kwargs):
7373
"""Override plot so that line is closed by default"""
74-
lines = super(RadarAxes, self).plot(*args, **kwargs)
74+
lines = super().plot(*args, **kwargs)
7575
for line in lines:
7676
self._close_line(line)
7777

0 commit comments

Comments
 (0)