#19556: upgrade matplotlib to 1.5.0
-------------------------------------+-------------------------------------
Reporter: fbissey | Owner:
Type: task | Status: new
Priority: major | Milestone: sage-6.10
Component: packages: | Resolution:
standard | Merged in:
Keywords: | Reviewers:
Authors: François Bissey | Work issues:
Report Upstream: N/A | Commit:
Branch: | b21be98e75eb044998b061e5f8da47ddf6a810a3
u/fbissey/mpl-1.5.0 | Stopgaps:
Dependencies: #17642 |
-------------------------------------+-------------------------------------
Comment (by fbissey):
Guilty bit is in `sage/plot/arrow.py`
{{{
if options['linestyle']!='solid':
# The next few lines work around a design issue in matplotlib.
Currently, the specified
# linestyle is used to draw both the path and the arrowhead.
If linestyle is 'dashed', this
# looks really odd. This code is from Jae-Joon Lee in
response to a post to the matplotlib mailing
# list. See
http://sourceforge.net/mailarchive/forum.php?thread_name=CAG%3DuJ
%2Bnw2dE05P9TOXTz_zp-
mGP3cY801vMH7yt6vgP9_WzU8w%40mail.gmail.com&forum_name=matp$
import matplotlib.patheffects as pe
class CheckNthSubPath(object):
def __init__(self, patch, n):
"""
creates an callable object that returns True if the
provided
path is the n-th path from the patch.
"""
self._patch = patch
self._n = n
def get_paths(self, renderer):
self._patch.set_dpi_cor(renderer.points_to_pixels(1.))
paths, fillables =
self._patch.get_path_in_displaycoord()
return paths
def __call__(self, renderer, gc, tpath, affine, rgbFace):
path = self.get_paths(renderer)[self._n]
vert1, code1 = path.vertices, path.codes
import numpy as np
if np.all(vert1 == tpath.vertices) and np.all(code1 ==
tpath.codes):
return True
else:
return False
}}}
`np.all(vert1 == tpath.vertices) and np.all(code1 == tpath.codes)` is the
elementwise comparison(s). This will need replacing.
--
Ticket URL: <http://trac.sagemath.org/ticket/19556#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.