SF.net SVN: matplotlib:[7438] trunk/matplotlib/doc/users

2009-08-09 Thread jouni
Revision: 7438
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7438&view=rev
Author:   jouni
Date: 2009-08-09 18:50:15 + (Sun, 09 Aug 2009)

Log Message:
---
Fix the spelling of my name
(the rst files are processed as UTF-8 anyway)

Modified Paths:
--
trunk/matplotlib/doc/users/credits.rst
trunk/matplotlib/doc/users/whats_new.rst

Modified: trunk/matplotlib/doc/users/credits.rst
===
--- trunk/matplotlib/doc/users/credits.rst  2009-08-09 04:50:12 UTC (rev 
7437)
+++ trunk/matplotlib/doc/users/credits.rst  2009-08-09 18:50:15 UTC (rev 
7438)
@@ -148,7 +148,8 @@
 Charlie Moad
   contributed work to matplotlib's Cocoa support and has done a lot of work on 
the OSX and win32 binary releases.
 
-Jouni K. Seppaenen wrote the PDF backend and contributed numerous
+Jouni K. Seppänen 
+  wrote the PDF backend and contributed numerous
   fixes to the code, to tex support and to the get_sample_data handler
 
 Paul Kienzle
@@ -172,4 +173,4 @@
 Jae-Joon Lee implemented fancy arrows and boxes, rewrote the legend
   support to handle multiple columns and fancy text boxes, wrote the
   axes grid toolkit, and has made numerous contributions to the code
-  and documentation
\ No newline at end of file
+  and documentation

Modified: trunk/matplotlib/doc/users/whats_new.rst
===
--- trunk/matplotlib/doc/users/whats_new.rst2009-08-09 04:50:12 UTC (rev 
7437)
+++ trunk/matplotlib/doc/users/whats_new.rst2009-08-09 18:50:15 UTC (rev 
7438)
@@ -72,7 +72,7 @@
 and 3.0 will not be available until numpy is available on those
 releases).  Thanks to the many developers who contributed to this
 release, with contributions from Jae-Joon Lee, Michael Droettboom,
-Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppaenen, Jeff Whitaker,
+Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppänen, Jeff Whitaker,
 Darren Dale, David Kaplan, Michiel de Hoon and many others who
 submitted patches
 


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7439] trunk/matplotlib/lib/matplotlib/image.py

2009-08-09 Thread leejjoon
Revision: 7439
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7439&view=rev
Author:   leejjoon
Date: 2009-08-09 19:25:49 + (Sun, 09 Aug 2009)

Log Message:
---
reorganization of AxesImage and BboxImage

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

Modified: trunk/matplotlib/lib/matplotlib/image.py
===
--- trunk/matplotlib/lib/matplotlib/image.py2009-08-09 18:50:15 UTC (rev 
7438)
+++ trunk/matplotlib/lib/matplotlib/image.py2009-08-09 19:25:49 UTC (rev 
7439)
@@ -26,7 +26,7 @@
 
 from matplotlib.transforms import BboxBase
 
-class AxesImage(martist.Artist, cm.ScalarMappable):
+class _AxesImageBase(martist.Artist, cm.ScalarMappable):
 zorder = 1
 # map interpolation strings to module constants
 _interpd = {
@@ -62,7 +62,6 @@
  norm = None,
  interpolation=None,
  origin=None,
- extent=None,
  filternorm=1,
  filterrad=4.0,
  resample = False,
@@ -87,7 +86,6 @@
 
 if origin is None: origin = rcParams['image.origin']
 self.origin = origin
-self._extent = extent
 self.set_filternorm(filternorm)
 self.set_filterrad(filterrad)
 self._filterrad = filterrad
@@ -126,108 +124,9 @@
 self._rgbacache = None
 cm.ScalarMappable.changed(self)
 
-
 def make_image(self, magnification=1.0):
-if self._A is None:
-raise RuntimeError('You must first set the image array or the 
image attribute')
+raise RuntimeError('The make_image method must be overridden.')
 
-xmin, xmax, ymin, ymax = self.get_extent()
-dxintv = xmax-xmin
-dyintv = ymax-ymin
-
-# the viewport scale factor
-sx = dxintv/self.axes.viewLim.width
-sy = dyintv/self.axes.viewLim.height
-numrows, numcols = self._A.shape[:2]
-if sx > 2:
-x0 = (self.axes.viewLim.x0-xmin)/dxintv * numcols
-ix0 = max(0, int(x0 - self._filterrad))
-x1 = (self.axes.viewLim.x1-xmin)/dxintv * numcols
-ix1 = min(numcols, int(x1 + self._filterrad))
-xslice = slice(ix0, ix1)
-xmin_old = xmin
-xmin = xmin_old + ix0*dxintv/numcols
-xmax = xmin_old + ix1*dxintv/numcols
-dxintv = xmax - xmin
-sx = dxintv/self.axes.viewLim.width
-else:
-xslice = slice(0, numcols)
-
-if sy > 2:
-y0 = (self.axes.viewLim.y0-ymin)/dyintv * numrows
-iy0 = max(0, int(y0 - self._filterrad))
-y1 = (self.axes.viewLim.y1-ymin)/dyintv * numrows
-iy1 = min(numrows, int(y1 + self._filterrad))
-if self.origin == 'upper':
-yslice = slice(numrows-iy1, numrows-iy0)
-else:
-yslice = slice(iy0, iy1)
-ymin_old = ymin
-ymin = ymin_old + iy0*dyintv/numrows
-ymax = ymin_old + iy1*dyintv/numrows
-dyintv = ymax - ymin
-sy = dyintv/self.axes.viewLim.height
-else:
-yslice = slice(0, numrows)
-
-if xslice != self._oldxslice or yslice != self._oldyslice:
-self._imcache = None
-self._oldxslice = xslice
-self._oldyslice = yslice
-
-if self._imcache is None:
-if self._A.dtype == np.uint8 and len(self._A.shape) == 3:
-im = _image.frombyte(self._A[yslice,xslice,:], 0)
-im.is_grayscale = False
-else:
-if self._rgbacache is None:
-x = self.to_rgba(self._A, self._alpha)
-self._rgbacache = x
-else:
-x = self._rgbacache
-im = _image.fromarray(x[yslice,xslice], 0)
-if len(self._A.shape) == 2:
-im.is_grayscale = self.cmap.is_gray()
-else:
-im.is_grayscale = False
-self._imcache = im
-
-if self.origin=='upper':
-im.flipud_in()
-else:
-im = self._imcache
-
-fc = self.axes.patch.get_facecolor()
-bg = mcolors.colorConverter.to_rgba(fc, 0)
-im.set_bg( *bg)
-
-# image input dimensions
-im.reset_matrix()
-numrows, numcols = im.get_size()
-
-im.set_interpolation(self._interpd[self._interpolation])
-
-im.set_resample(self._resample)
-
-# the viewport translation
-tx = (xmin-self.axes.viewLim.x0)/dxintv * numcols
-ty = (ymin-self.axes.viewLim.y0)/dyintv * numrows
-
-l, b, r, t = self.axes.bbox.extents
-widthDisplay = (round(r) + 0.5) - (round(l) - 0.5)
-heightDisplay = (round(t) + 0.5) - (round(b) - 0.5)
-widthDisplay *= magnification
-heightDisplay *= magnificat

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

2009-08-09 Thread leejjoon
Revision: 7440
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7440&view=rev
Author:   leejjoon
Date: 2009-08-09 19:38:48 + (Sun, 09 Aug 2009)

Log Message:
---
AnnotationBbox implemented.

Modified Paths:
--
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/offsetbox.py
trunk/matplotlib/lib/matplotlib/text.py
trunk/matplotlib/lib/mpl_toolkits/axes_grid/anchored_artists.py

Added Paths:
---
trunk/matplotlib/examples/pylab_examples/demo_annotation_box.py

Modified: trunk/matplotlib/CHANGELOG
===
--- trunk/matplotlib/CHANGELOG  2009-08-09 19:25:49 UTC (rev 7439)
+++ trunk/matplotlib/CHANGELOG  2009-08-09 19:38:48 UTC (rev 7440)
@@ -1,3 +1,7 @@
+2009-08-09 AnnotationBbox added. Similar to Annotation, but works with
+   OffsetBox instead of Text. See the example
+   demo_annotation_box.py. -JJL
+
 2009-08-07 BboxImage implemented. Two examples, demo_bboximage.py and
demo_ribbon_box.py added. - JJL
 

Added: trunk/matplotlib/examples/pylab_examples/demo_annotation_box.py
===
--- trunk/matplotlib/examples/pylab_examples/demo_annotation_box.py 
(rev 0)
+++ trunk/matplotlib/examples/pylab_examples/demo_annotation_box.py 
2009-08-09 19:38:48 UTC (rev 7440)
@@ -0,0 +1,94 @@
+import matplotlib.pyplot as plt
+from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, \
+ AnnotationBbox
+from matplotlib.cbook import get_sample_data
+
+import numpy as np
+
+if 1:
+fig = plt.gcf()
+fig.clf()
+ax = plt.subplot(111)
+
+offsetbox = TextArea("Test 1", minimumdescent=False)
+
+xy = (0.5, 0.7)
+
+ax.plot(xy[0], xy[1], ".r")
+
+ab = AnnotationBbox(offsetbox, xy,
+xybox=(-20, 40),
+xycoords='data',
+boxcoords="offset points",
+arrowprops=dict(arrowstyle="->"))
+ax.add_artist(ab)
+
+offsetbox = TextArea("Test", minimumdescent=False)
+
+ab = AnnotationBbox(offsetbox, xy,
+xybox=(1.02, xy[1]),
+xycoords='data',
+boxcoords=("axes fraction", "data"),
+box_alignment=(0.,0.5),
+arrowprops=dict(arrowstyle="->"))
+ax.add_artist(ab)
+
+
+from matplotlib.patches import Circle
+da = DrawingArea(20, 20, 0, 0)
+p = Circle((10, 10), 10)
+da.add_artist(p)
+
+xy = [0.3, 0.55]
+ab = AnnotationBbox(da, xy,
+xybox=(1.02, xy[1]),
+xycoords='data',
+boxcoords=("axes fraction", "data"),
+box_alignment=(0.,0.5),
+arrowprops=dict(arrowstyle="->"))
+#arrowprops=None)
+
+ax.add_artist(ab)
+
+
+arr = np.arange(100).reshape((10,10))
+im = OffsetImage(arr, zoom=2)
+
+ab = AnnotationBbox(im, xy,
+xybox=(-50., 50.),
+xycoords='data',
+boxcoords="offset points",
+pad=0.3,
+arrowprops=dict(arrowstyle="->"))
+#arrowprops=None)
+
+ax.add_artist(ab)
+
+
+# another image
+
+
+from matplotlib._png import read_png
+fn = get_sample_data("lena.png", asfileobj=False)
+arr_lena = read_png(fn)
+
+imagebox = OffsetImage(arr_lena, zoom=0.2)
+
+ab = AnnotationBbox(imagebox, xy,
+xybox=(120., -80.),
+xycoords='data',
+boxcoords="offset points",
+pad=0.5,
+arrowprops=dict(arrowstyle="->",
+
connectionstyle="angle,angleA=0,angleB=90,rad=3")
+)
+
+
+ax.add_artist(ab)
+
+ax.set_xlim(0, 1)
+ax.set_ylim(0, 1)
+
+
+plt.draw()
+plt.show()

Modified: trunk/matplotlib/lib/matplotlib/offsetbox.py
===
--- trunk/matplotlib/lib/matplotlib/offsetbox.py2009-08-09 19:25:49 UTC 
(rev 7439)
+++ trunk/matplotlib/lib/matplotlib/offsetbox.py2009-08-09 19:38:48 UTC 
(rev 7440)
@@ -19,13 +19,21 @@
 import matplotlib.artist as martist
 import matplotlib.text as mtext
 import numpy as np
-from matplotlib.transforms import Bbox, BboxBase, TransformedBbox, 
BboxTransformTo
+from matplotlib.transforms import Bbox, BboxBase, TransformedBbox, \
+ IdentityTransform
 
 from matplotlib.font_manager import FontProperties
-from matplotlib.patches import FancyBboxPatch
+from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
 from matplotlib import rcParams
 
+import matplotlib.cbook as cbook
+
+#from bboximage import BboxImage
+from matplotl

SF.net SVN: matplotlib:[7441] trunk/matplotlib/examples/pylab_examples/ demo_text_path.py

2009-08-09 Thread leejjoon
Revision: 7441
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7441&view=rev
Author:   leejjoon
Date: 2009-08-09 20:58:24 + (Sun, 09 Aug 2009)

Log Message:
---
added demo_text_path.py

Added Paths:
---
trunk/matplotlib/examples/pylab_examples/demo_text_path.py

Added: trunk/matplotlib/examples/pylab_examples/demo_text_path.py
===
--- trunk/matplotlib/examples/pylab_examples/demo_text_path.py  
(rev 0)
+++ trunk/matplotlib/examples/pylab_examples/demo_text_path.py  2009-08-09 
20:58:24 UTC (rev 7441)
@@ -0,0 +1,213 @@
+
+# -*- coding: utf-8 -*-
+
+import matplotlib.pyplot as plt
+from matplotlib.image import BboxImage
+import numpy as np
+from matplotlib.transforms import Affine2D, IdentityTransform
+
+import matplotlib.font_manager as font_manager
+from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING
+from matplotlib.font_manager import FontProperties
+from matplotlib.path import Path
+import matplotlib.patches as mpatches
+
+from matplotlib.offsetbox import AnnotationBbox,\
+ AnchoredOffsetbox, AuxTransformBox
+
+#from matplotlib.offsetbox import
+
+from matplotlib.cbook import get_sample_data
+
+
+class TextPatch(mpatches.PathPatch):
+
+FONT_SCALE = 100.
+
+def __init__(self, xy, s, size=None, prop=None, bbox_image=None,
+ *kl, **kwargs):
+if prop is None:
+prop = FontProperties()
+
+if size is None:
+size = prop.get_size_in_points()
+
+self._xy = xy
+self.set_size(size)
+
+self.text_path = self.text_get_path(prop, s)
+
+mpatches.PathPatch.__init__(self, self.text_path, *kl, **kwargs)
+
+self._init_bbox_image(bbox_image)
+
+
+def _init_bbox_image(self, im):
+
+if im is None:
+self.bbox_image = None
+else:
+bbox_image = BboxImage(self.get_window_extent,
+   norm = None,
+   origin=None,
+   )
+bbox_image.set_transform(IdentityTransform())
+
+bbox_image.set_data(im)
+self.bbox_image = bbox_image
+
+def draw(self, renderer=None):
+
+
+if self.bbox_image is not None:
+# the clip path must be updated every draw. any solution? -JJ
+self.bbox_image.set_clip_path(self.text_path, self.get_transform())
+self.bbox_image.draw(renderer)
+
+mpatches.PathPatch.draw(self, renderer)
+
+
+def set_size(self, size):
+self._size = size
+
+def get_size(self):
+return self._size
+
+def get_patch_transform(self):
+tr = Affine2D().scale(self._size/self.FONT_SCALE, 
self._size/self.FONT_SCALE)
+return tr.translate(*self._xy)
+
+def glyph_char_path(self, glyph, currx=0.):
+
+verts, codes = [], []
+for step in glyph.path:
+if step[0] == 0:   # MOVE_TO
+verts.append((step[1], step[2]))
+codes.append(Path.MOVETO)
+elif step[0] == 1: # LINE_TO
+verts.append((step[1], step[2]))
+codes.append(Path.LINETO)
+elif step[0] == 2: # CURVE3
+verts.extend([(step[1], step[2]),
+   (step[3], step[4])])
+codes.extend([Path.CURVE3, Path.CURVE3])
+elif step[0] == 3: # CURVE4
+verts.extend([(step[1], step[2]),
+  (step[3], step[4]),
+  (step[5], step[6])])
+codes.extend([Path.CURVE4, Path.CURVE4, Path.CURVE4])
+elif step[0] == 4: # ENDPOLY
+verts.append((0, 0,))
+codes.append(Path.CLOSEPOLY)
+
+verts = [(x+currx, y) for (x,y) in verts]
+
+return verts, codes
+
+
+def text_get_path(self, prop, s):
+
+fname = font_manager.findfont(prop)
+font = FT2Font(str(fname))
+
+font.set_size(self.FONT_SCALE, 72)
+
+cmap = font.get_charmap()
+lastgind = None
+
+currx = 0
+
+verts, codes = [], []
+
+for c in s:
+
+ccode = ord(c)
+gind = cmap.get(ccode)
+if gind is None:
+ccode = ord('?')
+gind = 0
+glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
+
+
+if lastgind is not None:
+kern = font.get_kerning(lastgind, gind, KERNING_DEFAULT)
+else:
+kern = 0
+currx += (kern / 64.0) #/ (self.FONT_SCALE)
+
+verts1, codes1 = self.glyph_char_path(glyph, currx)
+verts.extend(verts1)
+codes.extend(codes1)
+
+
+currx += (glyph.linearHoriAdvance / 65536.0) #/ (self.FONT_SCALE)
+lastgind = gind
+
+return Path(verts, codes)
+
+if 1:
+
+f

SF.net SVN: matplotlib:[7443] branches/v0_99_maint/lib/matplotlib

2009-08-09 Thread efiring
Revision: 7443
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7443&view=rev
Author:   efiring
Date: 2009-08-10 00:19:19 + (Mon, 10 Aug 2009)

Log Message:
---
Patch from Jason, sage project: prevent failure with tiny arrows.
Also deleting unwanted whitespace in bezier.py.

Modified Paths:
--
branches/v0_99_maint/lib/matplotlib/bezier.py
branches/v0_99_maint/lib/matplotlib/patches.py

Modified: branches/v0_99_maint/lib/matplotlib/bezier.py
===
--- branches/v0_99_maint/lib/matplotlib/bezier.py   2009-08-10 00:02:56 UTC 
(rev 7442)
+++ branches/v0_99_maint/lib/matplotlib/bezier.py   2009-08-10 00:19:19 UTC 
(rev 7443)
@@ -18,7 +18,7 @@
 """ return a intersecting point between a line through (cx1, cy1)
 and having angle t1 and a line through (cx2, cy2) and angle t2.
 """
-
+
 # line1 => sin_t1 * (x - cx1) - cos_t1 * (y - cy1) = 0.
 # line1 => sin_t1 * x + cos_t1 * y = sin_t1*cx1 - cos_t1*cy1
 
@@ -32,7 +32,7 @@
 ad_bc = a*d-b*c
 if ad_bc == 0.:
 raise ValueError("Given lines do not intersect")
-
+
 #rhs_inverse
 a_, b_ = d, -b
 c_, d_ = -c, a
@@ -53,7 +53,7 @@
 
 if length == 0.:
 return cx, cy, cx, cy
-
+
 cos_t1, sin_t1 = sin_t, -cos_t
 cos_t2, sin_t2 = -sin_t, cos_t
 
@@ -81,7 +81,7 @@
 def split_de_casteljau(beta, t):
 """split a bezier segment defined by its controlpoints *beta*
 into two separate segment divided at *t* and return their control points.
-
+
 """
 beta = np.asarray(beta)
 beta_list = [beta]
@@ -101,20 +101,20 @@
 
 
 
-def find_bezier_t_intersecting_with_closedpath(bezier_point_at_t, 
inside_closedpath, 
+def find_bezier_t_intersecting_with_closedpath(bezier_point_at_t, 
inside_closedpath,
t0=0., t1=1., tolerence=0.01):
 """ Find a parameter t0 and t1 of the given bezier path which
 bounds the intersecting points with a provided closed
 path(*inside_closedpath*). Search starts from *t0* and *t1* and it
 uses a simple bisecting algorithm therefore one of the end point
 must be inside the path while the orther doesn't. The search stop
-when |t0-t1| gets smaller than the given tolerence. 
+when |t0-t1| gets smaller than the given tolerence.
 value for
 
 - bezier_point_at_t : a function which returns x, y coordinates at *t*
 
 - inside_closedpath : return True if the point is insed the path
-
+
 """
 # inside_closedpath : function
 
@@ -146,11 +146,11 @@
 t0 = middle_t
 start = middle
 start_inside = middle_inside
-
 
 
 
 
+
 class BezierSegment:
 """
 A simple class of a 2-dimensional bezier segment
@@ -192,19 +192,19 @@
 
 
 def split_bezier_intersecting_with_closedpath(bezier,
-  inside_closedpath, 
+  inside_closedpath,
   tolerence=0.01):
 
 """
 bezier : control points of the bezier segment
 inside_closedpath : a function which returns true if the point is inside 
the path
 """
-
+
 bz = BezierSegment(bezier)
 bezier_point_at_t = bz.point_at_t
 
 t0, t1 = find_bezier_t_intersecting_with_closedpath(bezier_point_at_t,
-inside_closedpath, 
+inside_closedpath,
 tolerence=tolerence)
 
 _left, _right = split_de_casteljau(bezier, (t0+t1)/2.)
@@ -213,23 +213,23 @@
 
 
 def find_r_to_boundary_of_closedpath(inside_closedpath, xy,
- cos_t, sin_t, 
+ cos_t, sin_t,
  rmin=0., rmax=1., tolerence=0.01):
 """
 Find a radius r (centered at *xy*) between *rmin* and *rmax* at
 which it intersect with the path.
-
+
 inside_closedpath : function
 cx, cy : center
 cos_t, sin_t : cosine and sine for the angle
-rmin, rmax : 
+rmin, rmax :
 """
 
 cx, cy = xy
 def _f(r):
 return cos_t*r + cx, sin_t*r + cy
 
-find_bezier_t_intersecting_with_closedpath(_f, inside_closedpath, 
+find_bezier_t_intersecting_with_closedpath(_f, inside_closedpath,
t0=rmin, t1=rmax, 
tolerence=tolerence)
 
 
@@ -238,7 +238,7 @@
 
 def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
 """ divide a path into two segment at the point where inside(x, y)
-becomes False. 
+becomes False.
 """
 
 path_iter = path.iter_segments()
@@ -262,7 +262,7 @@
 break
 
 ctl_points_old = ctl_points
-
+
 if bezier_path is None:
 raise ValueError("The path 

SF.net SVN: matplotlib:[7444] branches/v0_99_maint/setupext.py

2009-08-09 Thread efiring
Revision: 7444
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7444&view=rev
Author:   efiring
Date: 2009-08-10 00:31:30 + (Mon, 10 Aug 2009)

Log Message:
---
Sage patch, slightly modified, to improve tk/tcl detection.
http://trac.sagemath.org/sage_trac/ticket/4176

Modified Paths:
--
branches/v0_99_maint/setupext.py

Modified: branches/v0_99_maint/setupext.py
===
--- branches/v0_99_maint/setupext.py2009-08-10 00:19:19 UTC (rev 7443)
+++ branches/v0_99_maint/setupext.py2009-08-10 00:31:30 UTC (rev 7444)
@@ -545,7 +545,7 @@
 else:
 add_base_flags(module)
 module.libraries.append('z')
-
+
 # put this last for library link order
 module.libraries.extend(std_libs)
 
@@ -1037,6 +1037,7 @@
 try:
 tcl_lib_dir, tk_lib_dir, tk_ver = query_tcltk()
 except:
+tk_ver = ''
 result = hardcoded_tcl_config()
 else:
 result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


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

2009-08-09 Thread efiring
Revision: 7445
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7445&view=rev
Author:   efiring
Date: 2009-08-10 00:47:21 + (Mon, 10 Aug 2009)

Log Message:
---
Merged revisions 7442-7444 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint


  r7442 | efiring | 2009-08-09 14:02:56 -1000 (Sun, 09 Aug 2009) | 2 lines
  
  patch from sage project: make unicode_safe safer

  r7443 | efiring | 2009-08-09 14:19:19 -1000 (Sun, 09 Aug 2009) | 3 lines
  
  Patch from Jason, sage project: prevent failure with tiny arrows.
  Also deleting unwanted whitespace in bezier.py.

  r7444 | efiring | 2009-08-09 14:31:30 -1000 (Sun, 09 Aug 2009) | 3 lines
  
  Sage patch, slightly modified, to improve tk/tcl detection.
  http://trac.sagemath.org/sage_trac/ticket/4176


Modified Paths:
--
trunk/matplotlib/lib/matplotlib/bezier.py
trunk/matplotlib/lib/matplotlib/cbook.py
trunk/matplotlib/lib/matplotlib/patches.py
trunk/matplotlib/setupext.py

Property Changed:

trunk/matplotlib/
trunk/matplotlib/doc/pyplots/README
trunk/matplotlib/doc/sphinxext/gen_gallery.py
trunk/matplotlib/doc/sphinxext/gen_rst.py
trunk/matplotlib/examples/misc/multiprocess.py
trunk/matplotlib/examples/mplot3d/contour3d_demo.py
trunk/matplotlib/examples/mplot3d/contourf3d_demo.py
trunk/matplotlib/examples/mplot3d/polys3d_demo.py
trunk/matplotlib/examples/mplot3d/scatter3d_demo.py
trunk/matplotlib/examples/mplot3d/surface3d_demo.py
trunk/matplotlib/examples/mplot3d/wire3d_demo.py
trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py
trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py
trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py


Property changes on: trunk/matplotlib
___
Modified: svnmerge-integrated
   - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7433
   + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7444
Modified: svn:mergeinfo
   - /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433
   + /branches/v0_91_maint:5753-5771
/branches/v0_98_5_maint:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6809,6811,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6906-6909,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444


Property changes on: trunk/matplotlib/doc/pyplots/README
___
Modified: svn:mergeinfo
   - 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433
   + 
/branches/v0_98_5_maint/doc/pyplots/README:6581,6585,6587,6589-6609,6614,6616,6625,6652,6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245
/branches/v0_99_maint/doc/pyplots/README:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444


Property changes on: trunk/matplotlib/doc/sphinxext/gen_gallery.py
___
Modified: svn:mergeinfo
   - /branches/v0_91_maint/doc/_templates/gen_gallery.py:5753-5771
/branches/v0_98_5_maint/doc/sphinxext/gen_gallery.py:6660-6662,6672-6673,6714-6715,6717-6732,6752-6754,6761-6773,6781,6792,6800,6802,6805,6822,6827,6850,6854,6856,6859,6861-6873,6883-6884,6886,6890-6891,6911-6912,6915-6916,6918,6920-6925,6927-6928,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,702

SF.net SVN: matplotlib:[7442] branches/v0_99_maint/lib/matplotlib/cbook.py

2009-08-09 Thread efiring
Revision: 7442
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7442&view=rev
Author:   efiring
Date: 2009-08-10 00:02:56 + (Mon, 10 Aug 2009)

Log Message:
---
patch from sage project: make unicode_safe safer

Modified Paths:
--
branches/v0_99_maint/lib/matplotlib/cbook.py

Modified: branches/v0_99_maint/lib/matplotlib/cbook.py
===
--- branches/v0_99_maint/lib/matplotlib/cbook.py2009-08-09 20:58:24 UTC 
(rev 7441)
+++ branches/v0_99_maint/lib/matplotlib/cbook.py2009-08-10 00:02:56 UTC 
(rev 7442)
@@ -13,13 +13,21 @@
 major, minor1, minor2, s, tmp = sys.version_info
 
 
-# on some systems, locale.getpreferredencoding returns None, which can break 
unicode
-preferredencoding = locale.getpreferredencoding()
+# 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.
 
+try:
+preferredencoding = locale.getpreferredencoding()
+except ValueError:
+preferredencoding = None
+
 def unicode_safe(s):
 if preferredencoding is None: return unicode(s)
 else: return unicode(s, preferredencoding)
 
+
 class converter:
 """
 Base class for handling string -> python type with support for


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins