Skip to content

Merge 15x to 2x #5934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions doc/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ <h4>Need help?</h4>

<p>To keep up to date with what's going on in matplotlib, see
the <a href="{{ pathto('users/whats_new.html', 1) }}">what's new
page</a>, the more detailed <a href="{{ pathto('_static/CHANGELOG', 1)
}}">changelog</a> or browse
the <a href="https://github.com/matplotlib/matplotlib">source
page</a> or browse the <a href="https://github.com/matplotlib/matplotlib">source
code</a>. Anything that could require changes to your existing code
is logged in the <a href="{{ pathto('api/api_changes.html', 1) }}">api
changes</a> file.</p>
Expand Down
8 changes: 5 additions & 3 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def set_axes(self, axes):

ACCEPTS: an :class:`~matplotlib.axes.Axes` instance
"""
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
warnings.warn(_get_axes_msg.format('set_axes'), mplDeprecation,
stacklevel=1)
self.axes = axes

def get_axes(self):
Expand All @@ -225,7 +226,8 @@ def get_axes(self):
This has been deprecated in mpl 1.5, please use the
axes property. Will be removed in 1.7 or 2.0.
"""
warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)
warnings.warn(_get_axes_msg.format('get_axes'), mplDeprecation,
stacklevel=1)
return self.axes

@property
Expand Down Expand Up @@ -1580,5 +1582,5 @@ def kwdoc(a):

docstring.interpd.update(Artist=kwdoc(Artist))

_get_axes_msg = """This has been deprecated in mpl 1.5, please use the
_get_axes_msg = """{} has been deprecated in mpl 1.5, please use the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, was this brace formatting used in v1.5.x?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is a merge of 1.5.x to 2.x

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's part of #5915

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so the point is that '{}' can't be used in v1.5.x branch. Same thing with my comment about the backport I just merged into 1.5.x.

axes property. A removal date has not been set."""
2 changes: 1 addition & 1 deletion lib/matplotlib/dviread.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def find_tex_file(filename, format=None):
"""
Call :program:`kpsewhich` to find a file in the texmf tree. If
*format* is not None, it is used as the value for the
:option:`--format` option.
`--format` option.

Apparently most existing TeX distributions on Unix-like systems
use kpathsea. I hear MikTeX (a popular distribution on Windows)
Expand Down
8 changes: 7 additions & 1 deletion lib/matplotlib/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2843,12 +2843,15 @@ def subsuper(self, s, loc, toks):
sub = None
super = None

# Pick all of the apostrophe's out
# Pick all of the apostrophes out, including first apostrophes that have
# been parsed as characters
napostrophes = 0
new_toks = []
for tok in toks[0]:
if isinstance(tok, six.string_types) and tok not in ('^', '_'):
napostrophes += len(tok)
elif isinstance(tok, Char) and tok.c == "'":
napostrophes += 1
else:
new_toks.append(tok)
toks = new_toks
Expand Down Expand Up @@ -2903,6 +2906,9 @@ def subsuper(self, s, loc, toks):
super = Hlist([])
for i in range(napostrophes):
super.children.extend(self.symbol(s, loc, ['\prime']))
# kern() and hpack() needed to get the metrics right after extending
super.kern()
super.hpack()

# Handle over/under symbols, such as sum or integral
if self.is_overunder(nucleus):
Expand Down
18 changes: 12 additions & 6 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -3011,15 +3011,21 @@ class Bar(_Base):

def __init__(self, armA=0., armB=0., fraction=0.3, angle=None):
"""
*armA* : minimum length of armA
Parameters
----------
armA : float
minimum length of armA

*armB* : minimum length of armB
armB : float
minimum length of armB

*fraction* : a fraction of the distance between two points that
will be added to armA and armB.
fraction : float
a fraction of the distance between two points that
will be added to armA and armB.

*angle* : angle of the connecting line (if None, parallel to A
and B)
angle : float or None
angle of the connecting line (if None, parallel
to A and B)
"""
self.armA = armA
self.armB = armB
Expand Down
6 changes: 5 additions & 1 deletion lib/matplotlib/quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
martist.Artist.__init__(self)
Expand Down Expand Up @@ -708,6 +708,10 @@ def _h_arrows(self, length):
X = X - X[:, 3, np.newaxis] # numpy bug? using -= does not
# work here unless we multiply
# by a float first, as with 'mid'.
elif self.pivot != 'tail':
raise ValueError(("Quiver.pivot must have value in {{'middle', "
"'tip', 'tail'}} not {}").format(self.pivot))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh, did I miss that in merging the backport?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, This is merging the backport that you did to 1.5.x back up to 2.x


tooshort = length < self.minlength
if tooshort.any():
# Use a heptagonal dot:
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
231 changes: 214 additions & 17 deletions lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_cm_31.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading