SF.net SVN: matplotlib: [3630] trunk/matplotlib

2007-07-30 Thread efiring
Revision: 3630
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3630&view=rev
Author:   efiring
Date: 2007-07-30 00:03:47 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Removed last vestiges of old pcolor, scatter, quiver versions.

Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/boilerplate.py
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/pylab.py

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2007-07-30 06:04:41 UTC (rev 3629)
+++ trunk/matplotlib/CHANGELOG  2007-07-30 07:03:47 UTC (rev 3630)
@@ -1,6 +1,7 @@
 2007-07-29 Changed default pcolor shading to flat; added aliases
to make collection kwargs agree with setter names, so
updating works; related minor cleanups.
+   Removed quiver_classic, scatter_classic, pcolor_classic. - EF
 
 2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model.
 

Modified: trunk/matplotlib/boilerplate.py
===
--- trunk/matplotlib/boilerplate.py 2007-07-30 06:04:41 UTC (rev 3629)
+++ trunk/matplotlib/boilerplate.py 2007-07-30 07:03:47 UTC (rev 3630)
@@ -82,7 +82,6 @@
 'stem',
 'vlines',
 'quiver',
-'quiver2',
 'quiverkey',
 'xcorr',
 )

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2007-07-30 06:04:41 UTC (rev 
3629)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2007-07-30 07:03:47 UTC (rev 
3630)
@@ -4051,34 +4051,6 @@
 
 scatter.__doc__ = cbook.dedent(scatter.__doc__) % martist.kwdocd
 
-def scatter_classic(self, x, y, s=None, c='b'):
-"""
-scatter_classic is no longer available; please use scatter.
-To help in porting, for comparison to the scatter docstring,
-here is the scatter_classic docstring:
-
-SCATTER_CLASSIC(x, y, s=None, c='b')
-
-Make a scatter plot of x versus y.  s is a size (in data coords) and
-can be either a scalar or an array of the same length as x or y.  c is
-a color and can be a single color format string or an length(x) array
-of intensities which will be mapped by the colormap jet.
-
-If size is None a default size will be used
-"""
-raise NotImplementedError('scatter_classic has been removed;\n'
-  + 'please use scatter instead')
-
-def pcolor_classic(self, *args):
-"""
-pcolor_classic is no longer available; please use pcolor,
-which is a drop-in replacement.
-"""
-raise NotImplementedError('pcolor_classic has been removed;\n'
-  + 'please use pcolor instead')
-
-
-
 def arrow(self, x, y, dx, dy, **kwargs):
 """
 Draws arrow on specified axis from (x,y) to (x+dx,y+dy).
@@ -4097,164 +4069,14 @@
 return qk
 quiverkey.__doc__ = mquiver.QuiverKey.quiverkey_doc
 
-def quiver2(self, *args, **kw):
+def quiver(self, *args, **kw):
 q = mquiver.Quiver(self, *args, **kw)
 self.add_collection(q)
 self.update_datalim_numerix(q.X, q.Y)
 self.autoscale_view()
 return q
-quiver2.__doc__ = mquiver.Quiver.quiver_doc
-
-def quiver(self, *args, **kw):
-if (len(args) == 3 or len(args) == 5) and not iterable(args[-1]):
-return self.quiver_classic(*args, **kw)
-c = kw.get('color', None)
-if c is not None:
-if not mcolors.is_color_like(c):
-assert npy.shape(npy.asarray(c)) == 
npy.shape(npy.asarray(args[-1]))
-return self.quiver_classic(*args, **kw)
-return self.quiver2(*args, **kw)
 quiver.__doc__ = mquiver.Quiver.quiver_doc
 
-def quiver_classic(self, U, V, *args, **kwargs ):
-"""
-QUIVER( X, Y, U, V )
-QUIVER( U, V )
-QUIVER( X, Y, U, V, S)
-QUIVER( U, V, S )
-QUIVER( ..., color=None, width=1.0, cmap=None, norm=None )
-
-Make a vector plot (U, V) with arrows on a grid (X, Y)
-
-If X and Y are not specified, U and V must be 2D arrays.
-Equally spaced X and Y grids are then generated using the
-meshgrid command.
-
-color can be a color value or an array of colors, so that the
-arrows can be colored according to another dataset.  If cmap
-is specified and color is 'length', the colormap is used to
-give a color according to the vector's length.
-
-If color is a scalar field, the colormap is used to map the
-scalar to a color If a colormap is specified and color is an
-array of color triplets, then the colormap is ignored
-
-width is a scalar that controls the width of the arrows
-
-if S is s

