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

Showing 9 results of 9

Revision: 6155
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6155&view=rev
Author: jswhit
Date: 2008年10月05日 13:38:11 +0000 (2008年10月05日)
Log Message:
-----------
docstring formatting fixes
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年10月05日 13:33:26 UTC (rev 6154)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年10月05日 13:38:11 UTC (rev 6155)
@@ -174,7 +174,7 @@
 (because either they are computed internally, or entire globe is
 always plotted). 
 
- For the cylindrical projections (``cyl``, ``merc``,``mill`` and ``gall``),
+ For the cylindrical projections (``cyl``, ``merc``, ``mill`` and ``gall``),
 the default is to use
 llcrnrlon=-180,llcrnrlat=-90, urcrnrlon=180 and urcrnrlat=90). For all other
 projections except ``ortho`` and ``geos``, either the lat/lon values of the
@@ -798,7 +798,7 @@
 For non-cylindrical projections, the inverse transformation
 always returns longitudes between -180 and 180 degrees. For
 cylindrical projections (self.projection == ``cyl``,
- ``mill``,``gall`` or ``merc``)
+ ``mill``, ``gall`` or ``merc``)
 the inverse transformation will return longitudes between
 self.llcrnrlon and self.llcrnrlat.
 
@@ -2294,7 +2294,7 @@
 lons, lats rank-1 arrays containing longitudes and latitudes
 (in degrees) of input data in increasing order.
 For non-cylindrical projections (those other than
- ``cyl``, ``merc``,``gall`` and ``mill``) lons must 
+ ``cyl``, ``merc``, ``gall`` and ``mill``) lons must 
 fit within range -180 to 180.
 nx, ny The size of the output regular grid in map
 projection coordinates
@@ -2365,7 +2365,7 @@
 lons, lats rank-1 arrays containing longitudes and latitudes
 (in degrees) of input data in increasing order.
 For non-cylindrical projections (those other than
- ``cyl``, ``merc``,``gall`` and ``mill``) lons must 
+ ``cyl``, ``merc``, ``gall`` and ``mill``) lons must 
 fit within range -180 to 180.
 nx, ny The size of the output regular grid in map
 projection coordinates
@@ -2437,7 +2437,7 @@
 lons, lats Arrays containing longitudes and latitudes
 (in degrees) of input data in increasing order.
 For non-cylindrical projections (those other than
- ``cyl``, ``merc``,``gall`` and ``mill``) lons must 
+ ``cyl``, ``merc``, ``gall`` and ``mill``) lons must 
 fit within range -180 to 180.
 ============== ====================================================
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6154
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6154&view=rev
Author: jswhit
Date: 2008年10月05日 13:33:26 +0000 (2008年10月05日)
Log Message:
-----------
docstring updates.
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年10月05日 13:31:43 UTC (rev 6153)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年10月05日 13:33:26 UTC (rev 6154)
@@ -3917,6 +3917,9 @@
 assert_almost_equal(rv[2, :],[1,1,-1,-1], 6)
 
 def test():
+ """
+ Run some tests.
+ """
 import unittest
 suite = unittest.makeSuite(TestRotateVector,'test')
 runner = unittest.TextTestRunner()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6153
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6153&view=rev
Author: jswhit
Date: 2008年10月05日 13:31:43 +0000 (2008年10月05日)
Log Message:
-----------
docstring updates
Modified Paths:
--------------
 trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年10月05日 13:26:07 UTC (rev 6152)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py	2008年10月05日 13:31:43 UTC (rev 6153)
@@ -174,7 +174,7 @@
 (because either they are computed internally, or entire globe is
 always plotted). 
 
- For the cylindrical projections (``cyl``, ``merc`` and ``mill``),
+ For the cylindrical projections (``cyl``, ``merc``,``mill`` and ``gall``),
 the default is to use
 llcrnrlon=-180,llcrnrlat=-90, urcrnrlon=180 and urcrnrlat=90). For all other
 projections except ``ortho`` and ``geos``, either the lat/lon values of the
