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



Showing 7 results of 7

Revision: 8435
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8435&view=rev
Author: efiring
Date: 2010年06月14日 05:51:06 +0000 (2010年6月14日)
Log Message:
-----------
cutils.py: fix and clarify absolute imports, so I don't get confused next time
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/config/cutils.py
Modified: trunk/matplotlib/lib/matplotlib/config/cutils.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/cutils.py	2010年06月14日 05:31:20 UTC (rev 8434)
+++ trunk/matplotlib/lib/matplotlib/config/cutils.py	2010年06月14日 05:51:06 UTC (rev 8435)
@@ -8,9 +8,10 @@
 import tempfile
 import warnings
 
-# matplotlib imports
-from matplotlib.verbose import verbose
-from matplotlib.rcsetup import defaultParams
+# imports from local modules that duplicate
+# functionality in matplotlib.__init__
+from matplotlib.config.verbose import verbose
+from matplotlib.config.rcsetup import defaultParams
 
 def is_string_like(obj):
 try: obj + ''
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年06月14日 05:31:26
Revision: 8434
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8434&view=rev
Author: efiring
Date: 2010年06月14日 05:31:20 +0000 (2010年6月14日)
Log Message:
-----------
[2895114] _get_data_path: improve py2exe handling and readability.
Also convert some imports to absolute.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/__init__.py
 trunk/matplotlib/lib/matplotlib/config/cutils.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py	2010年06月14日 02:53:59 UTC (rev 8433)
+++ trunk/matplotlib/lib/matplotlib/__init__.py	2010年06月14日 05:31:20 UTC (rev 8434)
@@ -126,8 +126,10 @@
 
 import sys, os, tempfile
 
-from rcsetup import defaultParams, validate_backend, validate_toolbar
-from rcsetup import validate_cairo_format
+from matplotlib.rcsetup import (defaultParams,
+ validate_backend,
+ validate_toolbar,
+ validate_cairo_format)
 
 major, minor1, minor2, s, tmp = sys.version_info
 _python24 = major>=2 and minor1>=4
@@ -478,28 +480,33 @@
 return path
 
 path = os.sep.join([os.path.dirname(__file__), 'mpl-data'])
- if os.path.isdir(path): return path
+ if os.path.isdir(path):
+ return path
 
 # setuptools' namespace_packages may highjack this init file
 # so need to try something known to be in matplotlib, not basemap
 import matplotlib.afm
 path = os.sep.join([os.path.dirname(matplotlib.afm.__file__), 'mpl-data'])
- if os.path.isdir(path): return path
+ if os.path.isdir(path):
+ return path
 
 # py2exe zips pure python, so still need special check
 if getattr(sys,'frozen',None):
- path = os.path.join(os.path.split(sys.path[0])[0], 'mpl-data')
- if os.path.isdir(path): return path
- else:
- # Try again assuming we need to step up one more directory
- path = os.path.join(os.path.split(os.path.split(sys.path[0])[0])[0],
- 'mpl-data')
- if os.path.isdir(path): return path
- else:
- # Try again assuming sys.path[0] is a dir not a exe
- path = os.path.join(sys.path[0], 'mpl-data')
- if os.path.isdir(path): return path
+ exe_path = os.path.dirname(sys.executable)
+ path = os.path.join(exe_path, 'mpl-data')
+ if os.path.isdir(path):
+ return path
 
+ # Try again assuming we need to step up one more directory
+ path = os.path.join(os.path.split(exe_path)[0], 'mpl-data')
+ if os.path.isdir(path):
+ return path
+
+ # Try again assuming sys.path[0] is a dir not a exe
+ path = os.path.join(sys.path[0], 'mpl-data')
+ if os.path.isdir(path):
+ return path
+
 raise RuntimeError('Could not find the matplotlib data files')
 
 def _get_data_path_cached():
@@ -813,11 +820,12 @@
 if NEWCONFIG:
 #print "importing from reorganized config system!"
 try:
- from config import rcParams, rcdefaults, mplConfig, save_config
+ from matplotlib.config import (rcParams, rcdefaults,
+ mplConfig, save_config)
 verbose.set_level(rcParams['verbose.level'])
 verbose.set_fileo(rcParams['verbose.fileo'])
 except:
