SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(3)
2
3
4
(1)
5
6
(1)
7
(2)
8
(22)
9
(8)
10
(24)
11
(3)
12
(4)
13
14
(3)
15
(3)
16
(1)
17
(2)
18
(6)
19
20
21
(3)
22
(2)
23
(8)
24
(1)
25
26
(6)
27
(1)
28
(3)
29
(4)
30
31
(9)


Showing results of 120

1 2 3 .. 5 > >> (Page 1 of 5)
Revision: 4917
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4917&view=rev
Author: dsdale
Date: 2008年01月31日 11:14:20 -0800 (2008年1月31日)
Log Message:
-----------
forgot to change unicode string to raw string
Modified Paths:
--------------
 branches/v0_91_maint/lib/matplotlib/ticker.py
Modified: branches/v0_91_maint/lib/matplotlib/ticker.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/ticker.py	2008年01月31日 19:05:28 UTC (rev 4916)
+++ branches/v0_91_maint/lib/matplotlib/ticker.py	2008年01月31日 19:14:20 UTC (rev 4917)
@@ -338,7 +338,7 @@
 return ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
 elif self._usetex:
 if sciNotStr != '':
- sciNotStr = u'\times%s' % sciNotStr
+ sciNotStr = r'\times%s' % sciNotStr
 return ''.join(('$',sciNotStr,offsetStr,'$'))
 else:
 return ''.join((sciNotStr,offsetStr))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ds...@us...> - 2008年01月31日 19:06:00
Revision: 4916
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4916&view=rev
Author: dsdale
Date: 2008年01月31日 11:05:28 -0800 (2008年1月31日)
Log Message:
-----------
fixed a bug in ticker, unicode string passed to tex
Modified Paths:
--------------
 branches/v0_91_maint/CHANGELOG
 branches/v0_91_maint/lib/matplotlib/ticker.py
Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG	2008年01月31日 19:01:38 UTC (rev 4915)
+++ branches/v0_91_maint/CHANGELOG	2008年01月31日 19:05:28 UTC (rev 4916)
@@ -1,3 +1,5 @@
+2008年01月31日 Don't use unicode strings with usetex by default - DSD
+
 2008年01月31日 Fix text spacing problems in PDF backend with *some* fonts,
 such as STIXGeneral.
 
Modified: branches/v0_91_maint/lib/matplotlib/ticker.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/ticker.py	2008年01月31日 19:01:38 UTC (rev 4915)
+++ branches/v0_91_maint/lib/matplotlib/ticker.py	2008年01月31日 19:05:28 UTC (rev 4916)
@@ -338,7 +338,7 @@
 return ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
 elif self._usetex:
 if sciNotStr != '':
- sciNotStr = u'\xd7%s' % sciNotStr
+ sciNotStr = u'\times%s' % sciNotStr
 return ''.join(('$',sciNotStr,offsetStr,'$'))
 else:
 return ''.join((sciNotStr,offsetStr))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月31日 19:01:43
Revision: 4915
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4915&view=rev
Author: mdboom
Date: 2008年01月31日 11:01:38 -0800 (2008年1月31日)
Log Message:
-----------
Merged revisions 4912-4914 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
 r4914 | mdboom | 2008年01月31日 13:59:22 -0500 (2008年1月31日) | 2 lines
 
 Fix text spacing problems in PDF backend with some fonts.
........
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
Property Changed:
----------------
 trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
 - /branches/v0_91_maint:1-4911
 + /branches/v0_91_maint:1-4914
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年01月31日 18:59:22 UTC (rev 4914)
+++ trunk/matplotlib/CHANGELOG	2008年01月31日 19:01:38 UTC (rev 4915)
@@ -1,3 +1,6 @@
+2008年01月31日 Fix text spacing problems in PDF backend with *some* fonts,
+ such as STIXGeneral.
+
 2008年01月31日 Fix \sqrt with radical number (broken by making [ and ]
 work below) - MGD
 
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py	2008年01月31日 18:59:22 UTC (rev 4914)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py	2008年01月31日 19:01:38 UTC (rev 4915)
@@ -801,8 +801,7 @@
 ccode = ord(c)
 gind = cmap.get(ccode) or 0
 glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
- # Why divided by 3.0 ??? Wish I knew... MGD
- widths.append((ccode, cvt(glyph.horiAdvance) / 3.0))
+ widths.append((ccode, glyph.horiAdvance / 6))
 if ccode < 65536:
 cid_to_gid_map[ccode] = unichr(gind)
 max_ccode = max(ccode, max_ccode)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月31日 18:59:25
Revision: 4914
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4914&view=rev
Author: mdboom
Date: 2008年01月31日 10:59:22 -0800 (2008年1月31日)
Log Message:
-----------
Fix text spacing problems in PDF backend with some fonts.
Modified Paths:
--------------
 branches/v0_91_maint/CHANGELOG
 branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG	2008年01月31日 17:46:56 UTC (rev 4913)
+++ branches/v0_91_maint/CHANGELOG	2008年01月31日 18:59:22 UTC (rev 4914)
@@ -1,3 +1,6 @@
+2008年01月31日 Fix text spacing problems in PDF backend with *some* fonts,
+ such as STIXGeneral.
+
 2008年01月31日 Fix \sqrt with radical number (broken by making [ and ]
 work below) - MGD
 
Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py	2008年01月31日 17:46:56 UTC (rev 4913)
+++ branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py	2008年01月31日 18:59:22 UTC (rev 4914)
@@ -795,8 +795,7 @@
 ccode = ord(c)
 gind = cmap.get(ccode) or 0
 glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
- # Why divided by 3.0 ??? Wish I knew... MGD
- widths.append((ccode, cvt(glyph.horiAdvance) / 3.0))
+ widths.append((ccode, glyph.horiAdvance / 6))
 if ccode < 65536:
 cid_to_gid_map[ccode] = unichr(gind)
 max_ccode = max(ccode, max_ccode)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年01月31日 17:47:04
Revision: 4913
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4913&view=rev
Author: jdh2358
Date: 2008年01月31日 09:46:56 -0800 (2008年1月31日)
Log Message:
-----------
fixed a bug where annotations w/ arrows were not getting the figure instance set properly
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/lines.py
 trunk/matplotlib/lib/matplotlib/mlab.py
 trunk/matplotlib/lib/matplotlib/rcsetup.py
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年01月31日 15:28:29 UTC (rev 4912)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年01月31日 17:46:56 UTC (rev 4913)
@@ -169,12 +169,14 @@
 def __str__(self):
 if self._label != "":
 return "Line2D(%s)"%(self._label)
- elif len(self._x) > 3:
+ elif hasattr(self, '_x') and len(self._x) > 3:
 return "Line2D((%g,%g),(%g,%g),...,(%g,%g))"\
 %(self._x[0],self._y[0],self._x[0],self._y[0],self._x[-1],self._y[-1])
- else:
+ elif hasattr(self, '_x'):
 return "Line2D(%s)"\
 %(",".join(["(%g,%g)"%(x,y) for x,y in zip(self._x,self._y)]))