@@ -350,8 +350,9 @@
 
 For non-cylindrical projections, the inverse transformation
 always returns longitudes between -180 and 180 degrees. For
- cylindrical projections (self.projection == ``cyl``, ``mill`` or ``merc``)
- The inverse transformation will return longitudes between
+ cylindrical projections (self.projection == ``cyl``, ``mill``,
+ ``gall`` or ``merc``)
+ the inverse transformation will return longitudes between
 self.llcrnrlon and self.llcrnrlat.
 
 Input arguments lon, lat can be either scalar floats, sequences
@@ -797,8 +798,8 @@
 For non-cylindrical projections, the inverse transformation
 always returns longitudes between -180 and 180 degrees. For
 cylindrical projections (self.projection == ``cyl``,
- ``mill`` or ``merc``)
- The inverse transformation will return longitudes between
+ ``mill``,``gall`` or ``merc``)
+ the inverse transformation will return longitudes between
 self.llcrnrlon and self.llcrnrlat.
 
 Input arguments lon, lat can be either scalar floats,
@@ -2293,8 +2294,8 @@
 lons, lats rank-1 arrays containing longitudes and latitudes
 (in degrees) of input data in increasing order.
 For non-cylindrical projections (those other than
- ``cyl``, ``merc`` and ``mill``) lons must fit 
- within range -180 to 180.
+ ``cyl``, ``merc``,``gall`` and ``mill``) lons must 
+ fit within range -180 to 180.
 nx, ny The size of the output regular grid in map
 projection coordinates
 ============== ====================================================
@@ -2364,8 +2365,8 @@
 lons, lats rank-1 arrays containing longitudes and latitudes
 (in degrees) of input data in increasing order.
 For non-cylindrical projections (those other than
- ``cyl``, ``merc`` and ``mill``) lons must fit 
- within range -180 to 180.
+ ``cyl``, ``merc``,``gall`` and ``mill``) lons must 
+ fit within range -180 to 180.
 nx, ny The size of the output regular grid in map
 projection coordinates
 ============== ====================================================
@@ -2436,8 +2437,8 @@
 lons, lats Arrays containing longitudes and latitudes
 (in degrees) of input data in increasing order.
 For non-cylindrical projections (those other than
- ``cyl``, ``merc`` and ``mill``) lons must fit 
- within range -180 to 180.
+ ``cyl``, ``merc``,``gall`` and ``mill``) lons must 
+ fit within range -180 to 180.
 ============== ====================================================
 
 Returns ``uout, vout`` (rotated vector field).
@@ -3231,15 +3232,15 @@
 tmp[:,:,k] = self._bm_rgba
 self._bm_rgba = tmp
 if cylproj and not bmproj:
- # stack grids side-by-side (in longitiudinal direction), so
- # any range of longitudes may be plotted on a world map.
+ # stack grids side-by-side (in longitiudinal direction), so
+ # any range of longitudes may be plotted on a world map.
 self._bm_lons = \
 np.concatenate((self._bm_lons,self._bm_lons+360),1)
 self._bm_rgba = \
 np.concatenate((self._bm_rgba,self._bm_rgba),1)
 # convert to normalized floats.
 self._bm_rgba = self._bm_rgba.astype(np.float32)/255.
- if not bmproj:
+ if not bmproj: # interpolation necessary.
 if newfile or not hasattr(self,'_bm_rgba_warped'):
 # transform to nx x ny regularly spaced native
 # projection grid.
@@ -3298,6 +3299,7 @@
 # plot warped rgba image.
 im = self.imshow(self._bm_rgba_warped,ax=ax)
 else:
+ # bmproj True, no interpolation necessary.
 im = self.imshow(self._bm_rgba,ax=ax)
 return im
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年10月05日 13:27:09
Revision: 6152
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6152&view=rev
Author: jswhit
Date: 2008年10月05日 13:26:07 +0000 (2008年10月05日)
Log Message:
-----------
update version number
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/conf.py
Modified: trunk/toolkits/basemap/doc/conf.py
===================================================================
--- trunk/toolkits/basemap/doc/conf.py	2008年10月05日 13:23:42 UTC (rev 6151)
+++ trunk/toolkits/basemap/doc/conf.py	2008年10月05日 13:26:07 UTC (rev 6152)
@@ -46,9 +46,9 @@
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '0.99.1'
+version = '0.99.2'
 # The full version, including alpha/beta/rc tags.
