|
From: <ef...@us...> - 2007-07-21 01:51:47
|
Revision: 3600
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3600&view=rev
Author: efiring
Date: 2007-07-20 18:51:44 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
More minor problems with examples solved
Modified Paths:
--------------
trunk/matplotlib/examples/arrow_demo.py
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/examples/arrow_demo.py
===================================================================
--- trunk/matplotlib/examples/arrow_demo.py 2007-07-20 23:45:24 UTC (rev 3599)
+++ trunk/matplotlib/examples/arrow_demo.py 2007-07-21 01:51:44 UTC (rev 3600)
@@ -308,6 +308,6 @@
normalize_data=scaled, head_starts_at_zero=True, size=size)
draw()
- savefig('arrows.png')
- print 'Example saved to file "arrows.png"'
+ #savefig('arrows.png')
+ #print 'Example saved to file "arrows.png"'
show()
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2007-07-20 23:45:24 UTC (rev 3599)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2007-07-21 01:51:44 UTC (rev 3600)
@@ -1094,7 +1094,7 @@
self.artists.append(a)
self._set_artist_props(a)
a._remove_method = lambda h: self.artists.remove(h)
-
+
def add_collection(self, collection, autolim=False):
'add a Collection instance to Axes'
label = collection.get_label()
@@ -1106,7 +1106,7 @@
if autolim:
self.update_datalim(collection.get_verts(self.transData))
collection._remove_method = lambda h: self.collections.remove(h)
-
+
def add_line(self, line):
'Add a line to the list of plot lines'
self._set_artist_props(line)
@@ -1117,7 +1117,7 @@
line.set_label('_line%d'%len(self.lines))
self.lines.append(line)
line._remove_method = lambda h: self.lines.remove(h)
-
+
def _update_line_limits(self, line):
xdata = line.get_xdata(orig=False)
ydata = line.get_ydata(orig=False)
@@ -1143,7 +1143,7 @@
self._update_patch_limits(p)
self.patches.append(p)
p._remove_method = lambda h: self.patches.remove(h)
-
+
def _update_patch_limits(self, p):
'update the datalimits for patch p'
xys = self._get_verts_in_data_coords(
@@ -1156,7 +1156,7 @@
self._set_artist_props(tab)
self.tables.append(tab)
tab._remove_method = lambda h: self.tables.remove(h)
-
+
def relim(self):
'recompute the datalimits based on current artists'
self.dataLim.ignore(True)
@@ -1165,7 +1165,7 @@
for p in self.patches:
self._update_patch_limits(p)
-
+
def update_datalim(self, xys):
'Update the data lim bbox with seq of xy tups or equiv. 2-D array'
# if no data is set currently, the bbox will ignore its
@@ -2153,8 +2153,8 @@
t.update(kwargs)
self.texts.append(t)
t._remove_method = lambda h: self.texts.remove(h)
-
+
#if t.get_clip_on(): t.set_clip_box(self.bbox)
if kwargs.has_key('clip_on'): t.set_clip_box(self.bbox)
return t
@@ -3139,17 +3139,19 @@
patches = []
# lets do some conversions now
- xconv = self.xaxis.converter
- if ( xconv ):
- units = self.xaxis.get_units()
- left = xconv.convert( left, units )
- width = xconv.convert( width, units )
+ if self.xaxis is not None:
+ xconv = self.xaxis.converter
+ if ( xconv ):
+ units = self.xaxis.get_units()
+ left = xconv.convert( left, units )
+ width = xconv.convert( width, units )
- yconv = self.yaxis.converter
- if ( yconv ):
- units = self.yaxis.get_units()
- bottom = yconv.convert( bottom, units )
- height = yconv.convert( height, units )
+ if self.yaxis is not None:
+ yconv = self.yaxis.converter
+ if ( yconv ):
+ units = self.yaxis.get_units()
+ bottom = yconv.convert( bottom, units )
+ height = yconv.convert( height, units )
if align == 'edge':
@@ -4077,7 +4079,7 @@
Draws arrow on specified axis from (x,y) to (x+dx,y+dy).
Optional kwargs control the arrow properties:
- %(Arrow)s
+ %(FancyArrow)s
"""
a = mpatches.FancyArrow(x, y, dx, dy, **kwargs)
self.add_artist(a)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|