- from config import rcParams, rcdefaults
+ from matplotlib.config import rcParams, rcdefaults
 
 _use_error_msg = """ This call to matplotlib.use() has no effect
 because the the backend has already been chosen;
Modified: trunk/matplotlib/lib/matplotlib/config/cutils.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/config/cutils.py	2010年06月14日 02:53:59 UTC (rev 8433)
+++ trunk/matplotlib/lib/matplotlib/config/cutils.py	2010年06月14日 05:31:20 UTC (rev 8434)
@@ -9,8 +9,8 @@
 import warnings
 
 # matplotlib imports
-from verbose import verbose
-from rcsetup import defaultParams
+from matplotlib.verbose import verbose
+from matplotlib.rcsetup import defaultParams
 
 def is_string_like(obj):
 try: obj + ''
@@ -92,6 +92,10 @@
 def _get_data_path():
 'get the path to matplotlib data'
 
+## The following is duplicated in matplotlib.__init__
+def _get_data_path():
+ 'get the path to matplotlib data'
+
 if 'MATPLOTLIBDATA' in os.environ:
 path = os.environ['MATPLOTLIBDATA']
 if not os.path.isdir(path):
@@ -99,30 +103,36 @@
 return path
 
 path = os.sep.join([os.path.dirname(__file__), 'mpl-data'])
- if os.path.isdir(path): return path
+ if os.path.isdir(path):
+ return path
 
 # setuptools' namespace_packages may highjack this init file
 # so need to try something known to be in matplotlib, not basemap
 import matplotlib.afm
 path = os.sep.join([os.path.dirname(matplotlib.afm.__file__), 'mpl-data'])
- if os.path.isdir(path): return path
+ if os.path.isdir(path):
+ return path
 
 # py2exe zips pure python, so still need special check
 if getattr(sys,'frozen',None):
- path = os.path.join(os.path.split(sys.path[0])[0], 'mpl-data')
- if os.path.isdir(path): return path
- else:
- # Try again assuming we need to step up one more directory
- path = os.path.join(os.path.split(os.path.split(sys.path[0])[0])[0],
- 'mpl-data')
- if os.path.isdir(path): return path
- else:
- # Try again assuming sys.path[0] is a dir not a exe
- path = os.path.join(sys.path[0], 'mpl-data')
- if os.path.isdir(path): return path
+ exe_path = os.path.dirname(sys.executable)
+ path = os.path.join(exe_path, 'mpl-data')
+ if os.path.isdir(path):
+ return path
 
+ # Try again assuming we need to step up one more directory
+ path = os.path.join(os.path.split(exe_path)[0], 'mpl-data')
+ if os.path.isdir(path):
+ return path
+
+ # Try again assuming sys.path[0] is a dir not a exe
+ path = os.path.join(sys.path[0], 'mpl-data')
+ if os.path.isdir(path):
+ return path
+
 raise RuntimeError('Could not find the matplotlib data files')
 
+
 def _get_data_path_cached():
 if defaultParams['datapath'][0] is None:
 defaultParams['datapath'][0] = _get_data_path()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年06月14日 02:54:05
Revision: 8433
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8433&view=rev
Author: efiring
Date: 2010年06月14日 02:53:59 +0000 (2010年6月14日)
Log Message:
-----------
cbook: handle empty string returned by locale.getpreferredencoding
Reported by Huziy Oleksandr.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py	2010年06月14日 02:33:37 UTC (rev 8432)
+++ trunk/matplotlib/lib/matplotlib/cbook.py	2010年06月14日 02:53:59 UTC (rev 8433)
@@ -23,11 +23,14 @@
 # On some systems, locale.getpreferredencoding returns None,
 # which can break unicode; and the sage project reports that
 # some systems have incorrect locale specifications, e.g.,
-# an encoding instead of a valid locale name.
+# an encoding instead of a valid locale name. Another
+# pathological case that has been reported is an empty string.
 
 try:
- preferredencoding = locale.getpreferredencoding()
-except (ValueError, ImportError):
+ preferredencoding = locale.getpreferredencoding().strip()
+ if not preferredencoding:
+ preferredencoding = None
+except (ValueError, ImportError, AttributeError):
 preferredencoding = None
 
 def unicode_safe(s):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年06月14日 02:33:43
Revision: 8432
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8432&view=rev
Author: efiring
Date: 2010年06月14日 02:33:37 +0000 (2010年6月14日)
Log Message:
-----------
[3015614] give examples/api/font_file.py a fighting chance on Linux and Win
Modified Paths:
--------------
 trunk/matplotlib/examples/api/font_file.py
Modified: trunk/matplotlib/examples/api/font_file.py
===================================================================
--- trunk/matplotlib/examples/api/font_file.py	2010年06月14日 01:49:12 UTC (rev 8431)
+++ trunk/matplotlib/examples/api/font_file.py	2010年06月14日 02:33:37 UTC (rev 8432)
@@ -1,19 +1,40 @@
-# -*- noplot -*-
-"""
-Although it is usually not a good idea to explicitly point to a single
-ttf file for a font instance, you can do so using the
-font_manager.FontProperties fname argument (for a more flexible
-solution, see the font_fmaily_rc.py and fonts_demo.py examples).
-"""
-import matplotlib.font_manager as fm
-
-import matplotlib.pyplot as plt
-
-fig = plt.figure()
-ax = fig.add_subplot(111)
-ax.plot([1,2,3])
-
-prop = fm.FontProperties(fname='/Library/Fonts/Tahoma.ttf')
-ax.set_title('this is a special font', fontproperties=prop)
-plt.show()
-
+# -*- noplot -*-
+"""
+Although it is usually not a good idea to explicitly point to a single
+ttf file for a font instance, you can do so using the
+font_manager.FontProperties fname argument (for a more flexible
+solution, see the font_fmaily_rc.py and fonts_demo.py examples).
+"""
+import sys
+import os
+import matplotlib.font_manager as fm
+
+import matplotlib.pyplot as plt
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot([1,2,3])
+
+if sys.platform == 'win32':
+ fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf'
+elif sys.platform == 'linux2':
+ fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf',
+ '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf',
+ '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf',
+ ]
+ for fpath in fonts:
+ if os.path.exists(fpath):
+ break
+else:
+ fpath = '/Library/Fonts/Tahoma.ttf'
+
+if os.path.exists(fpath):
+ prop = fm.FontProperties(fname=fpath)
+ fname = os.path.split(fpath)[1]
+ ax.set_title('this is a special font: %s' % fname, fontproperties=prop)
+else:
+ ax.set_title('Demo fails--cannot find a demo font')
+ax.set_xlabel('This is the default font')
+
+plt.show()
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年06月14日 01:49:18
Revision: 8431
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8431&view=rev
Author: efiring
Date: 2010年06月14日 01:49:12 +0000 (2010年6月14日)
Log Message:
-----------
numpy version check: make it more readable
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/__init__.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py	2010年06月14日 01:17:23 UTC (rev 8430)
+++ trunk/matplotlib/lib/matplotlib/__init__.py	2010年06月14日 01:49:12 UTC (rev 8431)
@@ -145,12 +145,10 @@
 raise ImportError('matplotlib requires Python 2.4 or later')
 
 import numpy
-nn = numpy.__version__.split('.')
-if not (int(nn[0]) >= 1 and int(nn[1]) >= 1):
- if not (int(nn[0]) >= 2):
- raise ImportError(
- 'numpy 1.1 or later is required; you have %s' %
- numpy.__version__)
+nmajor, nminor = [int(n) for n in numpy.__version__.split('.')[:2]]
+if not (nmajor > 1 or (nmajor == 1 and nminor >= 1)):
+ raise ImportError(
+ 'numpy 1.1 or later is required; you have %s' % numpy.__version__)
 
 def is_string_like(obj):
 if hasattr(obj, 'shape'): return 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年06月14日 01:17:30
Revision: 8430
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8430&view=rev
Author: efiring
Date: 2010年06月14日 01:17:23 +0000 (2010年6月14日)
Log Message:
-----------
[1474254] getp, setp: minor clarifications
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/artist.py
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py	2010年06月14日 00:54:41 UTC (rev 8429)
+++ trunk/matplotlib/lib/matplotlib/artist.py	2010年06月14日 01:17:23 UTC (rev 8430)
@@ -1082,25 +1082,25 @@
 
 
 
-def getp(o, property=None):
+def getp(obj, property=None):
 """
- Return the value of handle property. property is an optional string
+ Return the value of object's property. *property* is an optional string
 for the property you want to return
 
 Example usage::
 
- getp(o) # get all the object properties
- getp(o, 'linestyle') # get the linestyle property
+ getp(obj) # get all the object properties
+ getp(obj, 'linestyle') # get the linestyle property
 
- *o* is a :class:`Artist` instance, eg
+ *obj* is a :class:`Artist` instance, eg
 :class:`~matplotllib.lines.Line2D` or an instance of a
 :class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`.
 If the *property* is 'somename', this function returns
 
- o.get_somename()
+ obj.get_somename()
 
 :func:`getp` can be used to query all the gettable properties with
- ``getp(o)``. Many properties have aliases for shorter typing, e.g.
+ ``getp(obj)``. Many properties have aliases for shorter typing, e.g.
 'lw' is an alias for 'linewidth'. In the output, aliases and full
 property names will be listed as:
 
@@ -1111,21 +1111,20 @@
 linewidth or lw = 2
 """
 
- insp = ArtistInspector(o)
 
 if property is None:
+ insp = ArtistInspector(obj)
 ret = insp.pprint_getters()
 print '\n'.join(ret)
 return
 
- func = getattr(o, 'get_' + property)
-
+ func = getattr(obj, 'get_' + property)
 return func()
 
 # alias
 get = getp
 
-def setp(h, *args, **kwargs):
+def setp(obj, *args, **kwargs):
 """
 matplotlib supports the use of :func:`setp` ("set property") and
 :func:`getp` to set and get object properties, as well as to do
@@ -1160,7 +1159,7 @@
 >>> lines = plot(x, y1, x, y2)
 >>> setp(lines, linewidth=2, color='r')
 
- :func:`setp` works with the matlab(TM) style string/value pairs or
+ :func:`setp` works with the matlab style string/value pairs or
 with python kwargs. For example, the following are equivalent::
 
 >>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
@@ -1168,7 +1167,7 @@
 >>> setp(lines, linewidth=2, color='r') # python style
 """
 
- insp = ArtistInspector(h)
+ insp = ArtistInspector(obj)
 
 if len(kwargs)==0 and len(args)==0:
 print '\n'.join(insp.pprint_setters())
@@ -1178,8 +1177,10 @@
 print insp.pprint_setters(prop=args[0])
 return
 
- if not cbook.iterable(h): h = [h]
- else: h = cbook.flatten(h)
+ if not cbook.iterable(obj):
+ objs = [obj]
+ else:
+ objs = cbook.flatten(obj)
 
 
 if len(args)%2:
@@ -1191,11 +1192,11 @@
 funcvals.extend(kwargs.items())
 
 ret = []
- for o in h:
+ for o in objs:
 for s, val in funcvals:
 s = s.lower()
 funcName = "set_%s"%s
- func = getattr(o,funcName)
+ func = getattr(o, funcName)
 ret.extend( [func(val)] )
 return [x for x in cbook.flatten(ret)]
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2010年06月14日 00:54:48
Revision: 8429
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8429&view=rev
Author: efiring
Date: 2010年06月14日 00:54:41 +0000 (2010年6月14日)
Log Message:
-----------
[1467533] pie shadows are tagged with _nolabel_
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2010年06月13日 23:04:30 UTC (rev 8428)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2010年06月14日 00:54:41 UTC (rev 8429)
@@ -4777,6 +4777,7 @@
 #props={'facecolor':w.get_facecolor()}
 )
 shad.set_zorder(0.9*w.get_zorder())
+ shad.set_label('_nolegend_')
 self.add_patch(shad)
 
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 7 results of 7

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