You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(10) |
2
(6) |
3
|
4
(10) |
5
(5) |
6
(5) |
7
(6) |
8
(2) |
9
(5) |
10
(7) |
11
(5) |
12
(8) |
13
(5) |
14
(7) |
15
(3) |
16
(1) |
17
(1) |
18
|
19
(1) |
20
(6) |
21
(6) |
22
(3) |
23
(3) |
24
(7) |
25
|
26
(5) |
27
(1) |
28
(3) |
29
(2) |
30
(3) |
|
|
|
Revision: 8380 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8380&view=rev Author: efiring Date: 2010年06月04日 22:06:07 +0000 (2010年6月04日) Log Message: ----------- [2901582] Don't fail if the previous LocationEvent was in a canvas that no longer exists. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backend_bases.py Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2010年06月04日 20:57:33 UTC (rev 8379) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2010年06月04日 22:06:07 UTC (rev 8380) @@ -1069,12 +1069,13 @@ class LocationEvent(Event): """ - A event that has a screen location + An event that has a screen location The following additional attributes are defined and shown with - their default values + their default values. - In addition to the :class:`Event` attributes, the following event attributes are defined: + In addition to the :class:`Event` attributes, the following + event attributes are defined: *x* x position - pixels from left of canvas @@ -1148,8 +1149,16 @@ last = LocationEvent.lastevent if last.inaxes!=self.inaxes: # process axes enter/leave events - if last.inaxes is not None: - last.canvas.callbacks.process('axes_leave_event', last) + try: + if last.inaxes is not None: + last.canvas.callbacks.process('axes_leave_event', last) + except: + pass + # See ticket 2901582. + # I think this is a valid exception to the rule + # against catching all exceptions; if anything goes + # wrong, we simply want to move on and process the + # current event. if self.inaxes is not None: self.canvas.callbacks.process('axes_enter_event', self) @@ -1158,12 +1167,12 @@ if self.inaxes is not None: self.canvas.callbacks.process('axes_enter_event', self) - LocationEvent.lastevent = self + class MouseEvent(LocationEvent): """ A mouse event ('button_press_event', 'button_release_event', 'scroll_event', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8379 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8379&view=rev Author: efiring Date: 2010年06月04日 20:57:33 +0000 (2010年6月04日) Log Message: ----------- [3011650] don't raise RuntimeError upon importing texmanager Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/texmanager.py Modified: trunk/matplotlib/lib/matplotlib/texmanager.py =================================================================== --- trunk/matplotlib/lib/matplotlib/texmanager.py 2010年06月04日 19:20:47 UTC (rev 8378) +++ trunk/matplotlib/lib/matplotlib/texmanager.py 2010年06月04日 20:57:33 UTC (rev 8379) @@ -65,10 +65,10 @@ 'helpful') version = distutils.version.LooseVersion(version) return version < distutils.version.LooseVersion('1.6') - raise RuntimeError('Could not obtain dvipng version') + mpl.verbose.report('No dvipng was found', 'helpful') + return False - class TexManager: """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8378 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8378&view=rev Author: efiring Date: 2010年06月04日 19:20:47 +0000 (2010年6月04日) Log Message: ----------- suppress spurious exceptions when killing a qt4 session. While investigating 2927619 I found that killing a python session with an active qt4 window generated Exceptions because callbacks were being executed after their modules had been deleted. There may be a cleaner solution than the one I implemented, which is merely to catch the useless exceptions. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2010年06月04日 18:47:48 UTC (rev 8377) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2010年06月04日 19:20:47 UTC (rev 8378) @@ -1447,8 +1447,14 @@ 'close_event' with a :class:`CloseEvent` """ s = 'close_event' - event = CloseEvent(s, self, guiEvent=guiEvent) - self.callbacks.process(s, event) + try: + event = CloseEvent(s, self, guiEvent=guiEvent) + self.callbacks.process(s, event) + except TypeError: + pass + # Suppress the TypeError when the python session is being killed. + # It may be that a better solution would be a mechanism to + # disconnect all callbacks upon shutdown. def key_press_event(self, key, guiEvent=None): """ Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2010年06月04日 18:47:48 UTC (rev 8377) +++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4.py 2010年06月04日 19:20:47 UTC (rev 8378) @@ -87,7 +87,7 @@ class TimerQT(TimerBase): ''' Subclass of :class:`backend_bases.TimerBase` that uses Qt4 timer events. - + Attributes: * interval: The time between timer events in milliseconds. Default is 1000 ms. @@ -99,7 +99,7 @@ ''' def __init__(self, *args, **kwargs): TimerBase.__init__(self, *args, **kwargs) - + # Create a new timer and connect the timeout() signal to the # _on_timer method. self._timer = QtCore.QTimer() @@ -237,9 +237,9 @@ Creates a new backend-specific subclass of :class:`backend_bases.Timer`. This is useful for getting periodic events through the backend's native event loop. Implemented only for backends with GUIs. - + optional arguments: - + *interval* Timer interval in milliseconds *callbacks* @@ -341,8 +341,15 @@ def _widgetclosed( self ): if self.window._destroying: return self.window._destroying = True - Gcf.destroy(self.num) + try: + Gcf.destroy(self.num) + except AttributeError: + pass + # It seems that when the python session is killed, + # Gcf can get destroyed before the Gcf.destroy + # line is run, leading to a useless AttributeError. + def _get_toolbar(self, canvas, parent): # must be inited after the window, drawingArea and figure # attrs are set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8377 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8377&view=rev Author: efiring Date: 2010年06月04日 18:47:48 +0000 (2010年6月04日) Log Message: ----------- [2941338] backend_wx: disconnect drag before destroying frame Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_wx.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2010年06月04日 15:40:44 UTC (rev 8376) +++ trunk/matplotlib/lib/matplotlib/backends/backend_wx.py 2010年06月04日 18:47:48 UTC (rev 8377) @@ -230,7 +230,7 @@ class TimerWx(TimerBase): ''' Subclass of :class:`backend_bases.TimerBase` that uses WxTimer events. - + Attributes: * interval: The time between timer events in milliseconds. Default is 1000 ms. @@ -1027,9 +1027,9 @@ Creates a new backend-specific subclass of :class:`backend_bases.Timer`. This is useful for getting periodic events through the backend's native event loop. Implemented only for backends with GUIs. - + optional arguments: - + *interval* Timer interval in milliseconds *callbacks* @@ -1546,6 +1546,8 @@ return self.toolbar def Destroy(self, *args, **kwargs): + self.canvas.mpl_disconnect(self.toolbar._idDrag) + # Rationale for line above: see issue 2941338. wx.Frame.Destroy(self, *args, **kwargs) if self.toolbar is not None: self.toolbar.Destroy() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8376 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8376&view=rev Author: mdboom Date: 2010年06月04日 15:40:44 +0000 (2010年6月04日) Log Message: ----------- Minor change to SVG baseline image. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/formatter_ticker_003.svg Modified: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/formatter_ticker_003.svg =================================================================== --- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/formatter_ticker_003.svg 2010年06月04日 13:05:24 UTC (rev 8375) +++ trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/formatter_ticker_003.svg 2010年06月04日 15:40:44 UTC (rev 8376) @@ -222,7 +222,7 @@ <path id="c_0bce5afba2dc6b9024b26277c38ad8e8" d="M56.203125 -29.593750l0.000000 4.390625l-41.312500 0.000000q0.593750 9.281250 5.593750 14.140625q5.000000 4.859375 13.937500 4.859375q5.171875 0.000000 10.031250 -1.265625q4.859375 -1.265625 9.656250 -3.812500l0.000000 8.500000q-4.843750 2.046875 -9.921875 3.125000q-5.078125 1.078125 -10.296875 1.078125q-13.093750 0.000000 -20.734375 -7.609375q-7.640625 -7.625000 -7.640625 -20.625000q0.000000 -13.421875 7.250000 -21.296875q7.250000 -7.890625 19.562500 -7.890625q11.031250 0.000000 17.453125 7.109375q6.421875 7.093750 6.421875 19.296875M47.218750 -32.234375q-0.093750 -7.359375 -4.125000 -11.750000q-4.031250 -4.406250 -10.671875 -4.406250q-7.515625 0.000000 -12.031250 4.250000q-4.515625 4.250000 -5.203125 11.968750z"/> <path id="c_d41d8cd98f00b204e9800998ecf8427e" d=""/> </defs> -<g style="fill: #000000; opacity: 1.000000" transform="translate(262.254687,416.003125)scale(0.120000)"> +<g style="fill: #000000; opacity: 1.000000" transform="translate(262.082812,416.003125)scale(0.120000)"> <use xlink:href="#c_801fe2e877fad46da27c898b407b3b54"/> <use xlink:href="#c_7b26b13f539f13a4c64eef23b6952d29" x="59.179688"/> <use xlink:href="#c_5099edb83619131346ae654950954dea" x="95.263672"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8375 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8375&view=rev Author: jdh2358 Date: 2010年06月04日 13:05:24 +0000 (2010年6月04日) Log Message: ----------- fix the web page archive link to point to sf rather than nabble Modified Paths: -------------- branches/v0_99_maint/doc/_templates/indexsidebar.html Modified: branches/v0_99_maint/doc/_templates/indexsidebar.html =================================================================== --- branches/v0_99_maint/doc/_templates/indexsidebar.html 2010年06月04日 13:04:56 UTC (rev 8374) +++ branches/v0_99_maint/doc/_templates/indexsidebar.html 2010年06月04日 13:05:24 UTC (rev 8375) @@ -46,7 +46,7 @@ <p>Check the <a href="{{ pathto('users/index') }}">user guide</a>, the <a href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ pathto('api/index') }}">api</a> docs, -<a href="http://www.nabble.com/matplotlib---users-f2906.html">archives</a>, +<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=matplotlib-users">archives</a>, and join the matplotlib mailing <a href="http://sourceforge.net/mail/?group_id=80706">lists</a>. The <a href="{{ pathto('search') }}">search</a> tool searches all of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8374 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8374&view=rev Author: jdh2358 Date: 2010年06月04日 13:04:56 +0000 (2010年6月04日) Log Message: ----------- fix the web page archive link to point to sf rather than nabble Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2010年06月04日 12:48:54 UTC (rev 8373) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2010年06月04日 13:04:56 UTC (rev 8374) @@ -46,7 +46,7 @@ <p>Check the <a href="{{ pathto('users/index') }}">user guide</a>, the <a href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ pathto('api/index') }}">api</a> docs, -<a href="http://www.nabble.com/matplotlib---users-f2906.html">archives</a>, +<a href="http://sourceforge.net/mailarchive/forum.php?forum_name=matplotlib-users">archives</a>, and join the matplotlib mailing <a href="http://sourceforge.net/mail/?group_id=80706">lists</a>. The <a href="{{ pathto('search') }}">search</a> tool searches all of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8373 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8373&view=rev Author: mdboom Date: 2010年06月04日 12:48:54 +0000 (2010年6月04日) Log Message: ----------- [3010045] leading whitespace removed from text Modified Paths: -------------- trunk/matplotlib/src/ft2font.cpp Modified: trunk/matplotlib/src/ft2font.cpp =================================================================== --- trunk/matplotlib/src/ft2font.cpp 2010年06月04日 03:37:56 UTC (rev 8372) +++ trunk/matplotlib/src/ft2font.cpp 2010年06月04日 12:48:54 UTC (rev 8373) @@ -916,15 +916,15 @@ for ( size_t n = 0; n < glyphs.size(); n++ ) { FT_BBox glyph_bbox; FT_Glyph_Get_CBox( glyphs[n], ft_glyph_bbox_subpixels, &glyph_bbox ); + if ( glyph_bbox.xMin < bbox.xMin ) bbox.xMin = glyph_bbox.xMin; + if ( glyph_bbox.yMin < bbox.yMin ) bbox.yMin = glyph_bbox.yMin; if (glyph_bbox.xMin == glyph_bbox.xMax) { right_side += glyphs[n]->advance.x >> 10; if ( right_side > bbox.xMax ) bbox.xMax = right_side; } else { - if ( glyph_bbox.xMin < bbox.xMin ) bbox.xMin = glyph_bbox.xMin; - if ( glyph_bbox.yMin < bbox.yMin ) bbox.yMin = glyph_bbox.yMin; if ( glyph_bbox.xMax > bbox.xMax ) bbox.xMax = glyph_bbox.xMax; - if ( glyph_bbox.yMax > bbox.yMax ) bbox.yMax = glyph_bbox.yMax; } + if ( glyph_bbox.yMax > bbox.yMax ) bbox.yMax = glyph_bbox.yMax; } /* check that we really grew the string bbox */ if ( bbox.xMin > bbox.xMax ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8372 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8372&view=rev Author: efiring Date: 2010年06月04日 03:37:56 +0000 (2010年6月04日) Log Message: ----------- alpha is left as None until you really want to specify it; closes 2957321. I think this, together with some other recent commits, fixes various longstanding problems in the way alpha has been handled. The default value is left as None, and with this value, existing alpha specified in RGBA sequences will not be overridden. Substitution of the default value of 1 for a value of None is delayed until the GraphicsContextBase set_alpha method is executed. Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/figimage_demo.py trunk/matplotlib/lib/matplotlib/artist.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/cm.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/colorbar.py trunk/matplotlib/lib/matplotlib/contour.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/examples/pylab_examples/figimage_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/figimage_demo.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/examples/pylab_examples/figimage_demo.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -1,5 +1,6 @@ """ -See pcolor_demo2 for a much faster way of generating pcolor plots +This illustrates placing images directly in the figure, with no axes. + """ import numpy as np import matplotlib @@ -12,19 +13,9 @@ Z.shape = 100,100 Z[:,50:] = 1. -ax = fig.add_subplot(111) -ax.grid(True) - im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='lower') im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower') - -if 0: - dpi = 72 - plt.savefig('figimage_%d.png'%dpi, dpi=dpi, facecolor='gray') - plt.savefig('figimage_%d.pdf'%dpi, dpi=dpi, facecolor='gray') - plt.savefig('figimage_%d.svg'%dpi, dpi=dpi, facecolor='gray') - plt.savefig('figimage_%d.eps'%dpi, dpi=dpi, facecolor='gray') plt.show() Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/artist.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -78,7 +78,7 @@ self._transformSet = False self._visible = True self._animated = False - self._alpha = 1.0 + self._alpha = None self.clipbox = None self._clippath = None self._clipon = True Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/axes.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -372,7 +372,7 @@ Keyword Description ================ ========================================= *adjustable* [ 'box' | 'datalim' | 'box-forced'] - *alpha* float: the alpha transparency + *alpha* float: the alpha transparency (can be None) *anchor* [ 'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W' ] *aspect* [ 'auto' | 'equal' | aspect_ratio ] @@ -5338,14 +5338,14 @@ @docstring.dedent_interpd def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None, - vmin=None, vmax=None, alpha=1.0, linewidths=None, + vmin=None, vmax=None, alpha=None, linewidths=None, faceted=True, verts=None, **kwargs): """ call signatures:: scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, - vmin=None, vmax=None, alpha=1.0, linewidths=None, + vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, **kwargs) Make a scatter plot of *x* versus *y*, where *x*, *y* are @@ -5438,7 +5438,7 @@ *norm* instance, your settings for *vmin* and *vmax* will be ignored. - *alpha*: 0 <= scalar <= 1 + *alpha*: 0 <= scalar <= 1 or None The alpha value for the patches *linewidths*: [ None | scalar | sequence ] @@ -5656,7 +5656,7 @@ def hexbin(self, x, y, C = None, gridsize = 100, bins = None, xscale = 'linear', yscale = 'linear', extent = None, cmap=None, norm=None, vmin=None, vmax=None, - alpha=1.0, linewidths=None, edgecolors='none', + alpha=None, linewidths=None, edgecolors='none', reduce_C_function = np.mean, mincnt=None, marginals=False, **kwargs): """ @@ -5665,7 +5665,7 @@ hexbin(x, y, C = None, gridsize = 100, bins = None, xscale = 'linear', yscale = 'linear', cmap=None, norm=None, vmin=None, vmax=None, - alpha=1.0, linewidths=None, edgecolors='none' + alpha=None, linewidths=None, edgecolors='none' reduce_C_function = np.mean, mincnt=None, marginals=True **kwargs) @@ -5744,7 +5744,7 @@ array *C* is used. Note if you pass a norm instance, your settings for *vmin* and *vmax* will be ignored. - *alpha*: scalar + *alpha*: scalar between 0 and 1, or None the alpha value for the patches *linewidths*: [ None | scalar ] @@ -6438,14 +6438,14 @@ @docstring.dedent_interpd def imshow(self, X, cmap=None, norm=None, aspect=None, - interpolation=None, alpha=1.0, vmin=None, vmax=None, + interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, shape=None, filternorm=1, filterrad=4.0, imlim=None, resample=None, url=None, **kwargs): """ call signature:: imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, - alpha=1.0, vmin=None, vmax=None, origin=None, extent=None, + alpha=None, vmin=None, vmax=None, origin=None, extent=None, **kwargs) Display the image in *X* to current axes. *X* may be a float @@ -6505,6 +6505,7 @@ *alpha*: scalar The alpha blending value, between 0 (transparent) and 1 (opaque) + or *None* *origin*: [ None | 'upper' | 'lower' ] Place the [0,0] index of the array in the upper left or lower left @@ -6673,7 +6674,7 @@ An mpl color or sequence of colors will set the edge color - *alpha*: 0 <= scalar <= 1 + *alpha*: 0 <= scalar <= 1 or *None* the alpha blending value Return value is a :class:`matplotlib.collection.Collection` @@ -6729,7 +6730,7 @@ if not self._hold: self.cla() - alpha = kwargs.pop('alpha', 1.0) + alpha = kwargs.pop('alpha', None) norm = kwargs.pop('norm', None) cmap = kwargs.pop('cmap', None) vmin = kwargs.pop('vmin', None) @@ -6858,7 +6859,7 @@ An mpl color or sequence of colors will set the edge color - *alpha*: 0 <= scalar <= 1 + *alpha*: 0 <= scalar <= 1 or *None* the alpha blending value Return value is a :class:`matplotlib.collection.QuadMesh` @@ -6878,7 +6879,7 @@ """ if not self._hold: self.cla() - alpha = kwargs.pop('alpha', 1.0) + alpha = kwargs.pop('alpha', None) norm = kwargs.pop('norm', None) cmap = kwargs.pop('cmap', None) vmin = kwargs.pop('vmin', None) @@ -7003,7 +7004,7 @@ luminance data. If either are *None*, the min and max of the color array *C* is used. If you pass a norm instance, *vmin* and *vmax* will be *None*. - *alpha*: 0 <= scalar <= 1 + *alpha*: 0 <= scalar <= 1 or *None* the alpha blending value Return value is an image if a regular or rectangular grid @@ -7014,7 +7015,7 @@ if not self._hold: self.cla() - alpha = kwargs.pop('alpha', 1.0) + alpha = kwargs.pop('alpha', None) norm = kwargs.pop('norm', None) cmap = kwargs.pop('cmap', None) vmin = kwargs.pop('vmin', None) Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -727,6 +727,8 @@ Set the alpha value used for blending - not supported on all backends """ + if alpha is None: + alpha = 1.0 self._alpha = alpha def set_antialiased(self, b): Modified: trunk/matplotlib/lib/matplotlib/cm.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cm.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/cm.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -160,21 +160,25 @@ 'set the colorbar image and axes associated with mappable' self.colorbar = im, ax - def to_rgba(self, x, alpha=1.0, bytes=False): + def to_rgba(self, x, alpha=None, bytes=False): '''Return a normalized rgba array corresponding to *x*. If *x* is already an rgb array, insert *alpha*; if it is already rgba, return it unchanged. If *bytes* is True, return rgba as 4 uint8s instead of 4 floats. ''' + if alpha is None: + _alpha = 1.0 + else: + _alpha = alpha try: if x.ndim == 3: if x.shape[2] == 3: if x.dtype == np.uint8: - alpha = np.array(alpha*255, np.uint8) + _alpha = np.array(_alpha*255, np.uint8) m, n = x.shape[:2] xx = np.empty(shape=(m,n,4), dtype = x.dtype) xx[:,:,:3] = x - xx[:,:,3] = alpha + xx[:,:,3] = _alpha elif x.shape[2] == 4: xx = x else: Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/collections.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -443,25 +443,27 @@ def set_alpha(self, alpha): """ Set the alpha tranparencies of the collection. *alpha* must be - a float. + a float or *None*. - ACCEPTS: float + ACCEPTS: float or None """ - try: float(alpha) - except TypeError: raise TypeError('alpha must be a float') - else: - artist.Artist.set_alpha(self, alpha) + if alpha is not None: try: - self._facecolors = mcolors.colorConverter.to_rgba_array( - self._facecolors_original, self._alpha) - except (AttributeError, TypeError, IndexError): - pass - try: - if self._edgecolors_original != 'face': - self._edgecolors = mcolors.colorConverter.to_rgba_array( - self._edgecolors_original, self._alpha) - except (AttributeError, TypeError, IndexError): - pass + float(alpha) + except TypeError: + raise TypeError('alpha must be a float or None') + artist.Artist.set_alpha(self, alpha) + try: + self._facecolors = mcolors.colorConverter.to_rgba_array( + self._facecolors_original, self._alpha) + except (AttributeError, TypeError, IndexError): + pass + try: + if self._edgecolors_original != 'face': + self._edgecolors = mcolors.colorConverter.to_rgba_array( + self._edgecolors_original, self._alpha) + except (AttributeError, TypeError, IndexError): + pass def get_linewidths(self): return self._linewidths Modified: trunk/matplotlib/lib/matplotlib/colorbar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colorbar.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/colorbar.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -197,7 +197,7 @@ def __init__(self, ax, cmap=None, norm=None, - alpha=1.0, + alpha=None, values=None, boundaries=None, orientation='vertical', Modified: trunk/matplotlib/lib/matplotlib/contour.py =================================================================== --- trunk/matplotlib/lib/matplotlib/contour.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/contour.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -655,7 +655,7 @@ self.linewidths = kwargs.get('linewidths', None) self.linestyles = kwargs.get('linestyles', None) - self.alpha = kwargs.get('alpha', 1.0) + self.alpha = kwargs.get('alpha', None) self.origin = kwargs.get('origin', None) self.extent = kwargs.get('extent', None) cmap = kwargs.get('cmap', None) Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/figure.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -340,7 +340,7 @@ def figimage(self, X, xo=0, yo=0, - alpha=1.0, + alpha=None, norm=None, cmap=None, vmin=None, @@ -380,7 +380,7 @@ None, the min and max of the luminance values will be used. Note if you pass a norm instance, the settings for *vmin* and *vmax* will be ignored. - alpha the alpha blending value, default is 1.0 + alpha the alpha blending value, default is None origin [ 'upper' | 'lower' ] Indicates where the [0,0] index of the array is in the upper left or lower left corner of the axes. Defaults to the rc image.origin value Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2010年06月04日 02:40:00 UTC (rev 8371) +++ trunk/matplotlib/lib/matplotlib/text.py 2010年06月04日 03:37:56 UTC (rev 8372) @@ -61,7 +61,7 @@ ========================== ========================================================================= Property Value ========================== ========================================================================= - alpha float + alpha float or None animated [True | False] backgroundcolor any matplotlib color bbox rectangle prop dict plus key 'pad' which is a pad in points This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 8371 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8371&view=rev Author: efiring Date: 2010年06月04日 02:40:00 +0000 (2010年6月04日) Log Message: ----------- axes: quick fix to make fill_between_demo work again Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/colors.py trunk/matplotlib/lib/matplotlib/finance.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2010年06月02日 21:56:39 UTC (rev 8370) +++ trunk/matplotlib/lib/matplotlib/axes.py 2010年06月04日 02:40:00 UTC (rev 8371) @@ -6278,13 +6278,14 @@ if interpolate: def get_interp_point(ind): - x_values = x[ind-1:ind+1] - diff_values = y1[ind-1:ind+1] - y2[ind-1:ind+1] - y1_values = y1[ind-1:ind+1] + im1 = max(ind-1, 0) + x_values = x[im1:ind+1] + diff_values = y1[im1:ind+1] - y2[im1:ind+1] + y1_values = y1[im1:ind+1] if len(diff_values) == 2: if np.ma.is_masked(diff_values[1]): - return x[ind-1], y1[ind-1] + return x[im1], y1[im1] elif np.ma.is_masked(diff_values[0]): return x[ind], y1[ind] Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2010年06月02日 21:56:39 UTC (rev 8370) +++ trunk/matplotlib/lib/matplotlib/colors.py 2010年06月04日 02:40:00 UTC (rev 8371) @@ -382,10 +382,17 @@ if (c.ravel() > 1).any() or (c.ravel() < 0).any(): raise ValueError( "number in rgba sequence is outside 0-1 range") - # looks like rgba already, nothing to be done; do - # we want to apply alpha here if - # (c[:,3]==1).all() ? - return np.asarray(c, np.float) + result = np.asarray(c, np.float) + if alpha is not None: + if alpha > 1 or alpha < 0: + raise ValueError("alpha must be in 0-1 range") + result[:,3] = alpha + return result + # This alpha operation above is new, and depends + # on higher levels to refrain from setting alpha + # to values other than None unless there is + # intent to override any existing alpha values. + # It must be some other sequence of color specs. result = np.zeros((nc, 4), dtype=np.float) for i, cc in enumerate(c): Modified: trunk/matplotlib/lib/matplotlib/finance.py =================================================================== --- trunk/matplotlib/lib/matplotlib/finance.py 2010年06月02日 21:56:39 UTC (rev 8370) +++ trunk/matplotlib/lib/matplotlib/finance.py 2010年06月04日 02:40:00 UTC (rev 8371) @@ -42,7 +42,7 @@ where d is a floating poing representation of date, as returned by date2num - if adjust=True, use adjusted prices + if adjusted=True, use adjusted prices """ results = [] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.