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
(3) |
2
|
3
|
4
(1) |
5
(8) |
6
(5) |
7
|
8
|
9
|
10
|
11
(1) |
12
|
13
(3) |
14
(1) |
15
(2) |
16
(2) |
17
(6) |
18
(1) |
19
(3) |
20
|
21
(1) |
22
|
23
(5) |
24
(4) |
25
|
26
(1) |
27
(1) |
28
(1) |
29
(3) |
30
(4) |
|
|
Revision: 7031 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7031&view=rev Author: astraw Date: 2009年04月05日 22:09:45 +0000 (2009年4月05日) Log Message: ----------- update changelog about Tobias' patch Modified Paths: -------------- branches/v0_98_5_maint/CHANGELOG Modified: branches/v0_98_5_maint/CHANGELOG =================================================================== --- branches/v0_98_5_maint/CHANGELOG 2009年04月05日 22:08:24 UTC (rev 7030) +++ branches/v0_98_5_maint/CHANGELOG 2009年04月05日 22:09:45 UTC (rev 7031) @@ -1,3 +1,6 @@ +2009年04月05日 _png.read_png() reads 12 bit PNGs (patch from + Tobias Wood) - ADS + 2009年03月17日 Fix bugs in edge color handling by contourf, found by Jae-Joon Lee. - EF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7030 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7030&view=rev Author: astraw Date: 2009年04月05日 22:08:24 +0000 (2009年4月05日) Log Message: ----------- trivial: remove outdated comment Modified Paths: -------------- branches/v0_98_5_maint/lib/matplotlib/image.py Modified: branches/v0_98_5_maint/lib/matplotlib/image.py =================================================================== --- branches/v0_98_5_maint/lib/matplotlib/image.py 2009年04月05日 22:07:34 UTC (rev 7029) +++ branches/v0_98_5_maint/lib/matplotlib/image.py 2009年04月05日 22:08:24 UTC (rev 7030) @@ -720,8 +720,6 @@ <http://www.pythonware.com/products/pil/>`_ is installed, it will use it to load the image and return an array (if possible) which can be used with :func:`~matplotlib.pyplot.imshow`. - - TODO: support RGB and grayscale return values in _image.readpng """ def pilread(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7029 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7029&view=rev Author: astraw Date: 2009年04月05日 22:07:34 +0000 (2009年4月05日) Log Message: ----------- trivial: remove trailing whitespace from source code Modified Paths: -------------- branches/v0_98_5_maint/src/_png.cpp Modified: branches/v0_98_5_maint/src/_png.cpp =================================================================== --- branches/v0_98_5_maint/src/_png.cpp 2009年04月05日 22:07:01 UTC (rev 7028) +++ branches/v0_98_5_maint/src/_png.cpp 2009年04月05日 22:07:34 UTC (rev 7029) @@ -214,7 +214,7 @@ png_uint_32 height = info_ptr->height; int bit_depth = info_ptr->bit_depth; - + // Unpack 1, 2, and 4-bit images if (bit_depth < 8) png_set_packing(png_ptr); @@ -231,7 +231,7 @@ // Convert palletes to full RGB if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); - + // If there's an alpha channel convert gray to RGB if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_gray_to_rgb(png_ptr); @@ -262,7 +262,7 @@ dimensions[2] = 1; //Greyscale images //For gray, return an x by y array, not an x by y by 1 int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2; - + double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1; PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(num_dims, dimensions, PyArray_FLOAT); @@ -283,7 +283,7 @@ } } } - + //free the png memory png_read_end(png_ptr, info_ptr); png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7028 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7028&view=rev Author: astraw Date: 2009年04月05日 22:07:01 +0000 (2009年4月05日) Log Message: ----------- read 12 bit PNGs (patch from Tobias Wood) Modified Paths: -------------- branches/v0_98_5_maint/src/_png.cpp Modified: branches/v0_98_5_maint/src/_png.cpp =================================================================== --- branches/v0_98_5_maint/src/_png.cpp 2009年04月05日 22:06:05 UTC (rev 7027) +++ branches/v0_98_5_maint/src/_png.cpp 2009年04月05日 22:07:01 UTC (rev 7028) @@ -208,38 +208,37 @@ png_init_io(png_ptr, fp); png_set_sig_bytes(png_ptr, 8); - png_read_info(png_ptr, info_ptr); png_uint_32 width = info_ptr->width; png_uint_32 height = info_ptr->height; - bool do_gray_conversion = (info_ptr->bit_depth < 8 && - info_ptr->color_type == PNG_COLOR_TYPE_GRAY); int bit_depth = info_ptr->bit_depth; - if (bit_depth == 16) { - png_set_strip_16(png_ptr); - } else if (bit_depth < 8) { + + // Unpack 1, 2, and 4-bit images + if (bit_depth < 8) png_set_packing(png_ptr); - } - // convert misc color types to rgb for simplicity - if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY || - info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { - png_set_gray_to_rgb(png_ptr); - } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { + // If sig bits are set, shift data + png_color_8p sig_bit; + if ((info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) && png_get_sBIT(png_ptr, info_ptr, &sig_bit)) + png_set_shift(png_ptr, sig_bit); + + // Convert big endian to little + if (bit_depth == 16) + png_set_swap(png_ptr); + + // Convert palletes to full RGB + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); - } + + // If there's an alpha channel convert gray to RGB + if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb(png_ptr); png_set_interlace_handling(png_ptr); png_read_update_info(png_ptr, info_ptr); - bool rgba = info_ptr->color_type == PNG_COLOR_TYPE_RGBA; - if ( (info_ptr->color_type != PNG_COLOR_TYPE_RGB) && !rgba) { - std::cerr << "Found color type " << (int)info_ptr->color_type << std::endl; - throw Py::RuntimeError("_image_module::readpng: cannot handle color_type"); - } - /* read file */ if (setjmp(png_jmpbuf(png_ptr))) throw Py::RuntimeError("_image_module::readpng: error during read_image"); @@ -255,37 +254,36 @@ npy_intp dimensions[3]; dimensions[0] = height; //numrows dimensions[1] = width; //numcols - dimensions[2] = 4; + if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) + dimensions[2] = 4; //RGBA images + else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR) + dimensions[2] = 3; //RGB images + else + dimensions[2] = 1; //Greyscale images + //For gray, return an x by y array, not an x by y by 1 + int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2; + + double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1; + PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(num_dims, dimensions, PyArray_FLOAT); - PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(3, dimensions, PyArray_FLOAT); - - if (do_gray_conversion) { - float max_value = (float)((1L << bit_depth) - 1); - for (png_uint_32 y = 0; y < height; y++) { - png_byte* row = row_pointers[y]; - for (png_uint_32 x = 0; x < width; x++) { - float value = row[x] / max_value; - size_t offset = y*A->strides[0] + x*A->strides[1]; - *(float*)(A->data + offset + 0*A->strides[2]) = value; - *(float*)(A->data + offset + 1*A->strides[2]) = value; - *(float*)(A->data + offset + 2*A->strides[2]) = value; - *(float*)(A->data + offset + 3*A->strides[2]) = 1.0f; - } + for (png_uint_32 y = 0; y < height; y++) { + png_byte* row = row_pointers[y]; + for (png_uint_32 x = 0; x < width; x++) { + size_t offset = y*A->strides[0] + x*A->strides[1]; + if (bit_depth == 16) { + png_uint_16* ptr = &reinterpret_cast<png_uint_16*> (row)[x * dimensions[2]]; + for (png_uint_32 p = 0; p < dimensions[2]; p++) + *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value; + } else { + png_byte* ptr = &(row[x * dimensions[2]]); + for (png_uint_32 p = 0; p < dimensions[2]; p++) + { + *(float*)(A->data + offset + p*A->strides[2]) = (float)(ptr[p]) / max_value; + } + } } - } else { - for (png_uint_32 y = 0; y < height; y++) { - png_byte* row = row_pointers[y]; - for (png_uint_32 x = 0; x < width; x++) { - png_byte* ptr = (rgba) ? &(row[x*4]) : &(row[x*3]); - size_t offset = y*A->strides[0] + x*A->strides[1]; - *(float*)(A->data + offset + 0*A->strides[2]) = (float)(ptr[0]/255.0); - *(float*)(A->data + offset + 1*A->strides[2]) = (float)(ptr[1]/255.0); - *(float*)(A->data + offset + 2*A->strides[2]) = (float)(ptr[2]/255.0); - *(float*)(A->data + offset + 3*A->strides[2]) = rgba ? (float)(ptr[3]/255.0) : 1.0f; - } - } } - + //free the png memory png_read_end(png_ptr, info_ptr); png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7027 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7027&view=rev Author: astraw Date: 2009年04月05日 22:06:05 +0000 (2009年4月05日) Log Message: ----------- pngsuite test: plot images in grayscale if the input array is 2 dimensional Modified Paths: -------------- branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py Modified: branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py =================================================================== --- branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py 2009年04月05日 02:23:03 UTC (rev 7026) +++ branches/v0_98_5_maint/examples/tests/pngsuite/pngsuite.py 2009年04月05日 22:06:05 UTC (rev 7027) @@ -8,6 +8,7 @@ """ from matplotlib import pyplot as plt +import matplotlib.cm as cm import glob files = glob.glob("basn*.png") @@ -17,7 +18,11 @@ for i, fname in enumerate(files): data = plt.imread(fname) - plt.imshow(data, extent=[i,i+1,0,1]) + cmap = None # use default colormap + if data.ndim==2: + # keep grayscale images gray + cmap = cm.gray + plt.imshow(data, extent=[i,i+1,0,1], cmap=cmap) plt.gca().get_frame().set_facecolor("#ddffff") plt.gca().set_xlim(0, len(files)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7026 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7026&view=rev Author: efiring Date: 2009年04月05日 02:23:03 +0000 (2009年4月05日) Log Message: ----------- Merged revisions 7024-7025 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint ........ r7024 | efiring | 2009年04月04日 15:37:26 -1000 (2009年4月04日) | 2 lines Fix PatchCollection bug 2723527; thanks to Thomas Robitaille ........ r7025 | efiring | 2009年04月04日 16:16:44 -1000 (2009年4月04日) | 2 lines Fix PatchCollection bug 2732455 by letting to_rgba handle 'none' ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/colors.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/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/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7018 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7025 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 + /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 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 + /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 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 + /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,7024-7025 Property changes on: trunk/matplotlib/doc/sphinxext/gen_rst.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_rst.py: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 + /branches/v0_91_maint/doc/examples/gen_rst.py:5753-5771 /branches/v0_98_5_maint/doc/sphinxext/gen_rst.py: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 Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2009年04月05日 02:16:44 UTC (rev 7025) +++ trunk/matplotlib/lib/matplotlib/collections.py 2009年04月05日 02:23:03 UTC (rev 7026) @@ -1126,7 +1126,7 @@ facecolors = [determine_facecolor(p) for p in patches] edgecolors = [p.get_edgecolor() for p in patches] - linewidths = [p.get_linewidths() for p in patches] + linewidths = [p.get_linewidth() for p in patches] antialiaseds = [p.get_antialiased() for p in patches] Collection.__init__( Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2009年04月05日 02:16:44 UTC (rev 7025) +++ trunk/matplotlib/lib/matplotlib/colors.py 2009年04月05日 02:23:03 UTC (rev 7026) @@ -318,10 +318,18 @@ Returns an *RGBA* tuple of four floats from 0-1. For acceptable values of *arg*, see :meth:`to_rgb`. + In addition, if *arg* is "none" (case-insensitive), + then (0,0,0,0) will be returned. If *arg* is an *RGBA* sequence and *alpha* is not *None*, *alpha* will replace the original *A*. """ try: + if arg.lower() == 'none': + return (0.0, 0.0, 0.0, 0.0) + except AttributeError: + pass + + try: if not cbook.is_string_like(arg) and cbook.iterable(arg): if len(arg) == 4: if [x for x in arg if (float(x) < 0) or (x > 1)]: Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018 + /branches/v0_91_maint/doc/sphinxext/mathmpl.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/mathmpl.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018 + /branches/v0_91_maint/doc/sphinxext/only_directives.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/only_directives.py:6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025 Property changes on: trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018 + /branches/v0_91_maint/doc/sphinxext/plot_directive.py:5753-5771 /branches/v0_98_5_maint/lib/matplotlib/sphinxext/plot_directive.py:6920-6925,6934,6941,6946,6948,6950,6952,6960,6972,6984-6985,6990,6995,6997-7001,7014,7016,7018,7024-7025 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7024 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7024&view=rev Author: efiring Date: 2009年04月05日 01:37:26 +0000 (2009年4月05日) Log Message: ----------- Fix PatchCollection bug 2723527; thanks to Thomas Robitaille Modified Paths: -------------- branches/v0_98_5_maint/lib/matplotlib/collections.py Modified: branches/v0_98_5_maint/lib/matplotlib/collections.py =================================================================== --- branches/v0_98_5_maint/lib/matplotlib/collections.py 2009年04月04日 22:52:53 UTC (rev 7023) +++ branches/v0_98_5_maint/lib/matplotlib/collections.py 2009年04月05日 01:37:26 UTC (rev 7024) @@ -1108,7 +1108,7 @@ facecolors = [determine_facecolor(p) for p in patches] edgecolors = [p.get_edgecolor() for p in patches] - linewidths = [p.get_linewidths() for p in patches] + linewidths = [p.get_linewidth() for p in patches] antialiaseds = [p.get_antialiased() for p in patches] Collection.__init__( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7025 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7025&view=rev Author: efiring Date: 2009年04月05日 02:16:44 +0000 (2009年4月05日) Log Message: ----------- Fix PatchCollection bug 2732455 by letting to_rgba handle 'none' Modified Paths: -------------- branches/v0_98_5_maint/lib/matplotlib/colors.py Modified: branches/v0_98_5_maint/lib/matplotlib/colors.py =================================================================== --- branches/v0_98_5_maint/lib/matplotlib/colors.py 2009年04月05日 01:37:26 UTC (rev 7024) +++ branches/v0_98_5_maint/lib/matplotlib/colors.py 2009年04月05日 02:16:44 UTC (rev 7025) @@ -318,10 +318,18 @@ Returns an *RGBA* tuple of four floats from 0-1. For acceptable values of *arg*, see :meth:`to_rgb`. + In addition, if *arg* is "none" (case-insensitive), + then (0,0,0,0) will be returned. If *arg* is an *RGBA* sequence and *alpha* is not *None*, *alpha* will replace the original *A*. """ try: + if arg.lower() == 'none': + return (0.0, 0.0, 0.0, 0.0) + except AttributeError: + pass + + try: if not cbook.is_string_like(arg) and cbook.iterable(arg): if len(arg) == 4: if [x for x in arg if (float(x) < 0) or (x > 1)]: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.