+ else:
+ return "Line2D()"
 
 def __init__(self, xdata, ydata,
 linewidth = None, # all Nones default to rc
Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mlab.py	2008年01月31日 15:28:29 UTC (rev 4912)
+++ trunk/matplotlib/lib/matplotlib/mlab.py	2008年01月31日 17:46:56 UTC (rev 4913)
@@ -84,7 +84,7 @@
 """
 
 from __future__ import division
-import csv, warnings
+import csv, warnings, copy
 
 import numpy as npy
 
@@ -2186,7 +2186,12 @@
 # Get header and remove invalid characters
 needheader = names is None
 if needheader:
- headers = reader.next()
+ for row in reader:
+ if len(row) and row[0].startswith(comments):
+ continue
+ headers = row
+ break
+
 # remove these chars
 delete = set("""~!@#$%^&*()-=+~\|]}[{';: /?.>,<""")
 delete.add('"')
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py	2008年01月31日 15:28:29 UTC (rev 4912)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py	2008年01月31日 17:46:56 UTC (rev 4913)
@@ -425,12 +425,12 @@
 'figure.facecolor' : [ '0.75', validate_color], # facecolor; scalar gray
 'figure.edgecolor' : [ 'w', validate_color], # edgecolor; white
 
- 'figure.subplot.left' : [0.125, ValidateInterval(0, 1, closedmin=False, closedmax=False)],
- 'figure.subplot.right' : [0.9, ValidateInterval(0, 1, closedmin=False, closedmax=False)],
- 'figure.subplot.bottom' : [0.1, ValidateInterval(0, 1, closedmin=False, closedmax=False)],
- 'figure.subplot.top' : [0.9, ValidateInterval(0, 1, closedmin=False, closedmax=False)],
- 'figure.subplot.wspace' : [0.2, ValidateInterval(0, 1, closedmin=False, closedmax=True)],
- 'figure.subplot.hspace' : [0.2, ValidateInterval(0, 1, closedmin=False, closedmax=True)],
+ 'figure.subplot.left' : [0.125, ValidateInterval(0, 1, closedmin=True, closedmax=True)],
+ 'figure.subplot.right' : [0.9, ValidateInterval(0, 1, closedmin=True, closedmax=True)],
+ 'figure.subplot.bottom' : [0.1, ValidateInterval(0, 1, closedmin=True, closedmax=True)],
+ 'figure.subplot.top' : [0.9, ValidateInterval(0, 1, closedmin=True, closedmax=True)],
+ 'figure.subplot.wspace' : [0.2, ValidateInterval(0, 1, closedmin=True, closedmax=False)],
+ 'figure.subplot.hspace' : [0.2, ValidateInterval(0, 1, closedmin=True, closedmax=False)],
 
 'figure.autolayout' : [False, validate_bool],
 
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年01月31日 15:28:29 UTC (rev 4912)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年01月31日 17:46:56 UTC (rev 4913)
@@ -1052,6 +1052,12 @@
 return t,tinfo
 
 
+ def set_figure(self, fig):
+
+ if self.arrow is not None:
+ self.arrow.set_figure(fig)
+ Artist.set_figure(self, fig)
+
 def set_clip_box(self, clipbox):
 """
 Set the artist's clip Bbox
@@ -1204,6 +1210,8 @@
 self.update_positions(renderer)
 
 if self.arrow is not None:
+ if self.arrow.figure is None and self.figure is not None:
+ self.arrow.figure = self.figure
 self.arrow.draw(renderer)
 
 Text.draw(self, renderer)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月31日 15:28:39
Revision: 4912
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4912&view=rev
Author: mdboom
Date: 2008年01月31日 07:28:29 -0800 (2008年1月31日)
Log Message:
-----------
Merged revisions 4867-4911 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
 r4874 | jdh2358 | 2008年01月16日 23:13:27 -0500 (2008年1月16日) | 1 line
 
 forced nonunicode fname for save in agg
........
 r4879 | mdboom | 2008年01月18日 12:59:51 -0500 (2008年1月18日) | 2 lines
 
 Fix poly_editor.py
........
 r4882 | mdboom | 2008年01月21日 14:03:48 -0500 (2008年1月21日) | 2 lines
 
 Fix bug with pie chart slices less than 2.5 degrees.
........
 r4896 | efiring | 2008年01月25日 19:11:36 -0500 (2008年1月25日) | 2 lines
 
 Apply patch by Manuel Metz to scatter docstring.
........
 r4904 | jrevans | 2008年01月28日 13:02:31 -0500 (2008年1月28日) | 4 lines
 
 Fixed a bug where plotting a singe point unitized errorbar data would
 fail. Fixed a bug where plotting errorbar data where the error is a
 duration for a time valued axes would fail.
........
 r4907 | mdboom | 2008年01月29日 15:24:58 -0500 (2008年1月29日) | 1 line
 
 Allow updating of shared axes when calling Axes.axis() (Thanks Jorgen Stenarson)
........
 r4911 | mdboom | 2008年01月31日 10:21:10 -0500 (2008年1月31日) | 2 lines
 
 Fix \sqrt with a numeric radical.
........
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/examples/mathtext_examples.py
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/mathtext.py
Property Changed:
----------------
 trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Name: svnmerge-integrated
 - /branches/v0_91_maint:1-4866
 + /branches/v0_91_maint:1-4911
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年01月31日 15:21:10 UTC (rev 4911)
+++ trunk/matplotlib/CHANGELOG	2008年01月31日 15:28:29 UTC (rev 4912)
@@ -1,3 +1,6 @@
+2008年01月31日 Fix \sqrt with radical number (broken by making [ and ]
+ work below) - MGD
+
 2008年01月27日 Applied Martin Teichmann's patch to improve the Qt4
 backend. Uses Qt's builtin toolbars and statusbars.
 See bug 1828848 - DSD
Modified: trunk/matplotlib/examples/mathtext_examples.py
===================================================================
--- trunk/matplotlib/examples/mathtext_examples.py	2008年01月31日 15:21:10 UTC (rev 4911)
+++ trunk/matplotlib/examples/mathtext_examples.py	2008年01月31日 15:28:29 UTC (rev 4912)
@@ -40,7 +40,7 @@
 r"$f^'$",
 r'$\frac{x_2888}{y}$',
 r"$\sqrt[3]{\frac{X_2}{Y}}=5$",
- r"$\sqrt[5x\pi]{\prod^\frac{x}{2\pi^2}_\infty}$",
+ r"$\sqrt[5]{\prod^\frac{x}{2\pi^2}_\infty}$",
 r"$\sqrt[3]{x}=5$",
 r'$\frac{X}{\frac{X}{Y}}$',
 # From UTR #25
@@ -56,7 +56,7 @@
 
 def doall():
 tests = stests
- 
+
 figure(figsize=(8, (len(tests) * 1) + 2))
 plot([0, 0], 'r')
 grid(False)
@@ -69,7 +69,7 @@
 savefig('mathtext_examples')
 #close('all')
 show()
- 
+
 if '--latex' in sys.argv:
 fd = open("mathtext_examples.ltx", "w")
 fd.write("\\documentclass{article}\n")
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年01月31日 15:21:10 UTC (rev 4911)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年01月31日 15:28:29 UTC (rev 4912)
@@ -2641,10 +2641,6 @@
 ymin = npy.asarray(ymin)
 ymax = npy.asarray(ymax)
 
- if len(ymin)==1:
- ymin = ymin*npy.ones(x.shape, x.dtype)
- if len(ymax)==1:
- ymax = ymax*npy.ones(x.shape, x.dtype)
 
 if len(ymin)!=len(x):
 raise ValueError, 'ymin and x are unequal sized sequences'
@@ -2661,12 +2657,17 @@
 self.add_collection(coll)
 coll.update(kwargs)
 
- minx = x.min()
- maxx = x.max()
- miny = min(ymin.min(), ymax.min())
- maxy = max(ymin.max(), ymax.max())
- minx, maxx = self.convert_xunits((minx, maxx))
- miny, maxy = self.convert_yunits((miny, maxy))
+ # We do the conversion first since not all unitized data is uniform
+ xx = self.convert_xunits( x )
+ yymin = self.convert_yunits( ymin )
+ yymax = self.convert_yunits( ymax )
+
+ minx = min( xx )
+ maxx = max( xx )
+
+ miny = min( min(yymin), min(yymax) )
+ maxy = max( max(yymin), max(yymax) )
+
 corners = (minx, miny), (maxx, maxy)
 self.update_datalim(corners)
 self.autoscale_view()
@@ -4165,6 +4166,18 @@
 Finally, marker can be (verts, 0), verts is a sequence of (x,y)
 vertices for a custom scatter symbol.
 
+ numsides is the number of sides
+
+ style is the style of the regular symbol:
+ 0 : a regular polygon
+ 1 : a star-like symbol
+ 2 : an asterisk
+
+ angle is the angle of rotation of the symbol
+
+ Finally, marker can be (verts, 0), verts is a sequence of (x,y)
+ vertices for a custom scatter symbol.
+
 s is a size argument in points squared.
 
 Any or all of x, y, s, and c may be masked arrays, in which
Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py	2008年01月31日 15:21:10 UTC (rev 4911)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py	2008年01月31日 15:28:29 UTC (rev 4912)
@@ -2102,12 +2102,7 @@
 Suppress(Literal(r"\sqrt"))
 + Optional(
 Suppress(Literal("["))
- + Group(
- OneOrMore(
- (c_over_c | symbol)
- ^ font
- )
- )
+ + Regex("[0-9]+")
 + Suppress(Literal("]")),
 default = None
 )
@@ -2595,11 +2590,7 @@
 if root is None:
 root = Box(0., 0., 0.)
 else:
- if not isinstance(root, ParseResults):
- raise ParseFatalException(
- "Can not parse root of radical. "
- "Only simple symbols are allowed in the root.")
- root = Hlist(root.asList())
+ root = Hlist([Char(x, state) for x in root])
 root.shrink()
 root.shrink()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月31日 15:21:14
Revision: 4911
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4911&view=rev
Author: mdboom
Date: 2008年01月31日 07:21:10 -0800 (2008年1月31日)
Log Message:
-----------
Fix \sqrt with a numeric radical.
Modified Paths:
--------------
 branches/v0_91_maint/CHANGELOG
 branches/v0_91_maint/examples/mathtext_examples.py
 branches/v0_91_maint/lib/matplotlib/mathtext.py
Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG	2008年01月31日 15:10:16 UTC (rev 4910)
+++ branches/v0_91_maint/CHANGELOG	2008年01月31日 15:21:10 UTC (rev 4911)
@@ -1,3 +1,6 @@
+2008年01月31日 Fix \sqrt with radical number (broken by making [ and ]
+ work below) - MGD
+
 2008年01月10日 Fix bug displaying [ and ] in mathtext - MGD
 
 2008年01月10日 Fix bug when displaying a tick value offset with scientific
Modified: branches/v0_91_maint/examples/mathtext_examples.py
===================================================================
--- branches/v0_91_maint/examples/mathtext_examples.py	2008年01月31日 15:10:16 UTC (rev 4910)
+++ branches/v0_91_maint/examples/mathtext_examples.py	2008年01月31日 15:21:10 UTC (rev 4911)
@@ -40,7 +40,7 @@
 r"$f^'$",
 r'$\frac{x_2888}{y}$',
 r"$\sqrt[3]{\frac{X_2}{Y}}=5$",
- r"$\sqrt[5x\pi]{\prod^\frac{x}{2\pi^2}_\infty}$",
+ r"$\sqrt[5]{\prod^\frac{x}{2\pi^2}_\infty}$",
 r"$\sqrt[3]{x}=5$",
 r'$\frac{X}{\frac{X}{Y}}$',
 # From UTR #25
@@ -56,7 +56,7 @@
 
 def doall():
 tests = stests
- 
+
 figure(figsize=(8, (len(tests) * 1) + 2))
 plot([0, 0], 'r')
 grid(False)
@@ -69,7 +69,7 @@
 savefig('mathtext_examples')
 #close('all')
 show()
- 
+
 if '--latex' in sys.argv:
 fd = open("mathtext_examples.ltx", "w")
 fd.write("\\documentclass{article}\n")
Modified: branches/v0_91_maint/lib/matplotlib/mathtext.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/mathtext.py	2008年01月31日 15:10:16 UTC (rev 4910)
+++ branches/v0_91_maint/lib/matplotlib/mathtext.py	2008年01月31日 15:21:10 UTC (rev 4911)
@@ -2109,12 +2109,7 @@
 )
 + Optional(
 Suppress(Literal("["))
- + Group(
- OneOrMore(
- (c_over_c | symbol)
- ^ font
- )
- )
+ + Regex("[0-9]+")
 + Suppress(Literal("]")),
 default = None
 )
@@ -2607,11 +2602,7 @@
 if root is None:
 root = Box(0., 0., 0.)
 else:
- if not isinstance(root, ParseResults):
- raise ParseFatalException(
- "Can not parse root of radical. "
- "Only simple symbols are allowed in the root.")
- root = Hlist(root.asList())
+ root = Hlist([Char(x, state) for x in root])
 root.shrink()
 root.shrink()
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月31日 15:10:18
Revision: 4910
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4910&view=rev
Author: mdboom
Date: 2008年01月31日 07:10:16 -0800 (2008年1月31日)
Log Message:
-----------
Fix image artifacts with various kinds of interpolation (Thanks Darren
Dale for finding the bug).
Modified Paths:
--------------
 trunk/matplotlib/src/_image.cpp
Modified: trunk/matplotlib/src/_image.cpp
===================================================================
--- trunk/matplotlib/src/_image.cpp	2008年01月31日 14:21:49 UTC (rev 4909)
+++ trunk/matplotlib/src/_image.cpp	2008年01月31日 15:10:16 UTC (rev 4910)
@@ -409,43 +409,17 @@
 	agg::render_scanlines(ras, sl, ri);
 }
 break;
- case BILINEAR:
- case BICUBIC:
- case SPLINE16:
- case SPLINE36:
- case HANNING:
- case HAMMING:
- case HERMITE:
- case KAISER:
- case QUADRIC:
- case CATROM:
- case GAUSSIAN:
- case BESSEL:
- case MITCHELL:
- case SINC:
- case LANCZOS:
- case BLACKMAN:
- {
- agg::image_filter_lut filter;
- switch(interpolation)
- {
- case BILINEAR: filter.calculate(agg::image_filter_bilinear(), norm); break;
- case BICUBIC: filter.calculate(agg::image_filter_bicubic(), norm); break;
- case SPLINE16: filter.calculate(agg::image_filter_spline16(), norm); break;
- case SPLINE36: filter.calculate(agg::image_filter_spline36(), norm); break;
- case HANNING: filter.calculate(agg::image_filter_hanning(), norm); break;
- case HAMMING: filter.calculate(agg::image_filter_hamming(), norm); break;
- case HERMITE: filter.calculate(agg::image_filter_hermite(), norm); break;
- case KAISER: filter.calculate(agg::image_filter_kaiser(), norm); break;
- case QUADRIC: filter.calculate(agg::image_filter_quadric(), norm); break;
- case CATROM: filter.calculate(agg::image_filter_catrom(), norm); break;
- case GAUSSIAN: filter.calculate(agg::image_filter_gaussian(), norm); break;
- case BESSEL: filter.calculate(agg::image_filter_bessel(), norm); break;
- case MITCHELL: filter.calculate(agg::image_filter_mitchell(), norm); break;
- case SINC: filter.calculate(agg::image_filter_sinc(radius), norm); break;
- case LANCZOS: filter.calculate(agg::image_filter_lanczos(radius), norm); break;
- case BLACKMAN: filter.calculate(agg::image_filter_blackman(radius), norm); break;
- }
+
+ case HANNING:
+ case HAMMING:
+ case HERMITE:
+ {
+ agg::image_filter_lut filter;
+ switch (interpolation) {
+ case HANNING: filter.calculate(agg::image_filter_hanning(), norm); break;
+ case HAMMING: filter.calculate(agg::image_filter_hamming(), norm); break;
+ case HERMITE: filter.calculate(agg::image_filter_hermite(), norm); break;
+ }
 	typedef agg::span_image_filter_rgba_2x2<img_accessor_type, interpolator_type> span_gen_type;
 	typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
 	span_gen_type sg(ia, interpolator, filter);
@@ -453,6 +427,44 @@
 	agg::render_scanlines(ras, sl, ri);
 }
 break;
+ case BILINEAR:
+ case BICUBIC:
+ case SPLINE16:
+ case SPLINE36:
+ case KAISER:
+ case QUADRIC:
+ case CATROM:
+ case GAUSSIAN:
+ case BESSEL:
+ case MITCHELL:
+ case SINC:
+ case LANCZOS:
+ case BLACKMAN:
+ {
+ agg::image_filter_lut filter;
+ switch(interpolation)
+ {
+ case BILINEAR: filter.calculate(agg::image_filter_bilinear(), norm); break;
+ case BICUBIC: filter.calculate(agg::image_filter_bicubic(), norm); break;
+ case SPLINE16: filter.calculate(agg::image_filter_spline16(), norm); break;
+ case SPLINE36: filter.calculate(agg::image_filter_spline36(), norm); break;
+ case KAISER: filter.calculate(agg::image_filter_kaiser(), norm); break;
+ case QUADRIC: filter.calculate(agg::image_filter_quadric(), norm); break;
+ case CATROM: filter.calculate(agg::image_filter_catrom(), norm); break;
+ case GAUSSIAN: filter.calculate(agg::image_filter_gaussian(), norm); break;
+ case BESSEL: filter.calculate(agg::image_filter_bessel(), norm); break;
+ case MITCHELL: filter.calculate(agg::image_filter_mitchell(), norm); break;
+ case SINC: filter.calculate(agg::image_filter_sinc(radius), norm); break;
+ case LANCZOS: filter.calculate(agg::image_filter_lanczos(radius), norm); break;
+ case BLACKMAN: filter.calculate(agg::image_filter_blackman(radius), norm); break;
+ }
+	typedef agg::span_image_filter_rgba<img_accessor_type, interpolator_type> span_gen_type;
+	typedef agg::renderer_scanline_aa<renderer_base, span_alloc_type, span_gen_type> renderer_type;
+	span_gen_type sg(ia, interpolator, filter);
+	renderer_type ri(rb, sa, sg);
+	agg::render_scanlines(ras, sl, ri);
+ }
+ break;
 
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月31日 14:21:52
Revision: 4909
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4909&view=rev
Author: mdboom
Date: 2008年01月31日 06:21:49 -0800 (2008年1月31日)
Log Message:
-----------
Fig dpi-changing-related bug where tick label padding was not updating
(Thanks Eric Firing for finding this).
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/axis.py
 trunk/matplotlib/lib/matplotlib/collections.py
 trunk/matplotlib/lib/matplotlib/figure.py
 trunk/matplotlib/lib/matplotlib/patches.py
 trunk/matplotlib/lib/matplotlib/projections/geo.py
 trunk/matplotlib/lib/matplotlib/projections/polar.py
 trunk/matplotlib/lib/matplotlib/text.py
 trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -595,13 +595,13 @@
 """
 return self._xaxis_transform
 
- def get_xaxis_text1_transform(self, pad_pixels):
+ def get_xaxis_text1_transform(self, pad_points):
 """
 Get the transformation used for drawing x-axis labels, which
- will add the given number of pad_pixels between the axes and
- the label. The x-direction is in data coordinates and the
- y-direction is in axis coordinates. Returns a 3-tuple of the
- form:
+ will add the given amount of padding (in points) between the
+ axes and the label. The x-direction is in data coordinates
+ and the y-direction is in axis coordinates. Returns a 3-tuple
+ of the form:
 
 (transform, valign, halign)
 
@@ -612,14 +612,15 @@
 need to place axis elements in different locations.
 """
 return (self._xaxis_transform +
- mtransforms.Affine2D().translate(0, -1 * pad_pixels),
+ mtransforms.ScaledTranslation(0, -1 * pad_points / 72.0,
+ self.figure.dpi_scale_trans),
 "top", "center")
 
- def get_xaxis_text2_transform(self, pad_pixels):
+ def get_xaxis_text2_transform(self, pad_points):
 """
 Get the transformation used for drawing the secondary x-axis
- labels, which will add the given number of pad_pixels between
- the axes and the label. The x-direction is in data
+ labels, which will add the given amount of padding (in points)
+ between the axes and the label. The x-direction is in data
 coordinates and the y-direction is in axis coordinates.
 Returns a 3-tuple of the form:
 
@@ -632,7 +633,8 @@
 need to place axis elements in different locations.
 """
 return (self._xaxis_transform +
- mtransforms.Affine2D().translate(0, pad_pixels),
+ mtransforms.ScaledTranslation(0, pad_points / 72.0,
+ self.figure.dpi_scale_trans),
 "bottom", "center")
 
 def get_yaxis_transform(self):
@@ -647,13 +649,13 @@
 """
 return self._yaxis_transform
 
- def get_yaxis_text1_transform(self, pad_pixels):
+ def get_yaxis_text1_transform(self, pad_points):
 """
 Get the transformation used for drawing y-axis labels, which
- will add the given number of pad_pixels between the axes and
- the label. The x-direction is in axis coordinates and the
- y-direction is in data coordinates. Returns a 3-tuple of the
- form:
+ will add the given amount of padding (in points) between the
+ axes and the label. The x-direction is in axis coordinates
+ and the y-direction is in data coordinates. Returns a 3-tuple
+ of the form:
 
 (transform, valign, halign)
 
@@ -664,14 +666,15 @@
 need to place axis elements in different locations.
 """
 return (self._yaxis_transform +
- mtransforms.Affine2D().translate(-1 * pad_pixels, 0),
+ mtransforms.ScaledTranslation(-1 * pad_points / 72.0, 0,
+ self.figure.dpi_scale_trans),
 "center", "right")
 
- def get_yaxis_text2_transform(self, pad_pixels):
+ def get_yaxis_text2_transform(self, pad_points):
 """
 Get the transformation used for drawing the secondary y-axis
- labels, which will add the given number of pad_pixels between
- the axes and the label. The x-direction is in axis
+ labels, which will add the given amount of padding (in points)
+ between the axes and the label. The x-direction is in axis
 coordinates and the y-direction is in data coordinates.
 Returns a 3-tuple of the form:
 
@@ -684,7 +687,8 @@
 need to place axis elements in different locations.
 """
 return (self._yaxis_transform +
- mtransforms.Affine2D().translate(pad_pixels, 0),
+ mtransforms.ScaledTranslation(-1 * pad_points / 72.0, 0,
+ self.figure.dpi_scale_trans),
 "center", "left")
 
 def _update_transScale(self):
@@ -4287,7 +4291,6 @@
 if sym is not None:
 if symstyle==0:
 collection = mcoll.RegularPolyCollection(
- self.figure.dpi,
 numsides, rotation, scales,
 facecolors = colors,
 edgecolors = edgecolors,
@@ -4297,7 +4300,6 @@
 )
 elif symstyle==1:
 collection = mcoll.StarPolygonCollection(
- self.figure.dpi,
 numsides, rotation, scales,
 facecolors = colors,
 edgecolors = edgecolors,
@@ -4307,7 +4309,6 @@
 )
 elif symstyle==2:
 collection = mcoll.AsteriskPolygonCollection(
- self.figure.dpi,
 numsides, rotation, scales,
 facecolors = colors,
 edgecolors = edgecolors,
@@ -4316,6 +4317,7 @@
 transOffset = self.transData,
 )
 else:
+ # MGDTODO: This has dpi problems
 # rescale verts
 rescale = npy.sqrt(max(verts[:,0]**2+verts[:,1]**2))
 verts /= rescale
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/axis.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -223,9 +223,9 @@
 # get the affine as an a,b,c,d,tx,ty list
 # x in data coords, y in axes coords
 #t = Text(
- trans, vert, horiz = self.axes.get_xaxis_text1_transform(self.get_pad_pixels())
+ trans, vert, horiz = self.axes.get_xaxis_text1_transform(self._pad)
 
- t = TextWithDash(
+ t = TextWithDash(
 x=0, y=0,
 fontproperties=FontProperties(size=rcParams['xtick.labelsize']),
 color=rcParams['xtick.color'],
@@ -245,7 +245,7 @@
 'Get the default Text 2 instance'
 # x in data coords, y in axes coords
 #t = Text(
- trans, vert, horiz = self.axes.get_xaxis_text2_transform(self.get_pad_pixels())
+ trans, vert, horiz = self.axes.get_xaxis_text2_transform(self._pad)
 
 t = TextWithDash(
 x=0, y=1,
@@ -358,7 +358,7 @@
 'Get the default Text instance'
 # x in axes coords, y in data coords
 #t = Text(
- trans, vert, horiz = self.axes.get_yaxis_text1_transform(self.get_pad_pixels())
+ trans, vert, horiz = self.axes.get_yaxis_text1_transform(self._pad)
 
 t = TextWithDash(
 x=0, y=0,
@@ -378,7 +378,7 @@
 'Get the default Text instance'
 # x in axes coords, y in data coords
 #t = Text(
- trans, vert, horiz = self.axes.get_yaxis_text2_transform(self.get_pad_pixels())
+ trans, vert, horiz = self.axes.get_yaxis_text2_transform(self._pad)
 
 t = TextWithDash(
 x=1, y=0,
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -505,7 +505,6 @@
 _path_generator = mpath.Path.unit_regular_polygon
 
 def __init__(self,
- dpi,
 numsides,
 rotation = 0 ,
 sizes = (1,),
@@ -532,7 +531,6 @@
 black = (0,0,0,1)
 
 collection = RegularPolyCollection(
- fig.dpi,
 numsides=5, # a pentagon
 rotation=0,
 sizes=(50,),
@@ -545,18 +543,21 @@
 """
 Collection.__init__(self,**kwargs)
 self._sizes = sizes
- self._dpi = dpi
 self._paths = [self._path_generator(numsides)]
+ self._rotation = rotation
+ self.set_transform(transforms.IdentityTransform())
+
+ __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
+
+ def draw(self, renderer):
 # sizes is the area of the circle circumscribing the polygon
 # in points^2
 self._transforms = [
- transforms.Affine2D().rotate(-rotation).scale(
- (math.sqrt(x) * self._dpi / 72.0) / math.sqrt(math.pi))
- for x in sizes]
- self.set_transform(transforms.IdentityTransform())
+ transforms.Affine2D().rotate(-self._rotation).scale(
+ (npy.sqrt(x) * renderer.dpi / 72.0) / npy.sqrt(npy.pi))
+ for x in self._sizes]
+ return Collection.draw(self, renderer)
 