-release = '0.99.1'
+release = '0.99.2'
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <js...@us...> - 2008年10月05日 13:26:24
Revision: 6151
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6151&view=rev
Author: jswhit
Date: 2008年10月05日 13:23:42 +0000 (2008年10月05日)
Log Message:
-----------
update rsync instructions
Modified Paths:
--------------
 trunk/toolkits/basemap/doc/README.txt
Modified: trunk/toolkits/basemap/doc/README.txt
===================================================================
--- trunk/toolkits/basemap/doc/README.txt	2008年10月05日 10:14:42 UTC (rev 6150)
+++ trunk/toolkits/basemap/doc/README.txt	2008年10月05日 13:23:42 UTC (rev 6151)
@@ -15,4 +15,4 @@
 
 * to update on sf site:
 cd build
- rsync -avz html js...@ma...:/home/groups/m/ma/matplotlib/htdocs/basemap/doc/ -essh
+ rsync -avz html jswhit,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/basemap/doc/ -essh
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jo...@us...> - 2008年10月05日 11:28:06
Revision: 6150
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6150&view=rev
Author: jouni
Date: 2008年10月05日 10:14:42 +0000 (2008年10月05日)
Log Message:
-----------
Merged revisions 6149 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint
........
 r6149 | jouni | 2008年10月05日 13:02:16 +0300 (2008年10月05日) | 2 lines
 
 Fix problem with AFM files that don't specify the font's full name or family name
........
Modified Paths:
--------------
 trunk/matplotlib/API_CHANGES
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/afm.py
Property Changed:
----------------
 trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
 - /branches/v0_91_maint:1-6073
 + /branches/v0_91_maint:1-6073,6149
Modified: trunk/matplotlib/API_CHANGES
===================================================================
--- trunk/matplotlib/API_CHANGES	2008年10月05日 10:02:16 UTC (rev 6149)
+++ trunk/matplotlib/API_CHANGES	2008年10月05日 10:14:42 UTC (rev 6150)
@@ -1,6 +1,10 @@
 
 Changes for 0.98.x
 ==================
+ 
+* AFM.get_fullname() and get_familyname() no longer raise an
+ exception if the AFM file does not specify these optional attributes,
+ but returns a guess based on the required FontName attribute.
 
 * Changed precision kwarg in spy; default is 0, and the string value
 'present' is used for sparse arrays only to show filled locations.
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年10月05日 10:02:16 UTC (rev 6149)
+++ trunk/matplotlib/CHANGELOG	2008年10月05日 10:14:42 UTC (rev 6150)
@@ -1,3 +1,6 @@
+2008年10月05日 Fix problem with AFM files that don't specify the font's
+ full name or family name. - JKS
+
 2008年10月04日 Added 'scilimits' kwarg to Axes.ticklabel_format() method,
 for easy access to the set_powerlimits method of the
 major ScalarFormatter. - EF
Modified: trunk/matplotlib/lib/matplotlib/afm.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/afm.py	2008年10月05日 10:02:16 UTC (rev 6149)
+++ trunk/matplotlib/lib/matplotlib/afm.py	2008年10月05日 10:14:42 UTC (rev 6150)
@@ -34,7 +34,7 @@
 John D. Hunter <jd...@gm...>
 """
 
-import sys, os
+import sys, os, re
 from _mathtext_data import uni2type1
 
 #Convert string the a python type
@@ -433,12 +433,22 @@
 
 def get_fullname(self):
 "Return the font full name, eg, 'Times-Roman'"
- return self._header['FullName']
+ name = self._header.get('FullName')
+ if name is None: # use FontName as a substitute
+ name = self._header['FontName']
+ return name
 
 def get_familyname(self):
 "Return the font family name, eg, 'Times'"
- return self._header['FamilyName']
+ name = self._header.get('FamilyName')
+ if name is not None:
+ return name
 
+ # FamilyName not specified so we'll make a guess
+ name = self.get_fullname()
+ extras = r'(?i)([ -](regular|plain|italic|oblique|bold|semibold|light|ultralight|extra|condensed))+$'
+ return re.sub(extras, '', name)
+
 def get_weight(self):
 "Return the font weight, eg, 'Bold' or 'Roman'"
 return self._header['Weight']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jo...@us...> - 2008年10月05日 10:24:45
Revision: 6149
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6149&view=rev
Author: jouni
Date: 2008年10月05日 10:02:16 +0000 (2008年10月05日)
Log Message:
-----------
Fix problem with AFM files that don't specify the font's full name or family name
Modified Paths:
--------------
 branches/v0_91_maint/API_CHANGES
 branches/v0_91_maint/CHANGELOG
 branches/v0_91_maint/lib/matplotlib/afm.py
Modified: branches/v0_91_maint/API_CHANGES
===================================================================
--- branches/v0_91_maint/API_CHANGES	2008年10月05日 04:32:52 UTC (rev 6148)
+++ branches/v0_91_maint/API_CHANGES	2008年10月05日 10:02:16 UTC (rev 6149)
@@ -1,3 +1,8 @@
+ AFM.get_fullname() and get_familyname() no longer raise an 
+ exception if the AFM file does not specify these optional
+ attributes, but returns a guess based on the required FontName
+ attribute.
+
 Deprecated all mlab2 functions in mlab
 
 matplotlib.image.imread now no longer always returns RGBA -- if
Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG	2008年10月05日 04:32:52 UTC (rev 6148)
+++ branches/v0_91_maint/CHANGELOG	2008年10月05日 10:02:16 UTC (rev 6149)
@@ -1,3 +1,6 @@
+2008年10月05日 Fix problem with AFM files that don't specify the font's
+ full name or family name. - JKS
+
 2008年09月11日 Fix use of backticks in PS - MGD
 
 2008年09月07日 Changed full arrows slightly to avoid an xpdf rendering
Modified: branches/v0_91_maint/lib/matplotlib/afm.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/afm.py	2008年10月05日 04:32:52 UTC (rev 6148)
+++ branches/v0_91_maint/lib/matplotlib/afm.py	2008年10月05日 10:02:16 UTC (rev 6149)
@@ -34,7 +34,7 @@
 John D. Hunter <jdh...@ac...>
 """
 
-import sys, os
+import sys, os, re
 from _mathtext_data import uni2type1
 
 #Convert string the a python type
@@ -433,12 +433,22 @@
 
 def get_fullname(self):
 "Return the font full name, eg, Times-Roman"
- return self._header['FullName']
+ name = self._header.get('FullName')
+ if name is None: # use FontName as a substitute
+ name = self._header['FontName']
+ return name
 
 def get_familyname(self):
 "Return the font family name, eg, Times"
- return self._header['FamilyName']
+ name = self._header.get('FamilyName')
+ if name is not None:
+ return name
 
+ # FamilyName not specified so we'll make a guess
+ name = self.get_fullname()
+ extras = r'(?i)([ -](regular|plain|italic|oblique|bold|semibold|light|ultralight|extra|condensed))+$'
+ return re.sub(extras, '', name)
+
 def get_weight(self):
 "Return the font weight, eg, 'Bold' or 'Roman'"
 return self._header['Weight']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年10月05日 04:33:01
Revision: 6148
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6148&view=rev
Author: efiring
Date: 2008年10月05日 04:32:52 +0000 (2008年10月05日)
Log Message:
-----------
Add scilimits kwarg to Axes.ticklabel_format() method
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年10月05日 01:38:31 UTC (rev 6147)
+++ trunk/matplotlib/CHANGELOG	2008年10月05日 04:32:52 UTC (rev 6148)
@@ -1,3 +1,7 @@
+2008年10月04日 Added 'scilimits' kwarg to Axes.ticklabel_format() method,
+ for easy access to the set_powerlimits method of the
+ major ScalarFormatter. - EF
+
 2008年10月04日 Experimental new kwarg borderpad to replace pad in legend,
 based on suggestion by Jae-Joon Lee. - EF
 
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年10月05日 01:38:31 UTC (rev 6147)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年10月05日 04:32:52 UTC (rev 6148)
@@ -1639,26 +1639,34 @@
 
 Optional keyword arguments:
 
- ======= =====================================
- Keyword Description
- ======= =====================================
- *style* [ 'sci' (or 'scientific') | 'plain' ]
- plain turns off scientific notation
- *axis* [ 'x' | 'y' | 'both' ]
- ======= =====================================
+ ============ =====================================
+ Keyword Description
+ ============ =====================================
+ *style* [ 'sci' (or 'scientific') | 'plain' ]
+ plain turns off scientific notation
+ *scilimits* (m, n), pair of integers; if *style*
+ is 'sci', scientific notation will
+ be used for numbers outside the range
+ 10`-m`:sup: to 10`n`:sup:.
+ Use (0,0) to include all numbers.
+ *axis* [ 'x' | 'y' | 'both' ]
+ ============ =====================================
 
 Only the major ticks are affected.
 If the method is called when the
 :class:`~matplotlib.ticker.ScalarFormatter` is not the
 :class:`~matplotlib.ticker.Formatter` being used, an
- :exc:`AttributeError` will be raised with no additional error
- message.
+ :exc:`AttributeError` will be raised.
 
- Additional capabilities and/or friendlier error checking may
- be added.
-
 """
 style = kwargs.pop('style', '').lower()
+ scilimits = kwargs.pop('scilimits', None)
+ if scilimits is not None:
+ try:
+ m, n = scilimits
+ m+n+1 # check that both are numbers
+ except (ValueError, TypeError):
+ raise ValueError("scilimits must be a sequence of 2 integers")
 axis = kwargs.pop('axis', 'both').lower()
 if style[:3] == 'sci':
 sb = True
@@ -1673,11 +1681,20 @@
 sb = None
 else:
 raise ValueError, "%s is not a valid style value"
- if sb is not None:
- if axis == 'both' or axis == 'x':
- self.xaxis.major.formatter.set_scientific(sb)
- if axis == 'both' or axis == 'y':
- self.yaxis.major.formatter.set_scientific(sb)
+ try:
+ if sb is not None:
+ if axis == 'both' or axis == 'x':
+ self.xaxis.major.formatter.set_scientific(sb)
+ if axis == 'both' or axis == 'y':
+ self.yaxis.major.formatter.set_scientific(sb)
+ if scilimits is not None:
+ if axis == 'both' or axis == 'x':
+ self.xaxis.major.formatter.set_powerlimits(scilimits)
+ if axis == 'both' or axis == 'y':
+ self.yaxis.major.formatter.set_powerlimits(scilimits)
+ except AttributeError:
+ raise AttributeError(
+ "This method only works with the ScalarFormatter.")
 
 def set_axis_off(self):
 """turn off the axis"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年10月05日 01:38:42
Revision: 6147
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6147&view=rev
Author: efiring
Date: 2008年10月05日 01:38:31 +0000 (2008年10月05日)
Log Message:
-----------
New legend kwarg: borderpad to replace pad (primary code by Jae-Joon Lee)
Modified Paths:
--------------
 trunk/matplotlib/CHANGELOG
 trunk/matplotlib/lib/matplotlib/legend.py
 trunk/matplotlib/lib/matplotlib/rcsetup.py
 trunk/matplotlib/matplotlibrc.template
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG	2008年10月04日 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/CHANGELOG	2008年10月05日 01:38:31 UTC (rev 6147)
@@ -1,3 +1,6 @@
+2008年10月04日 Experimental new kwarg borderpad to replace pad in legend,
+ based on suggestion by Jae-Joon Lee. - EF
+
 2008年09月27日 Allow spy to ignore zero values in sparse arrays, based
 on patch by Tony Yu. Also fixed plot to handle empty
 data arrays, and fixed handling of markers in figlegend. - EF
Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py	2008年10月04日 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/lib/matplotlib/legend.py	2008年10月05日 01:38:31 UTC (rev 6147)
@@ -85,6 +85,7 @@
 numpoints = None, # the number of points in the legend line
 prop = None,
 pad = None, # the fractional whitespace inside the legend border
+ borderpad = None,
 markerscale = None, # the relative size of legend markers vs. original
 # the following dimensions are in axes coords
 labelsep = None, # the vertical space between the legend entries
@@ -116,12 +117,15 @@
 
 Artist.__init__(self)
 
- proplist=[numpoints, pad, markerscale, labelsep, handlelen, handletextsep, axespad, shadow]
- propnames=['numpoints', 'pad', 'markerscale', 'labelsep', 'handlelen', 'handletextsep', 'axespad', 'shadow']
+ proplist=[numpoints, pad, borderpad, markerscale, labelsep, handlelen, handletextsep, axespad, shadow]
+ propnames=['numpoints', 'pad', 'borderpad', 'markerscale', 'labelsep', 'handlelen', 'handletextsep', 'axespad', 'shadow']
 for name, value in safezip(propnames,proplist):
 if value is None:
 value=rcParams["legend."+name]
 setattr(self,name,value)
+ if pad:
+ warnings.DeprecationWarning("Use 'borderpad' instead of 'pad'.")
+ # 2008年10月04日
 if self.numpoints <= 0:
 raise ValueError("numpoints must be >= 0; it was %d"% numpoints)
 if prop is None:
@@ -532,8 +536,14 @@
 # Set the data for the legend patch
 bbox = self._get_handle_text_bbox(renderer)
 
- bbox = bbox.expanded(1 + self.pad, 1 + self.pad)
+ if self.pad:
+ bbox = bbox.expanded(1 + self.pad, 1 + self.pad)
+ else:
+ bbox = bbox.transformed(self.get_transform())
+ bbox = bbox.padded(self.borderpad*self.fontsize)
+ bbox = bbox.inverse_transformed(self.get_transform())
 l, b, w, h = bbox.bounds
+
 self.legendPatch.set_bounds(l, b, w, h)
 
 ox, oy = 0, 0 # center
Modified: trunk/matplotlib/lib/matplotlib/rcsetup.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/rcsetup.py	2008年10月04日 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/lib/matplotlib/rcsetup.py	2008年10月05日 01:38:31 UTC (rev 6147)
@@ -416,7 +416,8 @@
 'legend.isaxes' : [True,validate_bool], # this option is internally ignored - it never served any useful purpose
 'legend.numpoints' : [2, validate_int], # the number of points in the legend line
 'legend.fontsize' : ['large', validate_fontsize],
- 'legend.pad' : [0.2, validate_float], # the fractional whitespace inside the legend border
+ 'legend.pad' : [0, validate_float], # was 0.2, deprecated; the fractional whitespace inside the legend border
+ 'legend.borderpad' : [0.5, validate_float], # units are fontsize
 'legend.markerscale' : [1.0, validate_float], # the relative size of legend markers vs. original
 
 # the following dimensions are in axes coords
Modified: trunk/matplotlib/matplotlibrc.template
===================================================================
--- trunk/matplotlib/matplotlibrc.template	2008年10月04日 13:09:52 UTC (rev 6146)
+++ trunk/matplotlib/matplotlibrc.template	2008年10月05日 01:38:31 UTC (rev 6147)
@@ -233,7 +233,8 @@
 #legend.isaxes : True
 #legend.numpoints : 2 # the number of points in the legend line
 #legend.fontsize : large
-#legend.pad : 0.2 # the fractional whitespace inside the legend border
+#legend.pad : 0.0 # deprecated; the fractional whitespace inside the legend border
+#legend.borderpad : 0.5 # border whitspace in fontsize units
 #legend.markerscale : 1.0 # the relative size of legend markers vs. original
 # the following dimensions are in axes coords
 #legend.labelsep : 0.010 # the vertical space between the legend entries
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 9 results of 9

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 によって変換されたページ (->オリジナル) /