Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e72a2b + b32900d commit 9ecd876Copy full SHA for 9ecd876
25 files changed
doc/_templates/index.html
@@ -147,9 +147,7 @@ <h4>Need help?</h4>
147
148
<p>To keep up to date with what's going on in matplotlib, see
149
the <a href="{{ pathto('users/whats_new.html', 1) }}">what's new
150
-page</a>, the more detailed <a href="{{ pathto('_static/CHANGELOG', 1)
151
-}}">changelog</a> or browse
152
-the <a href="https://github.com/matplotlib/matplotlib">source
+page</a> or browse the <a href="https://github.com/matplotlib/matplotlib">source
153
code</a>. Anything that could require changes to your existing code
154
is logged in the <a href="{{ pathto('api/api_changes.html', 1) }}">api
155
changes</a> file.</p>
lib/matplotlib/artist.py
@@ -214,7 +214,8 @@ def set_axes(self, axes):
214
215
ACCEPTS: an :class:`~matplotlib.axes.Axes` instance
216
"""
217
- warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
+ warnings.warn(_get_axes_msg.format('set_axes'), mplDeprecation,
218
+ stacklevel=1)
219
self.axes = axes
220
221
def get_axes(self):
@@ -225,7 +226,8 @@ def get_axes(self):
225
226
This has been deprecated in mpl 1.5, please use the
227
axes property. Will be removed in 1.7 or 2.0.
228
229
+ warnings.warn(_get_axes_msg.format('get_axes'), mplDeprecation,
230
231
return self.axes
232
233
@property
@@ -1580,5 +1582,5 @@ def kwdoc(a):
1580
1582
1581
1583
docstring.interpd.update(Artist=kwdoc(Artist))
1584
-_get_axes_msg = """This has been deprecated in mpl 1.5, please use the
1585
+_get_axes_msg = """{} has been deprecated in mpl 1.5, please use the
1586
axes property. A removal date has not been set."""
lib/matplotlib/dviread.py
@@ -841,7 +841,7 @@ def find_tex_file(filename, format=None):
841
842
Call :program:`kpsewhich` to find a file in the texmf tree. If
843
*format* is not None, it is used as the value for the
844
- :option:`--format` option.
+ `--format` option.
845
846
Apparently most existing TeX distributions on Unix-like systems
847
use kpathsea. I hear MikTeX (a popular distribution on Windows)
lib/matplotlib/mathtext.py
@@ -2843,12 +2843,15 @@ def subsuper(self, s, loc, toks):
2843
sub = None
2844
super = None
2845
2846
- # Pick all of the apostrophe's out
+ # Pick all of the apostrophes out, including first apostrophes that have
2847
+ # been parsed as characters
2848
napostrophes = 0
2849
new_toks = []
2850
for tok in toks[0]:
2851
if isinstance(tok, six.string_types) and tok not in ('^', '_'):
2852
napostrophes += len(tok)
2853
+ elif isinstance(tok, Char) and tok.c == "'":
2854
+ napostrophes += 1
2855
else:
2856
new_toks.append(tok)
2857
toks = new_toks
@@ -2903,6 +2906,9 @@ def subsuper(self, s, loc, toks):
2903
2906
super = Hlist([])
2904
2907
for i in range(napostrophes):
2905
2908
super.children.extend(self.symbol(s, loc, ['\prime']))
2909
+ # kern() and hpack() needed to get the metrics right after extending
2910
+ super.kern()
2911
+ super.hpack()
2912
2913
# Handle over/under symbols, such as sum or integral
2914
if self.is_overunder(nucleus):
lib/matplotlib/patches.py
@@ -3011,15 +3011,21 @@ class Bar(_Base):
3011
3012
def __init__(self, armA=0., armB=0., fraction=0.3, angle=None):
3013
3014
- *armA* : minimum length of armA
+ Parameters
3015
+ ----------
3016
+ armA : float
3017
+ minimum length of armA
3018
- *armB* : minimum length of armB
3019
+ armB : float
3020
+ minimum length of armB
3021
- *fraction* : a fraction of the distance between two points that
- will be added to armA and armB.
3022
+ fraction : float
3023
+ a fraction of the distance between two points that
3024
+ will be added to armA and armB.
3025
- *angle* : angle of the connecting line (if None, parallel to A
- and B)
3026
+ angle : float or None
3027
+ angle of the connecting line (if None, parallel
3028
+ to A and B)
3029
3030
self.armA = armA
3031
self.armB = armB
lib/matplotlib/quiver.py
@@ -228,7 +228,7 @@ class QuiverKey(martist.Artist):
""" Labelled arrow for use as a quiver plot scale key."""
halign = {'N': 'center', 'S': 'center', 'E': 'left', 'W': 'right'}
valign = {'N': 'bottom', 'S': 'top', 'E': 'center', 'W': 'center'}
- pivot = {'N': 'mid', 'S': 'mid', 'E': 'tip', 'W': 'tail'}
+ pivot = {'N': 'middle', 'S': 'middle', 'E': 'tip', 'W': 'tail'}
def __init__(self, Q, X, Y, U, label, **kw):
234
martist.Artist.__init__(self)
@@ -708,6 +708,10 @@ def _h_arrows(self, length):
708
X = X - X[:, 3, np.newaxis] # numpy bug? using -= does not
709
# work here unless we multiply
710
# by a float first, as with 'mid'.
711
+ elif self.pivot != 'tail':
712
+ raise ValueError(("Quiver.pivot must have value in {{'middle', "
713
+ "'tip', 'tail'}} not {}").format(self.pivot))
714
+
715
tooshort = length < self.minlength
716
if tooshort.any():
717
# Use a heptagonal dot:
lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_31.pdf
4.31 KB
lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_31.png
1.28 KB
lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_31.svg
lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_dejavusans_31.pdf
3.1 KB
0 commit comments