- __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
-
 def get_paths(self):
 return self._paths
 
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/figure.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -122,10 +122,10 @@
 if facecolor is None: facecolor = rcParams['figure.facecolor']
 if edgecolor is None: edgecolor = rcParams['figure.edgecolor']
 
- self._dpi_scale_trans = Affine2D()
+ self.dpi_scale_trans = Affine2D()
 self.dpi = dpi
 self.bbox_inches = Bbox.from_bounds(0, 0, *figsize)
- self.bbox = TransformedBbox(self.bbox_inches, self._dpi_scale_trans)
+ self.bbox = TransformedBbox(self.bbox_inches, self.dpi_scale_trans)
 
 self.frameon = frameon
 
@@ -157,7 +157,7 @@
 return self._dpi
 def _set_dpi(self, dpi):
 self._dpi = dpi
- self._dpi_scale_trans.clear().scale(dpi, dpi)
+ self.dpi_scale_trans.clear().scale(dpi, dpi)
 dpi = property(_get_dpi, _set_dpi)
 
 def enable_auto_layout(self, setting=True):
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/patches.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -727,11 +727,11 @@
 def __str__(self):
 return "YAArrow()"
 
- def __init__(self, dpi, xytip, xybase, width=4, frac=0.1, headwidth=12, **kwargs):
+ def __init__(self, figure, xytip, xybase, width=4, frac=0.1, headwidth=12, **kwargs):
 """
 xytip : (x,y) location of arrow tip
 xybase : (x,y) location the arrow base mid point
- dpi : the figure dpi instance (fig.dpi)
+ figure : the figure instance (fig.dpi)
 width : the width of the arrow in points
 frac : the fraction of the arrow length occupied by the head
 headwidth : the width of the base of the arrow head in points
@@ -740,7 +740,7 @@
 %(Patch)s
 
 """
- self.dpi = dpi
+ self.figure = figure
 self.xytip = xytip
 self.xybase = xybase
 self.width = width
@@ -756,8 +756,8 @@
 # the base vertices
 x1, y1 = self.xytip
 x2, y2 = self.xybase
- k1 = self.width*self.dpi/72./2.
- k2 = self.headwidth*self.dpi/72./2.
+ k1 = self.width*self.figure.dpi/72./2.
+ k2 = self.headwidth*self.figure.dpi/72./2.
 xb1, yb1, xb2, yb2 = self.getpoints(x1, y1, x2, y2, k1)
 
 # a point on the segment 20% of the distance from the tip to the base
Modified: trunk/matplotlib/lib/matplotlib/projections/geo.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/geo.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/projections/geo.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -120,19 +120,19 @@
 def get_xaxis_transform(self):
 return self._xaxis_transform
 
- def get_xaxis_text1_transform(self, pixelPad):
+ def get_xaxis_text1_transform(self, pad):
 return self._xaxis_text1_transform, 'bottom', 'center'
 
- def get_xaxis_text2_transform(self, pixelPad):
+ def get_xaxis_text2_transform(self, pad):
 return self._xaxis_text2_transform, 'top', 'center'
 
 def get_yaxis_transform(self):
 return self._yaxis_transform
 
- def get_yaxis_text1_transform(self, pixelPad):
+ def get_yaxis_text1_transform(self, pad):
 return self._yaxis_text1_transform, 'center', 'right'
 
- def get_yaxis_text2_transform(self, pixelPad):
+ def get_yaxis_text2_transform(self, pad):
 return self._yaxis_text2_transform, 'center', 'left'
 
 def get_axes_patch(self):
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -252,19 +252,19 @@
 def get_xaxis_transform(self):
 return self._xaxis_transform
 
- def get_xaxis_text1_transform(self, pixelPad):
+ def get_xaxis_text1_transform(self, pad):
 return self._xaxis_text1_transform, 'center', 'center'
 
- def get_xaxis_text2_transform(self, pixelPad):
+ def get_xaxis_text2_transform(self, pad):
 return self._xaxis_text2_transform, 'center', 'center'
 
 def get_yaxis_transform(self):
 return self._yaxis_transform
 
- def get_yaxis_text1_transform(self, pixelPad):
+ def get_yaxis_text1_transform(self, pad):
 return self._yaxis_text1_transform, 'center', 'center'
 
- def get_yaxis_text2_transform(self, pixelPad):
+ def get_yaxis_text2_transform(self, pad):
 return self._yaxis_text2_transform, 'center', 'center'
 
 def get_axes_patch(self):
Modified: trunk/matplotlib/lib/matplotlib/text.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/text.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/text.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -1195,7 +1195,7 @@
 dx = shrink*r*math.cos(theta)
 dy = shrink*r*math.sin(theta)
 
- self.arrow = YAArrow(self.figure.dpi, (x0+dx,y0+dy), (x-dx, y-dy),
+ self.arrow = YAArrow(self.figure, (x0+dx,y0+dy), (x-dx, y-dy),
 width=width, headwidth=headwidth, frac=frac,
 **d)
 self.arrow.set_clip_box(self.get_clip_box())
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py	2008年01月29日 20:50:53 UTC (rev 4908)
+++ trunk/matplotlib/lib/matplotlib/transforms.py	2008年01月31日 14:21:49 UTC (rev 4909)
@@ -1898,6 +1898,32 @@
 get_matrix.__doc__ = Affine2DBase.get_matrix.__doc__
 
 
+class ScaledTranslation(Affine2DBase):
+ def __init__(self, xt, yt, scale_trans):
+ Affine2DBase.__init__(self)
+ self._t = (xt, yt)
+ self._scale_trans = scale_trans
+ self.set_children(scale_trans)
+ self._mtx = None
+ self._inverted = None
+
+ def __repr__(self):
+ return "ScaledTranslation(%s)" % (self._t)
+ __str__ = __repr__
+
+ def get_matrix(self):
+ if self._invalid:
+ xt, yt = self._scale_trans.transform_point(self._t)
+ self._mtx = npy.array([[1.0, 0.0, xt],
+ [0.0, 1.0, yt],
+ [0.0, 0.0, 1.0]],
+ npy.float_)
+ self._invalid = 0
+ self._inverted = None
+ return self._mtx
+ get_matrix.__doc__ = Affine2DBase.get_matrix.__doc__
+
+
 class TransformedPath(TransformNode):
 """
 A TransformedPath caches a non-affine transformed copy of the
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月29日 20:50:56
Revision: 4908
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4908&view=rev
Author: mdboom
Date: 2008年01月29日 12:50:53 -0800 (2008年1月29日)
Log Message:
-----------
Bugfix for Python pre-2.5 (Thanks Jorgen Stenarson and Nils Wagner)
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/path.py
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py	2008年01月29日 20:24:58 UTC (rev 4907)
+++ trunk/matplotlib/lib/matplotlib/path.py	2008年01月29日 20:50:53 UTC (rev 4908)
@@ -198,7 +198,7 @@
 elif code == STOP:
 return
 else:
- num_vertices = NUM_VERTICES[code]
+ num_vertices = NUM_VERTICES[int(code)]
 curr_vertices = vertices[i:i+num_vertices].flatten()
 if any(isnan(curr_vertices)):
 was_nan = True
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月29日 20:25:04
Revision: 4907
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4907&view=rev
Author: mdboom
Date: 2008年01月29日 12:24:58 -0800 (2008年1月29日)
Log Message:
-----------
Allow updating of shared axes when calling Axes.axis() (Thanks Jorgen Stenarson)
Modified Paths:
--------------
 branches/v0_91_maint/lib/matplotlib/axes.py
Modified: branches/v0_91_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/axes.py	2008年01月29日 20:19:27 UTC (rev 4906)
+++ branches/v0_91_maint/lib/matplotlib/axes.py	2008年01月29日 20:24:58 UTC (rev 4907)
@@ -1006,7 +1006,7 @@
 
 try: v[0]
 except IndexError:
- emit = kwargs.get('emit', False)
+ emit = kwargs.get('emit', True)
 xmin = kwargs.get('xmin', None)
 xmax = kwargs.get('xmax', None)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月29日 20:19:29
Revision: 4906
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4906&view=rev
Author: mdboom
Date: 2008年01月29日 12:19:27 -0800 (2008年1月29日)
Log Message:
-----------
Make shared axes work when calling Axes.axis() (Thanks Jorgen Stenarson)
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年01月29日 20:18:21 UTC (rev 4905)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年01月29日 20:19:27 UTC (rev 4906)
@@ -1049,7 +1049,7 @@
 
 try: v[0]
 except IndexError:
- emit = kwargs.get('emit', False)
+ emit = kwargs.get('emit', True)
 xmin = kwargs.get('xmin', None)
 xmax = kwargs.get('xmax', None)
 
@@ -4145,22 +4145,22 @@
 'p' : pentagram
 'h' : hexagon
 '8' : octagon
- 
+
 The marker can also be a tuple (numsides, style, angle), which will
 create a custom, regular symbol.
- 
+
 numsides is the number of sides
- 
+
 style is the style of the regular symbol:
 0 : a regular polygon
 1 : a star-like symbol
 2 : an asterisk
- 
+
 angle is the angle of rotation of the symbol
- 
+
 Finally, marker can be (verts, 0), verts is a sequence of (x,y)
 vertices for a custom scatter symbol.
- 
+
 s is a size argument in points squared.
 
 Any or all of x, y, s, and c may be masked arrays, in which
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月29日 20:18:25
Revision: 4905
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4905&view=rev
Author: mdboom
Date: 2008年01月29日 12:18:21 -0800 (2008年1月29日)
Log Message:
-----------
Add safety check.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/path.py
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py	2008年01月28日 18:02:31 UTC (rev 4904)
+++ trunk/matplotlib/lib/matplotlib/path.py	2008年01月29日 20:18:21 UTC (rev 4905)
@@ -456,6 +456,8 @@
 # number of curve segments to make
 if n is None:
 n = int(2 ** npy.ceil((eta2 - eta1) / halfpi))
+ if n < 1:
+ raise ValueError("n must be >= 1 or None")
 
 deta = (eta2 - eta1) / n
 t = npy.tan(0.5 * deta)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jr...@us...> - 2008年01月28日 18:02:40
Revision: 4904
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4904&view=rev
Author: jrevans
Date: 2008年01月28日 10:02:31 -0800 (2008年1月28日)
Log Message:
-----------
Fixed a bug where plotting a singe point unitized errorbar data would
fail. Fixed a bug where plotting errorbar data where the error is a
duration for a time valued axes would fail.
Modified Paths:
--------------
 branches/v0_91_maint/lib/matplotlib/axes.py
Modified: branches/v0_91_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/axes.py	2008年01月28日 15:43:55 UTC (rev 4903)
+++ branches/v0_91_maint/lib/matplotlib/axes.py	2008年01月28日 18:02:31 UTC (rev 4904)
@@ -331,7 +331,6 @@
 self.set_patchprops(seg, **kwargs)
 ret.append(seg)
 
-
 if self.command == 'plot': func = makeline
 else: func = makefill
 if multicol:
@@ -2513,10 +2512,6 @@
 ymin = npy.asarray(ymin)
 ymax = npy.asarray(ymax)
 
- if len(ymin)==1:
- ymin = ymin*npy.ones(x.shape, x.dtype)
- if len(ymax)==1:
- ymax = ymax*npy.ones(x.shape, x.dtype)
 
 if len(ymin)!=len(x):
 raise ValueError, 'ymin and x are unequal sized sequences'
@@ -2533,12 +2528,17 @@
 self.add_collection(coll)
 coll.update(kwargs)
 
- minx = x.min()
- maxx = x.max()
- miny = min(ymin.min(), ymax.min())
- maxy = max(ymin.max(), ymax.max())
- minx, maxx = self.convert_xunits((minx, maxx))
- miny, maxy = self.convert_yunits((miny, maxy))
+ # We do the conversion first since not all unitized data is uniform
+ xx = self.convert_xunits( x )
+ yymin = self.convert_yunits( ymin )
+ yymax = self.convert_yunits( ymax )
+
+ minx = min( xx )
+ maxx = max( xx )
+
+ miny = min( min(yymin), min(yymax) )
+ maxy = max( max(yymin), max(yymax) )
+
 corners = (minx, miny), (maxx, maxy)
 self.update_datalim(corners)
 self.autoscale_view()
@@ -2644,7 +2644,6 @@
 autoscaled; default True. See Axes.autoscale_view for more
 information
 """
-
 scalex = kwargs.pop( 'scalex', True)
 scaley = kwargs.pop( 'scaley', True)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ds...@us...> - 2008年01月28日 15:45:23
Revision: 4903
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4903&view=rev
Author: dsdale
Date: 2008年01月28日 07:43:55 -0800 (2008年1月28日)
Log Message:
-----------
don't use unicode strings with usetex
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/ticker.py
Modified: trunk/matplotlib/lib/matplotlib/ticker.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/ticker.py	2008年01月28日 13:28:20 UTC (rev 4902)
+++ trunk/matplotlib/lib/matplotlib/ticker.py	2008年01月28日 15:43:55 UTC (rev 4903)
@@ -336,7 +336,7 @@
 return ''.join(('$',sciNotStr,r'\mathdefault{',offsetStr,'}$'))
 elif self._usetex:
 if sciNotStr != '':
- sciNotStr = u'\xd7%s' % sciNotStr
+ sciNotStr = r'\times%s' % sciNotStr
 return ''.join(('$',sciNotStr,offsetStr,'$'))
 else:
 return ''.join((sciNotStr,offsetStr))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年01月28日 13:28:22
Revision: 4902
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4902&view=rev
Author: mdboom
Date: 2008年01月28日 05:28:20 -0800 (2008年1月28日)
Log Message:
-----------
Fix "gap" bug (Thanks Eric Firing)
Modified Paths:
--------------
 trunk/matplotlib/src/agg_py_path_iterator.h
Modified: trunk/matplotlib/src/agg_py_path_iterator.h
===================================================================
--- trunk/matplotlib/src/agg_py_path_iterator.h	2008年01月27日 15:17:28 UTC (rev 4901)
+++ trunk/matplotlib/src/agg_py_path_iterator.h	2008年01月28日 13:28:20 UTC (rev 4902)
@@ -366,7 +366,7 @@
 //direction we are drawing in, move back to we start drawing from
 //back there.
 if (m_haveMin)
- m_queue[m_queue_write++].set(agg::path_cmd_move_to, m_minX, m_minY);
+ m_queue[m_queue_write++].set(agg::path_cmd_line_to, m_minX, m_minY);
 m_queue[m_queue_write++].set(agg::path_cmd_line_to, m_maxX, m_maxY);
 
 //if we clipped some segments between this line and the next line
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ds...@us...> - 2008年01月27日 15:17:44
Revision: 4901
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4901&view=rev
Author: dsdale
Date: 2008年01月27日 07:17:28 -0800 (2008年1月27日)
Log Message:
-----------
backend_qt4 improvements, see bug 1288848
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
 trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年01月26日 13:22:33 UTC (rev 4900)
+++ trunk/matplotlib/CHANGELOG	2008年01月27日 15:17:28 UTC (rev 4901)
@@ -1,3 +1,7 @@
+2008年01月27日 Applied Martin Teichmann's patch to improve the Qt4
+ backend. Uses Qt's builtin toolbars and statusbars.
+ See bug 1828848 - DSD
+
 2008年01月10日 Moved toolkits to mpl_toolkits, made mpl_toolkits
 a namespace package - JSWHIT
 
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py	2008年01月26日 13:22:33 UTC (rev 4900)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py	2008年01月27日 15:17:28 UTC (rev 4901)
@@ -195,9 +195,6 @@
 image = os.path.join( matplotlib.rcParams['datapath'],'images','matplotlib.png' )
 self.window.setWindowIcon(QtGui.QIcon( image ))
 
- centralWidget = QtGui.QWidget( self.window )
- self.canvas.setParent( centralWidget )
-
 # Give the keyboard focus to the figure instead of the manager
 self.canvas.setFocusPolicy( QtCore.Qt.ClickFocus )
 self.canvas.setFocus()
@@ -206,31 +203,13 @@
 self._widgetclosed )
 self.window._destroying = False
 
- self.toolbar = self._get_toolbar(self.canvas, centralWidget)
+ self.toolbar = self._get_toolbar(self.canvas, self.window)
+ self.window.addToolBar(self.toolbar)
+ QtCore.QObject.connect(self.toolbar, QtCore.SIGNAL("message"),
+ self.window.statusBar().showMessage)
 
- # Use a vertical layout for the plot and the toolbar. Set the
- # stretch to all be in the plot so the toolbar doesn't resize.
- layout = QtGui.QVBoxLayout( centralWidget )
- layout.setMargin( 0 )
- layout.addWidget( self.canvas, 1 )
- if self.toolbar:
- layout.addWidget( self.toolbar, 0 )
+ self.window.setCentralWidget(self.canvas)
 
- self.window.setCentralWidget( centralWidget )
-
- # Reset the window height so the canvas will be the right
- # size. This ALMOST works right. The first issue is that the
- # reported toolbar height does not include the margin (so
- # we add the margin). The second is that the total width/height
- # is slightly smaller that we actually want. It seems like
- # the border of the window is being included in the size but
- # AFAIK there is no way to get that size.
- w = self.canvas.width()
- h = self.canvas.height()
- if self.toolbar:
- h += self.toolbar.height() + NavigationToolbar2QT.margin
- self.window.resize( w, h )
-
 if matplotlib.is_interactive():
 self.window.show()
 
@@ -251,9 +230,9 @@
 # must be inited after the window, drawingArea and figure
 # attrs are set
 if matplotlib.rcParams['toolbar'] == 'classic':
- print "Classic toolbar is not yet supported"
+ print "Classic toolbar is not supported"
 elif matplotlib.rcParams['toolbar'] == 'toolbar2':
- toolbar = NavigationToolbar2QT(canvas, parent)
+ toolbar = NavigationToolbar2QT(canvas, parent, False)
 else:
 toolbar = None
 return toolbar
@@ -274,68 +253,53 @@
 def set_window_title(self, title):
 self.window.setWindowTitle(title)
 
-class NavigationToolbar2QT( NavigationToolbar2, QtGui.QWidget ):
- # list of toolitems to add to the toolbar, format is:
- # text, tooltip_text, image_file, callback(str)
- toolitems = (
- ('Home', 'Reset original view', 'home.ppm', 'home'),
- ('Back', 'Back to previous view','back.ppm', 'back'),
- ('Forward', 'Forward to next view','forward.ppm', 'forward'),
- (None, None, None, None),
- ('Pan', 'Pan axes with left mouse, zoom with right', 'move.ppm', 'pan'),
- ('Zoom', 'Zoom to rectangle','zoom_to_rect.ppm', 'zoom'),
- (None, None, None, None),
- ('Subplots', 'Configure subplots','subplots.png', 'configure_subplots'),
- ('Save', 'Save the figure','filesave.ppm', 'save_figure'),
- )
-
- margin = 12 # extra margin for the toolbar
-
- def __init__(self, canvas, parent):
+class NavigationToolbar2QT( NavigationToolbar2, QtGui.QToolBar ):
+ def __init__(self, canvas, parent, coordinates=True):
+ """ coordinates: should we show the coordinates on the right? """
 self.canvas = canvas
- QtGui.QWidget.__init__( self, parent )
-
- # Layout toolbar buttons horizontally.
- self.layout = QtGui.QHBoxLayout( self )
- self.layout.setMargin( 2 )
- self.layout.setSpacing( 0 )
-
+ self.coordinates = coordinates
+ QtGui.QToolBar.__init__( self, parent )
 NavigationToolbar2.__init__( self, canvas )
 
- def _init_toolbar( self ):
- basedir = os.path.join(matplotlib.rcParams[ 'datapath' ],'images')
- self.buttons = {}
+ def _icon(self, name):
+ return QtGui.QIcon(os.path.join(self.basedir, name))
 
- for text, tooltip_text, image_file, callback in self.toolitems:
- if text == None:
- self.layout.addSpacing( 8 )
- continue
+ def _init_toolbar(self):
+ self.basedir = os.path.join(matplotlib.rcParams[ 'datapath' ],'images')
 
- fname = os.path.join( basedir, image_file )
- image = QtGui.QPixmap()
- image.load( fname )
+ a = self.addAction(self._icon('home.svg'), 'Home', self.home)
+ a.setToolTip('Reset original view')
+ a = self.addAction(self._icon('back.svg'), 'Back', self.back)
+ a.setToolTip('Back to previous view')
+ a = self.addAction(self._icon('forward.svg'), 'Forward', self.forward)
+ a.setToolTip('Forward to next view')
+ self.addSeparator()
+ a = self.addAction(self._icon('move.svg'), 'Pan', self.pan)
+ a.setToolTip('Pan axes with left mouse, zoom with right')
+ a = self.addAction(self._icon('zoom_to_rect.svg'), 'Zoom', self.zoom)
+ a.setToolTip('Zoom to rectangle')
+ self.addSeparator()
+ a = self.addAction(self._icon('subplots.png'), 'Subplots',
+ self.configure_subplots)
+ a.setToolTip('Configure subplots')
+ a = self.addAction(self._icon('filesave.svg'), 'Save',
+ self.save_figure)
+ a.setToolTip('Save the figure')
 
- button = QtGui.QPushButton( QtGui.QIcon( image ), "", self )
- button.setToolTip(tooltip_text)
- self.buttons[ text ] = button
+ self.buttons = {}
 
- # The automatic layout doesn't look that good - it's too close
- # to the images so add a margin around it.
- margin = self.margin
- button.setFixedSize( image.width()+margin, image.height()+margin )
-
- QtCore.QObject.connect( button, QtCore.SIGNAL( 'clicked()' ),
- getattr( self, callback ) )
- self.layout.addWidget( button )
-
 # Add the x,y location widget at the right side of the toolbar
 # The stretch factor is 1 which means any resizing of the toolbar
 # will resize this label instead of the buttons.
- self.locLabel = QtGui.QLabel( "", self )
- self.locLabel.setAlignment( QtCore.Qt.AlignRight | QtCore.Qt.AlignTop )
- self.locLabel.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored,
- QtGui.QSizePolicy.Ignored))
- self.layout.addWidget( self.locLabel, 1 )
+ if self.coordinates:
+ self.locLabel = QtGui.QLabel( "", self )
+ self.locLabel.setAlignment(
+ QtCore.Qt.AlignRight | QtCore.Qt.AlignTop )
+ self.locLabel.setSizePolicy(
+ QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
+ QtGui.QSizePolicy.Ignored))
+ labelAction = self.addWidget(self.locLabel)
+ labelAction.setVisible(True)
 
 # reference holder for subplots_adjust window
 self.adj_window = None
@@ -351,7 +315,9 @@
 self.canvas.draw()
 
 def set_message( self, s ):
- self.locLabel.setText( s.replace(', ', '\n') )
+ self.emit(QtCore.SIGNAL("message"), s)
+ if self.coordinates:
+ self.locLabel.setText(s.replace(', ', '\n'))
 
 def set_cursor( self, cursor ):
 if DEBUG: print 'Set cursor' , cursor
@@ -384,28 +350,6 @@
 
 win.show()
 
-# self.adj_window = QtGui.QDialog()
-# win = self.adj_window
-# win.setAttribute(QtCore.Qt.WA_DeleteOnClose)
-# win.setWindowTitle("Subplot Configuration Tool")
-# image = os.path.join( matplotlib.rcParams['datapath'],'images','matplotlib.png' )
-# win.setWindowIcon(QtGui.QIcon( image ))
-#
-# toolfig = Figure(figsize=(6,3))
-# toolfig.subplots_adjust(top=0.9)
-# canvas = self._get_canvas(toolfig)
-# tool = SubplotTool(self.canvas.figure, toolfig)
-#
-# canvas.setParent(win)
-# w = int (toolfig.bbox.width())
-# h = int (toolfig.bbox.height())
-#
-# win.resize(w, h)
-# canvas.setFocus()
-#
-# canvas.show()
-# win.show()
-
 def _get_canvas(self, fig):
 return FigureCanvasQT(fig)
 
@@ -425,7 +369,7 @@
 selectedFilter = filter
 filters.append(filter)
 filters = ';;'.join(filters)
- 
+
 fname = QtGui.QFileDialog.getSaveFileName(
 self, "Choose a filename to save to", start, filters, selectedFilter)
 if fname:
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py	2008年01月26日 13:22:33 UTC (rev 4900)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py	2008年01月27日 15:17:28 UTC (rev 4901)
@@ -35,7 +35,7 @@
 # must be inited after the window, drawingArea and figure
 # attrs are set
 if matplotlib.rcParams['toolbar']=='classic':
- print "Classic toolbar is not yet supported"
+ print "Classic toolbar is not supported"
 elif matplotlib.rcParams['toolbar']=='toolbar2':
 toolbar = NavigationToolbar2QTAgg(canvas, parent)
 else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4900
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4900&view=rev
Author: jswhit
Date: 2008年01月26日 05:22:33 -0800 (2008年1月26日)
Log Message:
-----------
add some comments
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/geos_demo_3.py
Modified: trunk/toolkits/basemap/examples/geos_demo_3.py
===================================================================
--- trunk/toolkits/basemap/examples/geos_demo_3.py	2008年01月26日 13:17:19 UTC (rev 4899)
+++ trunk/toolkits/basemap/examples/geos_demo_3.py	2008年01月26日 13:22:33 UTC (rev 4900)
@@ -1,14 +1,13 @@
 from mpl_toolkits.basemap import Basemap
 from pylab import title, show, arange, figure
 
-# map with continents drawn and filled.
 fig = figure()
 lon_0=57
+# global geos map
 m1 = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution=None)
 ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
-# plot just upper right quadrant.
+# plot just upper right quadrant (coordinates determined from global map).
 m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
-print m.projparams
 m.drawcoastlines()
 m.drawmapboundary(fill_color='aqua')
 m.fillcontinents(color='coral',lake_color='aqua')
@@ -20,11 +19,12 @@
 title('Geostationary Map Centered on Lon=%s' % lon_0)
 
 fig = figure()
-m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution=None)
+# global ortho map
+lat_0=10.
+m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution=None)
 ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
-# plot just upper right quadrant.
-m = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
-print m.projparams
+# plot just upper right quadrant (corners determined from global map).
+m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
 m.drawcoastlines()
 m.drawmapboundary(fill_color='aqua')
 m.fillcontinents(color='coral',lake_color='aqua')
@@ -33,6 +33,6 @@
 m.drawparallels(arange(-90.,120.,30.))
 m.drawmeridians(arange(0.,420.,60.))
 m.drawmapboundary()
-title('Orthographic Map Centered on Lon=%s' % lon_0)
+title('Orthographic Map Centered on Lon=%s, Lat=%s' % (lon_0,lat_0))
 
 show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年01月26日 13:17:22
Revision: 4899
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4899&view=rev
Author: jswhit
Date: 2008年01月26日 05:17:19 -0800 (2008年1月26日)
Log Message:
-----------
adjust geos and ortho corner specification.
Modified Paths:
--------------
 trunk/toolkits/basemap/examples/geos_demo_3.py
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py
Modified: trunk/toolkits/basemap/examples/geos_demo_3.py
===================================================================
--- trunk/toolkits/basemap/examples/geos_demo_3.py	2008年01月26日 13:09:36 UTC (rev 4898)
+++ trunk/toolkits/basemap/examples/geos_demo_3.py	2008年01月26日 13:17:19 UTC (rev 4899)
@@ -7,7 +7,7 @@
 m1 = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution=None)
 ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
 # plot just upper right quadrant.
-m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution='l',llcrnrx=m1.urcrnrx/2.,llcrnry=m1.urcrnry/2.,urcrnrx=m1.urcrnrx,urcrnry=m1.urcrnry)
+m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
 print m.projparams
 m.drawcoastlines()
 m.drawmapboundary(fill_color='aqua')
@@ -23,7 +23,7 @@
 m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution=None)
 ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
 # plot just upper right quadrant.
-m = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution='l',llcrnrx=m1.urcrnrx/2.,llcrnry=m1.urcrnry/2.,urcrnrx=m1.urcrnrx,urcrnry=m1.urcrnry)
+m = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
 print m.projparams
 m.drawcoastlines()
 m.drawmapboundary(fill_color='aqua')
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py	2008年01月26日 13:09:36 UTC (rev 4898)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py	2008年01月26日 13:17:19 UTC (rev 4899)
@@ -145,8 +145,9 @@
 corners or width and height must be specified by the user.
 For 'ortho' and 'geos', the lat/lon values of the corners may be specified,
 or the x/y values of the corners (llcrnrx,llcrnry,urcrnrx,urcrnry) in the 
- coordinate system of the global projection. If the corners are not
- specified, the entire globe is plotted.
+ coordinate system of the global projection (with x=0,y=0 at the center
+ of the global projection). If the corners are not specified,
+ the entire globe is plotted.
 
 resolution - resolution of boundary database to use. Can be 'c' (crude),
 'l' (low), 'i' (intermediate), 'h' (high), 'f' (full) or None.
@@ -612,10 +613,10 @@
 self.aspect = (proj.ymax-proj.ymin)/(proj.xmax-proj.xmin)
 if projection in ['geos','ortho'] and \
 None not in [llcrnrx,llcrnry,urcrnrx,urcrnry]:
- self.llcrnrx = llcrnrx
- self.llcrnry = llcrnry
- self.urcrnrx = urcrnrx
- self.urcrnry = urcrnry
+ self.llcrnrx = llcrnrx+0.5*proj.xmax
+ self.llcrnry = llcrnry+0.5*proj.ymax
+ self.urcrnrx = urcrnrx+0.5*proj.xmax
+ self.urcrnry = urcrnry+0.5*proj.ymax
 self._fulldisk = False
 else:
 self.llcrnrx = proj.llcrnrx
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4898
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4898&view=rev
Author: jswhit
Date: 2008年01月26日 05:09:36 -0800 (2008年1月26日)
Log Message:
-----------
illustrate specifying x,y corners for geos and ortho
Added Paths:
-----------
 trunk/toolkits/basemap/examples/geos_demo_3.py
Added: trunk/toolkits/basemap/examples/geos_demo_3.py
===================================================================
--- trunk/toolkits/basemap/examples/geos_demo_3.py	 (rev 0)
+++ trunk/toolkits/basemap/examples/geos_demo_3.py	2008年01月26日 13:09:36 UTC (rev 4898)
@@ -0,0 +1,38 @@
+from mpl_toolkits.basemap import Basemap
+from pylab import title, show, arange, figure
+
+# map with continents drawn and filled.
+fig = figure()
+lon_0=57
+m1 = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution=None)
+ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
+# plot just upper right quadrant.
+m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution='l',llcrnrx=m1.urcrnrx/2.,llcrnry=m1.urcrnry/2.,urcrnrx=m1.urcrnrx,urcrnry=m1.urcrnry)
+print m.projparams
+m.drawcoastlines()
+m.drawmapboundary(fill_color='aqua')
+m.fillcontinents(color='coral',lake_color='aqua')
+m.drawcountries()
+# draw parallels and meridians.
+m.drawparallels(arange(-90.,120.,30.))
+m.drawmeridians(arange(0.,420.,60.))
+m.drawmapboundary()
+title('Geostationary Map Centered on Lon=%s' % lon_0)
+
+fig = figure()
+m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution=None)
+ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
+# plot just upper right quadrant.
+m = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution='l',llcrnrx=m1.urcrnrx/2.,llcrnry=m1.urcrnry/2.,urcrnrx=m1.urcrnrx,urcrnry=m1.urcrnry)
+print m.projparams
+m.drawcoastlines()
+m.drawmapboundary(fill_color='aqua')
+m.fillcontinents(color='coral',lake_color='aqua')
+m.drawcountries()
+# draw parallels and meridians.
+m.drawparallels(arange(-90.,120.,30.))
+m.drawmeridians(arange(0.,420.,60.))
+m.drawmapboundary()
+title('Orthographic Map Centered on Lon=%s' % lon_0)
+
+show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4897
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4897&view=rev
Author: jswhit
Date: 2008年01月26日 05:06:47 -0800 (2008年1月26日)
Log Message:
-----------
add llcrnrx,llcrnry,urcrnrx,urcrnry keyword for Basemap.__init__, only
relevant for 'ortho' and 'geos' (to enable plotting of geostationary 
sector images).
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py	2008年01月26日 00:11:36 UTC (rev 4896)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py	2008年01月26日 13:06:47 UTC (rev 4897)
@@ -30,6 +30,7 @@
 from matplotlib.collections import LineCollection
 from matplotlib.patches import Ellipse, Circle, Polygon
 from matplotlib.lines import Line2D
+from matplotlib.transforms import Bbox
 import pyproj, sys, os, math, dbflib
 from proj import Proj
 import numpy as npy
@@ -94,8 +95,8 @@
 'spstere' : 'bounding_lat,lon_0,lat_0,no corners or width/height',
 'cass' : 'lon_0,lat_0',
 'poly' : 'lon_0,lat_0',
- 'ortho' : 'lon_0,lat_0',
- 'geos' : 'lon_0,lat_0,satellite_height',
+ 'ortho' : 'lon_0,lat_0,llcrnrx,llcrnry,urcrnrx,urcrnry,no width/height',
+ 'geos' : 'lon_0,satellite_height,llcrnrx,llcrnry,urcrnrx,urcrnry,no width/height',
 'sinu' : 'lon_0,lat_0,no corners or width/height',
 'moll' : 'lon_0,lat_0,no corners or width/height',
 'robin' : 'lon_0,lat_0,no corners or width/height',
@@ -143,7 +144,9 @@
 projections except 'ortho' and 'geos', either the lat/lon values of the
 corners or width and height must be specified by the user.
 For 'ortho' and 'geos', the lat/lon values of the corners may be specified,
- but if they are not, the entire globe is plotted.
+ or the x/y values of the corners (llcrnrx,llcrnry,urcrnrx,urcrnry) in the 
+ coordinate system of the global projection. If the corners are not
+ specified, the entire globe is plotted.
 
 resolution - resolution of boundary database to use. Can be 'c' (crude),
 'l' (low), 'i' (intermediate), 'h' (high), 'f' (full) or None.
@@ -323,6 +326,8 @@
 
 def __init__(self, llcrnrlon=None, llcrnrlat=None,
 urcrnrlon=None, urcrnrlat=None,
+ llcrnrx=None, llcrnry=None,
+ urcrnrx=None, urcrnry=None,
 width=None, height=None,
 projection='cyl', resolution='c',
 area_thresh=None, rsphere=6370997.0,
@@ -605,11 +610,18 @@
 self.aspect = (self.urcrnrlat-self.llcrnrlat)/(self.urcrnrlon-self.llcrnrlon)
 else:
 self.aspect = (proj.ymax-proj.ymin)/(proj.xmax-proj.xmin)
- self.llcrnrx = proj.llcrnrx
- self.llcrnry = proj.llcrnry
- self.urcrnrx = proj.urcrnrx
- self.urcrnry = proj.urcrnry
-
+ if projection in ['geos','ortho'] and \
+ None not in [llcrnrx,llcrnry,urcrnrx,urcrnry]:
+ self.llcrnrx = llcrnrx
+ self.llcrnry = llcrnry
+ self.urcrnrx = urcrnrx
+ self.urcrnry = urcrnry
+ self._fulldisk = False
+ else:
+ self.llcrnrx = proj.llcrnrx
+ self.llcrnry = proj.llcrnry
+ self.urcrnrx = proj.urcrnrx
+ self.urcrnry = proj.urcrnry
 # set min/max lats for projection domain.
 if projection in ['mill','cyl','merc']:
 self.latmin = self.llcrnrlat
@@ -1049,34 +1061,23 @@
 ax = pylab.gca()
 elif ax is None and self.ax is not None:
 ax = self.ax
- if self.projection == 'ortho' and self._fulldisk: # circular region.
- # define a circle patch, add it to axes instance.
- circle = Circle((self.rmajor,self.rmajor),self.rmajor)
- ax.add_patch(circle)
+ if self.projection == 'ortho':
+ limb = Circle((self.rmajor,self.rmajor),self.rmajor)
+ elif self.projection == 'geos':
+ limb = Ellipse((self._width,self._height),2.*self._width,2.*self._height)
+ if self.projection in ['ortho','geos'] and self._fulldisk:
+ # elliptical region.
+ ax.add_patch(limb)
 if fill_color is None:
- circle.set_fill(False)
+ limb.set_fill(False)
 else:
- circle.set_facecolor(fill_color)
- circle.set_zorder(0)
- circle.set_edgecolor(color)
- circle.set_linewidth(linewidth)
- circle.set_clip_on(False)
+ limb.set_facecolor(fill_color)
+ limb.set_zorder(0)
+ limb.set_edgecolor(color)
+ limb.set_linewidth(linewidth)
+ limb.set_clip_on(False)
 if zorder is not None:
- circle.set_zorder(zorder)
- elif self.projection == 'geos' and self._fulldisk: # elliptical region
- # define an Ellipse patch, add it to axes instance.
- ellps = Ellipse((self._width,self._height),2.*self._width,2.*self._height)
- ax.add_patch(ellps)
- if fill_color is None:
- ellps.set_fill(False)
- else:
- ellps.set_facecolor(fill_color)
- ellps.set_zorder(0)
- ellps.set_edgecolor(color)
- ellps.set_linewidth(linewidth)
- ellps.set_clip_on(False)
- if zorder is not None:
- ellps.set_zorder(0)
+ limb.set_zorder(zorder)
 elif self.projection in ['moll','robin','sinu']: # elliptical region.
 nx = 100; ny = 100
 # quasi-elliptical region.
@@ -1109,15 +1110,37 @@
 poly.set_zorder(zorder)
 else: # all other projections are rectangular.
 ax.axesPatch.set_linewidth(linewidth)
- if fill_color is None:
+ if self.projection not in ['geos','ortho']:
+ if fill_color is None:
+ ax.axesPatch.set_facecolor(ax.get_axis_bgcolor())
+ else:
+ ax.axesPatch.set_facecolor(fill_color)
+ ax.axesPatch.set_zorder(0)
 ax.axesPatch.set_facecolor(ax.get_axis_bgcolor())
+ ax.axesPatch.set_edgecolor(color)
+ ax.set_frame_on(True)
+ if zorder is not None:
+ ax.axesPatch.set_zorder(zorder)
 else:
- ax.axesPatch.set_facecolor(fill_color)
- ax.axesPatch.set_zorder(0)
- ax.axesPatch.set_edgecolor(color)
- ax.set_frame_on(True)
- if zorder is not None:
- ax.axesPatch.set_zorder(zorder)
+ ax.axesPatch.set_facecolor(ax.get_axis_bgcolor())
+ ax.axesPatch.set_edgecolor(color)
+ ax.set_frame_on(True)
+ if zorder is not None:
+ ax.axesPatch.set_zorder(zorder)
+ # for geos or ortho projections, also
+ # draw and fill map projection limb, clipped
+ # to rectangular region.
+ ax.add_patch(limb)
+ if fill_color is None:
+ limb.set_fill(False)
+ else:
+ limb.set_facecolor(fill_color)
+ limb.set_zorder(0)
+ limb.set_edgecolor(color)
+ limb.set_linewidth(linewidth)
+ if zorder is not None:
+ limb.set_zorder(zorder)
+ limb.set_clip_on(True)
 # set axes limits to fit map region.
 self.set_axes_limits(ax=ax)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年01月26日 00:11:44
Revision: 4896
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4896&view=rev
Author: efiring
Date: 2008年01月25日 16:11:36 -0800 (2008年1月25日)
Log Message:
-----------
Apply patch by Manuel Metz to scatter docstring.
Modified Paths:
--------------
 branches/v0_91_maint/lib/matplotlib/axes.py
Modified: branches/v0_91_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/axes.py	2008年01月26日 00:08:57 UTC (rev 4895)
+++ branches/v0_91_maint/lib/matplotlib/axes.py	2008年01月26日 00:11:36 UTC (rev 4896)
@@ -4047,10 +4047,22 @@
 'p' : pentagram
 'h' : hexagon
 '8' : octagon
-
- If marker is None and verts is not None, verts is a sequence
- of (x,y) vertices for a custom scatter symbol.
-
+ 
+ The marker can also be a tuple (numsides, style, angle), which will
+ create a custom, regular symbol.
+ 
+ numsides is the number of sides
+ 
+ style is the style of the regular symbol:
+ 0 : a regular polygon
+ 1 : a star-like symbol
+ 2 : an asterisk
+ 
+ angle is the angle of rotation of the symbol
+ 
+ Finally, marker can be (verts, 0), verts is a sequence of (x,y)
+ vertices for a custom scatter symbol.
+ 
 s is a size argument in points squared.
 
 Any or all of x, y, s, and c may be masked arrays, in which
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年01月26日 00:09:13
Revision: 4895
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4895&view=rev
Author: efiring
Date: 2008年01月25日 16:08:57 -0800 (2008年1月25日)
Log Message:
-----------
Apply patch by Manuel Metz to scatter docstring.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年01月24日 18:15:56 UTC (rev 4894)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年01月26日 00:08:57 UTC (rev 4895)
@@ -4145,10 +4145,22 @@
 'p' : pentagram
 'h' : hexagon
 '8' : octagon
-
- If marker is None and verts is not None, verts is a sequence
- of (x,y) vertices for a custom scatter symbol.
-
+ 
+ The marker can also be a tuple (numsides, style, angle), which will
+ create a custom, regular symbol.
+ 
+ numsides is the number of sides
+ 
+ style is the style of the regular symbol:
+ 0 : a regular polygon
+ 1 : a star-like symbol
+ 2 : an asterisk
+ 
+ angle is the angle of rotation of the symbol
+ 
+ Finally, marker can be (verts, 0), verts is a sequence of (x,y)
+ vertices for a custom scatter symbol.
+ 
 s is a size argument in points squared.
 
 Any or all of x, y, s, and c may be masked arrays, in which
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年01月24日 18:19:23
Revision: 4894
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4894&view=rev
Author: efiring
Date: 2008年01月24日 10:15:56 -0800 (2008年1月24日)
Log Message:
-----------
Change tabs to spaces, except in pyparsing.py
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/__init__.py
 trunk/matplotlib/lib/matplotlib/_mathtext_data.py
 trunk/matplotlib/lib/matplotlib/_pylab_helpers.py
 trunk/matplotlib/lib/matplotlib/afm.py
 trunk/matplotlib/lib/matplotlib/agg.py
 trunk/matplotlib/lib/matplotlib/artist.py
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/axis.py
 trunk/matplotlib/lib/matplotlib/backend_bases.py
 trunk/matplotlib/lib/matplotlib/cbook.py
 trunk/matplotlib/lib/matplotlib/cm.py
 trunk/matplotlib/lib/matplotlib/collections.py
 trunk/matplotlib/lib/matplotlib/colorbar.py
 trunk/matplotlib/lib/matplotlib/colors.py
 trunk/matplotlib/lib/matplotlib/contour.py
 trunk/matplotlib/lib/matplotlib/dates.py
 trunk/matplotlib/lib/matplotlib/dviread.py
 trunk/matplotlib/lib/matplotlib/figure.py
 trunk/matplotlib/lib/matplotlib/finance.py
 trunk/matplotlib/lib/matplotlib/font_manager.py
 trunk/matplotlib/lib/matplotlib/image.py
 trunk/matplotlib/lib/matplotlib/lines.py
 trunk/matplotlib/lib/matplotlib/mlab.py
 trunk/matplotlib/lib/matplotlib/mpl.py
 trunk/matplotlib/lib/matplotlib/patches.py
 trunk/matplotlib/lib/matplotlib/path.py
 trunk/matplotlib/lib/matplotlib/pylab.py
 trunk/matplotlib/lib/matplotlib/pyplot.py
 trunk/matplotlib/lib/matplotlib/quiver.py
 trunk/matplotlib/lib/matplotlib/table.py
 trunk/matplotlib/lib/matplotlib/text.py
 trunk/matplotlib/lib/matplotlib/transforms.py
 trunk/matplotlib/lib/matplotlib/type1font.py
 trunk/matplotlib/lib/matplotlib/units.py
 trunk/matplotlib/lib/matplotlib/windowing.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/__init__.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -113,8 +113,8 @@
 
 if not _python23:
 def enumerate(seq):
- for i in range(len(seq)):
- yield i, seq[i]
+ for i in range(len(seq)):
+ yield i, seq[i]
 
 
 def is_string_like(obj):
@@ -803,4 +803,3 @@
 verbose.report('units is %s'%rcParams['units'])
 verbose.report('platform is %s'%sys.platform)
 verbose.report('loaded modules: %s'%sys.modules.keys(), 'debug')
-
Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -2472,5 +2472,3 @@
 (0x0061, 0x007a, 'rm', 0x1d68a) # a-z
 ],
 }
-
-
Modified: trunk/matplotlib/lib/matplotlib/_pylab_helpers.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_pylab_helpers.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/_pylab_helpers.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -57,4 +57,3 @@
 Gcf._activeQue.append(manager)
 Gcf.figs[manager.num] = manager
 set_active = staticmethod(set_active)
-
Modified: trunk/matplotlib/lib/matplotlib/afm.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/afm.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/afm.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -55,7 +55,7 @@
 
 def _sanity_check(fh):
 """
- Check if the file at least looks like AFM. 
+ Check if the file at least looks like AFM.
 If not, raise RuntimeError.
 """
 
@@ -125,9 +125,9 @@
 #print '%-s\t%-d line :: %-s' % ( fh.name, len(lst), line )
 key = lst[0]
 if len( lst ) == 2:
- val = lst[1]
+ val = lst[1]
 else:
- val = ''
+ val = ''
 #key, val = line.split(' ', 1)
 try: d[key] = headerConverters[key](val)
 except ValueError:
@@ -377,7 +377,7 @@
 Return the string bounding box
 """
 return self.get_str_bbox_and_descent(s)[:4]
- 
+
 def get_name_char(self, c, isord=False):
 """
 Get the name of the character, ie, ';' is 'semicolon'
@@ -401,7 +401,7 @@
 """
 wx, bbox = self._metrics_by_name[name]
 return wx
- 
+
 def get_height_char(self, c, isord=False):
 """
 Get the height of character c from the bounding box. This is
@@ -426,7 +426,7 @@
 """
 try: return self._kern[ (name1, name2) ]
 except: return 0
- 
+
 def get_fontname(self):
 "Return the font name, eg, Times-Roman"
 return self._header['FontName']
@@ -472,8 +472,8 @@
 not specified in AFM file.
 """
 return self._header.get('StdVW', None)
- 
 
+
 if __name__=='__main__':
 #pathname = '/usr/local/lib/R/afm/'
 pathname = '/usr/local/share/fonts/afms/adobe'
@@ -482,6 +482,3 @@
 fh = file(os.path.join(pathname,fname))
 afm = AFM(fh)
 w,h = afm.string_width_height('John Hunter is the Man!')
-
-
-
Modified: trunk/matplotlib/lib/matplotlib/agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/agg.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/agg.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -100,7 +100,7 @@
 __swig_setmethods__["y"] = _agg.point_type_y_set
 __swig_getmethods__["y"] = _agg.point_type_y_get
 if _newclass:y = _swig_property(_agg.point_type_y_get, _agg.point_type_y_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_point_type(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -126,7 +126,7 @@
 __swig_setmethods__["cmd"] = _agg.vertex_type_cmd_set
 __swig_getmethods__["cmd"] = _agg.vertex_type_cmd_get
 if _newclass:cmd = _swig_property(_agg.vertex_type_cmd_get, _agg.vertex_type_cmd_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_vertex_type(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -153,7 +153,7 @@
 __swig_setmethods__["y2"] = _agg.rect_y2_set
 __swig_getmethods__["y2"] = _agg.rect_y2_get
 if _newclass:y2 = _swig_property(_agg.rect_y2_get, _agg.rect_y2_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rect(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -183,7 +183,7 @@
 __swig_setmethods__["y2"] = _agg.rect_d_y2_set
 __swig_getmethods__["y2"] = _agg.rect_d_y2_get
 if _newclass:y2 = _swig_property(_agg.rect_d_y2_get, _agg.rect_d_y2_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rect_d(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -211,7 +211,7 @@
 __swig_setmethods__["data"] = _agg.binary_data_data_set
 __swig_getmethods__["data"] = _agg.binary_data_data_get
 if _newclass:data = _swig_property(_agg.binary_data_data_get, _agg.binary_data_data_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_binary_data(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -226,7 +226,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, buffer, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_buffer(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -258,7 +258,7 @@
 G = _agg.order_rgb_G
 B = _agg.order_rgb_B
 rgb_tag = _agg.order_rgb_rgb_tag
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_order_rgb(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -277,7 +277,7 @@
 G = _agg.order_bgr_G
 R = _agg.order_bgr_R
 rgb_tag = _agg.order_bgr_rgb_tag
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_order_bgr(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -297,7 +297,7 @@
 B = _agg.order_rgba_B
 A = _agg.order_rgba_A
 rgba_tag = _agg.order_rgba_rgba_tag
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_order_rgba(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -317,7 +317,7 @@
 G = _agg.order_argb_G
 B = _agg.order_argb_B
 rgba_tag = _agg.order_argb_rgba_tag
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_order_argb(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -337,7 +337,7 @@
 G = _agg.order_abgr_G
 R = _agg.order_abgr_R
 rgba_tag = _agg.order_abgr_rgba_tag
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_order_abgr(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -357,7 +357,7 @@
 R = _agg.order_bgra_R
 A = _agg.order_bgra_A
 rgba_tag = _agg.order_bgra_rgba_tag
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_order_bgra(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -394,7 +394,7 @@
 if _newclass:no_color = staticmethod(_agg.rgba_no_color)
 __swig_getmethods__["from_wavelength"] = lambda x: _agg.rgba_from_wavelength
 if _newclass:from_wavelength = staticmethod(_agg.rgba_from_wavelength)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rgba(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -426,7 +426,7 @@
 __swig_setmethods__["a"] = _agg.rgba8_a_set
 __swig_getmethods__["a"] = _agg.rgba8_a_get
 if _newclass:a = _swig_property(_agg.rgba8_a_get, _agg.rgba8_a_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rgba8(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -472,7 +472,7 @@
 __swig_setmethods__["a"] = _agg.rgba16_a_set
 __swig_getmethods__["a"] = _agg.rgba16_a_get
 if _newclass:a = _swig_property(_agg.rgba16_a_get, _agg.rgba16_a_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rgba16(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -500,7 +500,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, trans_affine, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_trans_affine(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -543,7 +543,7 @@
 for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_rotation, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_trans_affine_rotation(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -560,7 +560,7 @@
 for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_scaling, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_trans_affine_scaling(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -577,7 +577,7 @@
 for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_translation, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_trans_affine_translation(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -594,7 +594,7 @@
 for _s in [trans_affine]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, trans_affine_skewing, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_trans_affine_skewing(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -611,7 +611,7 @@
 __repr__ = _swig_repr
 __swig_destroy__ = _agg.delete_path_storage
 __del__ = lambda self : None;
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_path_storage(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -663,7 +663,7 @@
 __repr__ = _swig_repr
 __swig_destroy__ = _agg.delete_rendering_buffer
 __del__ = lambda self : None;
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rendering_buffer(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -719,7 +719,7 @@
 __swig_setmethods__["c"] = _agg.pixel64_type_c_set
 __swig_getmethods__["c"] = _agg.pixel64_type_c_get
 if _newclass:c = _swig_property(_agg.pixel64_type_c_get, _agg.pixel64_type_c_set)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_pixel64_type(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -737,7 +737,7 @@
 base_shift = _agg.pixel_format_rgba_base_shift
 base_size = _agg.pixel_format_rgba_base_size
 base_mask = _agg.pixel_format_rgba_base_mask
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_pixel_format_rgba(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -772,7 +772,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, renderer_base_rgba, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_renderer_base_rgba(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -829,7 +829,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_curve_path, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_curve_path(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -848,7 +848,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_curve_trans, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_curve_trans(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -867,7 +867,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_transform_path, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_transform_path(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -886,7 +886,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_transform_curve, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_transform_curve(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -905,7 +905,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, vcgen_stroke, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_vcgen_stroke(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -938,7 +938,7 @@
 def prepare_src(*args): return _agg.null_markers_prepare_src(*args)
 def rewind(*args): return _agg.null_markers_rewind(*args)
 def vertex(*args): return _agg.null_markers_vertex(*args)
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_null_markers(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -953,7 +953,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_path, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_adaptor_vcgen_path(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -973,7 +973,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_transpath, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_adaptor_vcgen_transpath(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -993,7 +993,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_curve, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_adaptor_vcgen_curve(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1013,7 +1013,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_transcurve, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_adaptor_vcgen_transcurve(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1033,7 +1033,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_adaptor_vcgen_curvetrans, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_adaptor_vcgen_curvetrans(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1055,7 +1055,7 @@
 for _s in [conv_adaptor_vcgen_path]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_path, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_stroke_path(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1081,7 +1081,7 @@
 for _s in [conv_adaptor_vcgen_transpath]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_transpath, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_stroke_transpath(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1107,7 +1107,7 @@
 for _s in [conv_adaptor_vcgen_curve]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
 __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_curve, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_stroke_curve(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1131,7 +1131,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_transcurve, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_stroke_transcurve(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1155,7 +1155,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, conv_stroke_curvetrans, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_conv_stroke_curvetrans(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1179,7 +1179,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, rasterizer_scanline_aa, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_rasterizer_scanline_aa(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1214,7 +1214,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, renderer_scanline_aa_solid_rgba, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_renderer_scanline_aa_solid_rgba(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1234,7 +1234,7 @@
 __swig_getmethods__ = {}
 __getattr__ = lambda self, name: _swig_getattr(self, renderer_scanline_bin_solid_rgba, name)
 __repr__ = _swig_repr
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_renderer_scanline_bin_solid_rgba(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1256,7 +1256,7 @@
 __repr__ = _swig_repr
 __swig_destroy__ = _agg.delete_scanline_p8
 __del__ = lambda self : None;
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_scanline_p8(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1280,7 +1280,7 @@
 __repr__ = _swig_repr
 __swig_destroy__ = _agg.delete_scanline_bin
 __del__ = lambda self : None;
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_scanline_bin(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1303,7 +1303,7 @@
 __repr__ = _swig_repr
 __swig_destroy__ = _agg.delete_scanline32_bin
 __del__ = lambda self : None;
- def __init__(self, *args): 
+ def __init__(self, *args):
 this = _agg.new_scanline32_bin(*args)
 try: self.this.append(this)
 except: self.this = this
@@ -1320,5 +1320,3 @@
 
 render_scanlines_rgba = _agg.render_scanlines_rgba
 render_scanlines_bin_rgba = _agg.render_scanlines_bin_rgba
-
-
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/artist.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -299,7 +299,7 @@
 For efficiency, if the path happens to be an axis-aligned
 rectangle, this method will set the clipping box to the
 corresponding rectangle and set the clipping path to None.
- 
+
 ACCEPTS: a Path instance and a Transform instance, a Patch
 instance, or None
 """
@@ -316,14 +316,14 @@
 path.get_path(),
 path.get_transform())
 success = True
- 
+
 if path is None:
 self._clippath = None
 success = True
 elif isinstance(path, Path):
 self._clippath = TransformedPath(path, transform)
 success = True
- 
+
 if not success:
 print type(path), type(transform)
 raise TypeError("Invalid arguments to set_clip_path")
@@ -366,7 +366,7 @@
 if self._clippath is not None:
 return self._clippath.get_transformed_path_and_affine()
 return None, None
- 
+
 def set_clip_on(self, b):
 """
 Set whether artist uses clipping
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -491,10 +491,10 @@
 
 self._sharex = sharex
 self._sharey = sharey
-	if sharex is not None:
-	 self._shared_x_axes.join(self, sharex)
+ if sharex is not None:
+ self._shared_x_axes.join(self, sharex)
 if sharey is not None:
-	 self._shared_y_axes.join(self, sharey)
+ self._shared_y_axes.join(self, sharey)
 
 self.set_label(label)
 self.set_figure(fig)
@@ -550,7 +550,7 @@
 
 self.bbox = mtransforms.TransformedBbox(self._position, fig.transFigure)
 #these will be updated later as data is added
-	self.dataLim = mtransforms.Bbox.unit()
+ self.dataLim = mtransforms.Bbox.unit()
 self.viewLim = mtransforms.Bbox.unit()
 self.transScale = mtransforms.TransformWrapper(mtransforms.IdentityTransform())
 
@@ -718,7 +718,7 @@
 if not isinstance(pos, mtransforms.BboxBase):
 pos = mtransforms.Bbox.from_bounds(*pos)
 if which in ('both', 'active'):
-	 self._position.set(pos)
+ self._position.set(pos)
 if which in ('both', 'original'):
 self._originalPosition.set(pos)
 
@@ -748,7 +748,7 @@
 self.xaxis.cla()
 self.yaxis.cla()
 
-	self.ignore_existing_data_limits = True
+ self.ignore_existing_data_limits = True
 self.callbacks = cbook.CallbackRegistry(('xlim_changed', 'ylim_changed'))
 
 if self._sharex is not None:
@@ -1329,7 +1329,7 @@
 #### Drawing
 def draw(self, renderer=None, inframe=False):
 "Draw everything (plot lines, axes, labels)"
-	if renderer is None:
+ if renderer is None:
 renderer = self._cachedRenderer
 
 if renderer is None:
@@ -1390,8 +1390,8 @@
 if self.axison and self._frameon:
 artists.append(self.axesFrame)
 
-	dsu = [ (a.zorder, i, a) for i, a in enumerate(artists)
-		if not a.get_animated() ]
+ dsu = [ (a.zorder, i, a) for i, a in enumerate(artists)
+ if not a.get_animated() ]
 dsu.sort()
 
 for zorder, i, a in dsu:
@@ -1568,9 +1568,9 @@
 "Returns the x-axis numerical bounds in the form of lowerBound < upperBound"
 left, right = self.get_xlim()
 if left < right:
- return left, right
+ return left, right
 else:
- return right, left
+ return right, left
 
 def set_xbound(self, lower=None, upper=None):
 """Set the lower and upper numerical bounds of the x-axis.
@@ -1643,11 +1643,11 @@
 self.viewLim.intervalx = (xmin, xmax)
 
 if emit:
-	 self.callbacks.process('xlim_changed', self)
-	 # Call all of the other x-axes that are shared with this one
-	 for other in self._shared_x_axes.get_siblings(self):
-		if other is not self:
-		 other.set_xlim(self.viewLim.intervalx, emit=False)
+ self.callbacks.process('xlim_changed', self)
+ # Call all of the other x-axes that are shared with this one
+ for other in self._shared_x_axes.get_siblings(self):
+ if other is not self:
+ other.set_xlim(self.viewLim.intervalx, emit=False)
 if other.figure != self.figure and other.figure.canvas is not None:
 other.figure.canvas.draw_idle()
 
@@ -1656,7 +1656,7 @@
 def get_xscale(self):
 'return the xaxis scale string: %s' % (
 ", ".join(mscale.get_scale_names()))
-	return self.xaxis.get_scale()
+ return self.xaxis.get_scale()
 
 def set_xscale(self, value, **kwargs):
 """
@@ -1727,9 +1727,9 @@
 "Returns the y-axis numerical bounds in the form of lowerBound < upperBound"
 left, right = self.get_ylim()
 if left < right:
- return left, right
+ return left, right
 else:
- return right, left
+ return right, left
 
 def set_ybound(self, lower=None, upper=None):
 """Set the lower and upper numerical bounds of the y-axis.
@@ -1799,11 +1799,11 @@
 self.viewLim.intervaly = (ymin, ymax)
 
 if emit:
-	 self.callbacks.process('ylim_changed', self)
-	 # Call all of the other y-axes that are shared with this one
-	 for other in self._shared_y_axes.get_siblings(self):
-		if other is not self:
-		 other.set_ylim(self.viewLim.intervaly, emit=False)
+ self.callbacks.process('ylim_changed', self)
+ # Call all of the other y-axes that are shared with this one
+ for other in self._shared_y_axes.get_siblings(self):
+ if other is not self:
+ other.set_ylim(self.viewLim.intervaly, emit=False)
 if other.figure != self.figure and other.figure.canvas is not None:
 other.figure.canvas.draw_idle()
 return ymin, ymax
@@ -5709,5 +5709,3 @@
 # warning, probably breaks inverted axis
 self.set_xlim((0.1*minx, maxx))
 """
-
-
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/axis.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -1122,7 +1122,7 @@
 horizontalalignment='center',
 )
 label.set_transform( blended_transform_factory(
-		self.axes.transAxes, IdentityTransform() ))
+ self.axes.transAxes, IdentityTransform() ))
 
 self._set_artist_props(label)
 self.label_position='bottom'
@@ -1137,7 +1137,7 @@
 horizontalalignment='right',
 )
 offsetText.set_transform( blended_transform_factory(
-		self.axes.transAxes, IdentityTransform() ))
+ self.axes.transAxes, IdentityTransform() ))
 self._set_artist_props(offsetText)
 self.offset_text_position='bottom'
 return offsetText
@@ -1356,7 +1356,7 @@
 rotation='vertical',
 )
 label.set_transform( blended_transform_factory(
-		IdentityTransform(), self.axes.transAxes) )
+ IdentityTransform(), self.axes.transAxes) )
 
 self._set_artist_props(label)
 self.label_position='left'
@@ -1371,7 +1371,7 @@
 horizontalalignment = 'left',
 )
 offsetText.set_transform(blended_transform_factory(
-		self.axes.transAxes, IdentityTransform()) )
+ self.axes.transAxes, IdentityTransform()) )
 self._set_artist_props(offsetText)
 self.offset_text_position='left'
 return offsetText
@@ -1557,5 +1557,3 @@
 else:
 Vmin, Vmax = self.get_data_interval()
 self.axes.dataLim.intervaly = min(vmin, Vmin), max(vmax, Vmax)
-
-
Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backend_bases.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -48,9 +48,9 @@
 pass
 
 def draw_path(self, gc, path, transform, rgbFace=None):
-	"""
+ """
 Draws a Path instance using the given affine transform.
-	"""
+ """
 raise NotImplementedError
 
 def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None):
@@ -642,7 +642,7 @@
 self.inaxes = axes_list[0]
 
 try:
-	 xdata, ydata = self.inaxes.transData.inverted().transform_point((x, y))
+ xdata, ydata = self.inaxes.transData.inverted().transform_point((x, y))
 except ValueError:
 self.xdata = None
 self.ydata = None
@@ -1466,7 +1466,7 @@
 lims.append( (xmin, xmax, ymin, ymax) )
 # Store both the original and modified positions
 pos.append( (
-		 a.get_position(True).frozen(),
+ a.get_position(True).frozen(),
 a.get_position().frozen() ) )
 self._views.push(lims)
 self._positions.push(pos)
@@ -1515,7 +1515,7 @@
 x0, y0, x1, y1 = lim.extents
 
 # zoom to rect
-	 inverse = a.transData.inverted()
+ inverse = a.transData.inverted()
 lastx, lasty = inverse.transform_point( (lastx, lasty) )
 x, y = inverse.transform_point( (x, y) )
 Xmin,Xmax=a.get_xlim()
@@ -1661,5 +1661,3 @@
 def set_history_buttons(self):
 'enable or disable back/forward button'
 pass
-
-
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/cbook.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -182,25 +182,25 @@
 return s
 
 class Bunch:
- """
- Often we want to just collect a bunch of stuff together, naming each
- item of the bunch; a dictionary's OK for that, but a small do- nothing
- class is even handier, and prettier to use. Whenever you want to
- group a few variables:
+ """
+ Often we want to just collect a bunch of stuff together, naming each
+ item of the bunch; a dictionary's OK for that, but a small do- nothing
+ class is even handier, and prettier to use. Whenever you want to
+ group a few variables:
 
- >>> point = Bunch(datum=2, squared=4, coord=12)
- >>> point.datum
+ >>> point = Bunch(datum=2, squared=4, coord=12)
+ >>> point.datum
 
- By: Alex Martelli
- From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308
- """
- def __init__(self, **kwds):
- self.__dict__.update(kwds)
+ By: Alex Martelli
+ From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308
+ """
+ def __init__(self, **kwds):
+ self.__dict__.update(kwds)
 
 
 def unique(x):
- 'Return a list of unique elements of x'
- return dict([ (val, 1) for val in x]).keys()
+ 'Return a list of unique elements of x'
+ return dict([ (val, 1) for val in x]).keys()
 
 def iterable(obj):
 try: len(obj)
@@ -266,55 +266,55 @@
 if scalarp(item): yield item
 else:
 for subitem in flatten(item, scalarp):
- yield subitem
+ yield subitem
 
 
 
 class Sorter:
- """
+ """
 
- Sort by attribute or item
+ Sort by attribute or item
 
- Example usage:
- sort = Sorter()
+ Example usage:
+ sort = Sorter()
 
- list = [(1, 2), (4, 8), (0, 3)]
- dict = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0},
- {'a': 9, 'b': 9}]
+ list = [(1, 2), (4, 8), (0, 3)]
+ dict = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0},
+ {'a': 9, 'b': 9}]
 
 
- sort(list) # default sort
- sort(list, 1) # sort by index 1
- sort(dict, 'a') # sort a list of dicts by key 'a'
+ sort(list) # default sort
+ sort(list, 1) # sort by index 1
+ sort(dict, 'a') # sort a list of dicts by key 'a'
 
- """
+ """
 
- def _helper(self, data, aux, inplace):
- aux.sort()
- result = [data[i] for junk, i in aux]
- if inplace: data[:] = result
- return result
+ def _helper(self, data, aux, inplace):
+ aux.sort()
+ result = [data[i] for junk, i in aux]
+ if inplace: data[:] = result
+ return result
 
- def byItem(self, data, itemindex=None, inplace=1):
- if itemindex is None:
- if inplace:
- data.sort()
- result = data
- else:
- result = data[:]
- result.sort()
- return result
- else:
- aux = [(data[i][itemindex], i) for i in range(len(data))]
- return self._helper(data, aux, inplace)
+ def byItem(self, data, itemindex=None, inplace=1):
+ if itemindex is None:
+ if inplace:
+ data.sort()
+ result = data
+ else:
+ result = data[:]
+ result.sort()
+ return result
+ else:
+ aux = [(data[i][itemindex], i) for i in range(len(data))]
+ return self._helper(data, aux, inplace)
 
- def byAttribute(self, data, attributename, inplace=1):
- aux = [(getattr(data[i],attributename),i) for i in range(len(data))]
- return self._helper(data, aux, inplace)
+ def byAttribute(self, data, attributename, inplace=1):
+ aux = [(getattr(data[i],attributename),i) for i in range(len(data))]
+ return self._helper(data, aux, inplace)
 
- # a couple of handy synonyms
- sort = byItem
- __call__ = byItem
+ # a couple of handy synonyms
+ sort = byItem
+ __call__ = byItem
 
 
 
@@ -398,11 +398,11 @@
 
 
 def mkdirs(newdir, mode=0777):
- try: os.makedirs(newdir, mode)
- except OSError, err:
- # Reraise the error unless it's about an already existing directory
- if err.errno != errno.EEXIST or not os.path.isdir(newdir):
- raise
+ try: os.makedirs(newdir, mode)
+ except OSError, err:
+ # Reraise the error unless it's about an already existing directory
+ if err.errno != errno.EEXIST or not os.path.isdir(newdir):
+ raise
 
 
 class GetRealpathAndStat:
@@ -456,7 +456,7 @@
 return self.data
 
 def __get_item__(self, i):
- return self.data[i % len(self.data)]
+ return self.data[i % len(self.data)]
 
 
 # use enumerate builtin if available, else use python version
@@ -501,16 +501,16 @@
 
 
 def get_split_ind(seq, N):
- """seq is a list of words. Return the index into seq such that
- len(' '.join(seq[:ind])<=N
- """
+ """seq is a list of words. Return the index into seq such that
+ len(' '.join(seq[:ind])<=N
+ """
 
- sLen = 0
- # todo: use Alex's xrange pattern from the cbook for efficiency
- for (word, ind) in zip(seq, range(len(seq))):
- sLen += len(word) + 1 # +1 to account for the len(' ')
- if sLen>=N: return ind
- return len(seq)
+ sLen = 0
+ # todo: use Alex's xrange pattern from the cbook for efficiency
+ for (word, ind) in zip(seq, range(len(seq))):
+ sLen += len(word) + 1 # +1 to account for the len(' ')
+ if sLen>=N: return ind
+ return len(seq)
 
 
 def wrap(prefix, text, cols):
@@ -630,20 +630,20 @@
 
 
 def pieces(seq, num=2):
- "Break up the seq into num tuples"
- start = 0
- while 1:
- item = seq[start:start+num]
- if not len(item): break
- yield item
- start += num
+ "Break up the seq into num tuples"
+ start = 0
+ while 1:
+ item = seq[start:start+num]
+ if not len(item): break
+ yield item
+ start += num
 
 def exception_to_str(s = None):
 
- sh = StringIO.StringIO()
- if s is not None: print >>sh, s
- traceback.print_exc(file=sh)
- return sh.getvalue()
+ sh = StringIO.StringIO()
+ if s is not None: print >>sh, s
+ traceback.print_exc(file=sh)
+ return sh.getvalue()
 
 
 def allequal(seq):
@@ -995,59 +995,59 @@
 False
 """
 def __init__(self, init=[]):
-	mapping = self._mapping = {}
-	for x in init:
-	 mapping[x] = [x]
+ mapping = self._mapping = {}
+ for x in init:
+ mapping[x] = [x]
 
 def __contains__(self, item):
 return item in self._mapping
 
 def join(self, a, *args):
-	"""
-	Join given arguments into the same set.
-	Accepts one or more arguments.
-	"""
-	mapping = self._mapping
-	set_a = mapping.setdefault(a, [a])
+ """
+ Join given arguments into the same set.
+ Accepts one or more arguments.
+ """
+ mapping = self._mapping
+ set_a = mapping.setdefault(a, [a])
 
-	for arg in args:
-	 set_b = mapping.get(arg)
-	 if set_b is None:
-		set_a.append(arg)
-		mapping[arg] = set_a
-	 elif set_b is not set_a:
-		if len(set_b) > len(set_a):
-		 set_a, set_b = set_b, set_a
-		set_a.extend(set_b)
-		for elem in set_b:
-		 mapping[elem] = set_a
+ for arg in args:
+ set_b = mapping.get(arg)
+ if set_b is None:
+ set_a.append(arg)
+ mapping[arg] = set_a
+ elif set_b is not set_a:
+ if len(set_b) > len(set_a):
+ set_a, set_b = set_b, set_a
+ set_a.extend(set_b)
+ for elem in set_b:
+ mapping[elem] = set_a
 
 def joined(self, a, b):
-	"""
-	Returns True if a and b are members of the same set.
-	"""
-	mapping = self._mapping
-	try:
-	 return mapping[a] is mapping[b]
-	except KeyError:
-	 return False
+ """
+ Returns True if a and b are members of the same set.
+ """
+ mapping = self._mapping
+ try:
+ return mapping[a] is mapping[b]
+ except KeyError:
+ return False
 
 def __iter__(self):
-	"""
-	Returns an iterator yielding each of the disjoint sets as a list.
-	"""
-	seen = set()
-	for elem, group in self._mapping.iteritems():
-	 if elem not in seen:
-		yield group
-		seen.update(group)
+ """
+ Returns an iterator yielding each of the disjoint sets as a list.
+ """
+ seen = set()
+ for elem, group in self._mapping.iteritems():
+ if elem not in seen:
+ yield group
+ seen.update(group)
 
 def get_siblings(self, a):
-	"""
-	Returns all of the items joined with the given item, including
-	itself.
-	"""
-	return self._mapping.get(a, [a])
+ """
+ Returns all of the items joined with the given item, including
+ itself.
+ """
+ return self._mapping.get(a, [a])
 
 
 def simple_linear_interpolation(a, steps):
Modified: trunk/matplotlib/lib/matplotlib/cm.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cm.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/cm.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -194,4 +194,3 @@
 observer.notify(self)
 for key in self.update_dict:
 self.update_dict[key] = True
-
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/collections.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -709,4 +709,3 @@
 'StarPolygonCollection'):
 artist.kwdocd[k] = patchstr
 artist.kwdocd['LineCollection'] = artist.kwdoc(LineCollection)
-
Modified: trunk/matplotlib/lib/matplotlib/colorbar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colorbar.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/colorbar.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -670,4 +670,3 @@
 self.set_aspect(aspect, anchor=anchor, adjustable='box')
 
 '''
-
Modified: trunk/matplotlib/lib/matplotlib/colors.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/colors.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/colors.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -699,4 +699,3 @@
 # compatibility with earlier class names that violated convention:
 normalize = Normalize
 no_norm = NoNorm
-
Modified: trunk/matplotlib/lib/matplotlib/contour.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/contour.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/contour.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -365,7 +365,7 @@
 additions.append(path.Path(new[1]))
 paths.extend(additions)
 
- 
+
 class ContourSet(cm.ScalarMappable, ContourLabeler):
 """
 Create and store a set of contour lines or filled regions.
@@ -396,7 +396,7 @@
 self.filled = kwargs.get('filled', False)
 self.linewidths = kwargs.get('linewidths', None)
 self.linestyles = kwargs.get('linestyles', 'solid')
- 
+
 self.alpha = kwargs.get('alpha', 1.0)
 self.origin = kwargs.get('origin', None)
 self.extent = kwargs.get('extent', None)
@@ -705,7 +705,7 @@
 linewidths = [linewidths] * Nlev
 tlinewidths = [(w,) for w in linewidths]
 return tlinewidths
- 
+
 def _process_linestyles(self):
 linestyles = self.linestyles
 Nlev = len(self.levels)
@@ -839,5 +839,3 @@
 removed. Chunking introduces artifacts at the chunk
 boundaries unless antialiased = False
 """
-
-
Modified: trunk/matplotlib/lib/matplotlib/dates.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/dates.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/dates.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -1066,6 +1066,3 @@
 #for t in ticks: print formatter(t)
 
 for t in dates: print formatter(t)
-
-
-
Modified: trunk/matplotlib/lib/matplotlib/dviread.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/dviread.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/dviread.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -99,13 +99,13 @@
 descent=maxy-maxy_pure)
 
 d = self.dpi / (72.27 * 2**16) # from TeX's "scaled points" to dpi units
- text = [ ((x-minx)*d, (maxy-y)*d, f, g, w*d) 
+ text = [ ((x-minx)*d, (maxy-y)*d, f, g, w*d)
 for (x,y,f,g,w) in self.text ]
 boxes = [ ((x-minx)*d, (maxy-y)*d, h*d, w*d) for (x,y,h,w) in self.boxes ]
 
- return mpl_cbook.Bunch(text=text, boxes=boxes, 
- width=(maxx-minx)*d, 
- height=(maxy_pure-miny)*d, 
+ return mpl_cbook.Bunch(text=text, boxes=boxes,
+ width=(maxx-minx)*d,
+ height=(maxy_pure-miny)*d,
 descent=(maxy-maxy_pure)*d)
 
 def _read(self):
@@ -118,8 +118,8 @@
 self._dispatch(byte)
 # if self.state == _dvistate.inpage:
 # matplotlib.verbose.report(
-# 'Dvi._read: after %d at %f,%f' % 
-# (byte, self.h, self.v), 
+# 'Dvi._read: after %d at %f,%f' %
+# (byte, self.h, self.v),
 # 'debug-annoying')
 if byte == 140: # end of page
 return True
@@ -248,10 +248,10 @@
 raise ValueError, "misplaced put_char in dvi file"
 font = self.fonts[self.f]
 if font._vf is None:
- self.text.append((self.h, self.v, font, char, 
+ self.text.append((self.h, self.v, font, char,
 font._width_of(char)))
 # matplotlib.verbose.report(
-# 'Dvi._put_char: %d,%d %d' %(self.h, self.v, char), 
+# 'Dvi._put_char: %d,%d %d' %(self.h, self.v, char),
 # 'debug-annoying')
 else:
 scale = font._scale
@@ -350,7 +350,7 @@
 def _xxx(self, special):
 matplotlib.verbose.report(
 'Dvi._xxx: encountered special: %s'
- % ''.join([(32 <= ord(ch) < 127) and ch 
+ % ''.join([(32 <= ord(ch) < 127) and ch
 or '<%02x>' % ord(ch)
 for ch in special]),
 'debug')
@@ -420,7 +420,7 @@
 class Vf(Dvi):
 """
 A virtual font (*.vf file) containing subroutines for dvi files.
- 
+
 Usage:
 vf = Vf(filename)
 glyph = vf[code]
@@ -528,7 +528,7 @@
 Attributes:
 checksum: for verifying against dvi file
 design_size: design size of the font (in what units?)
- width[i]: width of character #i, needs to be scaled 
+ width[i]: width of character #i, needs to be scaled
 by the factor specified in the dvi file
 (this is a dict because indexing may not start from 0)
 height[i], depth[i]: height and depth of character #i
@@ -559,7 +559,7 @@
 
 self.width, self.height, self.depth = {}, {}, {}
 widths, heights, depths = \
- [ struct.unpack('!%dI' % (len(x)/4), x) 
+ [ struct.unpack('!%dI' % (len(x)/4), x)
 for x in (widths, heights, depths) ]
 for i in range(ec-bc):
 self.width[bc+i] = _fix2comp(widths[ord(char_info[4*i])])
@@ -590,7 +590,7 @@
 But the user may have configured these files differently.
 """
 __slots__ = ('_font',)
- 
+
 def __init__(self, filename):
 self._font = {}
 file = open(filename, 'rt')
@@ -612,7 +612,7 @@
 """Parse each line into words."""
 for line in file:
 line = line.strip()
- if line == '' or line.startswith('%'): 
+ if line == '' or line.startswith('%'):
 continue
 words, pos = [], 0
 while pos < len(line):
@@ -660,7 +660,7 @@
 assert filename is None
 filename = word
 self._font[texname] = mpl_cbook.Bunch(
- texname=texname, psname=psname, effects=effects, 
+ texname=texname, psname=psname, effects=effects,
 encoding=encoding, filename=filename)
 
 class Encoding(object):
@@ -670,7 +670,7 @@
 PostScript.
 
 Usage (subject to change):
- for name in Encoding(filename): 
+ for name in Encoding(filename):
 whatever(name)
 """
 __slots__ = ('encoding',)
@@ -698,7 +698,7 @@
 
 if state == 0:
 # Expecting something like /FooEncoding [
- if '[' in line: 
+ if '[' in line:
 state = 1
 line = line[line.index('[')+1:].strip()
 
@@ -766,10 +766,10 @@
 cache[texname] = result
 return result
 
-def _tfmfile(texname): 
+def _tfmfile(texname):
 return _fontfile(texname, Tfm, '.tfm', _tfmcache)
 
-def _vffile(texname): 
+def _vffile(texname):
 return _fontfile(texname, Vf, '.vf', _vfcache)
 
 
@@ -792,5 +792,3 @@
 print x,y,c, 32 <= c < 128 and chr(c) or '.', w
 for x,y,w,h in page.boxes:
 print x,y,'BOX',w,h
-
-
Modified: trunk/matplotlib/lib/matplotlib/figure.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/figure.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/figure.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -122,10 +122,10 @@
 if facecolor is None: facecolor = rcParams['figure.facecolor']
 if edgecolor is None: edgecolor = rcParams['figure.edgecolor']
 
-	self._dpi_scale_trans = Affine2D()
+ self._dpi_scale_trans = Affine2D()
 self.dpi = dpi
-	self.bbox_inches = Bbox.from_bounds(0, 0, *figsize)
-	self.bbox = TransformedBbox(self.bbox_inches, self._dpi_scale_trans)
+ self.bbox_inches = Bbox.from_bounds(0, 0, *figsize)
+ self.bbox = TransformedBbox(self.bbox_inches, self._dpi_scale_trans)
 
 self.frameon = frameon
 
@@ -154,10 +154,10 @@
 self._autoLayout = rcParams['figure.autolayout']
 
 def _get_dpi(self):
-	return self._dpi
+ return self._dpi
 def _set_dpi(self, dpi):
-	self._dpi = dpi
-	self._dpi_scale_trans.clear().scale(dpi, dpi)
+ self._dpi = dpi
+ self._dpi_scale_trans.clear().scale(dpi, dpi)
 dpi = property(_get_dpi, _set_dpi)
 
 def enable_auto_layout(self, setting=True):
@@ -334,8 +334,8 @@
 else:
 w,h = args
 
-	dpival = self.dpi
-	self.bbox_inches.p1 = w, h
+ dpival = self.dpi
+ self.bbox_inches.p1 = w, h
 
 if forward:
 dpival = self.dpi
@@ -358,7 +358,7 @@
 
 def get_figwidth(self):
 'Return the figwidth as a float'
-	return self.bbox_inches.width
+ return self.bbox_inches.width
 
 def get_figheight(self):
 'Return the figheight as a float'
@@ -394,7 +394,7 @@
 
 ACCEPTS: float
 """
-	self.dpi = val
+ self.dpi = val
 
 def set_figwidth(self, val):
 """
@@ -402,7 +402,7 @@
 
 ACCEPTS: float
 """
-	self.bbox_inches.x1 = val
+ self.bbox_inches.x1 = val
 
 def set_figheight(self, val):
 """
@@ -410,7 +410,7 @@
 
 ACCEPTS: float
 """
-	self.bbox_inches.y1 = val
+ self.bbox_inches.y1 = val
 
 def set_frameon(self, b):
 """
Modified: trunk/matplotlib/lib/matplotlib/finance.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/finance.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/finance.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -692,6 +692,3 @@
 # add these last
 ax.add_collection(barCollection)
 return barCollection
-
-
-
Modified: trunk/matplotlib/lib/matplotlib/font_manager.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/font_manager.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/font_manager.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -1139,4 +1139,3 @@
 _rebuild()
 font = fontManager.findfont(prop, **kw)
 return font
-
Modified: trunk/matplotlib/lib/matplotlib/image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/image.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/image.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -357,7 +357,7 @@
 if len(A.shape) == 3 and A.shape[2] not in [1, 3, 4]:
 raise TypeError("3D arrays must have three (RGB) or four (RGBA) color components")
 if len(A.shape) == 3 and A.shape[2] == 1:
- A.shape = A.shape[0:2]
+ A.shape = A.shape[0:2]
 if len(A.shape) == 2:
 if A.dtype != npy.uint8:
 A = (self.cmap(self.norm(A))*255).astype(npy.uint8)
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年01月23日 22:35:10 UTC (rev 4893)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年01月24日 18:15:56 UTC (rev 4894)
@@ -426,8 +426,8 @@
 self._xy = ma.concatenate((x, y), 1)
 else:
 self._xy = npy.concatenate((x, y), 1)
-	self._x = self._xy[:, 0] # just a view
-	self._y = self._xy[:, 1] # just a view
+ self._x = self._xy[:, 0] # just a view
+ self._y = self._xy[:, 1] # just a view
 
 # Masked arrays are now handled by the Path class itself
 self._path = Path(self._xy)
@@ -693,7 +693,7 @@
 
 def _draw_solid(self, renderer, gc, path, trans):
 gc.set_linestyle('solid')
-	renderer.draw_path(gc, path, trans)
+ renderer.draw_path(gc, path, trans)
 
 
 def _draw_steps_pre(self, renderer, gc, path, trans):
@@ -737,255 +737,255 @@
 if self._dashSeq is not None:
 gc.set_dashes(0, self._dashSeq)
 
-	renderer.draw_path(gc, path, trans)
+ renderer.draw_path(gc, path, trans)
 
 
 def _draw_dash_dot(self, renderer, gc, path, trans):
 gc.set_linestyle('dashdot')
-	renderer.draw_path(gc, path, trans)
+ renderer.draw_path(gc, path, trans)
 
 
 def _draw_dotted(self, renderer, gc, path, trans):
 gc.set_linestyle('dotted')
-	renderer.draw_path(gc, path, trans)
+ renderer.draw_path(gc, path, trans)
 
 
 def _draw_point(self, renderer, gc, path, path_trans):
 w = renderer.points_to_pixels(self._markersize) * \
-	 self._point_size_reduction * 0.5
+ self._point_size_reduction * 0.5
 rgbFace = self._get_rgb_face()
-	transform = Affine2D().scale(w)
-	renderer.draw_markers(
-	 gc, Path.unit_circle(), transform, path, path_trans,
-	 rgbFace)
+ transform = Affine2D().scale(w)
+ renderer.draw_markers(
+ gc, Path.unit_circle(), transform, path, path_trans,
+ rgbFace)
 
 _draw_pixel_transform = Affine2D().translate(-0.5, -0.5)
 def _draw_pixel(self, renderer, gc, path, path_trans):
-	rgbFace = self._get_rgb_face()
-	renderer.draw_markers(gc, Path.unit_rectangle(),
+ rgbFace = self._get_rgb_face()
+ renderer.draw_markers(gc, Path.unit_rectangle(),
 self._draw_pixel_transform,
-			 path, path_trans, rgbFace)
+ path, path_trans, rgbFace)
 
 
 def _draw_circle(self, renderer, gc, path, path_trans):
 w = renderer.points_to_pixels(self._markersize) * 0.5
 rgbFace = self._get_rgb_face()
-	transform = Affine2D().scale(w, w)
-	renderer.draw_markers(
-	 gc, Path.unit_circle(), transform, path, path_trans,
-	 rgbFace)
+ transform = Affine2D().scale(w, w)
+ renderer.draw_markers(
+ gc, Path.unit_circle(), transform, path, path_trans,
+ rgbFace)
 
 
 _triangle_path = Path([[0.0, 1.0], [-1.0, -1.0], [1.0, -1.0], [0.0, 1.0]])
 def _draw_triangle_up(self, renderer, gc, path, path_trans):
 offset = 0.5*renderer.points_to_pixels(self._markersize)
-	transform = Affine2D().scale(offset, offset)
+ transform = Affine2D().scale(offset, offset)
 rgbFace = self._get_rgb_face()
-	renderer.draw_markers(gc, self._triangle_path, transform,
-			 path, path_trans, rgbFace)
+ renderer.draw_markers(gc, self._triangle_path, transform,
+ path, path_trans, rgbFace)
 
 
 def _draw_triangle_down(self, renderer, gc, path, path_trans):
 offset = 0.5*renderer.points_to_pixels(self._markersize)
-	transform = Affine2D().scale(offset, -offset)
+ transform = Affine2D().scale(offset, -offset)
 rgbFace = self._get_rgb_face()
-	renderer.draw_markers(gc, self._triangle_path, transform,
-			 path, path_trans, rgbFace)
+ renderer.draw_markers(gc, self._triangle_path, transform,
+ path, path_trans, rgbFace)
 
 
 def _draw_triangle_left(self, renderer, gc, path, path_trans):
 offset = 0.5*renderer.points_to_pixels(self._markersize)
-	transform = Affine2D().scale(offset, offset).rotate_deg(90)
+ transform = Affine2D().scale(offset, offset).rotate_deg(90)
 rgbFace = self._get_rgb_face()
-	renderer.draw_markers(gc, self._triangle_path, transform,
-			 path, path_trans, rgbFace)
+ renderer.draw_markers(gc, self._triangle_path, transform,
+ path, path_trans, rgbFace)
 
 
 def _draw_triangle_right(self, renderer, gc, path, path_trans):
 offset = 0.5*renderer.points_to_pixels(self._markersize)
-	transform = Affine2D().scale(offset, offset).rotate_deg(-90)
+ transform = Affine2D().scale(offset, offset).rotate_deg(-90)
 rgbFace = self._get_rgb_face()
-	renderer.draw_markers(gc, self._triangle_path, transform,
-			 path, path_trans, rgbFace)
+ renderer.draw_markers(gc, self._triangle_path, transform,
+ path, path_trans, rgbFace)
 
 
 def _draw_square(self, renderer, gc, path, path_trans):
 side = renderer.points_to_pixels(self._markersize)
-	transform = Affine2D().translate(-0.5, -0.5).scale(side)
+ transform = Affine2D().translate(-0.5, -0.5).scale(side)
 rgbFace = self._get_rgb_face()
-	renderer.draw_markers(gc, Path.unit_rectangle(), transform,
-			 path, path_trans, rgbFace)
+ renderer.draw_markers(gc, Path.unit_rectangle(), transform,
+ path, path_trans, rgbFace)
 
 
 def _draw_diamond(self, renderer, gc, path, path_trans):
 side = renderer.points_to_pixels(self._markersize)
-	transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45).scale(side)
+ transform = Affine2D().translate(-0.5, -0.5).rotate_deg(45).scale(side)
 rgbFac...
 
[truncated message content]
From: <ef...@us...> - 2008年01月23日 22:35:53
Revision: 4893
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4893&view=rev
Author: efiring
Date: 2008年01月23日 14:35:10 -0800 (2008年1月23日)
Log Message:
-----------
streamline handling of masked values in Path.__init__
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/path.py
Modified: trunk/matplotlib/lib/matplotlib/path.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/path.py	2008年01月23日 20:33:27 UTC (rev 4892)
+++ trunk/matplotlib/lib/matplotlib/path.py	2008年01月23日 22:35:10 UTC (rev 4893)
@@ -101,7 +101,7 @@
 mask = ma.nomask
 
 if codes is not None:
-	 codes = npy.asarray(codes, self.code_type)
+ codes = npy.asarray(codes, self.code_type)
 assert codes.ndim == 1
 assert len(codes) == len(vertices)
 
@@ -112,17 +112,15 @@
 # MOVETO commands to the codes array accordingly.
 if is_mask:
 if mask is not ma.nomask:
- mask1d = ma.mask_or(mask[:, 0], mask[:, 1])
+ mask1d = npy.logical_or.reduce(mask, axis=1)
+ gmask1d = npy.invert(mask1d)
 if codes is None:
- codes = self.LINETO * npy.ones(
- len(vertices), self.code_type)
+ codes = npy.empty((len(vertices)), self.code_type)
+ codes.fill(self.LINETO)
 codes[0] = self.MOVETO
- vertices = npy.compress(npy.invert(mask1d), vertices, 0)
- vertices = npy.asarray(vertices)
- codes = npy.where(npy.concatenate((mask1d[-1:], mask1d[:-1])),
- self.MOVETO, codes)
- codes = ma.masked_array(codes, mask=mask1d).compressed()
- codes = npy.asarray(codes, self.code_type)
+ vertices = vertices[gmask1d].filled() # ndarray
+ codes[npy.roll(mask1d, 1)] = self.MOVETO
+ codes = codes[gmask1d] # npy.compress is much slower
 else:
 vertices = npy.asarray(vertices, npy.float_)
 
@@ -130,7 +128,7 @@
 assert vertices.shape[1] == 2
 
 self.codes = codes
-	self.vertices = vertices
+ self.vertices = vertices
 
 #@staticmethod
 def make_compound_path(*args):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing results of 120

1 2 3 .. 5 > >> (Page 1 of 5)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /