|
From: <pki...@us...> - 2008-07-26 19:22:47
|
Revision: 5890
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5890&view=rev
Author: pkienzle
Date: 2008-07-26 19:22:44 +0000 (Sat, 26 Jul 2008)
Log Message:
-----------
Fix str() method for Wedge artist
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-07-26 19:19:35 UTC (rev 5889)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-07-26 19:22:44 UTC (rev 5890)
@@ -627,7 +627,7 @@
class Wedge(Patch):
def __str__(self):
- return "Wedge(%g,%g)"%self.xy[0]
+ return "Wedge(%g,%g)"%(self.theta1,self.theta2)
def __init__(self, center, r, theta1, theta2, **kwargs):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-07-29 17:47:53
|
Revision: 5922
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5922&view=rev
Author: jdh2358
Date: 2008-07-29 17:47:50 +0000 (Tue, 29 Jul 2008)
Log Message:
-----------
special case contains test for degenerate rectangle
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-07-29 16:02:00 UTC (rev 5921)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-07-29 17:47:50 UTC (rev 5922)
@@ -401,6 +401,10 @@
return self._rect_transform
def contains(self, mouseevent):
+ # special case the degernate rectangle
+ if self._width==0 or self._height==0:
+ return False, {}
+
x, y = self.get_transform().inverted().transform_point(
(mouseevent.x, mouseevent.y))
return (x >= 0.0 and x <= 1.0 and y >= 0.0 and y <= 1.0), {}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2008-11-05 17:10:02
|
Revision: 6366
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6366&view=rev
Author: ryanmay
Date: 2008-11-05 17:09:55 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Re-add the xy attribute to the Rectangle class (disappeared during the transforms refactor).
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-11-05 15:15:28 UTC (rev 6365)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-11-05 17:09:55 UTC (rev 6366)
@@ -478,6 +478,10 @@
"Return the bottom coord of the rectangle"
return self._y
+ def get_xy(self):
+ "Return the left and bottom coords of the rectangle"
+ return self._x, self._y
+
def get_width(self):
"Return the width of the rectangle"
return self._width
@@ -502,6 +506,14 @@
"""
self._y = y
+ def set_xy(self, xy):
+ """
+ Set the left and bottom coords of the rectangle
+
+ ACCEPTS: 2-item sequence
+ """
+ self._x, self._y = xy
+
def set_width(self, w):
"""
Set the width rectangle
@@ -536,6 +548,8 @@
def get_bbox(self):
return transforms.Bbox.from_bounds(self._x, self._y, self._width, self._height)
+ xy = property(get_xy, set_xy)
+
class RegularPolygon(Patch):
"""
A regular polygon patch.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pki...@us...> - 2008-11-14 22:25:37
|
Revision: 6405
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6405&view=rev
Author: pkienzle
Date: 2008-11-14 22:25:28 +0000 (Fri, 14 Nov 2008)
Log Message:
-----------
patches: use None rather than 0 for full wedge
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-11-14 22:19:02 UTC (rev 6404)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-11-14 22:25:28 UTC (rev 6405)
@@ -718,7 +718,7 @@
def __str__(self):
return "Wedge(%g,%g)"%(self.theta1,self.theta2)
- def __init__(self, center, r, theta1, theta2, width=0, **kwargs):
+ def __init__(self, center, r, theta1, theta2, width=None, **kwargs):
"""
Draw a wedge centered at *x*, *y* center with radius *r* that
sweeps *theta1* to *theta2* (in degrees). If *width* is given,
@@ -745,7 +745,7 @@
# Form the outer ring
arc = Path.arc(theta1,theta2)
- if width != 0:
+ if width is not None:
# Partial annulus needs to draw the outter ring
# followed by a reversed and scaled inner ring
v1 = arc.vertices
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2008-12-08 22:04:19
|
Revision: 6524
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6524&view=rev
Author: jdh2358
Date: 2008-12-08 22:04:15 +0000 (Mon, 08 Dec 2008)
Log Message:
-----------
fixed some doc formatting errors
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-08 21:59:25 UTC (rev 6523)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-08 22:04:15 UTC (rev 6524)
@@ -1429,11 +1429,12 @@
args = None
if args is None:
- argstr = 'None' # empy table entry crashed latex build
+ argstr = 'None'
else:
argstr = ",".join([("%s=%s" % (an, av)) for an, av in args])
- _table.append([cls.__name__, name, argstr])
+ #adding quotes for now to work around tex bug treating '-' as itemize
+ _table.append([cls.__name__, "'%s'"%name, argstr])
return _pprint_table(_table)
@@ -3309,13 +3310,13 @@
def set_patchA(self, patchA):
- """ set the begin patche.
+ """ set the begin patch.
"""
self.patchA = patchA
def set_patchB(self, patchB):
- """ set the begin patche.
+ """ set the begin patch
"""
self.patchB = patchB
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ry...@us...> - 2008-12-10 21:12:38
|
Revision: 6554
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6554&view=rev
Author: ryanmay
Date: 2008-12-10 21:12:26 +0000 (Wed, 10 Dec 2008)
Log Message:
-----------
Remove trailing whitespace.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-10 21:02:44 UTC (rev 6553)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-10 21:12:26 UTC (rev 6554)
@@ -2208,7 +2208,7 @@
connected. *patchA* (or *patchB*) is given, the returned path is
clipped so that it start (or end) from the boundary of the
patch. The path is further shrunk by *shrinkA* (or *shrinkB*)
- which is given in points.
+ which is given in points.
"""
@@ -3372,7 +3372,7 @@
Old attrs simply are forgotten.
- Without argument (or with arrowstyle=None), return
+ Without argument (or with arrowstyle=None), return
available box styles as a list of strings.
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2008-12-29 14:25:57
|
Revision: 6711
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6711&view=rev
Author: mdboom
Date: 2008-12-29 14:25:47 +0000 (Mon, 29 Dec 2008)
Log Message:
-----------
Oops in last commit
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2008-12-29 14:23:24 UTC (rev 6710)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2008-12-29 14:25:47 UTC (rev 6711)
@@ -252,7 +252,7 @@
ACCEPTS: [ '/' | '\\' | '|' | '-' | '#' | 'x' ] (ps & pdf backend only)
"""
- self._hatch = h
+ self._hatch = hatch
def get_hatch(self):
'Return the current hatching pattern'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-06 19:34:53
|
Revision: 6748
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6748&view=rev
Author: mdboom
Date: 2009-01-06 19:34:52 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
Fix reST formatting.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-01-06 19:26:31 UTC (rev 6747)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-01-06 19:34:52 UTC (rev 6748)
@@ -249,12 +249,10 @@
hatchings are done. If same letter repeats, it increases the
density of hatching of that pattern.
- CURRENT LIMITATIONS:
+ Hatching is supported in the PostScript, PDF, SVG and Agg
+ backends only.
- 1. Hatching is supported in the PostScript, PDF, SVG and Agg
- backends only.
-
- ACCEPTS: [ '/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | ' *' ]
+ ACCEPTS: [ '/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
"""
self._hatch = hatch
@@ -1444,8 +1442,8 @@
else:
argstr = ",".join([("%s=%s" % (an, av)) for an, av in args])
- #adding quotes for now to work around tex bug treating '-' as itemize
- _table.append([cls.__name__, "'%s'"%name, argstr])
+ #adding ``quotes`` since - and | have special meaning in reST
+ _table.append([cls.__name__, "``%s``"%name, argstr])
return _pprint_table(_table)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-01-06 19:52:44
|
Revision: 6751
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6751&view=rev
Author: mdboom
Date: 2009-01-06 19:52:42 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
Fix reST formatting in list of hatch patterns.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-01-06 19:52:17 UTC (rev 6750)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-01-06 19:52:42 UTC (rev 6751)
@@ -252,7 +252,7 @@
Hatching is supported in the PostScript, PDF, SVG and Agg
backends only.
- ACCEPTS: [ '/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
+ ACCEPTS: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
"""
self._hatch = hatch
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-05-22 14:25:00
|
Revision: 7133
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7133&view=rev
Author: jdh2358
Date: 2009-05-22 14:24:55 +0000 (Fri, 22 May 2009)
Log Message:
-----------
modified Tony's patch to coimply w/ mpl properties
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-05-22 14:22:03 UTC (rev 7132)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-05-22 14:24:55 UTC (rev 7133)
@@ -1131,15 +1131,21 @@
self.radius = radius
Ellipse.__init__(self, xy, radius*2, radius*2, **kwargs)
__init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
-
- def radius():
- def fget(self):
- return self.width / 2.
- def fset(self, radius):
- self.width = self.height = 2 * radius
- return locals()
- radius = property(**radius())
+ def set_radius(self, radius):
+ """
+ Set the radius of the circle
+
+ ACCEPTS: float
+ """
+ self.width = self.height = 2 * radius
+
+ def get_radius(self):
+ 'return the radius of the circle'
+ return self.width / 2.
+
+ radius = property(get_radius, set_radius)
+
class Arc(Ellipse):
"""
An elliptical arc. Because it performs various optimizations, it
@@ -2589,7 +2595,7 @@
def connect(self, posA, posB):
x1, y1 = posA
x20, y20 = x2, y2 = posB
-
+
x12, y12 = (x1 + x2)/2., (y1 + y2)/2.
theta1 = math.atan2(y2-y1, x2-x1)
@@ -2598,7 +2604,7 @@
ddx, ddy = dx/dd, dy/dd
armA, armB = self.armA, self.armB
-
+
if self.angle is not None:
#angle = self.angle % 180.
#if angle < 0. or angle > 180.:
@@ -2622,7 +2628,7 @@
else:
dl = 0.
-
+
#if armA > armB:
# armB = armA + dl
#else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-05-25 00:00:52
|
Revision: 7138
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7138&view=rev
Author: efiring
Date: 2009-05-25 00:00:46 +0000 (Mon, 25 May 2009)
Log Message:
-----------
Fix bug in Arc handling of fill kwarg; thanks to Tony Yu
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-05-23 14:31:14 UTC (rev 7137)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-05-25 00:00:46 UTC (rev 7138)
@@ -1189,7 +1189,7 @@
%(Patch)s
"""
- fill = kwargs.pop('fill')
+ fill = kwargs.get('fill') # returns None if key is absent
if fill:
raise ValueError("Arc objects can not be filled")
kwargs['fill'] = False
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-05-25 01:22:24
|
Revision: 7139
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7139&view=rev
Author: efiring
Date: 2009-05-25 00:16:44 +0000 (Mon, 25 May 2009)
Log Message:
-----------
Improved version of previous commit: bug fix in Arc
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-05-25 00:00:46 UTC (rev 7138)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-05-25 00:16:44 UTC (rev 7139)
@@ -1189,10 +1189,9 @@
%(Patch)s
"""
- fill = kwargs.get('fill') # returns None if key is absent
+ fill = kwargs.setdefault('fill', False)
if fill:
raise ValueError("Arc objects can not be filled")
- kwargs['fill'] = False
Ellipse.__init__(self, xy, width, height, angle, **kwargs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-06-01 22:20:28
|
Revision: 7171
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7171&view=rev
Author: efiring
Date: 2009-06-01 22:20:26 +0000 (Mon, 01 Jun 2009)
Log Message:
-----------
Add set_color method to Patch, to match Collections
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-06-01 21:41:46 UTC (rev 7170)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-06-01 22:20:26 UTC (rev 7171)
@@ -199,6 +199,21 @@
"""alias for set_facecolor"""
return self.set_facecolor(color)
+ def set_color(self, c):
+ """
+ Set both the edgecolor and the facecolor.
+
+ ACCEPTS: matplotlib color arg or sequence of rgba tuples
+
+ .. seealso::
+
+ :meth:`set_facecolor`, :meth:`set_edgecolor`
+ For setting the edge or face color individually.
+ """
+ self.set_facecolor(c)
+ self.set_edgecolor(c)
+
+
def set_linewidth(self, w):
"""
Set the patch linewidth in points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <as...@us...> - 2009-09-07 16:57:44
|
Revision: 7674
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7674&view=rev
Author: astraw
Date: 2009-09-07 16:57:36 +0000 (Mon, 07 Sep 2009)
Log Message:
-----------
Patch artist: emit warning when kwargs conflict (addresses SF#2848629)
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-09-07 16:32:28 UTC (rev 7673)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-09-07 16:57:36 UTC (rev 7674)
@@ -73,6 +73,13 @@
if linestyle is None: linestyle = "solid"
if antialiased is None: antialiased = mpl.rcParams['patch.antialiased']
+ if 'color' in kwargs:
+ if (edgecolor is not None or
+ facecolor is not None):
+ import warnings
+ warnings.warn("Setting the 'color' property will override"
+ "the edgecolor or facecolor properties. ")
+
self.set_edgecolor(edgecolor)
self.set_facecolor(facecolor)
self.set_linewidth(linewidth)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-10-07 16:03:30
|
Revision: 7857
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7857&view=rev
Author: leejjoon
Date: 2009-10-07 16:03:23 +0000 (Wed, 07 Oct 2009)
Log Message:
-----------
patches.Arc.get_path returns the original arc path (instead of ellipse or truncated arc)
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-10-07 16:03:08 UTC (rev 7856)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-10-07 16:03:23 UTC (rev 7857)
@@ -1219,6 +1219,9 @@
self.theta1 = theta1
self.theta2 = theta2
+ self._path = Path.arc(self.theta1, self.theta2)
+
+
@allow_rasterization
def draw(self, renderer):
"""
@@ -1278,7 +1281,7 @@
inv_error = (1.0 / 1.89818e-6) * 0.5
if width < inv_error and height < inv_error:
- self._path = Path.arc(self.theta1, self.theta2)
+ #self._path = Path.arc(self.theta1, self.theta2)
return Patch.draw(self, renderer)
def iter_circle_intersect_on_line(x0, y0, x1, y1):
@@ -1360,15 +1363,22 @@
last_theta = theta1
theta1_rad = theta1 * DEG2RAD
inside = box_path.contains_point((np.cos(theta1_rad), np.sin(theta1_rad)))
+
+ # save original path
+ path_original = self._path
for theta in thetas:
if inside:
- self._path = Path.arc(last_theta, theta, 8)
+ _path = Path.arc(last_theta, theta, 8)
Patch.draw(self, renderer)
inside = False
else:
inside = True
last_theta = theta
+ # restore original path
+ self._path = path_original
+
+
def bbox_artist(artist, renderer, props=None, fill=True):
"""
This is a debug function to draw a rectangle around the bounding
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-11-02 18:31:55
|
Revision: 7915
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7915&view=rev
Author: mdboom
Date: 2009-11-02 18:31:42 +0000 (Mon, 02 Nov 2009)
Log Message:
-----------
[2890784] documentation bug in ellipse
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-11-02 17:46:59 UTC (rev 7914)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-11-02 18:31:42 UTC (rev 7915)
@@ -1091,10 +1091,10 @@
center of ellipse
*width*
- length of horizontal axis
+ total length (diameter) of horizontal axis
*height*
- length of vertical axis
+ total length (diameter) of vertical axis
*angle*
rotation in degrees (anti-clockwise)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-12-10 19:05:44
|
Revision: 8017
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8017&view=rev
Author: leejjoon
Date: 2009-12-10 19:05:35 +0000 (Thu, 10 Dec 2009)
Log Message:
-----------
add BracketAB arrow style
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-12-10 00:09:03 UTC (rev 8016)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-12-10 19:05:35 UTC (rev 8017)
@@ -3193,7 +3193,7 @@
cos_t, sin_t = get_cos_sin(x1, y1, x0, y0)
verticesA, codesA = self._get_bracket(x0, y0, cos_t, sin_t,
self.widthA*scaleA,
- self.legnthA*scaleA)
+ self.lengthA*scaleA)
vertices_list.append(verticesA)
codes_list.append(codesA)
@@ -3218,7 +3218,64 @@
return p, False
+ class BracketAB(_Bracket):
+ """
+ An arrow with a bracket(]) at both ends.
+ """
+ def __init__(self,
+ widthA=1., lengthA=0.2, angleA=None,
+ widthB=1., lengthB=0.2, angleB=None):
+ """
+ *widthA*
+ width of the bracket
+
+ *lengthA*
+ length of the bracket
+
+ *angleA*
+ angle between the bracket and the line
+
+ *widthB*
+ width of the bracket
+
+ *lengthB*
+ length of the bracket
+
+ *angleB*
+ angle between the bracket and the line
+ """
+
+ super(ArrowStyle.BracketAB, self).__init__(True, True, \
+ widthA=widthA, lengthA=lengthA, angleA=angleA,
+ widthB=widthB, lengthB=lengthB, angleB=angleB)
+
+ _style_list["]-["] = BracketAB
+
+
+ class BracketA(_Bracket):
+ """
+ An arrow with a bracket(]) at its end.
+ """
+
+ def __init__(self, widthA=1., lengthA=0.2, angleA=None):
+ """
+ *widthA*
+ width of the bracket
+
+ *lengthA*
+ length of the bracket
+
+ *angleA*
+ angle between the bracket and the line
+ """
+
+ super(ArrowStyle.BracketA, self).__init__(None, True,
+ widthA=widthA, lengthA=lengthA, angleA=angleA )
+
+ _style_list["]-"] = BracketA
+
+
class BracketB(_Bracket):
"""
An arrow with a bracket([) at its end.
@@ -3237,9 +3294,8 @@
"""
super(ArrowStyle.BracketB, self).__init__(None, True,
- widthB=widthB, lengthB=lengthB, angleB=None )
+ widthB=widthB, lengthB=lengthB, angleB=angleB )
- #_style_list["-["] = BracketB
_style_list["-["] = BracketB
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <lee...@us...> - 2009-12-10 20:06:05
|
Revision: 8018
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8018&view=rev
Author: leejjoon
Date: 2009-12-10 20:05:58 +0000 (Thu, 10 Dec 2009)
Log Message:
-----------
FancyArrowPatch.__str__ updated
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2009-12-10 19:05:35 UTC (rev 8017)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2009-12-10 20:05:58 UTC (rev 8018)
@@ -3535,9 +3535,17 @@
def __str__(self):
- return self.__class__.__name__ \
- + "FancyArrowPatch(%g,%g,%g,%g,%g,%g)" % tuple(self._q_bezier)
+
+ if self._posA_posB is not None:
+ (x1, y1), (x2, y2) = self._posA_posB
+ return self.__class__.__name__ \
+ + "(%g,%g->%g,%g)" % (x1, y1, x2, y2)
+ else:
+ return self.__class__.__name__ \
+ + "(%s)" % (str(self._path_original),)
+
+
@docstring.dedent_interpd
def __init__(self, posA=None, posB=None,
path=None,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2010-02-22 14:31:09
|
Revision: 8144
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8144&view=rev
Author: jdh2358
Date: 2010-02-22 14:30:59 +0000 (Mon, 22 Feb 2010)
Log Message:
-----------
fix setters for regular polygon
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2010-02-22 14:29:31 UTC (rev 8143)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2010-02-22 14:30:59 UTC (rev 8144)
@@ -653,19 +653,22 @@
def _get_xy(self):
return self._xy
def _set_xy(self, xy):
+ self._xy = xy
self._update_transform()
xy = property(_get_xy, _set_xy)
def _get_orientation(self):
return self._orientation
- def _set_orientation(self, xy):
- self._orientation = xy
+ def _set_orientation(self, orientation):
+ self._orientation = orientation
+ self._update_transform()
orientation = property(_get_orientation, _set_orientation)
def _get_radius(self):
return self._radius
- def _set_radius(self, xy):
- self._radius = xy
+ def _set_radius(self, radius):
+ self._radius = radius
+ self._update_transform()
radius = property(_get_radius, _set_radius)
def _get_numvertices(self):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2010-03-16 00:56:17
|
Revision: 8196
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8196&view=rev
Author: efiring
Date: 2010-03-16 00:56:09 +0000 (Tue, 16 Mar 2010)
Log Message:
-----------
patches.py: correct docstring in set_color
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2010-03-16 00:55:20 UTC (rev 8195)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2010-03-16 00:56:09 UTC (rev 8196)
@@ -246,7 +246,7 @@
"""
Set both the edgecolor and the facecolor.
- ACCEPTS: matplotlib color arg or sequence of rgba tuples
+ ACCEPTS: matplotlib color spec
.. seealso::
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|