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
(7) |
2
(14) |
3
(6) |
4
(8) |
5
(6) |
6
(3) |
7
(2) |
8
(22) |
9
(9) |
10
(23) |
11
(14) |
12
(22) |
13
(7) |
14
(3) |
15
(22) |
16
(13) |
17
(18) |
18
(21) |
19
(9) |
20
|
21
(3) |
22
(6) |
23
(5) |
24
|
25
|
26
(3) |
27
|
28
(1) |
29
(11) |
30
(1) |
31
(12) |
|
|
|
Revision: 6479 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6479&view=rev Author: leejjoon Date: 2008年12月02日 22:27:38 +0000 (2008年12月02日) Log Message: ----------- Fixed a bug in the new legend class that didn't allowed a tuple of coordinate vlaues as loc Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/legend.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008年12月02日 22:04:41 UTC (rev 6478) +++ trunk/matplotlib/CHANGELOG 2008年12月02日 22:27:38 UTC (rev 6479) @@ -1,3 +1,6 @@ +2008年12月02日 Fixed a bug in the new legend class that didn't allowed + a tuple of coordinate vlaues as loc. -JJL + 2008年12月02日 Improve checks for external dependencies, using subprocess (instead of deprecated popen*) and distutils (for version checking) - DSD Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2008年12月02日 22:04:41 UTC (rev 6478) +++ trunk/matplotlib/lib/matplotlib/legend.py 2008年12月02日 22:27:38 UTC (rev 6479) @@ -61,6 +61,9 @@ 'upper center' : 9, 'center' : 10, + loc can be a tuple of the noramilzed coordinate values with + respect its parent. + Return value is a sequence of text, line instances that make up the legend """ @@ -100,7 +103,7 @@ axespad = None, # deprecated; use borderaxespad # spacing & pad defined as a fractionof the font-size - borderpad = None, # the fractional whitespace inside the legend border + borderpad = None, # the whitespace inside the legend border labelspacing=None, #the vertical space between the legend entries handlelength=None, # the length of the legend handles handletextpad=None, # the pad between the legend handle and text @@ -119,11 +122,11 @@ Optional keyword arguments: - ================ ========================================= + ================ ================================================= Keyword Description - ================ ========================================= + ================ ================================================= - loc a location code + loc a location code or a tuple of coordinates numpoints the number of points in the legend line prop the font property markerscale the relative size of legend markers vs. original @@ -284,14 +287,22 @@ a.set_transform(self.get_transform()) def _findoffset_best(self, width, height, xdescent, ydescent): - "Heper function to locate the legend" + "Heper function to locate the legend at its best position" ox, oy = self._find_best_position(width, height) return ox+xdescent, oy+ydescent def _findoffset_loc(self, width, height, xdescent, ydescent): - "Heper function to locate the legend" - bbox = Bbox.from_bounds(0, 0, width, height) - x, y = self._get_anchored_bbox(self._loc, bbox, self.parent.bbox) + "Heper function to locate the legend using the location code" + + if iterable(self._loc) and len(self._loc)==2: + # when loc is a tuple of axes(or figure) coordinates. + fx, fy = self._loc + bbox = self.parent.bbox + x, y = bbox.x0 + bbox.width * fx, bbox.y0 + bbox.height * fy + else: + bbox = Bbox.from_bounds(0, 0, width, height) + x, y = self._get_anchored_bbox(self._loc, bbox, self.parent.bbox) + return x+xdescent, y+ydescent def draw(self, renderer): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6478 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6478&view=rev Author: dsdale Date: 2008年12月02日 22:04:41 +0000 (2008年12月02日) Log Message: ----------- removed lingering print statement Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008年12月02日 20:09:44 UTC (rev 6477) +++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008年12月02日 22:04:41 UTC (rev 6478) @@ -110,7 +110,6 @@ FigureCanvasBase.enter_notify_event(self, event) def leaveEvent(self, event): - print event FigureCanvasBase.leave_notify_event(self, event) def mousePressEvent( self, event ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6477 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6477&view=rev Author: mdboom Date: 2008年12月02日 20:09:44 +0000 (2008年12月02日) Log Message: ----------- Round theta ticks to the nearest degree, rather than truncating. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/projections/polar.py Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/projections/polar.py 2008年12月02日 20:08:53 UTC (rev 6476) +++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2008年12月02日 20:09:44 UTC (rev 6477) @@ -137,14 +137,14 @@ def __call__(self, x, pos=None): # \u00b0 : degree symbol if rcParams['text.usetex'] and not rcParams['text.latex.unicode']: - return r"$%d^\circ$" % ((x / npy.pi) * 180.0) + return r"$%0.0f^\circ$" % ((x / npy.pi) * 180.0) else: # we use unicode, rather than mathtext with \circ, so # that it will work correctly with any arbitrary font # (assuming it has a degree sign), whereas 5ドル\circ$ # will only work correctly with one of the supported # math fonts (Computer Modern and STIX) - return u"%d\u00b0" % ((x / npy.pi) * 180.0) + return u"%0.0f\u00b0" % ((x / npy.pi) * 180.0) class RadialLocator(Locator): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6476 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6476&view=rev Author: mdboom Date: 2008年12月02日 20:08:53 +0000 (2008年12月02日) Log Message: ----------- Replace axes when current one is of the wrong projection type. This lets "subplot(111); polar()" work. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/figure.py Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2008年12月02日 19:51:10 UTC (rev 6475) +++ trunk/matplotlib/lib/matplotlib/figure.py 2008年12月02日 20:08:53 UTC (rev 6476) @@ -656,13 +656,8 @@ %(Axes)s """ - key = self._make_key(*args, **kwargs) - if key in self._seen: - ax = self._seen[key] - self.sca(ax) - return ax + kwargs = kwargs.copy() - if not len(args): return if isinstance(args[0], SubplotBase): @@ -680,8 +675,18 @@ projection = 'polar' projection_class = get_projection_class(projection) - a = subplot_class_factory(projection_class)(self, *args, **kwargs) + key = self._make_key(*args, **kwargs) + if key in self._seen: + ax = self._seen[key] + if isinstance(ax, projection_class): + self.sca(ax) + return ax + else: + self.axes.remove(ax) + self._axstack.remove(ax) + + a = subplot_class_factory(projection_class)(self, *args, **kwargs) self.axes.append(a) self._axstack.push(a) self.sca(a) @@ -891,7 +896,20 @@ %(Axes)s """ ax = self._axstack() - if ax is not None: return ax + if ax is not None: + ispolar = kwargs.get('polar', False) + projection = kwargs.get('projection', None) + if ispolar: + if projection is not None and projection != 'polar': + raise ValueError( + "polar=True, yet projection='%s'. " + + "Only one of these arguments should be supplied." % + projection) + projection = 'polar' + + projection_class = get_projection_class(projection) + if isinstance(ax, projection_class): + return ax return self.add_subplot(111, **kwargs) gca.__doc__ = dedent(gca.__doc__) % artist.kwdocd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6475 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6475&view=rev Author: mdboom Date: 2008年12月02日 19:51:10 +0000 (2008年12月02日) Log Message: ----------- suppress gcc-4.3 warnings Modified Paths: -------------- trunk/matplotlib/src/_backend_agg.cpp trunk/matplotlib/src/_image.cpp Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年12月02日 17:55:15 UTC (rev 6474) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年12月02日 19:51:10 UTC (rev 6475) @@ -1216,8 +1216,8 @@ private: inline unsigned vertex(unsigned idx, double* x, double* y) { - size_t m = m_m + ((idx & 0x2) >> 1); - size_t n = m_n + ((idx+1 & 0x2) >> 1); + size_t m = m_m + ((idx & 0x2) >> 1); + size_t n = m_n + (((idx+1) & 0x2) >> 1); double* pair = (double*)PyArray_GETPTR2(m_coordinates, n, m); *x = *pair++; *y = *pair; @@ -1336,11 +1336,15 @@ throw Py::RuntimeError(e); } } catch (...) { - if (free_edgecolors) Py_XDECREF(edgecolors_obj.ptr()); + if (free_edgecolors) { + Py_XDECREF(edgecolors_obj.ptr()); + } throw; } - if (free_edgecolors) Py_XDECREF(edgecolors_obj.ptr()); + if (free_edgecolors) { + Py_XDECREF(edgecolors_obj.ptr()); + } return Py::Object(); } Modified: trunk/matplotlib/src/_image.cpp =================================================================== --- trunk/matplotlib/src/_image.cpp 2008年12月02日 17:55:15 UTC (rev 6474) +++ trunk/matplotlib/src/_image.cpp 2008年12月02日 19:51:10 UTC (rev 6475) @@ -1327,20 +1327,27 @@ void _pcolor_cleanup(PyArrayObject* x, PyArrayObject* y, PyArrayObject *d, unsigned int * rowstarts ,unsigned int*colstarts , float *acols , float *arows) { - if (x) + if (x) { Py_XDECREF(x); - if (y) + } + if (y) { Py_XDECREF(y); - if(d) + } + if(d) { Py_XDECREF(d); - if(rowstarts) + } + if(rowstarts) { PyMem_Free(rowstarts); - if(colstarts) + } + if(colstarts) { PyMem_Free(colstarts); - if(acols) + } + if(acols) { PyMem_Free(acols); - if(arows) + } + if(arows) { PyMem_Free(arows); + } return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6474 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6474&view=rev Author: ryanmay Date: 2008年12月02日 17:55:15 +0000 (2008年12月02日) Log Message: ----------- Begin and end docstrings on newlines. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/quiver.py Modified: trunk/matplotlib/lib/matplotlib/quiver.py =================================================================== --- trunk/matplotlib/lib/matplotlib/quiver.py 2008年12月02日 17:54:44 UTC (rev 6473) +++ trunk/matplotlib/lib/matplotlib/quiver.py 2008年12月02日 17:55:15 UTC (rev 6474) @@ -745,7 +745,8 @@ %s""" % _barbs_doc def _find_tails(self, mag, rounding=True, half=5, full=10, flag=50): - '''Find how many of each of the tail pieces is necessary. Flag + ''' + Find how many of each of the tail pieces is necessary. Flag specifies the increment for a flag, barb for a full barb, and half for half a barb. Mag should be the magnitude of a vector (ie. >= 0). @@ -777,7 +778,8 @@ def _make_barbs(self, u, v, nflags, nbarbs, half_barb, empty_flag, length, pivot, sizes, fill_empty, flip): - '''This function actually creates the wind barbs. *u* and *v* + ''' + This function actually creates the wind barbs. *u* and *v* are components of the vector in the *x* and *y* directions, respectively. @@ -817,7 +819,8 @@ This function returns list of arrays of vertices, defining a polygon for each of the wind barbs. These polygons have been rotated to properly - align with the vector direction.''' + align with the vector direction. + ''' #These control the spacing and size of barb elements relative to the #length of the shaft This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6473 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6473&view=rev Author: mdboom Date: 2008年12月02日 17:54:44 +0000 (2008年12月02日) Log Message: ----------- Fix axhline etc. with non-linear scales. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/transforms.py Modified: trunk/matplotlib/lib/matplotlib/transforms.py =================================================================== --- trunk/matplotlib/lib/matplotlib/transforms.py 2008年12月02日 17:53:45 UTC (rev 6472) +++ trunk/matplotlib/lib/matplotlib/transforms.py 2008年12月02日 17:54:44 UTC (rev 6473) @@ -1237,6 +1237,7 @@ of the same dimensions. """ pass_through = True + is_affine = False def __init__(self, child): """ @@ -1288,10 +1289,6 @@ self.invalidate() self._invalid = 0 - def _get_is_affine(self): - return self._child.is_affine - is_affine = property(_get_is_affine) - def _get_is_separable(self): return self._child.is_separable is_separable = property(_get_is_separable) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6472 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6472&view=rev Author: ryanmay Date: 2008年12月02日 17:53:45 +0000 (2008年12月02日) Log Message: ----------- Add information to docstring for pyplot.subplot() Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2008年12月02日 17:11:07 UTC (rev 6471) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2008年12月02日 17:53:45 UTC (rev 6472) @@ -588,11 +588,6 @@ ``subplot(111)`` is the default axis. - The background color of the subplot can be specified via keyword - argument *axisbg*, which takes a color string as value, as in:: - - subplot(211, axisbg='y') - New subplots that overlap old will delete the old axes. If you do not want this behavior, use :meth:`matplotlib.figure.Figure.add_subplot` or the @@ -602,11 +597,35 @@ plot([1,2,3]) # implicitly creates subplot(111) subplot(211) # overlaps, subplot(111) is killed plot(rand(12), rand(12)) + subplot(212, axisbg='y') # creates 2nd subplot with yellow background + Keyword arguments: + + *axisbg*: + The background color of the subplot, which can be any valid + color specifier. See :module:`matplotlib.colors` for more + information. + + *polar*: + A boolean flag indicating whether the subplot plot should be + a polar projection. Defaults to False. + + *projection*: + A string giving the name of a custom projection to be used + for the subplot. This projection must have been previously + registered. See :func:`matplotlib.projections.register_projection` + .. seealso:: :func:`~matplotlib.pyplot.axes`: For additional information on :func:`axes` and :func:`subplot` keyword arguments. + + :file:`examples/pylab_examples/polar_scatter.py` + + **Example:** + + .. plot:: mpl_examples/pylab_examples/subplot_demo.py + """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6471 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6471&view=rev Author: dsdale Date: 2008年12月02日 17:11:07 +0000 (2008年12月02日) Log Message: ----------- improved checks for external dependencies Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/__init__.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008年12月02日 17:07:57 UTC (rev 6470) +++ trunk/matplotlib/CHANGELOG 2008年12月02日 17:11:07 UTC (rev 6471) @@ -1,3 +1,7 @@ +2008年12月02日 Improve checks for external dependencies, using subprocess + (instead of deprecated popen*) and distutils (for version + checking) - DSD + 2008年11月30日 Reimplementaion of the legend which supports baseline alignement, multi-column, and expand mode. - JJL Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2008年12月02日 17:07:57 UTC (rev 6470) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2008年12月02日 17:11:07 UTC (rev 6471) @@ -93,8 +93,9 @@ __revision__ = '$Revision$' __date__ = '$Date$' -import os, re, shutil, sys, warnings +import os, re, shutil, subprocess, sys, warnings import distutils.sysconfig +import distutils.version NEWCONFIG = False @@ -256,10 +257,10 @@ def checkdep_dvipng(): try: - stdin, stdout = os.popen4('dvipng -version') - line = stdout.readlines()[1] + s = subprocess.Popen(['dvipng','-version'], stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + line = s.stdout.readlines()[1] v = line.split()[-1] - float(v) return v except (IndexError, ValueError): return None @@ -267,47 +268,45 @@ def checkdep_ghostscript(): try: if sys.platform == 'win32': - command = 'gswin32c --version' + command_args = ['gswin32c', '--version'] else: - command = 'gs --version' - stdin, stdout = os.popen4(command) - v = stdout.read()[:-1] - vtest = '.'.join(v.split('.')[:2]) # deal with version numbers like '7.07.1' - float(vtest) - return vtest + command_args = ['gs', '--version'] + s = subprocess.Popen(command_args, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + v = s.stdout.read()[:-1] + return v except (IndexError, ValueError): return None def checkdep_tex(): try: - stdin, stdout = os.popen4('tex -version') - line = stdout.readlines()[0] + s = subprocess.Popen(['tex','-version'], stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + line = s.stdout.readlines()[0] pattern = '3\.1\d+' match = re.search(pattern, line) v = match.group(0) - float(v) return v except (IndexError, ValueError, AttributeError): return None def checkdep_pdftops(): try: - stdin, stdout = os.popen4('pdftops -v') - for line in stdout.readlines(): + s = subprocess.Popen(['pdftops','-v'], stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + for line in s.stderr: if 'version' in line: v = line.split()[-1] - float(v) return v except (IndexError, ValueError, UnboundLocalError): return None def compare_versions(a, b): - "return True if a is greater than b" + "return True if a is greater than or equal to b" if a: - a = [int(i) for i in a.split('.')] - b = [int(i) for i in b.split('.')] - if a[0]>b[0]: return True - elif (a[0]==b[0]) and (a[1]>=b[1]): return True + a = distutils.version.LooseVersion(a) + b = distutils.version.LooseVersion(b) + if a>=b: return True else: return False else: return False @@ -330,8 +329,13 @@ if s == 'xpdf': pdftops_req = '3.0' + pdftops_req_alt = '0.9' # poppler version numbers, ugh pdftops_v = checkdep_pdftops() - if compare_versions(pdftops_v, pdftops_req): pass + if compare_versions(pdftops_v, pdftops_req): + pass + elif compare_versions(pdftops_v, pdftops_req_alt) and not \ + compare_versions(pdftops_v, '1.0'): + pass else: flag = False warnings.warn(('matplotlibrc ps.usedistiller can not be set to ' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6470 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6470&view=rev Author: dsdale Date: 2008年12月02日 17:07:57 +0000 (2008年12月02日) Log Message: ----------- Pass qt* enter and leave events to FigureCanvasBase Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_qt.py trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008年12月02日 15:52:39 UTC (rev 6469) +++ trunk/matplotlib/lib/matplotlib/backends/backend_qt.py 2008年12月02日 17:07:57 UTC (rev 6470) @@ -102,6 +102,12 @@ w,h = self.get_width_height() self.resize( w, h ) + def enterEvent(self, event): + FigureCanvasBase.enter_notify_event(self, event) + + def leaveEvent(self, event): + FigureCanvasBase.leave_notify_event(self, event) + def mousePressEvent( self, event ): x = event.pos().x() # flipy so y=0 is bottom of canvas Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008年12月02日 15:52:39 UTC (rev 6469) +++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2008年12月02日 17:07:57 UTC (rev 6470) @@ -105,8 +105,12 @@ def __timerEvent(self, event): # hide until we can test and fix self.mpl_idle_event(event) - + + def enterEvent(self, event): + FigureCanvasBase.enter_notify_event(self, event) + def leaveEvent(self, event): + print event FigureCanvasBase.leave_notify_event(self, event) def mousePressEvent( self, event ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6469 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6469&view=rev Author: mdboom Date: 2008年12月02日 15:52:39 +0000 (2008年12月02日) Log Message: ----------- Minor formatting changes. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/transforms.py Modified: trunk/matplotlib/lib/matplotlib/transforms.py =================================================================== --- trunk/matplotlib/lib/matplotlib/transforms.py 2008年12月02日 15:40:44 UTC (rev 6468) +++ trunk/matplotlib/lib/matplotlib/transforms.py 2008年12月02日 15:52:39 UTC (rev 6469) @@ -313,7 +313,8 @@ return [min(self.get_points()[:, 0]), min(self.get_points()[:, 1])] min = property(_get_min, None, None, """ - (property) :attr:`min` is the bottom-left corner of the bounding box.""") + (property) :attr:`min` is the bottom-left corner of the bounding + box.""") def _get_max(self): return [max(self.get_points()[:, 0]), @@ -324,41 +325,44 @@ def _get_intervalx(self): return self.get_points()[:, 0] intervalx = property(_get_intervalx, None, None, """ - (property) :attr:`intervalx` is the pair of *x* coordinates that define the - bounding box. It is not guaranteed to be sorted from left to right.""") + (property) :attr:`intervalx` is the pair of *x* coordinates that define + the bounding box. It is not guaranteed to be sorted from left to + right.""") def _get_intervaly(self): return self.get_points()[:, 1] intervaly = property(_get_intervaly, None, None, """ - (property) :attr:`intervaly` is the pair of *y* coordinates that define the - bounding box. It is not guaranteed to be sorted from bottom to top.""") + (property) :attr:`intervaly` is the pair of *y* coordinates that define + the bounding box. It is not guaranteed to be sorted from bottom to + top.""") def _get_width(self): points = self.get_points() return points[1, 0] - points[0, 0] width = property(_get_width, None, None, """ - (property) The width of the bounding box. It may be negative if :attr:`x1` < - :attr:`x0`.""") + (property) The width of the bounding box. It may be negative if + :attr:`x1` < :attr:`x0`.""") def _get_height(self): points = self.get_points() return points[1, 1] - points[0, 1] height = property(_get_height, None, None, """ - (property) The height of the bounding box. It may be negative if :attr:`y1` < - :attr:`y0`.""") + (property) The height of the bounding box. It may be negative if + :attr:`y1` < :attr:`y0`.""") def _get_size(self): points = self.get_points() return points[1] - points[0] size = property(_get_size, None, None, """ - (property) The width and height of the bounding box. May be negative, in the same - way as :attr:`width` and :attr:`height`.""") + (property) The width and height of the bounding box. May be negative, + in the same way as :attr:`width` and :attr:`height`.""") def _get_bounds(self): x0, y0, x1, y1 = self.get_points().flatten() return (x0, y0, x1 - x0, y1 - y0) bounds = property(_get_bounds, None, None, """ - (property) Returns (:attr:`x0`, :attr:`y0`, :attr:`width`, :attr:`height`).""") + (property) Returns (:attr:`x0`, :attr:`y0`, :attr:`width`, + :attr:`height`).""") def _get_extents(self): return self.get_points().flatten().copy() @@ -788,7 +792,8 @@ - when False, include the existing bounds of the :class:`Bbox`. - when None, use the last value passed to :meth:`ignore`. """ - warnings.warn("update_from_data requires a memory copy -- please replace with update_from_data_xy") + warnings.warn( + "update_from_data requires a memory copy -- please replace with update_from_data_xy") xy = np.hstack((x.reshape((len(x), 1)), y.reshape((len(y), 1)))) return self.update_from_data_xy(xy, ignore) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6468 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6468&view=rev Author: jdh2358 Date: 2008年12月02日 15:40:44 +0000 (2008年12月02日) Log Message: ----------- added gregor's wx enter/leave patch - fixed figure_enter problem Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py trunk/matplotlib/lib/matplotlib/backends/backend_wx.py Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2008年12月02日 15:32:07 UTC (rev 6467) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2008年12月02日 15:40:44 UTC (rev 6468) @@ -791,9 +791,6 @@ 'process the figure/axes enter leave events' if LocationEvent.lastevent is not None: last = LocationEvent.lastevent - if last.canvas!=self.canvas: - # process figure enter/leave event - self.canvas.callbacks.process('figure_enter_event', self) if last.inaxes!=self.inaxes: # process axes enter/leave events if last.inaxes is not None: @@ -803,8 +800,6 @@ else: # process a figure enter event - self.canvas.callbacks.process('figure_enter_event', self) - # process an axes enter event if we are over an axes if self.inaxes is not None: self.canvas.callbacks.process('axes_enter_event', self) @@ -952,8 +947,6 @@ 'pick_event', 'idle_event', 'figure_enter_event', - # todo: we only process this when a mouse enters a different - # figure -- we need to connect to the GUI leavel event 'figure_leave_event', 'axes_enter_event', 'axes_leave_event' @@ -1216,7 +1209,18 @@ self.callbacks.process('figure_leave_event', LocationEvent.lastevent) LocationEvent.lastevent = None + def enter_notify_event(self, guiEvent=None): + """ + Backend derived classes should call this function when entering + canvas + *guiEvent* + the native UI event that generated the mpl event + + """ + event = Event('figure_enter_event', self, guiEvent) + self.callbacks.process('figure_enter_event', event) + def idle_event(self, guiEvent=None): 'call when GUI is idle' s = 'idle_event' Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008年12月02日 15:32:07 UTC (rev 6467) +++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2008年12月02日 15:40:44 UTC (rev 6468) @@ -147,6 +147,7 @@ gdk.EXPOSURE_MASK | gdk.KEY_PRESS_MASK | gdk.KEY_RELEASE_MASK | + gdk.ENTER_NOTIFY_MASK | gdk.LEAVE_NOTIFY_MASK | gdk.POINTER_MOTION_MASK | gdk.POINTER_MOTION_HINT_MASK) @@ -171,6 +172,7 @@ self.connect('key_release_event', self.key_release_event) self.connect('motion_notify_event', self.motion_notify_event) self.connect('leave_notify_event', self.leave_notify_event) + self.connect('enter_notify_event', self.enter_notify_event) self.set_events(self.__class__.event_mask) @@ -243,6 +245,9 @@ def leave_notify_event(self, widget, event): FigureCanvasBase.leave_notify_event(self, event) + def enter_notify_event(self, widget, event): + FigureCanvasBase.enter_notify_event(self, event) + def _get_key(self, event): if event.keyval in self.keyvald: key = self.keyvald[event.keyval] Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008年12月02日 15:32:07 UTC (rev 6467) +++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2008年12月02日 15:40:44 UTC (rev 6468) @@ -1263,10 +1263,10 @@ FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=evt) def _onLeave(self, evt): - """Mouse has left the window; fake a motion event.""" + """Mouse has left the window.""" evt.Skip() - FigureCanvasBase.motion_notify_event(self, -1, -1, guiEvent=evt) + FigureCanvasBase.leave_notify_event(self, guiEvent = evt) ######################################################################## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6467 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6467&view=rev Author: mdboom Date: 2008年12月02日 15:32:07 +0000 (2008年12月02日) Log Message: ----------- Be more conservative about chunking large paths -- filled paths shouldn't be chunked -- or at least would require a more complex algorithm. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008年12月02日 15:27:23 UTC (rev 6466) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008年12月02日 15:32:07 UTC (rev 6467) @@ -79,7 +79,7 @@ def draw_path(self, gc, path, transform, rgbFace=None): nmax = rcParams['agg.path.chunksize'] # here at least for testing npts = path.vertices.shape[0] - if nmax > 100 and npts > nmax and path.should_simplify: + if nmax > 100 and npts > nmax and path.should_simplify and rgbFace is None: nch = npy.ceil(npts/float(nmax)) chsize = int(npy.ceil(npts/nch)) i0 = npy.arange(0, npts, chsize) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6466 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6466&view=rev Author: mdboom Date: 2008年12月02日 15:27:23 +0000 (2008年12月02日) Log Message: ----------- Remove one-pixel offset in clipbox code. Modified Paths: -------------- trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年12月01日 19:35:39 UTC (rev 6465) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年12月02日 15:27:23 UTC (rev 6466) @@ -312,8 +312,8 @@ double l, b, r, t; if (py_convert_bbox(cliprect.ptr(), l, b, r, t)) { - rasterizer.clip_box(int(mpl_round(l)) + 1, height - int(mpl_round(b)), - int(mpl_round(r)), height - int(mpl_round(t))); + rasterizer.clip_box(int(mpl_round(l)), height - int(mpl_round(b)), + int(mpl_round(r)), height - int(mpl_round(t))); } _VERBOSE("RendererAgg::set_clipbox done"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.