SF.net SVN: matplotlib: [3632] trunk/matplotlib

2007-07-30 Thread dsdale
Revision: 3632
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3632&view=rev
Author:   dsdale
Date: 2007-07-30 10:41:14 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Ability to use new, traited configuration system in mpl

Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/config/__init__.py
trunk/matplotlib/lib/matplotlib/config/cutils.py
trunk/matplotlib/lib/matplotlib/config/mplconfig.py
trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc
trunk/matplotlib/setup.py

Removed Paths:
-
trunk/matplotlib/lib/matplotlib/config/api.py

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2007-07-30 16:41:53 UTC (rev 3631)
+++ trunk/matplotlib/CHANGELOG  2007-07-30 17:41:14 UTC (rev 3632)
@@ -1,3 +1,12 @@
+2007-07-30 Reorganized configuration code to work with traited config
+   objects. The new config system is located in the 
+   matplotlib.config package, but it is disabled by default.
+   To enable it, set NEWCONFIG=True in matplotlib.__init__.py.
+   The new configuration system will still use the old 
+   matplotlibrc files by default. To switch to the experimental,
+   traited configuration, set USE_TRAITED_CONFIG=True in 
+   config.__init__.py.
+
 2007-07-29 Changed default pcolor shading to flat; added aliases
to make collection kwargs agree with setter names, so
updating works; related minor cleanups.

Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===
--- trunk/matplotlib/lib/matplotlib/__init__.py 2007-07-30 16:41:53 UTC (rev 
3631)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2007-07-30 17:41:14 UTC (rev 
3632)
@@ -55,6 +55,7 @@
 """
 from __future__ import generators
 
+NEWCONFIG = False
 
 __version__  = '0.90.1'
 __revision__ = '$Revision$'
@@ -706,6 +707,13 @@
 """
 rcParams.update(rcParamsDefault)
 
+if NEWCONFIG:
+print "importing from reorganized config system!"
+from config import rcParams, rcdefaults
+try:
+from config import mplConfig, save_config
+except:
+pass
 
 def use(arg):
 """

Modified: trunk/matplotlib/lib/matplotlib/config/__init__.py
===
--- trunk/matplotlib/lib/matplotlib/config/__init__.py  2007-07-30 16:41:53 UTC 
(rev 3631)
+++ trunk/matplotlib/lib/matplotlib/config/__init__.py  2007-07-30 17:41:14 UTC 
(rev 3632)
@@ -1 +1,12 @@
-# Please keep this file empty
\ No newline at end of file
+# Please keep this file empty
+
+USE_TRAITED_CONFIG = False
+
+from rcparams import rc
+from cutils import get_config_file
+
+if USE_TRAITED_CONFIG:
+print 'Using new config system!'
+from mplconfig import rcParams, mplConfig, save_config, rcdefaults
+else:
+from rcparams import rcParams, rcdefaults

Deleted: trunk/matplotlib/lib/matplotlib/config/api.py
===
--- trunk/matplotlib/lib/matplotlib/config/api.py   2007-07-30 16:41:53 UTC 
(rev 3631)
+++ trunk/matplotlib/lib/matplotlib/config/api.py   2007-07-30 17:41:14 UTC 
(rev 3632)
@@ -1,12 +0,0 @@
-"""
-"""
-
-USE_NEW_CONFIG = True
-
-from rcparams import rc
-from cutils import get_config_file
-
-if USE_NEW_CONFIG:
-from mplconfig import rcParams, mplConfig, save_config
-else:
-from rcparams import rcParams

Modified: trunk/matplotlib/lib/matplotlib/config/cutils.py
===
--- trunk/matplotlib/lib/matplotlib/config/cutils.py2007-07-30 16:41:53 UTC 
(rev 3631)
+++ trunk/matplotlib/lib/matplotlib/config/cutils.py2007-07-30 17:41:14 UTC 
(rev 3632)
@@ -179,4 +179,4 @@
 fname = os.path.join(path, filename)
 if not os.path.exists(fname):
 warnings.warn('Could not find %s; using defaults'%filename)
-return fname
\ No newline at end of file
+return fname

Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 16:41:53 UTC 
(rev 3631)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 17:41:14 UTC 
(rev 3632)
@@ -10,6 +10,7 @@
 # internal imports
 import mpltraits as mplT
 import cutils
+import checkdep
 from tconfig import TConfig, TConfigManager
 import pytz
 
@@ -266,210 +267,220 @@
 dpi = T.Float(100)
 facecolor = T.Trait('white', mplT.ColorHandler())
 edgecolor = T.Trait('white', mplT.ColorHandler())
-   orientation = T.Trait('portrait', 'portrait', 'landscape')
+orientation = T.Trait('portrait', 'portrait', 'landscape')
 
 class verbose(TConfig):
 level = T.Trait('sile

SF.net SVN: matplotlib: [3633] trunk/matplotlib/lib/matplotlib

2007-07-30 Thread mdboom
Revision: 3633
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3633&view=rev
Author:   mdboom
Date: 2007-07-30 11:05:14 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Various minor bugfixes.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/_mathtext_data.py
trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-07-30 17:41:14 UTC 
(rev 3632)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-07-30 18:05:14 UTC 
(rev 3633)
@@ -2214,7 +2214,7 @@
 'combiningbreve'   : 774,
 'combiningoverline': 772,
 'combininggraveaccent' : 768,
-'combiningacuteaccent' : 764,
+'combiningacuteaccent' : 714,
 'combiningdiaeresis'   : 776,
 'combiningtilde'   : 771,
 'combiningrightarrowabove' : 8407,

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-07-30 17:41:14 UTC (rev 
3632)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-07-30 18:05:14 UTC (rev 
3633)
@@ -617,7 +617,7 @@
 return alternatives
 return [(fontname, sym)]
 
-class UnicodeFonts(BakomaFonts):
+class UnicodeFonts(TruetypeFonts):
 """An abstract base class for handling Unicode fonts.
 """
 fontmap = { 'cal' : 'cmsy10',
@@ -628,7 +628,7 @@
 'sf'  : 'DejaVuSans',
 None  : 'DejaVuSerif-Italic'
 }
-
+
 def _get_offset(self, cached_font, glyph, fontsize, dpi):
 return 0.
 
@@ -637,6 +637,7 @@
 
 try:
 uniindex = get_unicode_index(sym)
+found_symbol = True
 except ValueError:
 # This is a total hack, but it works for now
 if sym.startswith('\\big'):
@@ -658,7 +659,7 @@
 glyphindex = cached_font.charmap[uniindex]
 except KeyError:
 warn("Font '%s' does not have a glyph for '%s'" %
- (cached_font.postscript_name, sym),
+ (cached_font.font.postscript_name, sym),
  MathTextWarning)
 found_symbol = False
 
@@ -2228,7 +2229,7 @@
 font_output = BakomaFonts(prop, backend)
 # When we have a decent Unicode font, we should test and
 # then make this available as an option
-# font_output = UnicodeFonts(prop, backend)
+#~ font_output = UnicodeFonts(prop, backend)
 
 fontsize = prop.get_size_in_points()
 if self._parser is None:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3634] trunk/matplotlib/lib/matplotlib

2007-07-30 Thread dsdale
Revision: 3634
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3634&view=rev
Author:   dsdale
Date: 2007-07-30 11:44:36 -0700 (Mon, 30 Jul 2007)

Log Message:
---
minor changes to traited configs

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/__init__.py
trunk/matplotlib/lib/matplotlib/config/__init__.py
trunk/matplotlib/lib/matplotlib/config/mplconfig.py
trunk/matplotlib/lib/matplotlib/config/mpltraits.py
trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc

Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===
--- trunk/matplotlib/lib/matplotlib/__init__.py 2007-07-30 18:05:14 UTC (rev 
3633)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2007-07-30 18:44:36 UTC (rev 
3634)
@@ -708,7 +708,7 @@
 rcParams.update(rcParamsDefault)
 
 if NEWCONFIG:
-print "importing from reorganized config system!"
+#print "importing from reorganized config system!"
 from config import rcParams, rcdefaults
 try:
 from config import mplConfig, save_config

Modified: trunk/matplotlib/lib/matplotlib/config/__init__.py
===
--- trunk/matplotlib/lib/matplotlib/config/__init__.py  2007-07-30 18:05:14 UTC 
(rev 3633)
+++ trunk/matplotlib/lib/matplotlib/config/__init__.py  2007-07-30 18:44:36 UTC 
(rev 3634)
@@ -1,12 +1,12 @@
 # Please keep this file empty
 
-USE_TRAITED_CONFIG = False
+USE_TRAITED_CONFIG = True
 
 from rcparams import rc
 from cutils import get_config_file
 
 if USE_TRAITED_CONFIG:
-print 'Using new config system!'
+#print 'Using new config system!'
 from mplconfig import rcParams, mplConfig, save_config, rcdefaults
 else:
 from rcparams import rcParams, rcdefaults

Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 18:05:14 UTC 
(rev 3633)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 18:44:36 UTC 
(rev 3634)
@@ -88,7 +88,7 @@
 fonttype = T.Trait(3, 42)
 
 class distiller(TConfig):
-use = T.Trait(None, None, 'ghostscript', 'xpdf')
+use = T.Trait(None, None, 'ghostscript', 'xpdf', False)
 resolution = T.Float(6000)
 
 class pdf(TConfig):
@@ -267,7 +267,7 @@
 dpi = T.Float(100)
 facecolor = T.Trait('white', mplT.ColorHandler())
 edgecolor = T.Trait('white', mplT.ColorHandler())
-orientation = T.Trait('portrait', 'portrait', 'landscape')
+orientation = T.Trait('portrait', 'portrait', 'landscape')
 
 class verbose(TConfig):
 level = T.Trait('silent', 'silent', 'helpful', 'debug', 
'debug-annoying')
@@ -457,13 +457,19 @@
 return self.tconfig_map.has_key(val)
 
 
-config_file = cutils.get_config_file(tconfig=True)
 old_config_file = cutils.get_config_file(tconfig=False)
+old_config_path = os.path.split(old_config_file)[0]
+config_file = os.path.join(old_config_path, 'matplotlib.conf')
+
 if os.path.exists(old_config_file) and not os.path.exists(config_file):
+print 'convert!'
 CONVERT = True
-else: CONVERT = False
+else:
+config_file = cutils.get_config_file(tconfig=True)
+CONVERT = False
+
 configManager = TConfigManager(MPLConfig,
-   cutils.get_config_file(tconfig=True),
+   config_file,
filePriority=True)
 mplConfig = configManager.tconf
 mplConfigDefault = MPLConfig()

Modified: trunk/matplotlib/lib/matplotlib/config/mpltraits.py
===
--- trunk/matplotlib/lib/matplotlib/config/mpltraits.py 2007-07-30 18:05:14 UTC 
(rev 3633)
+++ trunk/matplotlib/lib/matplotlib/config/mpltraits.py 2007-07-30 18:44:36 UTC 
(rev 3634)
@@ -32,7 +32,7 @@
 'ps': 'PS',
 'pdf': 'PDF',
 'svg': 'SVG',
-'template': 'Templates' }
+'template': 'Template' }
 
 def validate(self, object, name, value):
 try:
@@ -143,4 +143,4 @@
  'gist_yarg', 'gist_yarg_r', 'gray', 'gray_r', 'hot', 'hot_r', 
  'hsv', 'hsv_r', 'jet', 'jet_r', 'pink', 'pink_r', 
  'prism', 'prism_r', 'spectral', 'spectral_r', 'spring', 
- 'spring_r', 'summer', 'summer_r', 'winter', 'winter_r']
\ No newline at end of file
+ 'spring_r', 'summer', 'summer_r', 'winter', 'winter_r']

Modified: trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc
===
--- trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc   2007-07-30 
18:05:14 UTC (rev 3633)
+++ trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc   2007-07-30 
18:44:36 UTC (rev 3634)
@@ -243,

SF.net SVN: matplotlib: [3635] trunk/matplotlib/lib/matplotlib/mathtext.py

2007-07-30 Thread mdboom
Revision: 3635
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3635&view=rev
Author:   mdboom
Date: 2007-07-30 11:57:09 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Improving spacing operators.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-07-30 18:44:36 UTC (rev 
3634)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-07-30 18:57:09 UTC (rev 
3635)
@@ -1698,13 +1698,17 @@
 space=(FollowedBy(bslash)
  +   (Literal(r'\ ')
|  Literal(r'\/')
-   |  Group(Literal(r'\hspace{') + number + Literal('}'))
- )
+   |  Literal(r'\,')
+   |  Literal(r'\;')
+   |  Literal(r'\quad')
+   |  Literal(r'\qquad')
+   |  Literal(r'\!')
+   )
   ).setParseAction(self.space).setName('space')
 
 symbol   = Regex("(" + ")|(".join(
[
- r"\\(?!left[^a-z])(?!right[^a-z])[a-zA-Z0-9]+(?!{)",
+ 
r"\\(?!quad)(?!qquad)(?!left[^a-z])(?!right[^a-z])[a-zA-Z0-9]+(?!{)",
  r"[a-zA-Z0-9 ]",
  r"[+\-*/]",
  r"[<>=]",
@@ -1794,7 +1798,7 @@
 
 ambiDelim= oneOf(r"""| \| / \backslash \uparrow \downarrow
  \updownarrow \Uparrow \Downarrow
- \Updownarrow""")
+ \Updownarrow .""")
 leftDelim= oneOf(r"( [ { \lfloor \langle \lceil")
 rightDelim   = oneOf(r") ] } \rfloor \rangle \rceil")
 autoDelim   <<(Suppress(Literal(r"\left"))
@@ -1886,16 +1890,19 @@
 state = self.get_state()
 metrics = state.font_output.get_metrics(
 state.font, 'm', state.fontsize, state.dpi)
-em = metrics.width
-return Hbox(em * percentage)
-
+em = metrics.advance
+return Kern(em * percentage)
+
+_space_widths = { r'\ '  : 0.3,
+  r'\,'  : 0.4,
+  r'\;'  : 0.8,
+  r'\quad'   : 1.6,
+  r'\qquad'  : 3.2,
+  r'\!'  : -0.4,
+  r'\/'  : 0.4 }
 def space(self, s, loc, toks):
 assert(len(toks)==1)
-if toks[0]==r'\ ': num = 0.30 # 30% of fontsize
-elif toks[0]==r'\/': num = 0.1 # 10% of fontsize
-else:  # hspace
-num = float(toks[0][1]) # get the num out of \hspace{num}
-
+num = self._space_widths[toks[0]]
 box = self._make_space(num)
 return [box]
 
@@ -2179,10 +2186,13 @@
 state = self.get_state()
 height = max([x.height for x in middle])
 depth = max([x.depth for x in middle])
-hlist = Hlist(
-[AutoSizedDelim(front, height, depth, state)] +
-middle.asList() +
-[AutoSizedDelim(back, height, depth, state)])
+parts = []
+if front != '.':
+parts.append(AutoSizedDelim(front, height, depth, state))
+parts.extend(middle.asList())
+if back != '.':
+parts.append(AutoSizedDelim(back, height, depth, state))
+hlist = Hlist(parts)
 return hlist
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3636] trunk/matplotlib/lib/matplotlib/backends/ backend_cairo.py

2007-07-30 Thread mdboom
Revision: 3636
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3636&view=rev
Author:   mdboom
Date: 2007-07-30 12:46:53 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Fix numpification typo affecting mathtext output with Cairo backend.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py   2007-07-30 
18:57:09 UTC (rev 3635)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_cairo.py   2007-07-30 
19:46:53 UTC (rev 3636)
@@ -335,7 +335,7 @@
 Xall[:,i] = npy.fromstring(s, npy.uint8)
 
 # get the max alpha at each pixel
-Xs = npy.mlab.max (Xall,1)
+Xs = npy.max (Xall,1)
 
 # convert it to it's proper shape
 Xs.shape = imh, imw


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3637] trunk/matplotlib/lib/matplotlib/backends/ backend_svg.py

2007-07-30 Thread mdboom
Revision: 3637
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3637&view=rev
Author:   mdboom
Date: 2007-07-30 13:45:09 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Fix mathtext bug when svg.embed_char_paths is False

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_svg.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_svg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_svg.py 2007-07-30 
19:46:53 UTC (rev 3636)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_svg.py 2007-07-30 
20:45:09 UTC (rev 3637)
@@ -375,7 +375,7 @@
 new_y = - new_y_mtc
 
 svg.append('>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3638] trunk/matplotlib/lib/matplotlib

2007-07-30 Thread mdboom
Revision: 3638
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3638&view=rev
Author:   mdboom
Date: 2007-07-30 13:48:06 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Improve vertical alignment of large delimiters and n-ary operators.

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/_mathtext_data.py
trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-07-30 20:45:09 UTC 
(rev 3637)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-07-30 20:48:06 UTC 
(rev 3638)
@@ -2235,7 +2235,7 @@
 'biguplus': 10756,
 'epsilon': 949,
 'vartheta': 977,
-'bigotimes': 10754   
+'bigotimes': 10754
 }
 
 uni2tex = dict([(v,k) for k,v in tex2uni.items()])

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-07-30 20:45:09 UTC (rev 
3637)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-07-30 20:48:06 UTC (rev 
3638)
@@ -174,6 +174,13 @@
 or a Type1 symbol name (i.e. 'phi').
 
 """
+# From UTF #25: U+2212 − minus sign is the preferred
+# representation of the unary and binary minus sign rather than
+# the ASCII-derived U+002D - hyphen-minus, because minus sign is
+# unambiguous and because it is rendered with a more desirable
+# length, usually longer than a hyphen.
+if symbol == '-':
+return 0x2212
 try:# This will succeed if symbol is a single unicode char
 return ord(symbol)
 except TypeError:
@@ -484,7 +491,7 @@
 offset = self._get_offset(cached_font, glyph, fontsize, dpi)
 metrics = Bunch(
 advance = glyph.linearHoriAdvance/65536.0,
-height  = glyph.height/64.0 + offset,
+height  = glyph.height/64.0,
 width   = glyph.width/64.0,
 xmin= xmin,
 xmax= xmax,
@@ -545,7 +552,7 @@
 }
 
 def _get_offset(self, cached_font, glyph, fontsize, dpi):
-if cached_font.font.postscript_name == 'cmex10':
+if cached_font.font.postscript_name == 'Cmex10':
 return glyph.height/64.0/2 + 256.0/64.0 * dpi/72.0
 return 0.
 
@@ -577,8 +584,8 @@
 ('ex', '\xbd'), ('ex', '\x28')],
 '}'  : [('cal', '}'), ('ex', '\xaa'), ('ex', '\x6f'),
 ('ex', '\xbe'), ('ex', '\x29')],
-# The fourth size of '[' is mysteriously missing from the BaKoMa font,
-# so I've ommitted it for both
+# The fourth size of '[' is mysteriously missing from the BaKoMa
+# font, so I've ommitted it for both '[' and ']'
 '['  : [('rm', '['), ('ex', '\xa3'), ('ex', '\x68'),
 ('ex', '\x22')],
 ']'  : [('rm', ']'), ('ex', '\xa4'), ('ex', '\x69'),
@@ -839,7 +846,7 @@
 INV_SHRINK_FACTOR = 1.0 / SHRINK_FACTOR
 # The number of different sizes of chars to use, beyond which they will not
 # get any smaller
-NUM_SIZE_LEVELS = 3
+NUM_SIZE_LEVELS = 4
 # Percentage of x-height of additional horiz. space after sub/superscripts
 SCRIPT_SPACE= 0.3
 # Percentage of x-height that sub/superscripts drop below the baseline
@@ -1650,7 +1657,7 @@
 _punctuation_symbols = Set(r', ; . ! \ldotp \cdotp'.split())
 
 _overunder_symbols = Set(r'''
-   \sum \int \prod \coprod \oint \bigcap \bigcup \bigsqcup \bigvee
+   \sum \prod \int \coprod \oint \bigcap \bigcup \bigsqcup \bigvee
\bigwedge \bigodot \bigotimes \bigoplus \biguplus
'''.split()
 )
@@ -1758,9 +1765,11 @@
)
  + Optional(
  Suppress(Literal("["))
-   + OneOrMore(
-   symbol
- ^ font
+   + Group(
+   OneOrMore(
+ symbol
+   ^ font
+   )
  )
+ Suppress(Literal("]")),
  default = None
@@ -1881,12 +1890,13 @@
 #~ print "non_math", toks
 symbols = [Char(c, self.get_state()) for c in toks[0]]
 hlist = Hlist(symbols)
+# We're going into math now, so set font to 'it'
 self.push_state()
-# We're going into math now, so set font to 'it'
 self.get_state().font = 'it'
 return [hlist]
 
 def _make_space(self, percentage):
+# All spaces are relative to em width
 state = self.get_state()
 metrics = state.font_output.get_metrics(
 state.font, 'm', state.fontsize, state.dpi)
@@ -1910,12 +1920,12 @@
 # print "symbol", toks
 c = toks[0]
 if c in self._spaced_symbols:
- 

SF.net SVN: matplotlib: [3639] trunk/matplotlib

2007-07-30 Thread dsdale
Revision: 3639
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3639&view=rev
Author:   dsdale
Date: 2007-07-30 14:37:11 -0700 (Mon, 30 Jul 2007)

Log Message:
---
install matplotlib.conf in mpl-data for config package

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/mpl-data/matplotlib.conf
trunk/matplotlib/setup.py

Modified: trunk/matplotlib/lib/matplotlib/mpl-data/matplotlib.conf
===
--- trunk/matplotlib/lib/matplotlib/mpl-data/matplotlib.conf2007-07-30 
20:48:06 UTC (rev 3638)
+++ trunk/matplotlib/lib/matplotlib/mpl-data/matplotlib.conf2007-07-30 
21:37:11 UTC (rev 3639)
@@ -49,7 +49,7 @@
 
 # Where your matplotlib data lives if you installed to a non-default 
 #location.  This is where the matplotlib fonts, bitmaps, etc reside
-datapath = '/home/fperez/.matplotlib'
+#datapath = '/home/fperez/.matplotlib'
 
 #bogus = 1
 #[bogus_section]
@@ -62,7 +62,7 @@
 
 # 'GTKAgg', 'GTKCairo', 'QtAgg', 'Qt4Agg', 'TkAgg', 'Agg', 
 # 'Cairo', 'PS', 'PDF', 'SVG'
-use = 'Qt4Agg'
+use = 'TkAgg'
 
 [[cairo]]
 # png, ps, pdf, svg
@@ -453,4 +453,4 @@
 level = 'silent'
 
 # a log filename, 'sys.stdout' or 'sys.stderr'
-fileo = 'sys.stdout'
\ No newline at end of file
+fileo = 'sys.stdout'

Modified: trunk/matplotlib/setup.py
===
--- trunk/matplotlib/setup.py   2007-07-30 20:48:06 UTC (rev 3638)
+++ trunk/matplotlib/setup.py   2007-07-30 21:37:11 UTC (rev 3639)
@@ -93,6 +93,7 @@
   'mpl-data/images/*.png',
   'mpl-data/images/*.ppm',
   'mpl-data/matplotlibrc',
+  'mpl-data/matplotlib.conf',
   'mpl-data/*.glade',
   'backends/Matplotlib.nib/*',
   ]}


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3640] trunk/matplotlib/lib/matplotlib/config/ mplconfig.py

2007-07-30 Thread dsdale
Revision: 3640
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3640&view=rev
Author:   dsdale
Date: 2007-07-30 14:41:09 -0700 (Mon, 30 Jul 2007)

Log Message:
---
remove a print statement in mplconfig

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/config/mplconfig.py

Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 21:37:11 UTC 
(rev 3639)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 21:41:09 UTC 
(rev 3640)
@@ -462,7 +462,6 @@
 config_file = os.path.join(old_config_path, 'matplotlib.conf')
 
 if os.path.exists(old_config_file) and not os.path.exists(config_file):
-print 'convert!'
 CONVERT = True
 else:
 config_file = cutils.get_config_file(tconfig=True)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3641] trunk/matplotlib/lib/matplotlib/axes.py

2007-07-30 Thread efiring
Revision: 3641
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3641&view=rev
Author:   efiring
Date: 2007-07-30 16:05:06 -0700 (Mon, 30 Jul 2007)

Log Message:
---
bar plotting patch by Michael Forbes

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/axes.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2007-07-30 21:41:09 UTC (rev 
3640)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2007-07-30 23:05:06 UTC (rev 
3641)
@@ -3557,7 +3557,21 @@
 barcols = []
 caplines = []
 
+lines_kw = {'label':'_nolegend_'}
+if 'linewidth' in kwargs:
+lines_kw['linewidth']=kwargs['linewidth']
+if 'lw' in kwargs:
+lines_kw['lw']=kwargs['lw']
 
+if capsize > 0:
+plot_kw = {
+'ms':2*capsize,
+'label':'_nolegend_'}
+if 'markeredgewidth' in kwargs:
+plot_kw['markeredgewidth']=kwargs['markeredgewidth']
+if 'mew' in kwargs:
+plot_kw['mew']=kwargs['mew']
+
 if xerr is not None:
 if len(xerr.shape) == 1:
 left  = x-xerr
@@ -3566,12 +3580,10 @@
 left  = x-xerr[0]
 right = x+xerr[1]
 
-barcols.append( self.hlines(y, left, right, label='_nolegend_' ))
+barcols.append( self.hlines(y, left, right, **lines_kw ) )
 if capsize > 0:
-caplines.extend(
-self.plot(left, y, 'k|', ms=2*capsize, label='_nolegend_') 
)
-caplines.extend(
-self.plot(right, y, 'k|', ms=2*capsize, 
label='_nolegend_') )
+caplines.extend( self.plot(left, y, 'k|', **plot_kw) )
+caplines.extend( self.plot(right, y, 'k|', **plot_kw) )
 
 if yerr is not None:
 if len(yerr.shape) == 1:
@@ -3581,21 +3593,8 @@
 lower = y-yerr[0]
 upper = y+yerr[1]
 
-vlines_kw = {'label':'_nolegend_'}
-if 'linewidth' in kwargs:
-vlines_kw['linewidth']=kwargs['linewidth']
-if 'lw' in kwargs:
-vlines_kw['lw']=kwargs['lw']
-barcols.append( self.vlines(x, lower, upper, **vlines_kw) )
-
+barcols.append( self.vlines(x, lower, upper, **lines_kw) )
 if capsize > 0:
-plot_kw = {
-'ms':2*capsize,
-'label':'_nolegend_'}
-if 'markeredgewidth' in kwargs:
-plot_kw['markeredgewidth']=kwargs['markeredgewidth']
-if 'mew' in kwargs:
-plot_kw['mew']=kwargs['mew']
 caplines.extend( self.plot(x, lower, 'k_', **plot_kw) )
 caplines.extend( self.plot(x, upper, 'k_', **plot_kw) )
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3642] trunk/matplotlib/lib/matplotlib

2007-07-30 Thread dsdale
Revision: 3642
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3642&view=rev
Author:   dsdale
Date: 2007-07-30 16:22:48 -0700 (Mon, 30 Jul 2007)

Log Message:
---
minor change to mplconfig module

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/config/mplconfig.py
trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc

Modified: trunk/matplotlib/lib/matplotlib/config/mplconfig.py
===
--- trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 23:05:06 UTC 
(rev 3641)
+++ trunk/matplotlib/lib/matplotlib/config/mplconfig.py 2007-07-30 23:22:48 UTC 
(rev 3642)
@@ -214,7 +214,7 @@
 
 class grid(TConfig):
 color = T.Trait('black', mplT.ColorHandler())
-linestyle = T.Trait('-','--','-.', ':', 'steps', '', ' ')
+linestyle = T.Trait(':','-','--','-.', ':', 'steps', '', ' ')
 linewidth = T.Float(0.5)
 
 class legend(TConfig):

Modified: trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc
===
--- trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc   2007-07-30 
23:05:06 UTC (rev 3641)
+++ trunk/matplotlib/lib/matplotlib/mpl-data/matplotlibrc   2007-07-30 
23:22:48 UTC (rev 3642)
@@ -243,7 +243,6 @@
 #savefig.dpi   : 100  # figure dots per inch
 #savefig.facecolor : white# figure facecolor when saving
 #savefig.edgecolor : white# figure edgecolor when saving
-#savefig.orientation : portrait # portrait or landscape
 
 #cairo.format  : png  # png, ps, pdf, svg
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [3643] trunk/py4science/examples/spline_demo.py

2007-07-30 Thread fer_perez
Revision: 3643
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3643&view=rev
Author:   fer_perez
Date: 2007-07-30 23:53:07 -0700 (Mon, 30 Jul 2007)

Log Message:
---
Put in changes that for some reason SVN was not seeing in my local copy.  
Problem reported by Stefan

Modified Paths:
--
trunk/py4science/examples/spline_demo.py

Modified: trunk/py4science/examples/spline_demo.py
===
--- trunk/py4science/examples/spline_demo.py2007-07-30 23:22:48 UTC (rev 
3642)
+++ trunk/py4science/examples/spline_demo.py2007-07-31 06:53:07 UTC (rev 
3643)
@@ -10,13 +10,19 @@
 
 tfine = N.arange(0.0, 5, 0.01)
 tcoarse = N.arange(0.0, 5, 0.1)
-s = N.cos(N.pi*tcoarse) * N.sin(2*N.pi*tcoarse)
+def func(t):
+return N.cos(N.pi*t) * N.sin(2*N.pi*t)
 
 # create sinterp by computing the spline fitting tcoarse to s and then
-evaluating it on tfine.  Plot tcoarse vs s with markers and tfine vs
-sinterp with a solid line
+# evaluating it on tfine.  Plot tcoarse vs s with markers and tfine vs
+# sinterp with a solid line
+s = func(tcoarse)
+
 tck = interpolate.splrep(tcoarse, s, s=0)
 sinterp = interpolate.splev(tfine, tck, der=0)
 
-P.plot(tcoarse, s, 'o', tfine, sinterp)
+P.plot(tcoarse, s, 'o', label='coarse')
+P.plot(tfine, sinterp, '+', label='fit')
+P.plot(tfine, func(tfine), '-', label='actual')
+P.legend()
 P.show()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins