From: <he...@us...> - 2009-08-11 07:16:34
|
Revision: 7447 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7447&view=rev Author: heeres Date: 2009-08-11 07:16:27 +0000 (Tue, 11 Aug 2009) Log Message: ----------- Merged revisions 7446 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7446 | heeres | 2009-08-11 09:06:15 +0200 (Tue, 11 Aug 2009) | 2 lines Fix bugs: #2830483 (axis scaling), 2834105 (z order problem) ........ Modified Paths: -------------- trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.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-7444 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7446 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,7442-7444 + /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,7446 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,7442-7444 + /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,7446 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 Modified: trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py =================================================================== --- trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py 2009-08-11 07:06:15 UTC (rev 7446) +++ trunk/matplotlib/lib/mpl_toolkits/mplot3d/art3d.py 2009-08-11 07:16:27 UTC (rev 7447) @@ -217,9 +217,19 @@ def draw(self, renderer): Patch.draw(self, renderer) +def get_patch_verts(patch): + """Return a list of vertices for the path of a patch.""" + trans = patch.get_patch_transform() + path = patch.get_path() + polygons = path.to_polygons(trans) + if len(polygons): + return polygons[0] + else: + return [] + def patch_2d_to_3d(patch, z=0, zdir='z'): """Convert a Patch to a Patch3D object.""" - verts = patch.get_verts() + verts = get_patch_verts(patch) patch.__class__ = Patch3D patch.set_3d_properties(verts, z, zdir) @@ -333,7 +343,7 @@ if self._zsort: z_segments_2d = [(np.average(zs), zip(xs, ys), fc, ec) for (xs, ys, zs), fc, ec in zip(xyzlist, cface, cedge)] - z_segments_2d.sort(reverse=True) + z_segments_2d.sort(cmp=lambda x, y: cmp(y[0], x[0])) else: raise ValueError, "whoops" Modified: trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py =================================================================== --- trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py 2009-08-11 07:06:15 UTC (rev 7446) +++ trunk/matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py 2009-08-11 07:16:27 UTC (rev 7447) @@ -200,14 +200,17 @@ def get_w_lims(self): '''Get 3d world limits.''' - minpy, maxx = self.get_xlim3d() + minx, maxx = self.get_xlim3d() miny, maxy = self.get_ylim3d() minz, maxz = self.get_zlim3d() - return minpy, maxx, miny, maxy, minz, maxz + return minx, maxx, miny, maxy, minz, maxz def _determine_lims(self, xmin=None, xmax=None, *args, **kwargs): if xmax is None and cbook.iterable(xmin): xmin, xmax = xmin + if xmin == xmax: + xmin -= 0.5 + xmax += 0.5 return (xmin, xmax) def set_xlim3d(self, *args, **kwargs): @@ -442,12 +445,12 @@ elif self.button_pressed == 3: # zoom view # hmmm..this needs some help from clipping.... - minpy, maxx, miny, maxy, minz, maxz = self.get_w_lims() + minx, maxx, miny, maxy, minz, maxz = self.get_w_lims() df = 1-((h - dy)/h) - dx = (maxx-minpy)*df + dx = (maxx-minx)*df dy = (maxy-miny)*df dz = (maxz-minz)*df - self.set_xlim3d(minpy - dx, maxx + dx) + self.set_xlim3d(minx - dx, maxx + dx) self.set_ylim3d(miny - dy, maxy + dy) self.set_zlim3d(minz - dz, maxz + dz) self.get_proj() @@ -903,13 +906,12 @@ patches = Axes.bar(self, left, height, *args, **kwargs) if not cbook.iterable(zs): - zs = np.ones(len(left))*zs + zs = np.ones(len(left)) * zs - verts = [] verts_zs = [] for p, z in zip(patches, zs): - vs = p.get_verts() + vs = art3d.get_patch_verts(p) verts += vs.tolist() verts_zs += [z] * len(vs) art3d.patch_2d_to_3d(p, zs, zdir) @@ -933,7 +935,6 @@ had_data = self.has_data() if not cbook.iterable(x): - print 'not interable' x, y, z = [x], [y], [z] if not cbook.iterable(dx): dx, dy, dz = [dx], [dy], [dz] Modified: trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py =================================================================== --- trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py 2009-08-11 07:06:15 UTC (rev 7446) +++ trunk/matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py 2009-08-11 07:16:27 UTC (rev 7447) @@ -103,9 +103,6 @@ def get_major_ticks(self): ticks = maxis.XAxis.get_major_ticks(self) for t in ticks: - def update_coords(renderer, self=t.label1): - return text_update_coords(self, renderer) - # Text overrides setattr so need this to force new method t.tick1line.set_transform(self.axes.transData) t.tick2line.set_transform(self.axes.transData) t.gridline.set_transform(self.axes.transData) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-08-12 19:17:19
|
Revision: 7478 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7478&view=rev Author: mdboom Date: 2009-08-12 19:17:09 +0000 (Wed, 12 Aug 2009) Log Message: ----------- New version of Gouraud quadmesh shader with 4 triangles per quad. Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py 2009-08-12 16:53:41 UTC (rev 7477) +++ trunk/matplotlib/examples/pylab_examples/quadmesh_demo.py 2009-08-12 19:17:09 UTC (rev 7478) @@ -38,7 +38,7 @@ #cmap.set_bad('r', 1.0) #ax.pcolormesh(Qx,Qz,Zm, cmap=cmap) # Or use the default, which is transparent: -col = ax.pcolormesh(Qx,Qz,Zm) +col = ax.pcolormesh(Qx,Qz,Zm,shading='gouraud') ax.set_title('With masked values') Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2009-08-12 16:53:41 UTC (rev 7477) +++ trunk/matplotlib/lib/matplotlib/collections.py 2009-08-12 19:17:09 UTC (rev 7478) @@ -1132,41 +1132,45 @@ def convert_mesh_to_triangles(self, meshWidth, meshHeight, coordinates): """ Converts a given mesh into a sequence of triangles, each point - with its own color - :class:`matplotlib.path.Path` objects for easier rendering by - backends that do not directly support quadmeshes. - - This function is primarily of use to backend implementers. + with its own color. This is useful for experiments using + `draw_qouraud_triangle`. """ Path = mpath.Path if ma.isMaskedArray(coordinates): - c = coordinates.data + p = coordinates.data else: - c = coordinates + p = coordinates + p_a = p[0:-1, 0:-1] + p_b = p[0:-1, 1: ] + p_c = p[1: , 1: ] + p_d = p[1: , 0:-1] + p_center = (p_a + p_b + p_c + p_d) / 4.0 + triangles = np.concatenate(( - c[0:-1, 0:-1], - c[0:-1, 1: ], - c[1: , 1: ], - c[1: , 1: ], - c[1: , 0:-1], - c[0:-1, 0:-1] + p_a, p_b, p_center, + p_b, p_c, p_center, + p_c, p_d, p_center, + p_d, p_a, p_center, ), axis=2) - triangles = triangles.reshape((meshWidth * meshHeight * 2, 3, 2)) + triangles = triangles.reshape((meshWidth * meshHeight * 4, 3, 2)) c = self.get_facecolor().reshape((meshHeight + 1, meshWidth + 1, 4)) + c_a = c[0:-1, 0:-1] + c_b = c[0:-1, 1: ] + c_c = c[1: , 1: ] + c_d = c[1: , 0:-1] + c_center = (c_a + c_b + c_c + c_d) / 4.0 + colors = np.concatenate(( - c[0:-1, 0:-1], - c[0:-1, 1: ], - c[1: , 1: ], - c[1: , 1: ], - c[1: , 0:-1], - c[0:-1, 0:-1] + c_a, c_b, c_center, + c_b, c_c, c_center, + c_c, c_d, c_center, + c_d, c_a, c_center, ), axis=2) + colors = colors.reshape((meshWidth * meshHeight * 4, 3, 4)) - colors = colors.reshape((meshWidth * meshHeight * 2, 3, 4)) - return triangles, colors def get_datalim(self, transData): Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2009-08-12 16:53:41 UTC (rev 7477) +++ trunk/matplotlib/src/_backend_agg.cpp 2009-08-12 19:17:09 UTC (rev 7478) @@ -1470,6 +1470,10 @@ Py::Object colors_obj = args[2]; agg::trans_affine trans = py_to_agg_transformation_matrix(args[3].ptr()); + theRasterizer.reset_clipping(); + rendererBase.reset_clipping(true); + set_clipbox(gc.cliprect, theRasterizer); + trans *= agg::trans_affine_scaling(1.0, -1.0); trans *= agg::trans_affine_translation(0.0, (double)height); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2009-08-14 00:49:14
|
Revision: 7483 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7483&view=rev Author: efiring Date: 2009-08-14 00:49:02 +0000 (Fri, 14 Aug 2009) Log Message: ----------- Merged revisions 7475-7477,7480,7482 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7475 | jdh2358 | 2009-08-11 14:26:50 -1000 (Tue, 11 Aug 2009) | 1 line update the contributing faq ........ r7476 | jdh2358 | 2009-08-12 01:37:13 -1000 (Wed, 12 Aug 2009) | 1 line do case insensitive color string matching, as suggested in sf bug 2834598 ........ r7477 | efiring | 2009-08-12 06:53:41 -1000 (Wed, 12 Aug 2009) | 2 lines Typo in navigation_toolbar.rst. ........ r7480 | jdh2358 | 2009-08-12 14:41:58 -1000 (Wed, 12 Aug 2009) | 1 line add the pngs referenced by sphinx css; closes sf bug 2834121 ........ r7482 | efiring | 2009-08-13 14:24:40 -1000 (Thu, 13 Aug 2009) | 2 lines Remove older versions of some functions in mlab.py; closes bug 2806535 ........ Modified Paths: -------------- trunk/matplotlib/doc/faq/howto_faq.rst trunk/matplotlib/doc/users/navigation_toolbar.rst trunk/matplotlib/lib/matplotlib/colors.py trunk/matplotlib/lib/matplotlib/mlab.py Added Paths: ----------- trunk/matplotlib/doc/_static/contents.png trunk/matplotlib/doc/_static/navigation.png 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-7446 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7482 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,7442-7444,7446 + /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,7446,7475-7482 Copied: trunk/matplotlib/doc/_static/contents.png (from rev 7482, branches/v0_99_maint/doc/_static/contents.png) =================================================================== (Binary files differ) Copied: trunk/matplotlib/doc/_static/navigation.png (from rev 7482, branches/v0_99_maint/doc/_static/navigation.png) =================================================================== (Binary files differ) Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2009-08-14 00:24:40 UTC (rev 7482) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2009-08-14 00:49:02 UTC (rev 7483) @@ -516,8 +516,32 @@ If you have made lots of local changes and do not want to a diff against the entire tree, but rather against a single directory or -file, that is fine, but we do prefer svn diffs against HEAD. +file, that is fine, but we do prefer svn diffs against the top level +(where setup.py lives) since it is nice to have a consistent way to +apply them. +If you are posting a patch to fix a code bug, please explain your +patch in words -- what was broken before and how you fixed it. Also, +even if your patch is particularly simple, just a few lines or a +single function replacement, we encourage people to submit svn diffs +against HEAD or the branch they are patching. It just makes life +simpler for us, since we (fortunately) get a lot of contributions, and +want to receive them in a standard format. If possible, for any +non-trivial change, please include a complete, free-standing example +that the developers can run unmodified which shows the undesired +behavior pre-patch and the desired behavior post-patch, with a clear +verbal description of what to look for. The original developer may +have written the function you are working on years ago, and may no +longer be with the project, so it is quite possible you are the world +expert on the code you are patching and we want to hear as much detail +as you can offer. + +When emailing your patch and examples, feel free to paste any code +into the text of the message, indeed we encourage it, but also attach +the patches and examples since many email clients screw up the +formatting of plain text, and we spend lots of needless time trying to +reformat the code to make it usable. + You should check out the guide to developing matplotlib to make sure your patch abides by our coding conventions :ref:`developers-guide-index`. 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,7442-7444,7446 + /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,7446,7475-7482 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst =================================================================== --- trunk/matplotlib/doc/users/navigation_toolbar.rst 2009-08-14 00:24:40 UTC (rev 7482) +++ trunk/matplotlib/doc/users/navigation_toolbar.rst 2009-08-14 00:49:02 UTC (rev 7483) @@ -35,7 +35,7 @@ figure, dragging it to a new position. When you release it, the data under the point where you pressed will be moved to the point where you released. If you press 'x' or 'y' while panning the - motion will be contrained to the x or y axis, respectively. Press + motion will be constrained to the x or y axis, respectively. Press the right mouse button to zoom, dragging it to a new position. The x axis will be zoomed in proportionate to the rightward movement and zoomed out proportionate to the leftward movement. Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2009-08-14 00:24:40 UTC (rev 7482) +++ trunk/matplotlib/lib/matplotlib/colors.py 2009-08-14 00:49:02 UTC (rev 7483) @@ -282,13 +282,14 @@ try: if cbook.is_string_like(arg): - color = self.colors.get(arg, None) + argl = arg.lower() + color = self.colors.get(argl, None) if color is None: - str1 = cnames.get(arg, arg) + str1 = cnames.get(argl, argl) if str1.startswith('#'): color = hex2color(str1) else: - fl = float(arg) + fl = float(argl) if fl < 0 or fl > 1: raise ValueError( 'gray (string) must be in range 0-1') Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-14 00:24:40 UTC (rev 7482) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-14 00:49:02 UTC (rev 7483) @@ -1304,181 +1304,6 @@ else: return X -def slopes(x,y): - """ - SLOPES calculate the slope y'(x) Given data vectors X and Y SLOPES - calculates Y'(X), i.e the slope of a curve Y(X). The slope is - estimated using the slope obtained from that of a parabola through - any three consecutive points. - - This method should be superior to that described in the appendix - of A CONSISTENTLY WELL BEHAVED METHOD OF INTERPOLATION by Russel - W. Stineman (Creative Computing July 1980) in at least one aspect: - - Circles for interpolation demand a known aspect ratio between x- - and y-values. For many functions, however, the abscissa are given - in different dimensions, so an aspect ratio is completely - arbitrary. - - The parabola method gives very similar results to the circle - method for most regular cases but behaves much better in special - cases - - Norbert Nemec, Institute of Theoretical Physics, University or - Regensburg, April 2006 Norbert.Nemec at physik.uni-regensburg.de - - (inspired by a original implementation by Halldor Bjornsson, - Icelandic Meteorological Office, March 2006 halldor at vedur.is) - """ - # Cast key variables as float. - x=np.asarray(x, np.float_) - y=np.asarray(y, np.float_) - - yp=np.zeros(y.shape, np.float_) - - dx=x[1:] - x[:-1] - dy=y[1:] - y[:-1] - dydx = dy/dx - yp[1:-1] = (dydx[:-1] * dx[1:] + dydx[1:] * dx[:-1])/(dx[1:] + dx[:-1]) - yp[0] = 2.0 * dy[0]/dx[0] - yp[1] - yp[-1] = 2.0 * dy[-1]/dx[-1] - yp[-2] - return yp - - -def stineman_interp(xi,x,y,yp=None): - """ - STINEMAN_INTERP Well behaved data interpolation. Given data - vectors X and Y, the slope vector YP and a new abscissa vector XI - the function stineman_interp(xi,x,y,yp) uses Stineman - interpolation to calculate a vector YI corresponding to XI. - - Here's an example that generates a coarse sine curve, then - interpolates over a finer abscissa: - - x = linspace(0,2*pi,20); y = sin(x); yp = cos(x) - xi = linspace(0,2*pi,40); - yi = stineman_interp(xi,x,y,yp); - plot(x,y,'o',xi,yi) - - The interpolation method is described in the article A - CONSISTENTLY WELL BEHAVED METHOD OF INTERPOLATION by Russell - W. Stineman. The article appeared in the July 1980 issue of - Creative Computing with a note from the editor stating that while - they were - - not an academic journal but once in a while something serious - and original comes in adding that this was - "apparently a real solution" to a well known problem. - - For yp=None, the routine automatically determines the slopes using - the "slopes" routine. - - X is assumed to be sorted in increasing order - - For values xi[j] < x[0] or xi[j] > x[-1], the routine tries a - extrapolation. The relevance of the data obtained from this, of - course, questionable... - - original implementation by Halldor Bjornsson, Icelandic - Meteorolocial Office, March 2006 halldor at vedur.is - - completely reworked and optimized for Python by Norbert Nemec, - Institute of Theoretical Physics, University or Regensburg, April - 2006 Norbert.Nemec at physik.uni-regensburg.de - - """ - - # Cast key variables as float. - x=np.asarray(x, np.float_) - y=np.asarray(y, np.float_) - assert x.shape == y.shape - N=len(y) - - if yp is None: - yp = slopes(x,y) - else: - yp=np.asarray(yp, np.float_) - - xi=np.asarray(xi, np.float_) - yi=np.zeros(xi.shape, np.float_) - - # calculate linear slopes - dx = x[1:] - x[:-1] - dy = y[1:] - y[:-1] - s = dy/dx #note length of s is N-1 so last element is #N-2 - - # find the segment each xi is in - # this line actually is the key to the efficiency of this implementation - idx = np.searchsorted(x[1:-1], xi) - - # now we have generally: x[idx[j]] <= xi[j] <= x[idx[j]+1] - # except at the boundaries, where it may be that xi[j] < x[0] or xi[j] > x[-1] - - # the y-values that would come out from a linear interpolation: - sidx = s.take(idx) - xidx = x.take(idx) - yidx = y.take(idx) - xidxp1 = x.take(idx+1) - yo = yidx + sidx * (xi - xidx) - - # the difference that comes when using the slopes given in yp - dy1 = (yp.take(idx)- sidx) * (xi - xidx) # using the yp slope of the left point - dy2 = (yp.take(idx+1)-sidx) * (xi - xidxp1) # using the yp slope of the right point - - dy1dy2 = dy1*dy2 - # The following is optimized for Python. The solution actually - # does more calculations than necessary but exploiting the power - # of numpy, this is far more efficient than coding a loop by hand - # in Python - yi = yo + dy1dy2 * np.choose(np.array(np.sign(dy1dy2), np.int32)+1, - ((2*xi-xidx-xidxp1)/((dy1-dy2)*(xidxp1-xidx)), - 0.0, - 1/(dy1+dy2),)) - return yi - -def inside_poly(points, verts): - """ - points is a sequence of x,y points - verts is a sequence of x,y vertices of a poygon - - return value is a sequence of indices into points for the points - that are inside the polygon - """ - res, = np.nonzero(nxutils.points_inside_poly(points, verts)) - return res - -def poly_below(ymin, xs, ys): - """ - given a arrays *xs* and *ys*, return the vertices of a polygon - that has a scalar lower bound *ymin* and an upper bound at the *ys*. - - intended for use with Axes.fill, eg:: - - xv, yv = poly_below(0, x, y) - ax.fill(xv, yv) - """ - return poly_between(xs, ys, xmin) - - -def poly_between(x, ylower, yupper): - """ - given a sequence of x, ylower and yupper, return the polygon that - fills the regions between them. ylower or yupper can be scalar or - iterable. If they are iterable, they must be equal in length to x - - return value is x, y arrays for use with Axes.fill - """ - Nx = len(x) - if not cbook.iterable(ylower): - ylower = ylower*np.ones(Nx) - - if not cbook.iterable(yupper): - yupper = yupper*np.ones(Nx) - - x = np.concatenate( (x, x[::-1]) ) - y = np.concatenate( (yupper, ylower[::-1]) ) - return x,y - ### the following code was written and submitted by Fernando Perez ### from the ipython numutils package under a BSD license # begin fperez functions 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2009-08-14 03:29:25
|
Revision: 7485 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7485&view=rev Author: efiring Date: 2009-08-14 03:29:14 +0000 (Fri, 14 Aug 2009) Log Message: ----------- Merged revisions 7484 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7484 | efiring | 2009-08-13 15:58:44 -1000 (Thu, 13 Aug 2009) | 3 lines Prevent exception when image is off screen and out of the axes. Bug reported by G. Jones. ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/image.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-7482 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7484 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,7442-7444,7446,7475-7482 + /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,7446,7475-7482,7484 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,7442-7444,7446,7475-7482 + /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,7446,7475-7482,7484 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2009-08-14 01:58:44 UTC (rev 7484) +++ trunk/matplotlib/lib/matplotlib/image.py 2009-08-14 03:29:14 UTC (rev 7485) @@ -134,6 +134,8 @@ self.axes.get_yscale() != 'linear'): warnings.warn("Images are not supported on non-linear axes.") im = self.make_image(renderer.get_image_magnification()) + if im is None: + return im._url = self.get_url() l, b, widthDisplay, heightDisplay = self.axes.bbox.bounds gc = renderer.new_gc() @@ -167,6 +169,8 @@ def write_png(self, fname, noscale=False): """Write the image to png file with fname""" im = self.make_image() + if im is None: + return if noscale: numrows, numcols = im.get_size() im.reset_matrix() @@ -406,7 +410,8 @@ # image input dimensions im.reset_matrix() numrows, numcols = im.get_size() - + if numrows < 1 or numcols < 1: # out of range + return None im.set_interpolation(self._interpd[self._interpolation]) im.set_resample(self._resample) 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-08-14 13:56:52
|
Revision: 7487 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7487&view=rev Author: mdboom Date: 2009-08-14 13:56:44 +0000 (Fri, 14 Aug 2009) Log Message: ----------- Merged revisions 7486 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint ........ r7486 | mdboom | 2009-08-14 09:30:32 -0400 (Fri, 14 Aug 2009) | 2 lines Fix documentation about Axis.transAxis (thanks Jason Sage) ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axis.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-7484 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7486 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,7442-7444,7446,7475-7482,7484 + /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,7446,7475-7482,7484,7486 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,7442-7444,7446,7475-7482,7484 + /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,7446,7475-7482,7484,7486 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 Modified: trunk/matplotlib/lib/matplotlib/axis.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axis.py 2009-08-14 13:30:32 UTC (rev 7486) +++ trunk/matplotlib/lib/matplotlib/axis.py 2009-08-14 13:56:44 UTC (rev 7487) @@ -501,8 +501,8 @@ """ Public attributes - * :attr:`transData` - transform data coords to display coords - * :attr:`transAxis` - transform axis coords to display coords + * :attr:`axes.transData` - transform data coords to display coords + * :attr:`axes.transAxes` - transform axis coords to display coords * :attr:`labelpad` - number of points between the axis and its label """ OFFSETTEXTPAD = 3 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2009-08-14 18:11:13
|
Revision: 7488 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7488&view=rev Author: leejjoon Date: 2009-08-14 18:11:05 +0000 (Fri, 14 Aug 2009) Log Message: ----------- add support for image filtering in agg backend Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/artist.py trunk/matplotlib/lib/matplotlib/backend_bases.py trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py trunk/matplotlib/lib/matplotlib/colors.py trunk/matplotlib/lib/matplotlib/text.py Added Paths: ----------- trunk/matplotlib/examples/pylab_examples/demo_agg_filter.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/CHANGELOG 2009-08-14 18:11:05 UTC (rev 7488) @@ -1,3 +1,6 @@ +2009-08-14 Add support for image filtering for agg back end. See the example + demo_agg_filter.py. -JJL + 2009-08-09 AnnotationBbox added. Similar to Annotation, but works with OffsetBox instead of Text. See the example demo_annotation_box.py. -JJL Added: trunk/matplotlib/examples/pylab_examples/demo_agg_filter.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/demo_agg_filter.py (rev 0) +++ trunk/matplotlib/examples/pylab_examples/demo_agg_filter.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -0,0 +1,312 @@ +import matplotlib.pyplot as plt + +import numpy as np +import scipy.ndimage as NI +import matplotlib.cm as cm +import matplotlib.mlab as mlab + + +class BaseFilter(object): + def prepare_image(self, src_image, dpi, pad): + ny, nx, depth = src_image.shape + #tgt_image = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d") + padded_src = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d") + padded_src[pad:-pad, pad:-pad,:] = src_image[:,:,:] + + return padded_src#, tgt_image + + def get_pad(self, dpi): + return 0 + + def __call__(self, im, dpi): + pad = self.get_pad(dpi) + padded_src = self.prepare_image(im, dpi, pad) + tgt_image = self.process_image(padded_src, dpi) + return tgt_image, -pad, -pad + + +class OffsetFilter(BaseFilter): + def __init__(self, offsets=None): + if offsets is None: + self.offsets = (0, 0) + else: + self.offsets = offsets + + def get_pad(self, dpi): + return max(*self.offsets) + + def process_image(self, padded_src, dpi): + ox, oy = self.offsets + a1 = np.roll(padded_src, ox, axis=1) + a2 = np.roll(a1, -oy, axis=0) + return a2 + +class GaussianFilter(BaseFilter): + "simple gauss filter" + def __init__(self, sigma, alpha=0.5, color=None): + self.sigma = sigma + self.alpha = alpha + if color is None: + self.color=(0, 0, 0) + else: + self.color=color + + def get_pad(self, dpi): + return int(self.sigma*3) + + + def process_image(self, padded_src, dpi): + #offsetx, offsety = int(self.offsets[0]), int(self.offsets[1]) + tgt_image = np.zeros_like(padded_src) + tgt_image[:,:,-1] = NI.gaussian_filter(padded_src[:,:,-1]*self.alpha, + self.sigma) + tgt_image[:,:,:-1] = self.color + return tgt_image + +class DropShadowFilter(BaseFilter): + def __init__(self, sigma, alpha=0.3, color=None, offsets=None): + self.gauss_filter = GaussianFilter(sigma, alpha, color) + self.offset_filter = OffsetFilter(offsets) + + def get_pad(self, dpi): + return max(self.gauss_filter.get_pad(dpi), + self.offset_filter.get_pad(dpi)) + + def process_image(self, padded_src, dpi): + t1 = self.gauss_filter.process_image(padded_src, dpi) + t2 = self.offset_filter.process_image(t1, dpi) + return t2 + + +from matplotlib.colors import LightSource + +class LightFilter(BaseFilter): + "simple gauss filter" + def __init__(self, sigma, fraction=0.5): + self.gauss_filter = GaussianFilter(sigma, alpha=1) + self.light_source = LightSource() + self.fraction = fraction + #hsv_min_val=0.5,hsv_max_val=0.9, + # hsv_min_sat=0.1,hsv_max_sat=0.1) + def get_pad(self, dpi): + return self.gauss_filter.get_pad(dpi) + + def process_image(self, padded_src, dpi): + t1 = self.gauss_filter.process_image(padded_src, dpi) + elevation = t1[:,:,3] + rgb = padded_src[:,:,:3] + + rgb2 = self.light_source.shade_rgb(rgb, elevation, + fraction=self.fraction) + + tgt = np.empty_like(padded_src) + tgt[:,:,:3] = rgb2 + tgt[:,:,3] = padded_src[:,:,3] + + return tgt + + + +class GrowFilter(BaseFilter): + "enlarge the area" + def __init__(self, pixels, color=None): + self.pixels = pixels + if color is None: + self.color=(1, 1, 1) + else: + self.color=color + + def __call__(self, im, dpi): + pad = self.pixels + ny, nx, depth = im.shape + new_im = np.empty([pad*2+ny, pad*2+nx, depth], dtype="d") + alpha = new_im[:,:,3] + alpha.fill(0) + alpha[pad:-pad, pad:-pad] = im[:,:,-1] + alpha2 = NI.grey_dilation(alpha, size=(self.pixels, self.pixels)) + new_im[:,:,-1] = alpha2 + new_im[:,:,:-1] = self.color + offsetx, offsety = -pad, -pad + + return new_im, offsetx, offsety + + +from matplotlib.artist import Artist + +class FilteredArtistList(Artist): + """ + A simple container to draw filtered artist. + """ + def __init__(self, artist_list, filter): + self._artist_list = artist_list + self._filter = filter + Artist.__init__(self) + + def draw(self, renderer): + renderer.start_rasterizing() + renderer.start_filter() + for a in self._artist_list: + a.draw(renderer) + renderer.stop_filter(self._filter) + renderer.stop_rasterizing() + + + +import matplotlib.transforms as mtransforms + +def filtered_text(ax): + # mostly copied from contour_demo.py + + # prepare image + delta = 0.025 + x = np.arange(-3.0, 3.0, delta) + y = np.arange(-2.0, 2.0, delta) + X, Y = np.meshgrid(x, y) + Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) + Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1) + # difference of Gaussians + Z = 10.0 * (Z2 - Z1) + + + # draw + im = ax.imshow(Z, interpolation='bilinear', origin='lower', + cmap=cm.gray, extent=(-3,3,-2,2)) + levels = np.arange(-1.2, 1.6, 0.2) + CS = ax.contour(Z, levels, + origin='lower', + linewidths=2, + extent=(-3,3,-2,2)) + + ax.set_aspect("auto") + + # contour label + cl = ax.clabel(CS, levels[1::2], # label every second level + inline=1, + fmt='%1.1f', + fontsize=11) + + # change clable color to black + for t in cl: + t.set_color("k") + + # Add white glows to improve visibility of labels. + white_glows = FilteredArtistList(cl, GrowFilter(3)) + ax.add_artist(white_glows) + white_glows.set_zorder(cl[0].get_zorder()-0.1) + + ax.xaxis.set_visible(False) + ax.yaxis.set_visible(False) + + +def drop_shadow_line(ax): + # copyed from examples/misc/svg_filter_line.py + + # draw lines + l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-", + mec="b", mfc="w", lw=5, mew=3, ms=10, label="Line 1") + l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "ro-", + mec="r", mfc="w", lw=5, mew=3, ms=10, label="Line 1") + + + gauss = DropShadowFilter(2) + + for l in [l1, l2]: + + # draw shadows with same lines with slight offset. + + xx = l.get_xdata() + yy = l.get_ydata() + shadow, = ax.plot(xx, yy) + shadow.update_from(l) + + # offset transform + ot = mtransforms.offset_copy(l.get_transform(), ax.figure, + x=4.0, y=-6.0, units='points') + + shadow.set_transform(ot) + + + # adjust zorder of the shadow lines so that it is drawn below the + # original lines + shadow.set_zorder(l.get_zorder()-0.5) + shadow.set_agg_filter(gauss) + shadow.set_rasterized(True) # to support mixed-mode renderers + + + + ax.set_xlim(0., 1.) + ax.set_ylim(0., 1.) + + ax.xaxis.set_visible(False) + ax.yaxis.set_visible(False) + + + + +def drop_shadow_patches(ax): + # copyed from barchart_demo.py + N = 5 + menMeans = (20, 35, 30, 35, 27) + + ind = np.arange(N) # the x locations for the groups + width = 0.35 # the width of the bars + + rects1 = ax.bar(ind, menMeans, width, color='r', ec="w", lw=2) + + womenMeans = (25, 32, 34, 20, 25) + rects2 = ax.bar(ind+width+0.1, womenMeans, width, color='y', ec="w", lw=2) + + #gauss = GaussianFilter(1.5, offsets=(1,1), ) + gauss = DropShadowFilter(1.5, offsets=(1,1), ) + shadow = FilteredArtistList(rects1+rects2, gauss) + ax.add_artist(shadow) + shadow.set_zorder(rects1[0].get_zorder()-0.1) + + ax.set_xlim(ind[0]-0.5, ind[-1]+1.5) + ax.set_ylim(0, 40) + + ax.xaxis.set_visible(False) + ax.yaxis.set_visible(False) + + +def light_filter_pie(ax): + fracs = [15,30,45, 10] + explode=(0, 0.05, 0, 0) + pies = ax.pie(fracs, explode=explode) + ax.patch.set_visible(True) + + light_filter = LightFilter(8) + for p in pies[0]: + p.set_agg_filter(light_filter) + p.set_rasterized(True) # to support mixed-mode renderers + p.set(ec="none", + lw=2) + + gauss = DropShadowFilter(3, offsets=(3,4), alpha=0.7) + shadow = FilteredArtistList(pies[0], gauss) + ax.add_artist(shadow) + shadow.set_zorder(pies[0][0].get_zorder()-0.1) + + +if 1: + + plt.figure(1, figsize=(6, 6)) + plt.subplots_adjust(left=0.05, right=0.95) + + ax = plt.subplot(221) + filtered_text(ax) + + ax = plt.subplot(222) + drop_shadow_line(ax) + + ax = plt.subplot(223) + drop_shadow_patches(ax) + + ax = plt.subplot(224) + ax.set_aspect(1) + light_filter_pie(ax) + ax.set_frame_on(True) + + plt.show() + + Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/lib/matplotlib/artist.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -36,7 +36,15 @@ if artist.get_rasterized(): renderer.start_rasterizing() + if artist.get_agg_filter() is not None: + renderer.start_filter() + + def after(artist, renderer): + + if artist.get_agg_filter() is not None: + renderer.stop_filter(artist.get_agg_filter()) + if artist.get_rasterized(): renderer.stop_rasterizing() @@ -78,7 +86,8 @@ self._picker = None self._contains = None self._rasterized = None - + self._agg_filter = None + self.eventson = False # fire events only if eventson self._oid = 0 # an observer id self._propobservers = {} # a dict from oids to funcs @@ -548,6 +557,7 @@ gc.set_clip_path(None) def get_rasterized(self): + "return True if the artist is to be rasterized" return self._rasterized def set_rasterized(self, rasterized): @@ -563,6 +573,17 @@ self._rasterized = rasterized + def get_agg_filter(self): + "return filter function to be used for agg filter" + return self._agg_filter + + def set_agg_filter(self, filter_func): + """ + set agg_filter fuction. + + """ + self._agg_filter = filter_func + def draw(self, renderer, *args, **kwargs): 'Derived classes drawing method' if not self.get_visible(): return Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backend_bases.py 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/lib/matplotlib/backend_bases.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -409,12 +409,36 @@ return cbook.strip_math(s) def start_rasterizing(self): + """ + Used in MixedModeRenderer. Switch to the raster renderer. + """ pass def stop_rasterizing(self): + """ + Used in MixedModeRenderer. Switch back to the vector renderer + and draw the contents of the raster renderer as an image on + the vector renderer. + """ pass + def start_filter(self): + """ + Used in AggRenderer. Switch to a temporary renderer for image + filtering effects. + """ + pass + def stop_filter(self, filter_func): + """ + Used in AggRenderer. Switch back to the original renderer. + The contents of the temporary renderer is processed with the + *filter_func* and is drawn on the original renderer as an + image. + """ + pass + + class GraphicsContextBase: """ An abstract base class that provides color, line styles, etc... Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -57,22 +57,33 @@ self.height = height if __debug__: verbose.report('RendererAgg.__init__ width=%s, height=%s'%(width, height), 'debug-annoying') self._renderer = _RendererAgg(int(width), int(height), dpi, debug=False) + self._filter_renderers = [] + if __debug__: verbose.report('RendererAgg.__init__ _RendererAgg done', 'debug-annoying') + + self._update_methods() + self.mathtext_parser = MathTextParser('Agg') + + self.bbox = Bbox.from_bounds(0, 0, self.width, self.height) + if __debug__: verbose.report('RendererAgg.__init__ done', + 'debug-annoying') + + def draw_markers(self, *kl, **kw): + # for filtering to work with rastrization, methods needs to be wrapped. + # maybe there is better way to do it. + return self._renderer.draw_markers(*kl, **kw) + + def _update_methods(self): #self.draw_path = self._renderer.draw_path # see below - self.draw_markers = self._renderer.draw_markers + #self.draw_markers = self._renderer.draw_markers self.draw_path_collection = self._renderer.draw_path_collection self.draw_quad_mesh = self._renderer.draw_quad_mesh self.draw_gouraud_triangle = self._renderer.draw_gouraud_triangle self.draw_image = self._renderer.draw_image self.copy_from_bbox = self._renderer.copy_from_bbox self.tostring_rgba_minimized = self._renderer.tostring_rgba_minimized - self.mathtext_parser = MathTextParser('Agg') - self.bbox = Bbox.from_bounds(0, 0, self.width, self.height) - if __debug__: verbose.report('RendererAgg.__init__ done', - 'debug-annoying') - def draw_path(self, gc, path, transform, rgbFace=None): """ Draw the path @@ -165,6 +176,7 @@ d /= 64.0 return w, h, d + def draw_tex(self, gc, x, y, s, prop, angle): # todo, handle props, angle, origins size = prop.get_size_in_points() @@ -271,7 +283,58 @@ else: self._renderer.restore_region(region) + def start_filter(self): + """ + Start filtering. It simply create a new canvas (the old one is saved). + """ + self._filter_renderers.append(self._renderer) + self._renderer = _RendererAgg(int(self.width), int(self.height), + self.dpi) + self._update_methods() + def stop_filter(self, post_processing): + """ + Save the plot in the current canvas as a image and apply + the *post_processing* function. + + def post_processing(image, dpi): + # ny, nx, depth = image.shape + # image (numpy array) has RGBA channels and has a depth of 4. + ... + # create a new_image (numpy array of 4 channels, size can be + # different). The resulting image may have offsets from + # lower-left corner of the original image + return new_image, offset_x, offset_y + + The saved renderer is restored and the returned image from + post_processing is plotted (using draw_image) on it. + """ + + from matplotlib._image import fromarray + + width, height = int(self.width), int(self.height) + + buffer, bounds = self._renderer.tostring_rgba_minimized() + + l, b, w, h = bounds + + + self._renderer = self._filter_renderers.pop() + self._update_methods() + + if w > 0 and h > 0: + img = npy.fromstring(buffer, npy.uint8) + img, ox, oy = post_processing(img.reshape((h, w, 4)) / 255., + self.dpi) + image = fromarray(img, 1) + image.flipud_out() + + gc = self.new_gc() + self._renderer.draw_image(gc, + l+ox, height - b - h +oy, + image) + + def new_figure_manager(num, *args, **kwargs): """ Create a new figure manager instance Modified: trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -58,6 +58,7 @@ finalize flipy get_canvas_width_height get_image_magnification get_texmanager get_text_width_height_descent new_gc open_group option_image_nocomposite points_to_pixels strip_math + start_filter stop_filter """.split() def _set_current_renderer(self, renderer): self._renderer = renderer Modified: trunk/matplotlib/lib/matplotlib/colors.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colors.py 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/lib/matplotlib/colors.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -1021,6 +1021,19 @@ RGBA values are returned, which can then be used to plot the shaded image with imshow. """ + + rgb0 = cmap((data-data.min())/(data.max()-data.min())) + rgb1 = self.shade_rgb(rgb0, elevation=data) + rgb0[:,:,0:3] = rgb1 + return rgb0 + + def shade_rgb(self,rgb, elevation, fraction=1.): + """ + Take the input RGB array (ny*nx*3) adjust their color values + to given the impression of a shaded relief map with a + specified light source using the elevation (ny*nx). + A new RGB array ((ny*nx*3)) is returned. + """ # imagine an artificial sun placed at infinity in # some azimuth and elevation position illuminating our surface. The parts of # the surface that slope toward the sun should brighten while those sides @@ -1029,7 +1042,7 @@ az = self.azdeg*np.pi/180.0 alt = self.altdeg*np.pi/180.0 # gradient in x and y directions - dx, dy = np.gradient(data) + dx, dy = np.gradient(elevation) slope = 0.5*np.pi - np.arctan(np.hypot(dx, dy)) aspect = np.arctan2(dx, dy) intensity = np.sin(alt)*np.sin(slope) + np.cos(alt)*np.cos(slope)*np.cos(-az -\ @@ -1037,9 +1050,9 @@ # rescale to interval -1,1 # +1 means maximum sun exposure and -1 means complete shade. intensity = (intensity - intensity.min())/(intensity.max() - intensity.min()) - intensity = 2.*intensity - 1. + intensity = (2.*intensity - 1.)*fraction # convert to rgb, then rgb to hsv - rgb = cmap((data-data.min())/(data.max()-data.min())) + #rgb = cmap((data-data.min())/(data.max()-data.min())) hsv = rgb_to_hsv(rgb[:,:,0:3]) # modify hsv values to simulate illumination. hsv[:,:,1] = np.where(np.logical_and(np.abs(hsv[:,:,1])>1.e-10,intensity>0),\ @@ -1053,5 +1066,4 @@ hsv[:,:,1:] = np.where(hsv[:,:,1:]<0.,0,hsv[:,:,1:]) hsv[:,:,1:] = np.where(hsv[:,:,1:]>1.,1,hsv[:,:,1:]) # convert modified hsv back to rgb. - rgb[:,:,0:3] = hsv_to_rgb(hsv) - return rgb + return hsv_to_rgb(hsv) Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2009-08-14 13:56:44 UTC (rev 7487) +++ trunk/matplotlib/lib/matplotlib/text.py 2009-08-14 18:11:05 UTC (rev 7488) @@ -18,6 +18,8 @@ from matplotlib.transforms import Affine2D, Bbox from matplotlib.lines import Line2D +from matplotlib.artist import allow_rasterization + import matplotlib.nxutils as nxutils def _process_text_args(override, fontdict=None, **kwargs): @@ -501,6 +503,7 @@ self._bbox_patch.draw(renderer) + @allow_rasterization def draw(self, renderer): """ Draws the :class:`Text` object to the given *renderer*. @@ -1727,6 +1730,7 @@ self.arrow.set_clip_box(self.get_clip_box()) + @allow_rasterization def draw(self, renderer): """ Draw the :class:`Annotation` object to the given *renderer*. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2009-08-15 18:34:05
|
Revision: 7491 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7491&view=rev Author: efiring Date: 2009-08-15 18:33:54 +0000 (Sat, 15 Aug 2009) Log Message: ----------- Use decorators to manipulate docstrings; patch by Jason Coombs Tracker 2835685, file DocstringOptimizedTypeErrorRev5.patch Modified Paths: -------------- trunk/matplotlib/boilerplate.py trunk/matplotlib/lib/matplotlib/artist.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/colorbar.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/lib/matplotlib/mlab.py trunk/matplotlib/lib/matplotlib/offsetbox.py trunk/matplotlib/lib/matplotlib/patches.py trunk/matplotlib/lib/matplotlib/projections/geo.py trunk/matplotlib/lib/matplotlib/projections/polar.py trunk/matplotlib/lib/matplotlib/pyplot.py trunk/matplotlib/lib/matplotlib/quiver.py trunk/matplotlib/lib/matplotlib/scale.py trunk/matplotlib/lib/matplotlib/spines.py trunk/matplotlib/lib/matplotlib/table.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/boilerplate.py =================================================================== --- trunk/matplotlib/boilerplate.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/boilerplate.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -20,6 +20,7 @@ _fmtplot = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost +@autogen_docstring(Axes.%(func)s) def %(func)s(%(argspec)s): %(ax)s = gca() # allow callers to override the hold state by passing hold=True|False @@ -34,19 +35,16 @@ %(ax)s.hold(%(washold)s) %(mappable)s return %(ret)s -if Axes.%(func)s.__doc__ is not None: - %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) + __docstring_addendum """ _fmtmisc = """\ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost +...@do...py_dedent(Axes.%(func)s) def %(func)s(%(argspec)s): %(ret)s = gca().%(func)s(%(call)s) draw_if_interactive() return %(ret)s -if Axes.%(func)s.__doc__ is not None: - %(func)s.__doc__ = dedent(Axes.%(func)s.__doc__) """ # these methods are all simple wrappers of Axes methods by the same Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/artist.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -2,6 +2,7 @@ import re, warnings import matplotlib import matplotlib.cbook as cbook +from matplotlib import docstring from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath from path import Path @@ -1193,5 +1194,4 @@ else: return '\n'.join(ArtistInspector(a).pprint_setters(leadingspace=2)) -kwdocd = dict() -kwdocd['Artist'] = kwdoc(Artist) +docstring.interpd.update(Artist=kwdoc(Artist)) Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -15,6 +15,7 @@ import matplotlib.colors as mcolors import matplotlib.contour as mcontour import matplotlib.dates as mdates +from matplotlib import docstring import matplotlib.font_manager as font_manager import matplotlib.image as mimage import matplotlib.legend as mlegend @@ -33,7 +34,6 @@ is_string_like = cbook.is_string_like is_sequence_of_strings = cbook.is_sequence_of_strings - def _process_plot_format(fmt): """ Process a matlab(TM) style color/line style format string. Return a @@ -1787,6 +1787,7 @@ """ self._axisbelow = b + @docstring.dedent_interpd def grid(self, b=None, **kwargs): """ call signature:: @@ -1810,7 +1811,6 @@ if len(kwargs): b = True self.xaxis.grid(b, **kwargs) self.yaxis.grid(b, **kwargs) - grid.__doc__ = cbook.dedent(grid.__doc__) % martist.kwdocd def ticklabel_format(self, **kwargs): """ @@ -2018,6 +2018,7 @@ ", ".join(mscale.get_scale_names())) return self.xaxis.get_scale() + @docstring.dedent_interpd def set_xscale(self, value, **kwargs): """ call signature:: @@ -2035,10 +2036,6 @@ self.autoscale_view() self._update_transScale() - set_xscale.__doc__ = cbook.dedent(set_xscale.__doc__) % { - 'scale': ' | '.join([repr(x) for x in mscale.get_scale_names()]), - 'scale_docs': mscale.get_scale_docs().strip()} - def get_xticks(self, minor=False): 'Return the x ticks as a list of locations' return self.xaxis.get_ticklocs(minor=minor) @@ -2066,6 +2063,7 @@ return cbook.silent_list('Text xticklabel', self.xaxis.get_ticklabels(minor=minor)) + @docstring.dedent_interpd def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs): """ call signature:: @@ -2083,8 +2081,6 @@ """ return self.xaxis.set_ticklabels(labels, fontdict, minor=minor, **kwargs) - set_xticklabels.__doc__ = cbook.dedent( - set_xticklabels.__doc__) % martist.kwdocd def invert_yaxis(self): "Invert the y-axis." @@ -2192,6 +2188,7 @@ ", ".join(mscale.get_scale_names())) return self.yaxis.get_scale() + @docstring.dedent_interpd def set_yscale(self, value, **kwargs): """ call signature:: @@ -2209,10 +2206,6 @@ self.autoscale_view() self._update_transScale() - set_yscale.__doc__ = cbook.dedent(set_yscale.__doc__) % { - 'scale': ' | '.join([repr(x) for x in mscale.get_scale_names()]), - 'scale_docs': mscale.get_scale_docs().strip()} - def get_yticks(self, minor=False): 'Return the y ticks as a list of locations' return self.yaxis.get_ticklocs(minor=minor) @@ -2245,6 +2238,7 @@ return cbook.silent_list('Text yticklabel', self.yaxis.get_ticklabels(minor=minor)) + @docstring.dedent_interpd def set_yticklabels(self, labels, fontdict=None, minor=False, **kwargs): """ call signature:: @@ -2262,8 +2256,6 @@ """ return self.yaxis.set_ticklabels(labels, fontdict, minor=minor, **kwargs) - set_yticklabels.__doc__ = cbook.dedent( - set_yticklabels.__doc__) % martist.kwdocd def xaxis_date(self, tz=None): """Sets up x-axis ticks and labels that treat the x data as dates. @@ -2693,6 +2685,7 @@ """ return self.title.get_text() + @docstring.dedent_interpd def set_title(self, label, fontdict=None, **kwargs): """ call signature:: @@ -2722,7 +2715,6 @@ if fontdict is not None: self.title.update(fontdict) self.title.update(kwargs) return self.title - set_title.__doc__ = cbook.dedent(set_title.__doc__) % martist.kwdocd def get_xlabel(self): """ @@ -2731,6 +2723,7 @@ label = self.xaxis.get_label() return label.get_text() + @docstring.dedent_interpd def set_xlabel(self, xlabel, fontdict=None, labelpad=None, **kwargs): """ call signature:: @@ -2752,7 +2745,6 @@ """ if labelpad is not None: self.xaxis.labelpad = labelpad return self.xaxis.set_label_text(xlabel, fontdict, **kwargs) - set_xlabel.__doc__ = cbook.dedent(set_xlabel.__doc__) % martist.kwdocd def get_ylabel(self): """ @@ -2761,6 +2753,7 @@ label = self.yaxis.get_label() return label.get_text() + @docstring.dedent_interpd def set_ylabel(self, ylabel, fontdict=None, labelpad=None, **kwargs): """ call signature:: @@ -2782,8 +2775,8 @@ """ if labelpad is not None: self.yaxis.labelpad = labelpad return self.yaxis.set_label_text(ylabel, fontdict, **kwargs) - set_ylabel.__doc__ = cbook.dedent(set_ylabel.__doc__) % martist.kwdocd + @docstring.dedent_interpd def text(self, x, y, s, fontdict=None, withdash=False, **kwargs): """ @@ -2864,8 +2857,8 @@ #if t.get_clip_on(): t.set_clip_box(self.bbox) if 'clip_on' in kwargs: t.set_clip_box(self.bbox) return t - text.__doc__ = cbook.dedent(text.__doc__) % martist.kwdocd + @docstring.dedent_interpd def annotate(self, *args, **kwargs): """ call signature:: @@ -2885,10 +2878,10 @@ if kwargs.has_key('clip_on'): a.set_clip_path(self.patch) self.texts.append(a) return a - annotate.__doc__ = cbook.dedent(annotate.__doc__) % martist.kwdocd #### Lines and spans + @docstring.dedent_interpd def axhline(self, y=0, xmin=0, xmax=1, **kwargs): """ call signature:: @@ -2948,8 +2941,7 @@ self.autoscale_view(scalex=False, scaley=scaley) return l - axhline.__doc__ = cbook.dedent(axhline.__doc__) % martist.kwdocd - + @docstring.dedent_interpd def axvline(self, x=0, ymin=0, ymax=1, **kwargs): """ call signature:: @@ -3009,8 +3001,7 @@ self.autoscale_view(scalex=scalex, scaley=False) return l - axvline.__doc__ = cbook.dedent(axvline.__doc__) % martist.kwdocd - + @docstring.dedent_interpd def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs): """ call signature:: @@ -3066,8 +3057,8 @@ self.add_patch(p) self.autoscale_view(scalex=False) return p - axhspan.__doc__ = cbook.dedent(axhspan.__doc__) % martist.kwdocd + @docstring.dedent_interpd def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs): """ call signature:: @@ -3123,9 +3114,9 @@ self.add_patch(p) self.autoscale_view(scaley=False) return p - axvspan.__doc__ = cbook.dedent(axvspan.__doc__) % martist.kwdocd + @docstring.dedent def hlines(self, y, xmin, xmax, colors='k', linestyles='solid', label='', **kwargs): """ @@ -3210,8 +3201,8 @@ return coll - hlines.__doc__ = cbook.dedent(hlines.__doc__) + @docstring.dedent_interpd def vlines(self, x, ymin, ymax, colors='k', linestyles='solid', label='', **kwargs): """ @@ -3290,9 +3281,9 @@ self.autoscale_view() return coll - vlines.__doc__ = cbook.dedent(vlines.__doc__) % martist.kwdocd #### Basic plotting + @docstring.dedent_interpd def plot(self, *args, **kwargs): """ Plot lines and/or markers to the @@ -3425,8 +3416,7 @@ self.autoscale_view(scalex=scalex, scaley=scaley) return lines - plot.__doc__ = cbook.dedent(plot.__doc__) % martist.kwdocd - + @docstring.dedent_interpd def plot_date(self, x, y, fmt='bo', tz=None, xdate=True, ydate=False, **kwargs): """ @@ -3496,9 +3486,9 @@ self.autoscale_view() return ret - plot_date.__doc__ = cbook.dedent(plot_date.__doc__) % martist.kwdocd + @docstring.dedent_interpd def loglog(self, *args, **kwargs): """ call signature:: @@ -3557,8 +3547,8 @@ self._hold = b # restore the hold return l - loglog.__doc__ = cbook.dedent(loglog.__doc__) % martist.kwdocd + @docstring.dedent_interpd def semilogx(self, *args, **kwargs): """ call signature:: @@ -3608,8 +3598,8 @@ l = self.plot(*args, **kwargs) self._hold = b # restore the hold return l - semilogx.__doc__ = cbook.dedent(semilogx.__doc__) % martist.kwdocd + @docstring.dedent_interpd def semilogy(self, *args, **kwargs): """ call signature:: @@ -3659,8 +3649,8 @@ self._hold = b # restore the hold return l - semilogy.__doc__ = cbook.dedent(semilogy.__doc__) % martist.kwdocd + @docstring.dedent_interpd def acorr(self, x, **kwargs): """ call signature:: @@ -3722,8 +3712,8 @@ .. plot:: mpl_examples/pylab_examples/xcorr_demo.py """ return self.xcorr(x, x, **kwargs) - acorr.__doc__ = cbook.dedent(acorr.__doc__) % martist.kwdocd + @docstring.dedent_interpd def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none, usevlines=True, maxlags=10, **kwargs): """ @@ -3810,7 +3800,6 @@ a, = self.plot(lags, c, **kwargs) b = None return lags, c, a, b - xcorr.__doc__ = cbook.dedent(xcorr.__doc__) % martist.kwdocd def _get_legend_handles(self): @@ -4064,6 +4053,7 @@ return self.plot(x, y, *args, **kwargs) + @docstring.dedent_interpd def bar(self, left, height, width=0.8, bottom=None, color=None, edgecolor=None, linewidth=None, yerr=None, xerr=None, ecolor=None, capsize=3, @@ -4331,8 +4321,8 @@ self.dataLim.intervaly = (ymin, ymax) self.autoscale_view() return patches - bar.__doc__ = cbook.dedent(bar.__doc__) % martist.kwdocd + @docstring.dedent_interpd def barh(self, bottom, width, height=0.8, left=None, **kwargs): """ call signature:: @@ -4403,8 +4393,7 @@ orientation='horizontal', **kwargs) return patches - barh.__doc__ = cbook.dedent(barh.__doc__) % martist.kwdocd - + @docstring.dedent_interpd def broken_barh(self, xranges, yrange, **kwargs): """ call signature:: @@ -4447,8 +4436,6 @@ return col - broken_barh.__doc__ = cbook.dedent(broken_barh.__doc__) % martist.kwdocd - def stem(self, x, y, linefmt='b-', markerfmt='bo', basefmt='r-'): """ call signature:: @@ -4642,6 +4629,7 @@ if autopct is None: return slices, texts else: return slices, texts, autotexts + @docstring.dedent_interpd def errorbar(self, x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, @@ -4900,7 +4888,6 @@ self.autoscale_view() return (l0, caplines, barcols) - errorbar.__doc__ = cbook.dedent(errorbar.__doc__) % martist.kwdocd def boxplot(self, x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None): @@ -5092,6 +5079,7 @@ return dict(whiskers=whiskers, caps=caps, boxes=boxes, medians=medians, fliers=fliers) + @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, faceted=True, verts=None, @@ -5407,8 +5395,7 @@ self.add_collection(collection) return collection - scatter.__doc__ = cbook.dedent(scatter.__doc__) % martist.kwdocd - + @docstring.dedent_interpd 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, @@ -5821,9 +5808,8 @@ return collection - hexbin.__doc__ = cbook.dedent(hexbin.__doc__) % martist.kwdocd - + @docstring.dedent_interpd def arrow(self, x, y, dx, dy, **kwargs): """ call signature:: @@ -5843,7 +5829,6 @@ a = mpatches.FancyArrow(x, y, dx, dy, **kwargs) self.add_artist(a) return a - arrow.__doc__ = cbook.dedent(arrow.__doc__) % martist.kwdocd def quiverkey(self, *args, **kw): qk = mquiver.QuiverKey(*args, **kw) @@ -5860,6 +5845,7 @@ return q quiver.__doc__ = mquiver.Quiver.quiver_doc + @docstring.dedent_interpd def barbs(self, *args, **kw): """ %(barbs_doc)s @@ -5873,9 +5859,8 @@ self.update_datalim(b.get_offsets()) self.autoscale_view() return b - barbs.__doc__ = cbook.dedent(barbs.__doc__) % { - 'barbs_doc': mquiver.Barbs.barbs_doc} + @docstring.dedent_interpd def fill(self, *args, **kwargs): """ call signature:: @@ -5922,8 +5907,8 @@ patches.append( poly ) self.autoscale_view() return patches - fill.__doc__ = cbook.dedent(fill.__doc__) % martist.kwdocd + @docstring.dedent_interpd def fill_between(self, x, y1, y2=0, where=None, **kwargs): """ call signature:: @@ -6029,8 +6014,8 @@ self.add_collection(collection) self.autoscale_view() return collection - fill_between.__doc__ = cbook.dedent(fill_between.__doc__) % martist.kwdocd + @docstring.dedent_interpd def fill_betweenx(self, y, x1, x2=0, where=None, **kwargs): """ call signature:: @@ -6136,10 +6121,10 @@ self.add_collection(collection) self.autoscale_view() return collection - fill_between.__doc__ = cbook.dedent(fill_between.__doc__) % martist.kwdocd #### plotting z(x,y): imshow, pcolor and relatives, contour + @docstring.dedent_interpd def imshow(self, X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=1.0, vmin=None, vmax=None, origin=None, extent=None, shape=None, filternorm=1, @@ -6276,7 +6261,6 @@ self.images.append(im) return im - imshow.__doc__ = cbook.dedent(imshow.__doc__) % martist.kwdocd def _pcolorargs(self, funcname, *args): @@ -6304,6 +6288,7 @@ funcname, funcname)) return X, Y, C + @docstring.dedent_interpd def pcolor(self, *args, **kwargs): """ call signatures:: @@ -6511,8 +6496,8 @@ self.autoscale_view() self.add_collection(collection) return collection - pcolor.__doc__ = cbook.dedent(pcolor.__doc__) % martist.kwdocd + @docstring.dedent_interpd def pcolormesh(self, *args, **kwargs): """ call signatures:: @@ -6634,8 +6619,8 @@ self.autoscale_view() self.add_collection(collection) return collection - pcolormesh.__doc__ = cbook.dedent(pcolormesh.__doc__) % martist.kwdocd + @docstring.dedent_interpd def pcolorfast(self, *args, **kwargs): """ pseudocolor plot of a 2-D array @@ -6829,6 +6814,7 @@ return CS.clabel(*args, **kwargs) clabel.__doc__ = mcontour.ContourSet.clabel.__doc__ + @docstring.dedent_interpd def table(self, **kwargs): """ call signature:: @@ -6853,7 +6839,6 @@ %(Table)s """ return mtable.table(self, **kwargs) - table.__doc__ = cbook.dedent(table.__doc__) % martist.kwdocd def twinx(self): """ @@ -6905,6 +6890,7 @@ #### Data analysis + @docstring.dedent_interpd def hist(self, x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, @@ -7257,8 +7243,8 @@ return n[0], bins, cbook.silent_list('Patch', patches[0]) else: return n, bins, cbook.silent_list('Lists of Patches', patches) - hist.__doc__ = cbook.dedent(hist.__doc__) % martist.kwdocd + @docstring.dedent_interpd def psd(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs): @@ -7330,12 +7316,7 @@ return pxx, freqs - psd_doc_dict = dict() - psd_doc_dict.update(martist.kwdocd) - psd_doc_dict.update(mlab.kwdocd) - psd_doc_dict['PSD'] = cbook.dedent(psd_doc_dict['PSD']) - psd.__doc__ = cbook.dedent(psd.__doc__) % psd_doc_dict - + @docstring.dedent_interpd def csd(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs): @@ -7403,8 +7384,8 @@ self.set_yticks(ticks) return pxy, freqs - csd.__doc__ = cbook.dedent(csd.__doc__) % psd_doc_dict + @docstring.dedent_interpd def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs): @@ -7460,8 +7441,8 @@ self.grid(True) return cxy, freqs - cohere.__doc__ = cbook.dedent(cohere.__doc__) % psd_doc_dict + @docstring.dedent_interpd def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', @@ -7534,8 +7515,6 @@ self.axis('auto') return Pxx, freqs, bins, im - specgram.__doc__ = cbook.dedent(specgram.__doc__) % psd_doc_dict - del psd_doc_dict #So that this does not become an Axes attribute def spy(self, Z, precision=0, marker=None, markersize=None, aspect='equal', **kwargs): @@ -7908,7 +7887,8 @@ # This is provided for backward compatibility Subplot = subplot_class_factory() -martist.kwdocd['Axes'] = martist.kwdocd['Subplot'] = martist.kwdoc(Axes) +docstring.interpd.update(Axes=martist.kwdoc(Axes)) +docstring.interpd.update(Subplot=martist.kwdoc(Axes)) """ # this is some discarded code I was using to find the minimum positive Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/collections.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -15,6 +15,7 @@ import matplotlib.cbook as cbook import matplotlib.colors as mcolors import matplotlib.cm as cm +from matplotlib import docstring import matplotlib.transforms as transforms import matplotlib.artist as artist from matplotlib.artist import allow_rasterization @@ -496,7 +497,7 @@ # these are not available for the object inspector until after the # class is built so we define an initial set here for the init # function and they will be overridden after object defn -artist.kwdocd['Collection'] = """\ +docstring.interpd.update(Collection = """\ Valid Collection keyword arguments: * *edgecolors*: None @@ -516,12 +517,13 @@ If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds* are None, they default to their :data:`matplotlib.rcParams` patch setting, in sequence form. -""" +""") class PathCollection(Collection): """ This is the most basic :class:`Collection` subclass. """ + @docstring.dedent_interpd def __init__(self, paths, **kwargs): """ *paths* is a sequence of :class:`matplotlib.path.Path` @@ -532,7 +534,6 @@ Collection.__init__(self, **kwargs) self.set_paths(paths) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def set_paths(self, paths): @@ -540,6 +541,7 @@ class PolyCollection(Collection): + @docstring.dedent_interpd def __init__(self, verts, sizes = None, closed = True, **kwargs): """ *verts* is a sequence of ( *verts0*, *verts1*, ...) where @@ -562,7 +564,6 @@ Collection.__init__(self,**kwargs) self._sizes = sizes self.set_verts(verts, closed) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def set_verts(self, verts, closed=True): '''This allows one to delay initialization of the vertices.''' @@ -599,6 +600,7 @@ A collection of horizontal bars spanning *yrange* with a sequence of *xranges*. """ + @docstring.dedent_interpd def __init__(self, xranges, yrange, **kwargs): """ *xranges* @@ -613,7 +615,6 @@ ymax = ymin + ywidth verts = [ [(xmin, ymin), (xmin, ymax), (xmin+xwidth, ymax), (xmin+xwidth, ymin), (xmin, ymin)] for xmin, xwidth in xranges] PolyCollection.__init__(self, verts, **kwargs) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd @staticmethod @@ -640,6 +641,7 @@ """Draw a collection of regular polygons with *numsides*.""" _path_generator = mpath.Path.unit_regular_polygon + @docstring.dedent_interpd def __init__(self, numsides, rotation = 0 , @@ -682,8 +684,6 @@ self._rotation = rotation self.set_transform(transforms.IdentityTransform()) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd - @allow_rasterization def draw(self, renderer): self._transforms = [ @@ -875,6 +875,7 @@ """ A collection of circles, drawn using splines. """ + @docstring.dedent_interpd def __init__(self, sizes, **kwargs): """ *sizes* @@ -886,7 +887,6 @@ self._sizes = sizes self.set_transform(transforms.IdentityTransform()) self._paths = [mpath.Path.unit_circle()] - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def get_sizes(self): "return sizes of circles" @@ -906,6 +906,7 @@ """ A collection of ellipses, drawn using splines. """ + @docstring.dedent_interpd def __init__(self, widths, heights, angles, units='points', **kwargs): """ *widths*: sequence @@ -937,8 +938,6 @@ self._initialized = False - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd - def _init(self): def on_dpi_change(fig): self._transforms = [] @@ -1230,9 +1229,10 @@ -artist.kwdocd['Collection'] = patchstr = artist.kwdoc(Collection) +patchstr = artist.kwdoc(Collection) for k in ('QuadMesh', 'PolyCollection', 'BrokenBarHCollection', 'RegularPolyCollection', 'PathCollection', - 'StarPolygonCollection', 'PatchCollection', 'CircleCollection'): - artist.kwdocd[k] = patchstr -artist.kwdocd['LineCollection'] = artist.kwdoc(LineCollection) + 'StarPolygonCollection', 'PatchCollection', + 'CircleCollection', 'Collection',): + docstring.interpd.update({k:patchstr}) +docstring.interpd.update(LineCollection = artist.kwdoc(LineCollection)) Modified: trunk/matplotlib/lib/matplotlib/colorbar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/colorbar.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/colorbar.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -23,6 +23,7 @@ import matplotlib as mpl import matplotlib.colors as colors import matplotlib.cm as cm +from matplotlib import docstring import matplotlib.ticker as ticker import matplotlib.cbook as cbook import matplotlib.lines as lines @@ -150,6 +151,7 @@ ''' % (make_axes_kw_doc, colormap_kw_doc) +docstring.interpd.update(colorbar_doc=colorbar_doc) class ColorbarBase(cm.ScalarMappable): @@ -693,7 +695,25 @@ # be recalculating everything if there was a simple alpha # change. +...@do...bstitution(make_axes_kw_doc) def make_axes(parent, **kw): + ''' + Resize and reposition a parent axes, and return a child + axes suitable for a colorbar:: + + cax, kw = make_axes(parent, **kw) + + Keyword arguments may include the following (with defaults): + + *orientation* + 'vertical' or 'horizontal' + + %s + + All but the first of these are stripped from the input kw set. + + Returns (cax, kw), the child axes and the reduced kw dictionary. + ''' orientation = kw.setdefault('orientation', 'vertical') fraction = kw.pop('fraction', 0.15) shrink = kw.pop('shrink', 1.0) @@ -720,22 +740,5 @@ cax = fig.add_axes(pbcb) cax.set_aspect(aspect, anchor=anchor, adjustable='box') return cax, kw -make_axes.__doc__ =''' - Resize and reposition a parent axes, and return a child - axes suitable for a colorbar:: - cax, kw = make_axes(parent, **kw) - Keyword arguments may include the following (with defaults): - - *orientation* - 'vertical' or 'horizontal' - - %s - - All but the first of these are stripped from the input kw set. - - Returns (cax, kw), the child axes and the reduced kw dictionary. - ''' % make_axes_kw_doc - - Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/figure.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -32,7 +32,9 @@ from matplotlib.blocking_input import BlockingMouseInput, BlockingKeyMouseInput import matplotlib.cbook as cbook +from matplotlib import docstring +docstring.interpd.update(projection_names = get_projection_names()) class SubplotParams: """ @@ -555,6 +557,7 @@ key = fixlist(args), fixitems(kwargs.items()) return key + @docstring.dedent_interpd def add_axes(self, *args, **kwargs): """ Add an a axes with axes rect [*left*, *bottom*, *width*, @@ -564,7 +567,7 @@ sets the projection type of the axes. (For backward compatibility, ``polar=True`` may also be provided, which is equivalent to ``projection='polar'``). Valid values for - *projection* are: %(list)s. Some of these projections support + *projection* are: %(projection_names)s. Some of these projections support additional kwargs, which may be provided to :meth:`add_axes`:: rect = l,b,w,h @@ -624,10 +627,7 @@ self._seen[key] = a return a - add_axes.__doc__ = dedent(add_axes.__doc__) % \ - {'list': (", ".join(get_projection_names())), - 'Axes': artist.kwdocd['Axes']} - + @docstring.dedent_interpd def add_subplot(self, *args, **kwargs): """ Add a subplot. Examples: @@ -642,7 +642,7 @@ *projection*, which chooses a projection type for the axes. (For backward compatibility, *polar=True* may also be provided, which is equivalent to *projection='polar'*). Valid - values for *projection* are: %(list)s. Some of these projections + values for *projection* are: %(projection_names)s. Some of these projections support additional *kwargs*, which may be provided to :meth:`add_axes`. @@ -693,9 +693,6 @@ self._axstack.push(a) self.sca(a) return a - add_subplot.__doc__ = dedent(add_subplot.__doc__) % { - 'list': ", ".join(get_projection_names()), - 'Axes': artist.kwdocd['Axes']} def clf(self): """ @@ -891,6 +888,7 @@ self.legends.append(l) return l + @docstring.dedent_interpd def text(self, x, y, s, *args, **kwargs): """ Call signature:: @@ -915,13 +913,13 @@ self._set_artist_props(t) self.texts.append(t) return t - text.__doc__ = dedent(text.__doc__) % artist.kwdocd def _set_artist_props(self, a): if a!= self: a.set_figure(self) a.set_transform(self.transFigure) + @docstring.dedent_interpd def gca(self, **kwargs): """ Return the current axes, creating one if necessary @@ -945,7 +943,6 @@ if isinstance(ax, projection_class): return ax return self.add_subplot(111, **kwargs) - gca.__doc__ = dedent(gca.__doc__) % artist.kwdocd def sca(self, a): 'Set the current axes to be a and return a' @@ -1038,7 +1035,14 @@ for ax, alpha in zip(self.axes, original_axes_alpha): ax.patch.set_alpha(alpha) + @docstring.dedent_interpd def colorbar(self, mappable, cax=None, ax=None, **kw): + """ + Create a colorbar for a ScalarMappable instance. + + Documentation for the pylab thin wrapper: + %(colorbar_doc)s + """ if ax is None: ax = self.gca() if cax is None: @@ -1056,14 +1060,7 @@ mappable.set_colorbar(cb, cax) self.sca(ax) return cb - colorbar.__doc__ = ''' - Create a colorbar for a ScalarMappable instance. - Documentation for the pylab thin wrapper: - %s - - '''% cbar.colorbar_doc - def subplots_adjust(self, *args, **kwargs): """ fig.subplots_adjust(left=None, bottom=None, right=None, wspace=None, hspace=None) @@ -1220,4 +1217,4 @@ newsize = np.clip(newsize,figsize_min,figsize_max) return newsize -artist.kwdocd['Figure'] = artist.kwdoc(Figure) +docstring.interpd.update(Figure=artist.kwdoc(Figure)) Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/lines.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -19,6 +19,7 @@ from matplotlib import rcParams from artist import allow_rasterization +from matplotlib import docstring # special-purpose marker identifiers: (TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN, @@ -172,7 +173,7 @@ markeredgewidth = None, markeredgecolor = None, markerfacecolor = None, - fillstyle = 'full', + fillstyle = 'full', antialiased = None, dash_capstyle = None, solid_capstyle = None, @@ -1546,8 +1547,8 @@ lineMarkers = Line2D._markers drawStyles = Line2D.drawStyles -artist.kwdocd['Line2D'] = artist.kwdoc(Line2D) +docstring.interpd.update(Line2D = artist.kwdoc(Line2D)) # You can not set the docstring of an instancemethod, # but you can on the underlying function. Go figure. -Line2D.__init__.im_func.__doc__ = dedent(Line2D.__init__.__doc__) % artist.kwdocd +docstring.dedent_interpd(Line2D.__init__.im_func) Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -147,6 +147,7 @@ import matplotlib.nxutils as nxutils import matplotlib.cbook as cbook +from matplotlib import docstring def logspace(xmin,xmax,N): @@ -288,8 +289,7 @@ return Pxy, freqs, t #Split out these keyword docs so that they can be used elsewhere -kwdocd = dict() -kwdocd['PSD'] =""" +docstring.interpd.update(PSD=cbook.dedent(""" Keyword arguments: *NFFT*: integer @@ -346,8 +346,9 @@ by the scaling frequency, which gives density in units of Hz^-1. This allows for integration over the returned frequency values. The default is True for MatLab compatibility. -""" +""")) +...@do...dent_interpd def psd(x, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None): """ @@ -373,8 +374,7 @@ scale_by_freq) return Pxx.real,freqs -psd.__doc__ = psd.__doc__ % kwdocd - +...@do...dent_interpd def csd(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None): """ @@ -405,8 +405,7 @@ Pxy = Pxy.mean(axis=1) return Pxy, freqs -csd.__doc__ = csd.__doc__ % kwdocd - +...@do...dent_interpd def specgram(x, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, noverlap=128, pad_to=None, sides='default', scale_by_freq=None): """ @@ -445,11 +444,10 @@ return Pxx, freqs, t -specgram.__doc__ = specgram.__doc__ % kwdocd - _coh_error = """Coherence is calculated by averaging over *NFFT* length segments. Your signal is too short for your choice of *NFFT*. """ +...@do...dent_interpd def cohere(x, y, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None): """ @@ -488,9 +486,7 @@ Cxy.shape = (len(f),) return Cxy, f -cohere.__doc__ = cohere.__doc__ % kwdocd - def donothing_callback(*args): pass Modified: trunk/matplotlib/lib/matplotlib/offsetbox.py =================================================================== --- trunk/matplotlib/lib/matplotlib/offsetbox.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/offsetbox.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -26,6 +26,7 @@ from matplotlib.patches import FancyBboxPatch, FancyArrowPatch from matplotlib import rcParams +from matplotlib import docstring import matplotlib.cbook as cbook #from bboximage import BboxImage @@ -1171,6 +1172,7 @@ def __str__(self): return "AnnotationBbox(%g,%g)"%(self.xy[0],self.xy[1]) + @docstring.dedent_interpd def __init__(self, offsetbox, xy, xybox=None, xycoords='data', @@ -1236,8 +1238,6 @@ self._drawFrame = frameon - __init__.__doc__ = cbook.dedent(__init__.__doc__) % martist.kwdocd - def contains(self,event): t,tinfo = self.offsetbox.contains(event) if self.arrow is not None: Modified: trunk/matplotlib/lib/matplotlib/patches.py =================================================================== --- trunk/matplotlib/lib/matplotlib/patches.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/patches.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -9,13 +9,14 @@ import matplotlib.artist as artist from matplotlib.artist import allow_rasterization import matplotlib.colors as colors +from matplotlib import docstring import matplotlib.transforms as transforms from matplotlib.path import Path # these are not available for the object inspector until after the # class is built so we define an initial set here for the init # function and they will be overridden after object definition -artist.kwdocd['Patch'] = """ +docstring.interpd.update(Patch = """ ================= ============================================== Property Description @@ -38,7 +39,7 @@ zorder any number ================= ============================================== - """ + """) class Patch(artist.Artist): """ @@ -51,6 +52,38 @@ def __str__(self): return str(self.__class__).split('.')[-1] + def __init__(self, + edgecolor=None, + facecolor=None, + linewidth=None, + linestyle=None, + antialiased = None, + hatch = None, + fill=True, + **kwargs + ): + """ + The following kwarg properties are supported + + %(Patch)s + """ + artist.Artist.__init__(self) + + if linewidth is None: linewidth = mpl.rcParams['patch.linewidth'] + if linestyle is None: linestyle = "solid" + if antialiased is None: antialiased = mpl.rcParams['patch.antialiased'] + + self.set_edgecolor(edgecolor) + self.set_facecolor(facecolor) + self.set_linewidth(linewidth) + self.set_linestyle(linestyle) + self.set_antialiased(antialiased) + self.set_hatch(hatch) + self.fill = fill + self._combined_transform = transforms.IdentityTransform() + + if len(kwargs): artist.setp(self, **kwargs) + def get_verts(self): """ Return a copy of the vertices used in this patch @@ -337,53 +370,20 @@ def get_window_extent(self, renderer=None): return self.get_path().get_extents(self.get_transform()) -artist.kwdocd['Patch'] = patchdoc = artist.kwdoc(Patch) +patchdoc = artist.kwdoc(Patch) for k in ('Rectangle', 'Circle', 'RegularPolygon', 'Polygon', 'Wedge', 'Arrow', 'FancyArrow', 'YAArrow', 'CirclePolygon', 'Ellipse', 'Arc', - 'FancyBboxPatch'): - artist.kwdocd[k] = patchdoc + 'FancyBboxPatch', 'Patch'): + docstring.interpd.update({k:patchdoc}) -# define Patch.__init__ after the class so that the docstring can be -# auto-generated. -def __patch__init__(self, - edgecolor=None, - facecolor=None, - linewidth=None, - linestyle=None, - antialiased = None, - hatch = None, - fill=True, - **kwargs - ): - """ - The following kwarg properties are supported +# define Patch.__init__ docstring after the class has been added to interpd +docstring.dedent_interpd(Patch.__init__.im_func) - %(Patch)s - """ - artist.Artist.__init__(self) - - if linewidth is None: linewidth = mpl.rcParams['patch.linewidth'] - if linestyle is None: linestyle = "solid" - if antialiased is None: antialiased = mpl.rcParams['patch.antialiased'] - - self.set_edgecolor(edgecolor) - self.set_facecolor(facecolor) - self.set_linewidth(linewidth) - self.set_linestyle(linestyle) - self.set_antialiased(antialiased) - self.set_hatch(hatch) - self.fill = fill - self._combined_transform = transforms.IdentityTransform() - - if len(kwargs): artist.setp(self, **kwargs) - -__patch__init__.__doc__ = cbook.dedent(__patch__init__.__doc__) % artist.kwdocd -Patch.__init__ = __patch__init__ - class Shadow(Patch): def __str__(self): return "Shadow(%s)"%(str(self.patch)) + @docstring.dedent_interpd def __init__(self, patch, ox, oy, props=None, **kwargs): """ Create a shadow of the given *patch* offset by *ox*, *oy*. @@ -400,7 +400,6 @@ self._ox, self._oy = ox, oy self._shadow_transform = transforms.Affine2D() self._update() - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def _update(self): self.update_from(self.patch) @@ -451,6 +450,7 @@ return self.__class__.__name__ \ + "(%g,%g;%gx%g)" % (self._x, self._y, self._width, self._height) + @docstring.dedent_interpd def __init__(self, xy, width, height, **kwargs): """ @@ -468,7 +468,6 @@ self._height = height # Note: This cannot be calculated until this is added to an Axes self._rect_transform = transforms.IdentityTransform() - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def get_path(self): """ @@ -589,6 +588,7 @@ def __str__(self): return "Poly%d(%g,%g)"%(self._numVertices,self._xy[0],self._xy[1]) + @docstring.dedent_interpd def __init__(self, xy, numVertices, radius=5, orientation=0, **kwargs): """ @@ -619,8 +619,6 @@ Patch.__init__(self, **kwargs) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd - def _update_transform(self): self._poly_transform.clear() \ .scale(self.radius) \ @@ -665,6 +663,7 @@ def __str__(self): return "Poly((%g, %g) ...)" % tuple(self._path.vertices[0]) + @docstring.dedent_interpd def __init__(self, path, **kwargs): """ *path* is a :class:`matplotlib.path.Path` object. @@ -680,7 +679,6 @@ """ Patch.__init__(self, **kwargs) self._path = path - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def get_path(self): return self._path @@ -692,6 +690,7 @@ def __str__(self): return "Poly((%g, %g) ...)" % tuple(self._path.vertices[0]) + @docstring.dedent_interpd def __init__(self, xy, closed=True, **kwargs): """ *xy* is a numpy array with shape Nx2. @@ -713,8 +712,6 @@ self._path = Path(xy) self.set_closed(closed) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd - def get_path(self): return self._path @@ -753,6 +750,7 @@ def __str__(self): return "Wedge(%g,%g)"%(self.theta1,self.theta2) + @docstring.dedent_interpd def __init__(self, center, r, theta1, theta2, width=None, **kwargs): """ Draw a wedge centered at *x*, *y* center with radius *r* that @@ -798,7 +796,6 @@ v += np.asarray(center) self._path = Path(v,c) self._patch_transform = transforms.IdentityTransform() - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def get_path(self): return self._path @@ -818,6 +815,7 @@ [ 1.0, 0.0 ], [ 0.8, 0.3], [ 0.8, 0.1 ], [ 0.0, 0.1] ] ) + @docstring.dedent_interpd def __init__( self, x, y, dx, dy, width=1.0, **kwargs ): """ Draws an arrow, starting at (*x*, *y*), direction and length @@ -836,7 +834,6 @@ trans3 = transforms.Affine2D().translate(x, y) trans = trans1 + trans2 + trans3 self._patch_transform = trans.frozen() - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def get_path(self): return self._path @@ -852,6 +849,7 @@ def __str__(self): return "FancyArrow()" + @docstring.dedent_interpd def __init__(self, x, y, dx, dy, width=0.001, length_includes_head=False, \ head_width=None, head_length=None, shape='full', overhang=0, \ head_starts_at_zero=False,**kwargs): @@ -924,7 +922,6 @@ verts = np.dot(coords, M) + (x+dx, y+dy) Polygon.__init__(self, map(tuple, verts), **kwargs) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd class YAArrow(Patch): """ @@ -936,6 +933,7 @@ def __str__(self): return "YAArrow()" + @docstring.dedent_interpd def __init__(self, figure, xytip, xybase, width=4, frac=0.1, headwidth=12, **kwargs): """ Constructor arguments: @@ -970,7 +968,6 @@ self.frac = frac self.headwidth = headwidth Patch.__init__(self, **kwargs) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def get_path(self): # Since this is dpi dependent, we need to recompute the path @@ -1034,6 +1031,7 @@ def __str__(self): return "CirclePolygon(%d,%d)"%self.center + @docstring.dedent_interpd def __init__(self, xy, radius=5, resolution=20, # the number of vertices **kwargs): @@ -1052,7 +1050,6 @@ radius, orientation=0, **kwargs) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd class Ellipse(Patch): @@ -1062,6 +1059,7 @@ def __str__(self): return "Ellipse(%s,%s;%sx%s)"%(self.center[0],self.center[1],self.width,self.height) + @docstring.dedent_interpd def __init__(self, xy, width, height, angle=0.0, **kwargs): """ *xy* @@ -1087,7 +1085,6 @@ self._path = Path.unit_circle() # Note: This cannot be calculated until this is added to an Axes self._patch_transform = transforms.IdentityTransform() - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def _recompute_transform(self): """NOTE: This cannot be called until after this has been added @@ -1127,6 +1124,7 @@ def __str__(self): return "Circle((%g,%g),r=%g)"%(self.center[0],self.center[1],self.radius) + @docstring.dedent_interpd def __init__(self, xy, radius=5, **kwargs): """ Create true circle at center *xy* = (*x*, *y*) with given @@ -1145,7 +1143,6 @@ self.radius = radius Ellipse.__init__(self, xy, radius*2, radius*2, **kwargs) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd def set_radius(self, radius): """ @@ -1175,6 +1172,7 @@ def __str__(self): return "Arc(%s,%s;%sx%s)"%(self.center[0],self.center[1],self.width,self.height) + @docstring.dedent_interpd def __init__(self, xy, width, height, angle=0.0, theta1=0.0, theta2=360.0, **kwargs): """ The following args are supported: @@ -1212,7 +1210,6 @@ self.theta1 = theta1 self.theta2 = theta2 - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd @allow_rasterization def draw(self, renderer): @@ -1987,9 +1984,11 @@ _style_list["roundtooth"] = Roundtooth - __doc__ = cbook.dedent(__doc__) % \ - {"AvailableBoxstyles": _pprint_styles(_style_list)} + if __doc__: # __doc__ could be None if -OO optimization is enabled + __doc__ = cbook.dedent(__doc__) % \ + {"AvailableBoxstyles": _pprint_styles(_style_list)} +docstring.interpd.update(AvailableBoxstyles=_pprint_styles(BoxStyle._style_list)) class FancyBboxPatch(Patch): """ @@ -2007,6 +2006,7 @@ return self.__class__.__name__ \ + "FancyBboxPatch(%g,%g;%gx%g)" % (self._x, self._y, self._width, self._height) + @docstring.dedent_interpd def __init__(self, xy, width, height, boxstyle="round", bbox_transmuter=None, @@ -2054,13 +2054,7 @@ self._mutation_aspect=mutation_aspect - kwdoc = dict() - kwdoc["AvailableBoxstyles"]=_pprint_styles(BoxStyle._style_list) - kwdoc.update(artist.kwdocd) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % kwdoc - del kwdoc - - + @docstring.dedent_interpd def set_boxstyle(self, boxstyle=None, **kw): """ Set the box style. @@ -2092,12 +2086,6 @@ self._bbox_transmuter = BoxStyle(boxstyle, **kw) - kwdoc = dict() - kwdoc["AvailableBoxstyles"]=_pprint_styles(BoxStyle._style_list) - kwdoc.update(artist.kwdocd) - set_boxstyle.__doc__ = cbook.dedent(set_boxstyle.__doc__) % kwdoc - del kwdoc - def set_mutation_scale(self, scale): """ Set the mutation scale. @@ -2682,12 +2670,12 @@ _style_list["bar"] = Bar + if __doc__: + __doc__ = cbook.dedent(__doc__) % \ + {"AvailableConnectorstyles": _pprint_styles(_style_list)} - __doc__ = cbook.dedent(__doc__) % \ - {"AvailableConnectorstyles": _pprint_styles(_style_list)} - class ArrowStyle(_Style): """ :class:`ArrowStyle` is a container class which defines several @@ -3438,11 +3426,16 @@ _style_list["wedge"] = Wedge - __doc__ = cbook.dedent(__doc__) % \ - {"AvailableArrowstyles": _pprint_styles(_style_list)} + if __doc__: + __doc__ = cbook.dedent(__doc__) % \ + {"AvailableArrowstyles": _pprint_styles(_style_list)} +docstring.interpd.update( + AvailableArrowstyles = _pprint_styles(ArrowStyle._style_list), + AvailableConnectorstyles = _pprint_styles(ConnectionStyle._style_list), +) class FancyArrowPatch(Patch): """ @@ -3454,6 +3447,7 @@ return self.__class__.__name__ \ + "FancyArrowPatch(%g,%g,%g,%g,%g,%g)" % tuple(self._q_bezier) + @docstring.dedent_interpd def __init__(self, posA=None, posB=None, path=None, arrowstyle="simple", @@ -3535,14 +3529,6 @@ #self._draw_in_display_coordinate = True - kwdoc = dict() - kwdoc["AvailableArrowstyles"]=_pprint_styles(ArrowStyle._style_list) - kwdoc["AvailableConnectorstyles"]=_pprint_styles(ConnectionStyle._style_list) - - kwdoc.update(artist.kwdocd) - __init__.__doc__ = cbook.dedent(__init__.__doc__) % kwdoc - del kwdoc - def set_positions(self, posA, posB): """ set the begin end end positions of the connecting path. Use current vlaue if None. @@ -3768,6 +3754,7 @@ return "ConnectionPatch((%g,%g),(%g,%g))" % \ (self.xy1[0],self.xy1[1],self.xy2[0],self.xy2[1]) + @docstring.dedent_interpd def __init__(self, xyA, xyB, coordsA, coordsB=None, axesA=None, axesB=None, arrowstyle="-", @@ -3859,9 +3846,7 @@ # if True, draw annotation only if self.xy is inside the axes self._annotation_clip = None - __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd - def _get_xy(self, x, y, s, axes=None): """ caculate the pixel position of given point Modified: trunk/matplotlib/lib/matplotlib/projections/geo.py =================================================================== --- trunk/matplotlib/lib/matplotlib/projections/geo.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/projections/geo.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -5,7 +5,6 @@ import matplotlib rcParams = matplotlib.rcParams -from matplotlib.artist import kwdocd from matplotlib.axes import Axes from matplotlib import cbook from matplotlib.patches import Circle Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py =================================================================== --- trunk/matplotlib/lib/matplotlib/projections/polar.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/projections/polar.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -5,10 +5,10 @@ import matplotlib rcParams = matplotlib.rcParams -from matplotlib.artist import kwdocd from matplotlib.axes import Axes import matplotlib.axis as maxis from matplotlib import cbook +from matplotlib import docstring from matplotlib.patches import Circle from matplotlib.path import Path from matplotlib.ticker import Formatter, Locator @@ -317,6 +317,7 @@ set_rscale = Axes.set_yscale set_rticks = Axes.set_yticks + @docstring.dedent_interpd def set_thetagrids(self, angles, labels=None, frac=None, **kwargs): """ @@ -353,8 +354,8 @@ for t in self.xaxis.get_ticklabels(): t.update(kwargs) return self.xaxis.get_ticklines(), self.xaxis.get_ticklabels() - set_thetagrids.__doc__ = cbook.dedent(set_thetagrids.__doc__) % kwdocd + @docstring.dedent_interpd def set_rgrids(self, radii, labels=None, angle=None, rpad=None, **kwargs): """ Set the radial locations and labels of the *r* grids. @@ -399,8 +400,6 @@ t.update(kwargs) return self.yaxis.get_gridlines(), self.yaxis.get_ticklabels() - set_rgrids.__doc__ = cbook.dedent(set_rgrids.__doc__) % kwdocd - def set_xscale(self, scale, *args, **kwargs): if scale != 'linear': raise NotImplementedError("You can not set the xscale on a polar plot.") Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 17:56:44 UTC (rev 7490) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 18:33:54 UTC (rev 7491) @@ -3,6 +3,7 @@ import matplotlib from matplotlib import _pylab_helpers, interactive from matplotlib.cbook import dedent, silent_list, is_string_like, is_numlike +from matplotlib import docstring from matplotlib.figure import Figure, figaspect from matplotlib.backend_bases import FigureCanvasBase from matplotlib.image import imread as _imread @@ -119,16 +120,14 @@ 'Turn interactive mode on.' matplotlib.interactive(True) +...@do...py_dedent(matplotlib.rc) def rc(*args, **kwargs): matplotlib.rc(*args, **kwargs) -if matplotlib.rc.__doc__ is not None: - rc.__doc__ = dedent(matplotlib.rc.__doc__) +...@do...py_dedent(matplotlib.rcdefaults) def rcdefaults(): matplotlib.rcdefaults() draw_if_interactive() -if matplotlib.rcdefaults.__doc__ is not None: - rcdefaults.__doc__ = dedent(matplotlib.rcdefaults.__doc__) # The current "image" (ScalarMappable) is tracked here on a # per-pylab-session basis: @@ -161,12 +160,11 @@ # (getp is simply imported) +...@do...py(_setp) def setp(*args, **kwargs): ret = _setp(*args, **kwargs) draw_if_interactive() return ret -if _setp.__doc__ is not None: - setp.__doc__ = _setp.__doc__ @@ -290,17 +288,13 @@ figManager = _pylab_helpers.Gcf.get_active() return figManager -# note we check for __doc__ is not None since py2exe optimize removes -# the docstrings +...@do...py_dedent(FigureCanvasBase.mpl_connect) def connect(s, func): return get_current_fig_manager().canvas.mpl_connect(s, func) -if FigureCanvasBase.mpl_connect.__doc__ is not None: - connect.__doc__ = dedent(FigureCanvasBase.mpl_connect.__doc__) +...@do...py_dedent(FigureCanvasBase.mpl_disconnect) def disconnect(cid): return get_current_fig_manager().canvas.mpl_disconnect(cid) -if FigureCanvasBase.mpl_disconnect.__doc__ is not None: - disconnect.__doc__ = dedent(FigureCanvasBase.mpl_disconnect.__doc__) def close(*args): """ @@ -351,12 +345,12 @@ 'redraw the current figure' get_current_fig_manager().canvas.draw() +...@do...py_dedent(Figure.savefig) def savefig(*args, **kwargs): fig = gcf() return fig.savefig(*args, **kwargs) -if Figure.savefig.__doc__ is not None: - savefig.__doc__ = dedent(Figure.savefig.__doc__) +...@do...py_dedent(Figure.ginput) def ginput(*args, **kwargs): """ Blocking call to interact with the figure. @@ -367,9 +361,8 @@ If *timeout* is negative, does not timeout. """ return gcf().ginput(*args, **kwargs) -if Figure.ginput.__doc__ is not None: - ginput.__doc__ = dedent(Figure.ginput.__doc__) +...@do...py_dedent(Figure.waitforbuttonpress) def waitforbuttonpress(*args, **kwargs): """ Blocking call to interact with the figure. @@ -381,36 +374,31 @@ If *timeout* is negative, does not timeout. """ return gcf().waitforbuttonpress(*args, **kwargs) -if Figure.waitforbuttonpress.__doc__ is not None: - waitforbuttonpress.__doc__ = dedent(Figure.waitforbuttonpress.__doc__) # Putting things in figures +...@do...py_dedent(Figure.text) def figtext(*args, **kwargs): ret = gcf().text(*args, **kwargs) draw_if_interactive() return ret -if Figure.text.__doc__ is not None: - figtext.__doc__ = dedent(Figure.text.__doc__) +...@do...py_dedent(Figure.suptitle) def suptitle(*args, **kwargs): ret = gcf().suptitle(*args, **kwargs) draw_if_interactive() return ret -if Figure.suptitle.__doc__ is not None: - suptitle.__doc__ = dedent(Figure.suptitle.__doc__) +@docstring.Appender("Addition kwargs: hold = [True|False] overrides default hold state", "\n") +...@do...py_dedent(Figure.figimage) def figimage(*args, **kwargs): # allow callers to override the hold state by passing hold=True|False ret = gcf().figimage(*args, **kwargs) draw_if_interactive() gci._current = ret return ret -if Figure.figimage.__doc__ is not None: - figimage.__doc__ = dedent(Figure.figimage.__doc__) + """ -Addition kwargs: hold = [True|False] overrides default hold state""" def figlegend(handles, labels, loc, **kwargs): """ @@ -930,6 +918,7 @@ return ret +...@do...dent_interpd def xscale(*args, **kwargs): """ call signature:: @@ -946,10 +935,8 @@ ret = ax.set_xscale(*args, **kwargs) draw_if_interactive() return ret -xscale.__doc__ = dedent(xscale.__doc__) % { - 'scale': ' | '.join([repr(_x) for _x in get_scale_names()]), - 'scale_docs': get_scale_docs()} +...@do...dent_interpd def yscale(*args, **kwargs): """ call signature:: @@ -966,9 +953,6 @@ ret = ax.set_yscale(*args, **kwargs) draw_if_interactive() return ret -yscale.__doc__ = dedent(yscale.__doc__) % { - 'scale': ' | '.join([repr(_x) for _x in get_scale_names()]), - 'scale_docs': get_scale_docs()} def xticks(*args, **kwargs): """ @@ -1415,15 +1399,13 @@ draw_if_interactive() +...@do...py_dedent(_imread) def imre... [truncated message content] |
From: <ef...@us...> - 2009-08-15 21:24:09
|
Revision: 7494 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7494&view=rev Author: efiring Date: 2009-08-15 21:24:01 +0000 (Sat, 15 Aug 2009) Log Message: ----------- pyplot tracks current image at the figure and axes level; fixes ticket 1656374 Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/boilerplate.py trunk/matplotlib/examples/pylab_examples/multi_image.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/cbook.py trunk/matplotlib/lib/matplotlib/figure.py trunk/matplotlib/lib/matplotlib/pyplot.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/CHANGELOG 2009-08-15 21:24:01 UTC (rev 7494) @@ -1,3 +1,6 @@ +2009-08-15 Pyplot interface: the current image is now tracked at the + figure and axes level, addressing tracker item 1656374. - EF + 2009-08-15 Docstrings are now manipulated with decorators defined in a new module, docstring.py, thanks to Jason Coombs. - EF Modified: trunk/matplotlib/boilerplate.py =================================================================== --- trunk/matplotlib/boilerplate.py 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/boilerplate.py 2009-08-15 21:24:01 UTC (rev 7494) @@ -1,5 +1,5 @@ # Wrap the plot commands defined in axes. The code generated by this -# file is pasted into pylab.py. We did try to do this the smart way, +# file is pasted into pyplot.py. We did try to do this the smart way, # with callable functions and new.function, but could never get the # docstrings right for python2.2. See # http://groups.google.com/group/comp.lang.python/browse_frm/thread/dcd63ec13096a0f6/1b14640f3a4ad3dc?#1b14640f3a4ad3dc @@ -13,7 +13,7 @@ import types # import the local copy of matplotlib, not the installed one -sys.path.insert(0, './lib') +#sys.path.insert(0, './lib') from matplotlib.axes import Axes from matplotlib.cbook import dedent @@ -104,16 +104,16 @@ ) cmappable = { - 'contour' : 'if %(ret)s._A is not None: gci._current = %(ret)s', - 'contourf': 'if %(ret)s._A is not None: gci._current = %(ret)s', - 'hexbin' : 'gci._current = %(ret)s', - 'scatter' : 'gci._current = %(ret)s', - 'pcolor' : 'gci._current = %(ret)s', - 'pcolormesh' : 'gci._current = %(ret)s', - 'imshow' : 'gci._current = %(ret)s', - 'spy' : 'gci._current = %(ret)s', - 'quiver' : 'gci._current = %(ret)s', - 'specgram' : 'gci._current = %(ret)s[-1]', + 'contour' : 'if %(ret)s._A is not None: sci(%(ret)s)', + 'contourf': 'if %(ret)s._A is not None: sci(%(ret)s)', + 'hexbin' : 'sci(%(ret)s)', + 'scatter' : 'sci(%(ret)s)', + 'pcolor' : 'sci(%(ret)s)', + 'pcolormesh': 'sci(%(ret)s)', + 'imshow' : 'sci(%(ret)s)', + 'spy' : 'sci(%(ret)s)', + 'quiver' : 'sci(%(ret)s)', + 'specgram' : 'sci(%(ret)s[-1])', } @@ -233,3 +233,4 @@ # add all the colormaps (autumn, hsv, ....) for name in cmaps: print _fmtcmap%locals() + Modified: trunk/matplotlib/examples/pylab_examples/multi_image.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/multi_image.py 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/examples/pylab_examples/multi_image.py 2009-08-15 21:24:01 UTC (rev 7494) @@ -5,7 +5,7 @@ It also illustrates colorbar tick labelling with a multiplier. ''' -from matplotlib.pyplot import figure, show, sci +from matplotlib.pyplot import figure, show, axes, sci from matplotlib import cm, colors from matplotlib.font_manager import FontProperties from numpy import amin, amax, ravel @@ -68,9 +68,11 @@ # The colorbar is also based on this master image. fig.colorbar(images[0], cax, orientation='horizontal') -# We need the following only if we want to run this +# We need the following only if we want to run this interactively and +# modify the colormap: -sci(images[0]) +axes(ax[0]) # Return the current axes to the first one, +sci(images[0]) # because the current image must be in current axes. show() Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-15 21:24:01 UTC (rev 7494) @@ -838,6 +838,7 @@ self.tables = [] self.artists = [] self.images = [] + self._current_image = None # strictly for pyplot via _sci, _gci self.legend_ = None self.collections = [] # collection.Collection instances @@ -1309,6 +1310,27 @@ #### Adding and tracking artists + def _sci(self, im): + """ + helper for :func:`~matplotlib.pyplot.sci`; + do not use elsewhere. + """ + if isinstance(im, matplotlib.contour.ContourSet): + if im.collections[0] not in self.collections: + raise ValueError( + "ContourSet must be in current Axes") + elif im not in self.images and im not in self.collections: + raise ValueError( + "Argument must be an image, collection, or ContourSet in this Axes") + self._current_image = im + + def _gci(self): + """ + helper for :func:`~matplotlib.pyplot.gci`; + do not use elsewhere. + """ + return self._current_image + def has_data(self): '''Return *True* if any artists have been added to axes. Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-15 21:24:01 UTC (rev 7494) @@ -1007,7 +1007,7 @@ -class Stack: +class Stack(object): """ Implement a stack where elements can be pushed on and you can move back and forth. But no pop. Should mimic home / back / forward @@ -1023,6 +1023,12 @@ if not len(self._elements): return self._default else: return self._elements[self._pos] + def __len__(self): + return self._elements.__len__() + + def __getitem__(self, ind): + return self._elements.__getitem__(ind) + def forward(self): 'move the position forward and return the current element' N = len(self._elements) Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/lib/matplotlib/figure.py 2009-08-15 21:24:01 UTC (rev 7494) @@ -950,6 +950,17 @@ for func in self._axobservers: func(self) return a + def _gci(self): + """ + helper for :func:`~matplotlib.pyplot.gci`; + do not use elsewhere. + """ + for ax in reversed(self._axstack): + im = ax._gci() + if im is not None: + return im + return None + def add_axobserver(self, func): 'whenever the axes state change, func(self) will be called' self._axobservers.append(func) @@ -1039,7 +1050,7 @@ def colorbar(self, mappable, cax=None, ax=None, **kw): """ Create a colorbar for a ScalarMappable instance. - + Documentation for the pylab thin wrapper: %(colorbar_doc)s """ Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 20:00:09 UTC (rev 7493) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009-08-15 21:24:01 UTC (rev 7494) @@ -129,8 +129,10 @@ matplotlib.rcdefaults() draw_if_interactive() -# The current "image" (ScalarMappable) is tracked here on a -# per-pylab-session basis: +# The current "image" (ScalarMappable) is retrieved or set +# only via the pyplot interface using the following two +# functions: + def gci(): """ Get the current :class:`~matplotlib.cm.ScalarMappable` instance @@ -142,18 +144,20 @@ :func:`~matplotlib.pyplot.pcolor` and :func:`~matplotlib.pyplot.scatter` create :class:`~matplotlib.collections.Collection` instances. + The current image is an attribute of the current axes, or the + nearest earlier axes in the current figure that contains an + image. """ - return gci._current -gci._current = None + return gcf()._gci() - def sci(im): """ Set the current image (target of colormap commands like :func:`~matplotlib.pyplot.jet`, :func:`~matplotlib.pyplot.hot` or - :func:`~matplotlib.pyplot.clim`). + :func:`~matplotlib.pyplot.clim`). The current image is an + attribute of the current axes. """ - gci._current = im + gca()._sci(im) ## Any Artist ## @@ -1598,7 +1602,6 @@ ## Plotting part 2: autogenerated wrappers for axes methods ## - # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost @autogen_docstring(Axes.acorr) @@ -1830,7 +1833,7 @@ draw_if_interactive() finally: ax.hold(washold) - if ret._A is not None: gci._current = ret + if ret._A is not None: sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -1848,7 +1851,7 @@ draw_if_interactive() finally: ax.hold(washold) - if ret._A is not None: gci._current = ret + if ret._A is not None: sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -1956,7 +1959,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2010,7 +2013,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2046,7 +2049,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2064,7 +2067,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2154,7 +2157,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2190,7 +2193,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2244,7 +2247,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret[-1] + sci(ret[-1]) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2262,7 +2265,7 @@ draw_if_interactive() finally: ax.hold(washold) - gci._current = ret + sci(ret) return ret # This function was autogenerated by boilerplate.py. Do not edit as @@ -2628,3 +2631,5 @@ draw_if_interactive() + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-20 23:11:53
|
Revision: 7511 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7511&view=rev Author: jdh2358 Date: 2009-08-20 23:11:44 +0000 (Thu, 20 Aug 2009) Log Message: ----------- make autodateformatter customizable Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/examples/pylab_examples/demo_ribbon_box.py trunk/matplotlib/lib/matplotlib/dates.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-08-20 16:19:22 UTC (rev 7510) +++ trunk/matplotlib/CHANGELOG 2009-08-20 23:11:44 UTC (rev 7511) @@ -1,3 +1,6 @@ +2009-08-20 Added scaled dict to AutoDateFormatter for customized + scales - JDH + 2009-08-15 Pyplot interface: the current image is now tracked at the figure and axes level, addressing tracker item 1656374. - EF Modified: trunk/matplotlib/examples/pylab_examples/demo_ribbon_box.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/demo_ribbon_box.py 2009-08-20 16:19:22 UTC (rev 7510) +++ trunk/matplotlib/examples/pylab_examples/demo_ribbon_box.py 2009-08-20 23:11:44 UTC (rev 7511) @@ -136,5 +136,6 @@ ax.set_xlim(years[0]-0.5, years[-1]+0.5) ax.set_ylim(0, 10000) + fig.savefig('ribbon_box.png') plt.show() Modified: trunk/matplotlib/lib/matplotlib/dates.py =================================================================== --- trunk/matplotlib/lib/matplotlib/dates.py 2009-08-20 16:19:22 UTC (rev 7510) +++ trunk/matplotlib/lib/matplotlib/dates.py 2009-08-20 23:11:44 UTC (rev 7511) @@ -378,6 +378,28 @@ """ This class attempts to figure out the best format to use. This is most useful when used with the :class:`AutoDateLocator`. + + + The AutoDateFormatter has a scale dictionary that maps the scale + of the tick (the distance in days between one major tick) and a + format string. The default looks like this:: + + self.scaled = { + 365.0 : '%Y', + 30. : '%b %Y', + 1.0 : '%b %d %Y', + 1./24. : '%H:%M:%D', + } + + + The algorithm picks the key in the dictionary that is >= the + current scale and uses that format string. You can customize this + dictionary by doing:: + + + formatter = AutoDateFormatter() + formatter.scaled[1/(24.*60.)] = '%M:%S' # only show min and sec + """ # This can be improved by providing some user-level direction on @@ -392,28 +414,29 @@ # possibility... def __init__(self, locator, tz=None): + """ + """ self._locator = locator - self._formatter = DateFormatter("%b %d %Y %H:%M:%S %Z", tz) self._tz = tz + self._formatter = DateFormatter("%b %d %Y %H:%M:%D", tz) + self.scaled = { + 365.0 : '%Y', + 30. : '%b %Y', + 1.0 : '%b %d %Y', + 1./24. : '%H:%M:%S', + } def __call__(self, x, pos=0): scale = float( self._locator._get_unit() ) - if ( scale == 365.0 ): - self._formatter = DateFormatter("%Y", self._tz) - elif ( scale == 30.0 ): - self._formatter = DateFormatter("%b %Y", self._tz) - elif ( (scale == 1.0) or (scale == 7.0) ): - self._formatter = DateFormatter("%b %d %Y", self._tz) - elif ( scale == (1.0/24.0) ): - self._formatter = DateFormatter("%H:%M:%S %Z", self._tz) - elif ( scale == (1.0/(24*60)) ): - self._formatter = DateFormatter("%H:%M:%S %Z", self._tz) - elif ( scale == (1.0/(24*3600)) ): - self._formatter = DateFormatter("%H:%M:%S %Z", self._tz) - else: - self._formatter = DateFormatter("%b %d %Y %H:%M:%S %Z", self._tz) + keys = self.scaled.keys() + keys.sort() + for k in keys: + if k>=scale: + self._formatter = DateFormatter(self.scaled[k]) + break + return self._formatter(x, pos) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-22 23:26:33
|
Revision: 7524 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7524&view=rev Author: jdh2358 Date: 2009-08-22 23:26:25 +0000 (Sat, 22 Aug 2009) Log Message: ----------- Merged revisions 7489-7490,7498-7502,7506,7517,7519,7521-7523 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7489 | jdh2358 | 2009-08-15 10:40:27 -0700 (Sat, 15 Aug 2009) | 1 line some doc reorg ........ r7490 | jdh2358 | 2009-08-15 10:56:44 -0700 (Sat, 15 Aug 2009) | 1 line added transformations tut, did some reorg ........ r7498 | jdh2358 | 2009-08-17 20:48:21 -0700 (Mon, 17 Aug 2009) | 1 line added path tut ........ r7499 | jdh2358 | 2009-08-17 22:15:21 -0700 (Mon, 17 Aug 2009) | 1 line added looking glass demo ........ r7500 | mdboom | 2009-08-18 07:00:28 -0700 (Tue, 18 Aug 2009) | 2 lines Fix some minor typos in the transforms tutorial ........ r7501 | mdboom | 2009-08-18 07:01:41 -0700 (Tue, 18 Aug 2009) | 2 lines Fix some minor typos in the transforms tutorial ........ r7502 | mdboom | 2009-08-18 07:08:27 -0700 (Tue, 18 Aug 2009) | 2 lines Fix some minor typos in the paths tutorial ........ r7506 | ryanmay | 2009-08-19 00:56:33 -0700 (Wed, 19 Aug 2009) | 1 line Remove calls to np.asarray(). This was breaking the use of masked arrays in calls to set_[x|y]data() and is handled appropriately already by set_data(). ........ r7517 | jdh2358 | 2009-08-21 17:02:15 -0700 (Fri, 21 Aug 2009) | 1 line fixed a fifo bug for the new transforms infrastructure ........ r7519 | jouni | 2009-08-21 23:25:07 -0700 (Fri, 21 Aug 2009) | 2 lines Fix typos found by Marc Desmarais and Nicolas Pinto ........ r7521 | jdh2358 | 2009-08-22 15:50:55 -0700 (Sat, 22 Aug 2009) | 1 line added Ariel's max install patch ........ r7522 | jdh2358 | 2009-08-22 16:19:44 -0700 (Sat, 22 Aug 2009) | 1 line applied Ariel's mlab.cohere_pairs fixes ........ r7523 | jdh2358 | 2009-08-22 16:20:30 -0700 (Sat, 22 Aug 2009) | 1 line fix osx epd formatting bug in rest ........ Modified Paths: -------------- trunk/matplotlib/CXX/IndirectPythonInterface.hxx trunk/matplotlib/agg24/include/agg_basics.h trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/_templates/layout.html trunk/matplotlib/doc/faq/installing_faq.rst trunk/matplotlib/doc/users/artists.rst trunk/matplotlib/doc/users/index.rst trunk/matplotlib/doc/users/index_text.rst trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/lines.py trunk/matplotlib/lib/matplotlib/mlab.py Added Paths: ----------- trunk/matplotlib/doc/pyplots/annotate_transform.py trunk/matplotlib/doc/pyplots/compound_path_demo.py trunk/matplotlib/doc/users/annotations_guide.rst trunk/matplotlib/doc/users/annotations_intro.rst trunk/matplotlib/doc/users/legend_guide.rst trunk/matplotlib/doc/users/path_tutorial.rst trunk/matplotlib/doc/users/transforms_tutorial.rst trunk/matplotlib/examples/event_handling/looking_glass.py Removed Paths: ------------- trunk/matplotlib/doc/users/annotations.rst trunk/matplotlib/doc/users/plotting/annotation.rst trunk/matplotlib/doc/users/plotting/legend.rst 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-7486 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7523 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,7442-7444,7446,7475-7482,7484,7486 + /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,7446,7475-7482,7484,7486,7489-7523 Modified: trunk/matplotlib/CXX/IndirectPythonInterface.hxx =================================================================== --- trunk/matplotlib/CXX/IndirectPythonInterface.hxx 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/CXX/IndirectPythonInterface.hxx 2009-08-22 23:26:25 UTC (rev 7524) @@ -193,6 +193,6 @@ void _XDECREF( PyObject *op ); char *__Py_PackageContext(); -}; +} #endif // __CXX_INDIRECT_PYTHON_INTERFACE__HXX__ Modified: trunk/matplotlib/agg24/include/agg_basics.h =================================================================== --- trunk/matplotlib/agg24/include/agg_basics.h 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/agg24/include/agg_basics.h 2009-08-22 23:26:25 UTC (rev 7524) @@ -2,8 +2,8 @@ // Anti-Grain Geometry - Version 2.4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // @@ -25,12 +25,12 @@ #else namespace agg { - // The policy of all AGG containers and memory allocation strategy + // The policy of all AGG containers and memory allocation strategy // in general is that no allocated data requires explicit construction. // It means that the allocator can be really simple; you can even - // replace new/delete to malloc/free. The constructors and destructors - // won't be called in this case, however everything will remain working. - // The second argument of deallocate() is the size of the allocated + // replace new/delete to malloc/free. The constructors and destructors + // won't be called in this case, however everything will remain working. + // The second argument of deallocate() is the size of the allocated // block. You can use this information if you wish. //------------------------------------------------------------pod_allocator template<class T> struct pod_allocator @@ -40,8 +40,8 @@ }; // Single object allocator. It's also can be replaced with your custom - // allocator. The difference is that it can only allocate a single - // object and the constructor and destructor must be called. + // allocator. The difference is that it can only allocate a single + // object and the constructor and destructor must be called. // In AGG there is no need to allocate an array of objects with // calling their constructors (only single ones). So that, if you // replace these new/delete to malloc/free make sure that the in-place @@ -213,23 +213,23 @@ enum cover_scale_e { cover_shift = 8, //----cover_shift - cover_size = 1 << cover_shift, //----cover_size - cover_mask = cover_size - 1, //----cover_mask - cover_none = 0, //----cover_none - cover_full = cover_mask //----cover_full + cover_size = 1 << cover_shift, //----cover_size + cover_mask = cover_size - 1, //----cover_mask + cover_none = 0, //----cover_none + cover_full = cover_mask //----cover_full }; //----------------------------------------------------poly_subpixel_scale_e - // These constants determine the subpixel accuracy, to be more precise, - // the number of bits of the fractional part of the coordinates. + // These constants determine the subpixel accuracy, to be more precise, + // the number of bits of the fractional part of the coordinates. // The possible coordinate capacity in bits can be calculated by formula: // sizeof(int) * 8 - poly_subpixel_shift, i.e, for 32-bit integers and // 8-bits fractional part the capacity is 24 bits. enum poly_subpixel_scale_e { poly_subpixel_shift = 8, //----poly_subpixel_shift - poly_subpixel_scale = 1<<poly_subpixel_shift, //----poly_subpixel_scale - poly_subpixel_mask = poly_subpixel_scale-1, //----poly_subpixel_mask + poly_subpixel_scale = 1<<poly_subpixel_shift, //----poly_subpixel_scale + poly_subpixel_mask = poly_subpixel_scale-1 //----poly_subpixel_mask }; //----------------------------------------------------------filling_rule_e @@ -253,7 +253,7 @@ { return rad * 180.0 / pi; } - + //----------------------------------------------------------------rect_base template<class T> struct rect_base { @@ -265,9 +265,9 @@ rect_base(T x1_, T y1_, T x2_, T y2_) : x1(x1_), y1(y1_), x2(x2_), y2(y2_) {} - void init(T x1_, T y1_, T x2_, T y2_) + void init(T x1_, T y1_, T x2_, T y2_) { - x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_; + x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_; } const self_type& normalize() @@ -299,17 +299,17 @@ }; //-----------------------------------------------------intersect_rectangles - template<class Rect> + template<class Rect> inline Rect intersect_rectangles(const Rect& r1, const Rect& r2) { Rect r = r1; - // First process x2,y2 because the other order - // results in Internal Compiler Error under - // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in + // First process x2,y2 because the other order + // results in Internal Compiler Error under + // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in // case of "Maximize Speed" optimization option. //----------------- - if(r.x2 > r2.x2) r.x2 = r2.x2; + if(r.x2 > r2.x2) r.x2 = r2.x2; if(r.y2 > r2.y2) r.y2 = r2.y2; if(r.x1 < r2.x1) r.x1 = r2.x1; if(r.y1 < r2.y1) r.y1 = r2.y1; @@ -318,7 +318,7 @@ //---------------------------------------------------------unite_rectangles - template<class Rect> + template<class Rect> inline Rect unite_rectangles(const Rect& r1, const Rect& r2) { Rect r = r1; @@ -336,26 +336,26 @@ //---------------------------------------------------------path_commands_e enum path_commands_e { - path_cmd_stop = 0, //----path_cmd_stop - path_cmd_move_to = 1, //----path_cmd_move_to - path_cmd_line_to = 2, //----path_cmd_line_to - path_cmd_curve3 = 3, //----path_cmd_curve3 - path_cmd_curve4 = 4, //----path_cmd_curve4 + path_cmd_stop = 0, //----path_cmd_stop + path_cmd_move_to = 1, //----path_cmd_move_to + path_cmd_line_to = 2, //----path_cmd_line_to + path_cmd_curve3 = 3, //----path_cmd_curve3 + path_cmd_curve4 = 4, //----path_cmd_curve4 path_cmd_curveN = 5, //----path_cmd_curveN path_cmd_catrom = 6, //----path_cmd_catrom path_cmd_ubspline = 7, //----path_cmd_ubspline path_cmd_end_poly = 0x0F, //----path_cmd_end_poly - path_cmd_mask = 0x0F //----path_cmd_mask + path_cmd_mask = 0x0F //----path_cmd_mask }; //------------------------------------------------------------path_flags_e enum path_flags_e { - path_flags_none = 0, //----path_flags_none - path_flags_ccw = 0x10, //----path_flags_ccw - path_flags_cw = 0x20, //----path_flags_cw + path_flags_none = 0, //----path_flags_none + path_flags_ccw = 0x10, //----path_flags_ccw + path_flags_cw = 0x20, //----path_flags_cw path_flags_close = 0x40, //----path_flags_close - path_flags_mask = 0xF0 //----path_flags_mask + path_flags_mask = 0xF0 //----path_flags_mask }; //---------------------------------------------------------------is_vertex @@ -372,7 +372,7 @@ //-----------------------------------------------------------------is_stop inline bool is_stop(unsigned c) - { + { return c == path_cmd_stop; } @@ -416,7 +416,7 @@ inline bool is_close(unsigned c) { return (c & ~(path_flags_cw | path_flags_ccw)) == - (path_cmd_end_poly | path_flags_close); + (path_cmd_end_poly | path_flags_close); } //------------------------------------------------------------is_next_poly @@ -440,19 +440,19 @@ //-------------------------------------------------------------is_oriented inline bool is_oriented(unsigned c) { - return (c & (path_flags_cw | path_flags_ccw)) != 0; + return (c & (path_flags_cw | path_flags_ccw)) != 0; } //---------------------------------------------------------------is_closed inline bool is_closed(unsigned c) { - return (c & path_flags_close) != 0; + return (c & path_flags_close) != 0; } //----------------------------------------------------------get_close_flag inline unsigned get_close_flag(unsigned c) { - return c & path_flags_close; + return c & path_flags_close; } //-------------------------------------------------------clear_orientation @@ -513,7 +513,7 @@ int x1, x2; const T* ptr; const_row_info() {} - const_row_info(int x1_, int x2_, const T* ptr_) : + const_row_info(int x1_, int x2_, const T* ptr_) : x1(x1_), x2(x2_), ptr(ptr_) {} }; Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-22 23:26:25 UTC (rev 7524) @@ -8,18 +8,33 @@ pathto('users/installing') }}">installing</a> </p> -<p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">video lecture</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>Machine Learning Open Source Software</i></a>. +<p>Build websites like matplotlib's, +with <a href="http://sphinx.pocoo.org/">sphinx</a> and extensions for +mpl plots, math, inheritance diagrams -- try +the <a href="http://matplotlib.sf.net/sampledoc">sampledoc</a> +tutorial. </p> + +<h3>Videos</h3> + +<p>Watch the <a href="http://conference.scipy.org/">SciPy</a> 2009 <a href="http://www.archive.org/details/scipy09_introTutorialDay2_1">intro</a> and <a href="http://www.archive.org/details/scipy09_advancedTutorialDay1_3">advanced</a> matplotlib tutorials +</p> + +<p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">talk</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>MLOSS</i></a>. +</p> + + +<h3>Toolkits</h3> + <p>There are several matplotlib addon <a href="{{ pathto('users/toolkits') }}">toolkits</a>, including the projection and mapping toolkit <a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>, 3d plotting with <a href="{{ -pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, wild and wonderful axes and axis helpers in <a href="{{ +pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>, axes and axis helpers in <a href="{{ pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more. </p> - <h3>Need help?</h3> <p>Check the <a href="{{ pathto('users/index') }}">user guide</a>, Modified: trunk/matplotlib/doc/_templates/layout.html =================================================================== --- trunk/matplotlib/doc/_templates/layout.html 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/_templates/layout.html 2009-08-22 23:26:25 UTC (rev 7524) @@ -2,10 +2,11 @@ {% block rootrellink %} - <li><a href="{{ pathto('index') }}">matplotlib home</a>| </li> + <li><a href="{{ pathto('index') }}">home</a>| </li> <li><a href="{{ pathto('search') }}">search</a>| </li> + <li><a href="examples/index.html">examples</a>| </li> <li><a href="{{ pathto('gallery') }}">gallery</a>| </li> - <li><a href="{{ pathto('contents') }}">documentation </a> »</li> + <li><a href="{{ pathto('contents') }}">docs</a> »</li> {% endblock %} Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -295,8 +295,8 @@ If you want to install matplotlib from one of the binary installers we build, you have two choices: a dmg installer, which is a typical Installer.app, or an binary OSX egg, which you can install via -setuptools easy_install. - +setuptools easy_install. + The mkpg installer will have a "dmg" extension, and will have a name like :file:`matplotlib-0.99.0-py2.5-macosx10.5.dmg` depending on the python, matplotlib, and OSX versions. Save this file and double @@ -318,10 +318,24 @@ then you will need to set your PYTHONPATH, eg:: - export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages:$PYTHONPATH + export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages:$PYTHONPATH See also :ref:`environment-variables`. + +If you are upgrading your matplotlib using the dmg installer over an +Enthought Python Distribution, you may get an error like "You must use +a framework install of python". EPD puts their python in a directory +like :file:``//Library/Frameworks/Python.framework/Versions/4.3.0`` +where 4.3.0 is an EPD version number. The mpl installer needs the +`python` version number, so you need to create a symlink pointing your +python version to the EPS version before installing matplotlib. For +example, for python veersion 2.5 and EPD version 4.3.0:: + + > cd /Library/Frameworks/Python.framework/Versions + > ln -s 4.3.0 2.5 + + .. _easy-install-osx-egg: easy_install from egg @@ -342,7 +356,7 @@ <http://sourceforge.net/projects/matplotlib/files/>`_ directly to your harddrive, and manually install it with - > easy_install --install-dir=~/dev/lib/python2.5/site-packages/ matplotlib-0.99.0.rc1-py2.5-macosx-10.5-i386.egg + > easy_install --install-dir=~/dev/lib/python2.5/site-packages/ matplotlib-0.99.0.rc1-py2.5-macosx-10.5-i386.egg Some users have reported problems with the egg for 0.98 from the @@ -364,6 +378,66 @@ which prevents their installation through easy_install. Renaming is all it takes to install them; still, it's annoying. + +.. _install_from_source_on_osx_epd: + +Building and installing from source on OSX with EPD +--------------------------------------------------- + +If you have the EPD installed (:ref:`which-python-for-osx`), it might turn out +to be rather tricky to install a new version of matplotlib from source on the +Mac OS 10.5 . Here's a procedure that seems to work, at least sometimes: + +0. Remove the ~/.matplotlib folder ("rm -rf ~/.matplotlib"). + +1. Edit the file (make a backup before you start, just in case): +``/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile``, +removing all occurrences of the string ``-arch ppc``, changing the line +``MACOSX_DEPLOYMENT_TARGET=10.3`` to ``MACOSX_DEPLOYMENT_TARGET=10.5`` and +changing the occurrences of ``MacOSX10.4u.sdk`` into ``MacOSX10.5.sdk`` + +2. In +``/Library/Frameworks/Python.framework/Versions/Current/lib/pythonX.Y/site-packages/easy-install.pth``, +(where X.Y is the version of Python you are building against) +Comment out the line containing the name of the directory in which the +previous version of MPL was installed (Looks something like ``./matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg``). + +3. Save the following as a shell script , for example ``./install-matplotlib-epd-osx.sh`` :: + + NAME=matplotlib + VERSION=0_99 + PREFIX=$HOME + #branch="release" + branch="trunk" + if [ $branch = "trunk" ] + then + echo getting the trunk + svn co https://matplotlib.svn.sourceforge.net/svnroot/$NAME/trunk/$NAME $NAME + cd $NAME + + fi + if [ $branch = "release" ] + then + echo getting the maintenance branch + svn co https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v${VERSION}_maint $NAME$VERSION + cd $NAME$VERSION + fi + export CFLAGS="-Os -arch i386" + export LDFLAGS="-Os -arch i386" + export PKG_CONFIG_PATH="/usr/x11/lib/pkgconfig" + export ARCHFLAGS="-arch i386" + python setup.py build + python setup.py install #--prefix=$PREFIX #Use this if you don't want it installed into your default location + cd .. + +Run this script (for example ``sh ./install-matplotlib-epd-osx.sh``) in the +directory in which you want the source code to be placed, or simply type the +commands in the terminal command line. This script sets some local variable +(CFLAGS, LDFLAGS, PKG_CONFIG_PATH, ARCHFLAGS), removes previous installations, +checks out the source from svn, builds and installs it. The backend seems to be +set to MacOSX. + + Windows questions ================= 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,7442-7444,7446,7475-7482,7484,7486 + /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,7446,7475-7482,7484,7486,7489-7523 Copied: trunk/matplotlib/doc/pyplots/annotate_transform.py (from rev 7523, branches/v0_99_maint/doc/pyplots/annotate_transform.py) =================================================================== --- trunk/matplotlib/doc/pyplots/annotate_transform.py (rev 0) +++ trunk/matplotlib/doc/pyplots/annotate_transform.py 2009-08-22 23:26:25 UTC (rev 7524) @@ -0,0 +1,34 @@ +import numpy as np +import matplotlib.pyplot as plt + +x = np.arange(0, 10, 0.005) +y = np.exp(-x/2.) * np.sin(2*np.pi*x) + +fig = plt.figure() +ax = fig.add_subplot(111) +ax.plot(x, y) +ax.set_xlim(0, 10) +ax.set_ylim(-1, 1) + +xdata, ydata = 5, 0 +xdisplay, ydisplay = ax.transData.transform((xdata, ydata)) + +bbox = dict(boxstyle="round", fc="0.8") +arrowprops = dict( + arrowstyle = "->", + connectionstyle = "angle,angleA=0,angleB=90,rad=10") + +offset = 72 +ax.annotate('data = (%.1f, %.1f)'%(xdata, ydata), + (xdata, ydata), xytext=(-2*offset, offset), textcoords='offset points', + bbox=bbox, arrowprops=arrowprops) + + +disp = ax.annotate('display = (%.1f, %.1f)'%(xdisplay, ydisplay), + (xdisplay, ydisplay), xytext=(0.5*offset, -offset), + xycoords='figure pixels', + textcoords='offset points', + bbox=bbox, arrowprops=arrowprops) + + +plt.show() Copied: trunk/matplotlib/doc/pyplots/compound_path_demo.py (from rev 7523, branches/v0_99_maint/doc/pyplots/compound_path_demo.py) =================================================================== --- trunk/matplotlib/doc/pyplots/compound_path_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/compound_path_demo.py 2009-08-22 23:26:25 UTC (rev 7524) @@ -0,0 +1,42 @@ +import numpy as np + +import matplotlib.pyplot as plt +import matplotlib.patches as patches +import matplotlib.path as path + +fig = plt.figure() +ax = fig.add_subplot(111) + +# histogram our data with numpy +data = np.random.randn(1000) +n, bins = np.histogram(data, 100) + +# get the corners of the rectangles for the histogram +left = np.array(bins[:-1]) +right = np.array(bins[1:]) +bottom = np.zeros(len(left)) +top = bottom + n +nrects = len(left) + +nverts = nrects*(1+3+1) +verts = np.zeros((nverts, 2)) +codes = np.ones(nverts, int) * path.Path.LINETO +codes[0::5] = path.Path.MOVETO +codes[4::5] = path.Path.CLOSEPOLY +verts[0::5,0] = left +verts[0::5,1] = bottom +verts[1::5,0] = left +verts[1::5,1] = top +verts[2::5,0] = right +verts[2::5,1] = top +verts[3::5,0] = right +verts[3::5,1] = bottom + +barpath = path.Path(verts, codes) +patch = patches.PathPatch(barpath, facecolor='green', edgecolor='yellow', alpha=0.5) +ax.add_patch(patch) + +ax.set_xlim(left[0], right[-1]) +ax.set_ylim(bottom.min(), top.max()) + +plt.show() 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 Deleted: trunk/matplotlib/doc/users/annotations.rst =================================================================== --- trunk/matplotlib/doc/users/annotations.rst 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/users/annotations.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -1,87 +0,0 @@ -.. _annotations-tutorial: - -Annotating text -=============== - -For a more detailed introduction to annotations, see -:ref:`plotting-guide-annotation`. - -The uses of the basic :func:`~matplotlib.pyplot.text` command above -place text at an arbitrary position on the Axes. A common use case of -text is to annotate some feature of the plot, and the -:func:`~matplotlib.Axes.annotate` method provides helper functionality -to make annotations easy. In an annotation, there are two points to -consider: the location being annotated represented by the argument -``xy`` and the location of the text ``xytext``. Both of these -arguments are ``(x,y)`` tuples. - -.. plot:: pyplots/annotation_basic.py - :include-source: - - -In this example, both the ``xy`` (arrow tip) and ``xytext`` locations -(text location) are in data coordinates. There are a variety of other -coordinate systems one can choose -- you can specify the coordinate -system of ``xy`` and ``xytext`` with one of the following strings for -``xycoords`` and ``textcoords`` (default is 'data') - -==================== ==================================================== -argument coordinate system -==================== ==================================================== - 'figure points' points from the lower left corner of the figure - 'figure pixels' pixels from the lower left corner of the figure - 'figure fraction' 0,0 is lower left of figure and 1,1 is upper, right - 'axes points' points from lower left corner of axes - 'axes pixels' pixels from lower left corner of axes - 'axes fraction' 0,1 is lower left of axes and 1,1 is upper right - 'data' use the axes data coordinate system -==================== ==================================================== - -For example to place the text coordinates in fractional axes -coordinates, one could do:: - - ax.annotate('local max', xy=(3, 1), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top', - ) - -For physical coordinate systems (points or pixels) the origin is the -(bottom, left) of the figure or axes. If the value is negative, -however, the origin is from the (right, top) of the figure or axes, -analogous to negative indexing of sequences. - -Optionally, you can specify arrow properties which draws an arrow -from the text to the annotated point by giving a dictionary of arrow -properties in the optional keyword argument ``arrowprops``. - - -==================== ===================================================== -``arrowprops`` key description -==================== ===================================================== -width the width of the arrow in points -frac the fraction of the arrow length occupied by the head -headwidth the width of the base of the arrow head in points -shrink move the tip and base some percent away from - the annotated point and text - -\*\*kwargs any key for :class:`matplotlib.patches.Polygon`, - e.g. ``facecolor`` -==================== ===================================================== - - -In the example below, the ``xy`` point is in native coordinates -(``xycoords`` defaults to 'data'). For a polar axes, this is in -(theta, radius) space. The text in this example is placed in the -fractional figure coordinate system. :class:`matplotlib.text.Text` -keyword args like ``horizontalalignment``, ``verticalalignment`` and -``fontsize are passed from the `~matplotlib.Axes.annotate` to the -``Text`` instance - -.. plot:: pyplots/annotation_polar.py - :include-source: - -For more on all the wild and wonderful things you can do with -annotations, including fancy arrows, see :ref:`plotting-guide-annotation` -and :ref:`pylab_examples-annotation_demo`. - Copied: trunk/matplotlib/doc/users/annotations_guide.rst (from rev 7523, branches/v0_99_maint/doc/users/annotations_guide.rst) =================================================================== --- trunk/matplotlib/doc/users/annotations_guide.rst (rev 0) +++ trunk/matplotlib/doc/users/annotations_guide.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -0,0 +1,332 @@ +.. _plotting-guide-annotation: + +**************** +Annotating Axes +**************** + +Do not proceed unless you already have read +:func:`~matplotlib.pyplot.text` and :func:`~matplotlib.pyplot.annotate`! + + +Annotating with Text with Box +============================= + +Let's start with a simple example. + +.. plot:: users/plotting/examples/annotate_text_arrow.py + + +The :func:`~matplotlib.pyplot.text` function in the pyplot module (or +text method of the Axes class) takes bbox keyword argument, and when +given, a box around the text is drawn. :: + + bbox_props = dict(boxstyle="rarrow,pad=0.3", fc="cyan", ec="b", lw=2) + t = ax.text(0, 0, "Direction", ha="center", va="center", rotation=45, + size=15, + bbox=bbox_props) + + +The patch object associated with the text can be accessed by:: + + bb = t.get_bbox_patch() + +The return value is an instance of FancyBboxPatch and the patch +properties like facecolor, edgewidth, etc. can be accessed and +modified as usual. To change the shape of the box, use *set_boxstyle* +method. :: + + bb.set_boxstyle("rarrow", pad=0.6) + +The arguments are the name of the box style with its attributes as +keyword arguments. Currently, followign box styles are implemented. + + ========== ============== ========================== + Class Name Attrs + ========== ============== ========================== + LArrow ``larrow`` pad=0.3 + RArrow ``rarrow`` pad=0.3 + Round ``round`` pad=0.3,rounding_size=None + Round4 ``round4`` pad=0.3,rounding_size=None + Roundtooth ``roundtooth`` pad=0.3,tooth_size=None + Sawtooth ``sawtooth`` pad=0.3,tooth_size=None + Square ``square`` pad=0.3 + ========== ============== ========================== + +.. plot:: mpl_examples/pylab_examples/fancybox_demo2.py + + +Note that the attrubutes arguments can be specified within the style +name with separating comma (this form can be used as "boxstyle" value +of bbox argument when initializing the text instance) :: + + bb.set_boxstyle("rarrow,pad=0.6") + + + + +Annotating with Arrow +===================== + +The :func:`~matplotlib.pyplot.annotate` function in the pyplot module +(or annotate method of the Axes class) is used to draw an arrow +connecting two points on the plot. :: + + ax.annotate("Annotation", + xy=(x1, y1), xycoords='data', + xytext=(x2, y2), textcoords='offset points', + ) + +This annotates a point at ``xy`` in the given coordinate (``xycoords``) +with the text at ``xytext`` given in ``textcoords``. Often, the +annotated point is specified in the *data* coordinate and the annotating +text in *offset points*. +See :func:`~matplotlib.pyplot.annotate` for available coordinate systems. + +An arrow connecting two point (xy & xytext) can be optionally drawn by +specifying the ``arrowprops`` argument. To draw only an arrow, use +empty string as the first argument. :: + + ax.annotate("", + xy=(0.2, 0.2), xycoords='data', + xytext=(0.8, 0.8), textcoords='data', + arrowprops=dict(arrowstyle="->", + connectionstyle="arc3"), + ) + +.. plot:: users/plotting/examples/annotate_simple01.py + +The arrow drawing takes a few steps. + +1. a connecting path between two points are created. This is + controlled by ``connectionstyle`` key value. + +2. If patch object is given (*patchA* & *patchB*), the path is clipped to + avoid the patch. + +3. The path is further shrinked by given amount of pixels (*shirnkA* + & *shrinkB*) + +4. The path is transmuted to arrow patch, which is controlled by the + ``arrowstyle`` key value. + + +.. plot:: users/plotting/examples/annotate_explain.py + + +The creation of the connecting path between two points is controlled by +``connectionstyle`` key and follwing styles are available. + + ========== ============================================= + Name Attrs + ========== ============================================= + ``angle`` angleA=90,angleB=0,rad=0.0 + ``angle3`` angleA=90,angleB=0 + ``arc`` angleA=0,angleB=0,armA=None,armB=None,rad=0.0 + ``arc3`` rad=0.0 + ``bar`` armA=0.0,armB=0.0,fraction=0.3,angle=None + ========== ============================================= + +Note that "3" in ``angle3`` and ``arc3`` is meant to indicate that the +resulting path is a quadratic spline segment (three control +points). As will be discussed below, some arrow style option only can +be used when the connecting path is a quadratic spline. + +The behavior of each connection style is (limitedly) demonstrated in the +example below. (Warning : The behavior of the ``bar`` style is currently not +well defined, it may be changed in the future). + +.. plot:: users/plotting/examples/connectionstyle_demo.py + + +The connecting path (after clipping and shrinking) is then mutated to +an arrow patch, according to the given ``arrowstyle``. + + ========== ============================================= + Name Attrs + ========== ============================================= + ``-`` None + ``->`` head_length=0.4,head_width=0.2 + ``-[`` widthB=1.0,lengthB=0.2,angleB=None + ``-|>`` head_length=0.4,head_width=0.2 + ``<-`` head_length=0.4,head_width=0.2 + ``<->`` head_length=0.4,head_width=0.2 + ``<|-`` head_length=0.4,head_width=0.2 + ``<|-|>`` head_length=0.4,head_width=0.2 + ``fancy`` head_length=0.4,head_width=0.4,tail_width=0.4 + ``simple`` head_length=0.5,head_width=0.5,tail_width=0.2 + ``wedge`` tail_width=0.3,shrink_factor=0.5 + ========== ============================================= + +.. plot:: mpl_examples/pylab_examples/fancyarrow_demo.py + +Some arrowstyles only work with connection style that generates a +quadratic-spline segment. They are ``fancy``, ``simple``, and ``wedge``. +For these arrow styles, you must use "angle3" or "arc3" connection +style. + +If the annotation string is given, the patchA is set to the bbox patch +of the text by default. + +.. plot:: users/plotting/examples/annotate_simple02.py + +As in the text command, a box around the text can be drawn using +the ``bbox`` argument. + +.. plot:: users/plotting/examples/annotate_simple03.py + +By default, the starting point is set to the center of the text +extent. This can be adjusted with ``relpos`` key value. The values +are normalized to the extent of the text. For example, (0,0) means +lower-left corner and (1,1) means top-right. + +.. plot:: users/plotting/examples/annotate_simple04.py + + +Using ConnectorPatch +==================== + +The ConnectorPatch is like an annotation without a text. While the +annotate function is recommended in most of situation, the +ConnectorPatch is useful when you want to connect points in different +axes. :: + + from matplotlib.patches import ConnectionPatch + xy = (0.2, 0.2) + con = ConnectionPatch(xyA=xy, xyB=xy, coordsA="data", coordsB="data", + axesA=ax1, axesB=ax2) + ax2.add_artist(con) + +The above code connects point xy in data coordinate of ``ax1`` to +point xy int data coordiante of ``ax2``. Here is a simple example. + +.. plot:: users/plotting/examples/connect_simple01.py + + +While the ConnectorPatch instance can be added to any axes, but you +may want it to be added to the axes in the latter (?) of the axes +drawing order to prevent overlap (?) by other axes. + + +Placing Artist at the anchored location of the Axes +=================================================== + +There are class of artist that can be placed at the anchored location +of the Axes. A common example is the legend. This type of artists can +be created by using the OffsetBox class. A few predefined classes are +available in ``mpl_toolkits.axes_grid.anchored_artists``. :: + + from mpl_toolkits.axes_grid.anchored_artists import AnchoredText + at = AnchoredText("Figure 1a", + prop=dict(size=8), frameon=True, + loc=2, + ) + at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") + ax.add_artist(at) + + +.. plot:: users/plotting/examples/anchored_box01.py + + +The *loc* keyword has same meaning as in the legend command. + +A simple application is when the size of the artist (or collection of +artists) is knwon in pixel size during the time of creation. For +example, If you want to draw a circle with fixed size of 20 pixel x 20 +pixel (radius = 10 pixel), you can utilize +``AnchoredDrawingArea``. The instance is created with a size of the +drawing area (in pixel). And user can add arbitrary artist to the +drawing area. Note that the extents of the artists that are added to +the drawing area has nothing to do with the placement of the drawing +area itself. The initial size only matters. :: + + from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea + + ada = AnchoredDrawingArea(20, 20, 0, 0, + loc=1, pad=0., frameon=False) + p1 = Circle((10, 10), 10) + ada.drawing_area.add_artist(p1) + p2 = Circle((30, 10), 5, fc="r") + ada.drawing_area.add_artist(p2) + +The artists that are added to the drawing area should not have +transform set (they will be overridden) and the dimension of those +artists are interpreted as a pixel coordinate, i.e., the radius of the +circles in above example are 10 pixel and 5 pixel, respectively. + +.. plot:: users/plotting/examples/anchored_box02.py + +Sometimes, you want to your artists scale with data coordinate (or +other coordinate than canvas pixel). You can use +``AnchoredAuxTransformBox`` class. This is similar to +``AnchoredDrawingArea`` except that the extent of the artist is +determined during the drawing time respecting the specified transform. :: + + from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox + + box = AnchoredAuxTransformBox(ax.transData, loc=2) + el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates! + box.drawing_area.add_artist(el) + +The ellipse in the above example will have width and height +corresponds to 0.1 and 0.4 in data coordinate and will be +automatically scaled when the view limits of the axes change. + +.. plot:: users/plotting/examples/anchored_box03.py + +As in the legend, the bbox_to_anchor argument can be set. Using the +HPacker and VPacker, you can have an arrangement(?) of artist as in the +legend (as a matter of fact, this is how the legend is created). + +.. plot:: users/plotting/examples/anchored_box04.py + +Note that unlike the legend, the ``bbox_transform`` is set +to IdentityTransform by default. + +Advanced Topics +*************** + +Zoom effect between Axes +======================== + +mpl_toolkits.axes_grid.inset_locator defines some patch classs useful +for interconnect two axes. Understanding the code requires some +knowledge of how mpl's transform works. But, utilizing it will be +straight forward. + + +.. plot:: mpl_examples/pylab_examples/axes_zoom_effect.py + + +Define Custom BoxStyle +====================== + +You can use a custom box style. The value for the ``boxstyle`` can be a +callable object in following forms.:: + + def __call__(self, x0, y0, width, height, mutation_size, + aspect_ratio=1.): + """ + Given the location and size of the box, return the path of + the box around it. + + - *x0*, *y0*, *width*, *height* : location and size of the box + - *mutation_size* : a reference scale for the mutation. + - *aspect_ratio* : aspect-ration for the mutation. + """ + path = ... + return path + +Here is a complete example. + +.. plot:: users/plotting/examples/custom_boxstyle01.py + +However, it is recommended that you derive from the +matplotlib.patches.BoxStyle._Base as demonstrated below. + +.. plot:: users/plotting/examples/custom_boxstyle02.py + :include-source: + + +Similarly, you can define custom ConnectionStyle and Custome ArrowStyle. +See the source code of ``lib/matplotlib/patches.py`` and check +how each style class is defined. Copied: trunk/matplotlib/doc/users/annotations_intro.rst (from rev 7523, branches/v0_99_maint/doc/users/annotations_intro.rst) =================================================================== --- trunk/matplotlib/doc/users/annotations_intro.rst (rev 0) +++ trunk/matplotlib/doc/users/annotations_intro.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -0,0 +1,87 @@ +.. _annotations-tutorial: + +Annotating text +=============== + +For a more detailed introduction to annotations, see +:ref:`plotting-guide-annotation`. + +The uses of the basic :func:`~matplotlib.pyplot.text` command above +place text at an arbitrary position on the Axes. A common use case of +text is to annotate some feature of the plot, and the +:func:`~matplotlib.Axes.annotate` method provides helper functionality +to make annotations easy. In an annotation, there are two points to +consider: the location being annotated represented by the argument +``xy`` and the location of the text ``xytext``. Both of these +arguments are ``(x,y)`` tuples. + +.. plot:: pyplots/annotation_basic.py + :include-source: + + +In this example, both the ``xy`` (arrow tip) and ``xytext`` locations +(text location) are in data coordinates. There are a variety of other +coordinate systems one can choose -- you can specify the coordinate +system of ``xy`` and ``xytext`` with one of the following strings for +``xycoords`` and ``textcoords`` (default is 'data') + +==================== ==================================================== +argument coordinate system +==================== ==================================================== + 'figure points' points from the lower left corner of the figure + 'figure pixels' pixels from the lower left corner of the figure + 'figure fraction' 0,0 is lower left of figure and 1,1 is upper, right + 'axes points' points from lower left corner of axes + 'axes pixels' pixels from lower left corner of axes + 'axes fraction' 0,1 is lower left of axes and 1,1 is upper right + 'data' use the axes data coordinate system +==================== ==================================================== + +For example to place the text coordinates in fractional axes +coordinates, one could do:: + + ax.annotate('local max', xy=(3, 1), xycoords='data', + xytext=(0.8, 0.95), textcoords='axes fraction', + arrowprops=dict(facecolor='black', shrink=0.05), + horizontalalignment='right', verticalalignment='top', + ) + +For physical coordinate systems (points or pixels) the origin is the +(bottom, left) of the figure or axes. If the value is negative, +however, the origin is from the (right, top) of the figure or axes, +analogous to negative indexing of sequences. + +Optionally, you can specify arrow properties which draws an arrow +from the text to the annotated point by giving a dictionary of arrow +properties in the optional keyword argument ``arrowprops``. + + +==================== ===================================================== +``arrowprops`` key description +==================== ===================================================== +width the width of the arrow in points +frac the fraction of the arrow length occupied by the head +headwidth the width of the base of the arrow head in points +shrink move the tip and base some percent away from + the annotated point and text + +\*\*kwargs any key for :class:`matplotlib.patches.Polygon`, + e.g. ``facecolor`` +==================== ===================================================== + + +In the example below, the ``xy`` point is in native coordinates +(``xycoords`` defaults to 'data'). For a polar axes, this is in +(theta, radius) space. The text in this example is placed in the +fractional figure coordinate system. :class:`matplotlib.text.Text` +keyword args like ``horizontalalignment``, ``verticalalignment`` and +``fontsize are passed from the `~matplotlib.Axes.annotate` to the +``Text`` instance + +.. plot:: pyplots/annotation_polar.py + :include-source: + +For more on all the wild and wonderful things you can do with +annotations, including fancy arrows, see :ref:`plotting-guide-annotation` +and :ref:`pylab_examples-annotation_demo`. + Modified: trunk/matplotlib/doc/users/artists.rst =================================================================== --- trunk/matplotlib/doc/users/artists.rst 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/users/artists.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -37,7 +37,7 @@ :class:`~matplotlib.text.Text`, :class:`~matplotlib.patches.Rectangle`, :class:`~matplotlib.image.Image`, respectively). These helper methods -will take your data (eg. ``numpy`` arrays and strings) create +will take your data (eg. ``numpy`` arrays and strings) and create primitive ``Artist`` instances as needed (eg. ``Line2D``), add them to the relevant containers, and draw them when requested. Most of you are probably familiar with the :class:`~matplotlib.axes.Subplot`, Modified: trunk/matplotlib/doc/users/index.rst =================================================================== --- trunk/matplotlib/doc/users/index.rst 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/users/index.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -20,8 +20,12 @@ shell.rst index_text.rst artists.rst + legend_guide.rst event_handling.rst - plotting.rst + legend.rst + transforms_tutorial.rst + path_tutorial.rst + annotations_guide.rst toolkits.rst screenshots.rst whats_new.rst Modified: trunk/matplotlib/doc/users/index_text.rst =================================================================== --- trunk/matplotlib/doc/users/index_text.rst 2009-08-22 23:20:30 UTC (rev 7523) +++ trunk/matplotlib/doc/users/index_text.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -9,6 +9,6 @@ text_props.rst mathtext.rst usetex.rst - annotations.rst + annotations_intro.rst Copied: trunk/matplotlib/doc/users/legend_guide.rst (from rev 7523, branches/v0_99_maint/doc/users/legend_guide.rst) =================================================================== --- trunk/matplotlib/doc/users/legend_guide.rst (rev 0) +++ trunk/matplotlib/doc/users/legend_guide.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -0,0 +1,182 @@ +.. _plotting-guide-legend: + +************ +Legend guide +************ + +Do not proceed unless you already have read :func:`~matplotlib.pyplot.legend` and +:class:`matplotlib.legend.Legend`! + + +What to be displayed +==================== + +The legend command has a following call signature:: + + legend(*args, **kwargs) + +If len(args) is 2, the first argument should be a list of artist to be +labeled, and the second argument should a list of string labels. If +len(args) is 0, it automatically generate the legend from label +properties of the child artists by calling +:meth:`~matplotlib.axes.Axes.get_legend_handles_labels` method. +For example, *ax.legend()* is equivalent to:: + + handles, labels = ax.get_legend_handles_labels() + ax.legend(handles, labels) + +The :meth:`~matplotlib.axes.Axes.get_legend_handles_labels` method +returns a tuple of two lists, i.e., list of artists and list of labels +(python string). However, it does not return all of its child +artists. It returns all artists in *ax.lines* and *ax.patches* and +some artists in *ax.collection* which are instance of +:class:`~matplotlib.collections.LineCollection` or +:class:`~matplotlib.collections.RegularPolyCollection`. The label +attributes (returned by get_label() method) of collected artists are +used as text labels. If label attribute is empty string or starts with +"_", that artist will be ignored. + + + * Note that not all kind of artists are supported by the legend. The + following is the list of artists that are currently supported. + + * :class:`~matplotlib.lines.Line2D` + * :class:`~matplotlib.patches.Patch` + * :class:`~matplotlib.collections.LineCollection` + * :class:`~matplotlib.collections.RegularPolyCollection` + + Unfortunately, there is no easy workaround when you need legend for + an artist not in the above list (You may use one of the supported + artist as a proxy. See below), or customize it beyond what is + supported by :class:`matplotlib.legend.Legend`. + + * Remember that some *pyplot* commands return artist not supported by + legend, e.g., :func:`~matplotlib.pyplot.fill_between` returns + :class:`~matplotlib.collections.PolyCollection` that is not + supported. Or some return multiple artists. For example, + :func:`~matplotlib.pyplot.plot` returns list of + :class:`~matplotlib.lines.Line2D` instances, and + :func:`~matplotlib.pyplot.errorbar` returns a length 3 tuple of + :class:`~matplotlib.lines.Line2D` instances. + + * The legend does not care about the axes that given artists belongs, + i.e., the artists may belong to other axes or even none. + + +Adjusting the Order of Legend items +----------------------------------- + +When you want to customize the list of artists to be displayed in the +legend, or their order of appearance. There are a two options. First, +you can keep lists of artists and labels, and explicitly use these for +the first two argument of the legend call.:: + + p1, = plot([1,2,3]) + p2, = plot([3,2,1]) + p3, = plot([2,3,1]) + legend([p2, p1], ["line 2", "line 1"]) + +Or you may use :meth:`~matplotlib.axes.Axes.get_legend_handles_labels` +to retrieve list of artist and labels and manipulate them before +feeding them to legend call.:: + + ax = subplot(1,1,1) + p1, = ax.plot([1,2,3], label="line 1") + p2, = ax.plot([3,2,1], label="line 2") + p3, = ax.plot([2,3,1], label="line 3") + + handles, labels = ax.get_legend_handles_labels() + + # reverse the order + ax.legend(handles[::-1], labels[::-1]) + + # or sort them by labels + import operator + hl = sorted(zip(handles, labels), + key=operator.itemgetter(1)) + handles2, labels2 = zip(*hl) + + ax.legend(handles2, labels2) + + +Using Proxy Artist +------------------ + +When you want to display legend for an artist not supported by the +matplotlib, you may use other supported artist as a proxy. For +example, you may creates an proxy artist without adding it to the axes +(so the proxy artist will not be drawn in the main axes) and feet it +to the legend function.:: + + p = Rectangle((0, 0), 1, 1, fc="r") + legend([p], ["Red Rectangle"]) + + +Multicolumn Legend +================== + +By specifying the keyword argument *ncol*, you can have a multi-column +legend. Also, mode="expand" horizontally expand the legend to fill the +axes area. See `legend_demo3.py +<http://matplotlib.sourceforge.net/examples/pylab_examples/legend_demo3.html>`_ +for example. + + +Legend location +=============== + +The location of the legend can be specified by the keyword argument +*loc*, either by string or a integer number. + +============= ====== + String Number +============= ====== + upper right 1 + upper left 2 + lower left 3 + lower right 4 + right 5 + center left 6 + center right 7 + lower center 8 + upper center 9 + center 10 +============= ====== + +By default, the legend will anchor to the bbox of the axes +(for legend) or the bbox of the figure (figlegend). You can specify +your own bbox using *bbox_to_anchor* argument. *bbox_to_anchor* can be an +instance of :class:`~matplotlib.transforms.BboxBase`, a tuple of 4 +floats (x, y, width, height of the bbox), or a tuple of 2 floats (x, y +with width=height=0). Unless *bbox_transform* argument is given, the +coordinates (even for the bbox instance) are considered as normalized +axes coordinates. + +For example, if you want your axes legend located at the figure corner +(instead of the axes corner):: + + l = legend(bbox_to_anchor=(0, 0, 1, 1), transform=gcf().transFigure) + +Also, you can place above or outer right-hand side of the axes, + +.. plot:: users/plotting/examples/simple_legend01.py + :include-source: + + +Multiple Legend +=============== + +Sometime, you want to split the legend into multiple ones.:: + + p1, = plot([1,2,3]) + p2, = plot([3,2,1]) + legend([p1], ["Test1"], loc=1) + legend([p2], ["Test2"], loc=4) + +However, the above code only shows the second legend. When the legend +command is called, a new legend instance is created and old ones are +removed from the axes. Thus, you need to manually add the removed +legend. + +.. plot:: users/plotting/examples/simple_legend02.py + :include-source: Copied: trunk/matplotlib/doc/users/path_tutorial.rst (from rev 7523, branches/v0_99_maint/doc/users/path_tutorial.rst) =================================================================== --- trunk/matplotlib/doc/users/path_tutorial.rst (rev 0) +++ trunk/matplotlib/doc/users/path_tutorial.rst 2009-08-22 23:26:25 UTC (rev 7524) @@ -0,0 +1,187 @@ +.. _path_tutorial: + +************* +Path Tutorial +************* + +The object underlying all of the :mod:`matplotlib.patch` objects is +the :class:`~matplotlib.path.Path`, which supports the standard set of +moveto, lineto, curveto commands to draw simple and compound outlines +consisting of line segments and splines. The ``Path`` is instantiated +with a (N,2) array of (x,y) vertices, and a N-length array of path +codes. For example to draw the unit rectangle from (0,0) to (1,1), we +could use this code + +.. plot:: + :include-source: + + import matplotlib.pyplot as plt + from matplotlib.path import Path + import matplotlib.patches as patches + + verts = [ + (0., 0.), # left, bottom + (0., 1.), # left, top + ... [truncated message content] |
From: <as...@us...> - 2009-08-23 01:03:25
|
Revision: 7525 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7525&view=rev Author: astraw Date: 2009-08-23 01:03:07 +0000 (Sun, 23 Aug 2009) Log Message: ----------- remove buildout support (testing will use plain buildbot) Removed Paths: ------------- trunk/matplotlib/bootstrap.py trunk/matplotlib/buildout.cfg Deleted: trunk/matplotlib/bootstrap.py =================================================================== --- trunk/matplotlib/bootstrap.py 2009-08-22 23:26:25 UTC (rev 7524) +++ trunk/matplotlib/bootstrap.py 2009-08-23 01:03:07 UTC (rev 7525) @@ -1,52 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Zope Corporation and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# -############################################################################## -"""Bootstrap a buildout-based project - -Simply run this script in a directory containing a buildout.cfg. -The script accepts buildout command-line options, so you can -use the -c option to specify an alternate configuration file. - -$Id$ -""" - -import os, shutil, sys, tempfile, urllib2 - -tmpeggs = tempfile.mkdtemp() - -ez = {} -exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' - ).read() in ez -ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) - -import pkg_resources - -cmd = 'from setuptools.command.easy_install import main; main()' -if sys.platform == 'win32': - cmd = '"%s"' % cmd # work around spawn lamosity on windows - -ws = pkg_resources.working_set -assert os.spawnle( - os.P_WAIT, sys.executable, sys.executable, - '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout', - dict(os.environ, - PYTHONPATH= - ws.find(pkg_resources.Requirement.parse('setuptools')).location - ), - ) == 0 - -ws.add_entry(tmpeggs) -ws.require('zc.buildout') -import zc.buildout.buildout -zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) -shutil.rmtree(tmpeggs) Deleted: trunk/matplotlib/buildout.cfg =================================================================== --- trunk/matplotlib/buildout.cfg 2009-08-22 23:26:25 UTC (rev 7524) +++ trunk/matplotlib/buildout.cfg 2009-08-23 01:03:07 UTC (rev 7525) @@ -1,31 +0,0 @@ -[buildout] -parts = PIL test python -develop = . -eggs = matplotlib -find-links = http://astraw.com/mpl/ - -[test] -recipe = pbp.recipe.noserunner -# Use Andrew Straw's custom packaging of noserunner with plugin support. -eggs = - pbp.recipe.noserunner==0.2.6.2 - PIL - ${buildout:eggs} -working-directory = ${buildout:directory}/test -initialization = - sys.path.insert(0,'.') - from mplTest import MplNosePlugin -plugins = - MplNosePlugin() - -[python] -recipe = zc.recipe.egg -interpreter = python -eggs = - ${buildout:eggs} - -[PIL] -# This recipe based on http://www.koansys.com/tech/install-plone-with-zopeskel-buildout-needs-pil -# Build egg with Andrew Straw's custom packaging of setuptools-compatibile PIL without Tkinter. -recipe = zc.recipe.egg -egg = PIL==1.1.6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-23 02:16:34
|
Revision: 7532 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7532&view=rev Author: jdh2358 Date: 2009-08-23 02:16:27 +0000 (Sun, 23 Aug 2009) Log Message: ----------- Merged revisions 7519,7521-7523,7528-7530 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7519 | jouni | 2009-08-22 01:25:07 -0500 (Sat, 22 Aug 2009) | 2 lines Fix typos found by Marc Desmarais and Nicolas Pinto ........ r7521 | jdh2358 | 2009-08-22 17:50:55 -0500 (Sat, 22 Aug 2009) | 1 line added Ariel's max install patch ........ r7522 | jdh2358 | 2009-08-22 18:19:44 -0500 (Sat, 22 Aug 2009) | 1 line applied Ariel's mlab.cohere_pairs fixes ........ r7523 | jdh2358 | 2009-08-22 18:20:30 -0500 (Sat, 22 Aug 2009) | 1 line fix osx epd formatting bug in rest ........ r7528 | jdh2358 | 2009-08-22 20:50:21 -0500 (Sat, 22 Aug 2009) | 1 line added new makefile for osx builds ........ r7529 | jdh2358 | 2009-08-22 21:10:46 -0500 (Sat, 22 Aug 2009) | 1 line removed darwin lookup in setupext -- use make.osx install ........ r7530 | jdh2358 | 2009-08-22 21:10:59 -0500 (Sat, 22 Aug 2009) | 1 line removed darwin lookup in setupext -- use make.osx install ........ Modified Paths: -------------- trunk/matplotlib/setupext.py Added Paths: ----------- trunk/matplotlib/make.osx Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7517 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7531 Copied: trunk/matplotlib/make.osx (from rev 7530, branches/v0_99_maint/make.osx) =================================================================== --- trunk/matplotlib/make.osx (rev 0) +++ trunk/matplotlib/make.osx 2009-08-23 02:16:27 UTC (rev 7532) @@ -0,0 +1,89 @@ +PREFIX=/Users/jdh2358/dev +PYVERSION=2.6 +PYTHON=python${PYVERSION} +SRCDIR=${PWD} +ZLIBVERSION=1.2.3 +PNGVERSION=1.2.33 +FREETYPEVERSION=2.3.7 +MPLVERSION=0.99.0 +BDISTMPKGVERSION=0.4.4 +MPLSRC=matplotlib-${MPLVERSION} +MACOSX_DEPLOYMENT_TARGET=10.4 + +## You shouldn't need to configure past this point + +CFLAGS="-Os -arch ppc -arch i386 -I{$PREFIX}/include" + +LDFLAGS="-arch ppc -arch i386 -L${PREFIX}/lib" + +CFLAGS_DEPS="-arch i386 -arch ppc -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" +LDFLAGS_DEPS="-arch i386 -arch ppc -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" + +clean: + rm -rf zlib-${ZLIBVERSION}.tar.gz libpng-${PNGVERSION}.tar.bz2 \ + freetype-${FREETYPEVERSION}.tar.bz2 bdist_mpkg-${BDISTMPKGVERSION}.tar.gz \ + bdist_mpkg-${BDISTMPKGVERSION} \ + zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION} + +fetch: + python -c 'import urllib; urllib.urlretrieve("http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz", "zlib-${ZLIBVERSION}.tar.gz")' &&\ + python -c 'import urllib; urllib.urlretrieve("http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-${PNGVERSION}.tar.bz2", "libpng-${PNGVERSION}.tar.bz2")' &&\ + python -c 'import urllib; urllib.urlretrieve("http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2", "freetype-${FREETYPEVERSION}.tar.bz2")' + + + + +zlib: + unset PKG_CONFIG_PATH &&\ + rm -rf zlib-${ZLIBVERSION} &&\ + tar xvfz zlib-${ZLIBVERSION}.tar.gz &&\ + cd zlib-${ZLIBVERSION} &&\ + export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ + export CFLAGS=${CFLAGS_DEPS} &&\ + export LDFLAGS=${LDFLAGS_DEPS} &&\ + ./configure --prefix=${PREFIX}&&\ + MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} CFLAGS=${CFLAGS_DEPS} LDFLAGS=${LDFLAGS_DEPS} make -j3 install&& \ + unset MACOSX_DEPLOYMENT_TARGET + +png: zlib + unset PKG_CONFIG_PATH &&\ + rm -rf libpng-${PNGVERSION} &&\ + tar xvfj libpng-${PNGVERSION}.tar.bz2 + cd libpng-${PNGVERSION} &&\ + export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ + export CFLAGS=${CFLAGS_DEPS} &&\ + export LDFLAGS=${LDFLAGS_DEPS} &&\ + ./configure --disable-dependency-tracking --prefix=${PREFIX} &&\ + make -j3 install&&\ + cp .libs/libpng.a . &&\ + unset MACOSX_DEPLOYMENT_TARGET + + +freetype: zlib + unset PKG_CONFIG_PATH &&\ + rm -rf ${FREETYPEVERSION} &&\ + tar xvfj freetype-${FREETYPEVERSION}.tar.bz2 &&\ + cd freetype-${FREETYPEVERSION} &&\ + export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ + export CFLAGS=${CFLAGS_DEPS} &&\ + export LDFLAGS=${LDFLAGS_DEPS} &&\ + ./configure --prefix=${PREFIX} &&\ + make -j3 install &&\ + cp objs/.libs/libfreetype.a . &&\ + unset MACOSX_DEPLOYMENT_TARGET + + +deps: zlib png freetype + echo 'all done' + +mpl_build: + export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ + export CFLAGS=${CFLAGS_DEPS} &&\ + export LDFLAGS=${LDFLAGS_DEPS} &&\ + python setup.py build + +mpl_install: + export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ + export CFLAGS=${CFLAGS_DEPS} &&\ + export LDFLAGS=${LDFLAGS_DEPS} &&\ + python setup.py install --prefix=${PREFIX} Modified: trunk/matplotlib/setupext.py =================================================================== --- trunk/matplotlib/setupext.py 2009-08-23 02:13:35 UTC (rev 7531) +++ trunk/matplotlib/setupext.py 2009-08-23 02:16:27 UTC (rev 7532) @@ -50,8 +50,15 @@ 'linux2' : ['/usr/local', '/usr'], 'linux' : ['/usr/local', '/usr',], 'cygwin' : ['/usr/local', '/usr',], - 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local', + '_darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local', '/usr', '/sw'], + # it appears builds with darwin are broken because of all the + # different flags the deps can be compile with, so I am pushing + # people to : + # make -f make.osx fetch deps mpl_build mpl_install + + 'darwin' : [], + 'freebsd4' : ['/usr/local', '/usr'], 'freebsd5' : ['/usr/local', '/usr'], 'freebsd6' : ['/usr/local', '/usr'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-23 02:29:00
|
Revision: 7534 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7534&view=rev Author: jdh2358 Date: 2009-08-23 02:28:52 +0000 (Sun, 23 Aug 2009) Log Message: ----------- Merged revisions 7533 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7533 | jdh2358 | 2009-08-22 21:27:44 -0500 (Sat, 22 Aug 2009) | 1 line tweaks to os x ........ Modified Paths: -------------- trunk/matplotlib/Makefile trunk/matplotlib/make.osx Added Paths: ----------- trunk/matplotlib/README.osx Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7531 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7533 Modified: trunk/matplotlib/Makefile =================================================================== --- trunk/matplotlib/Makefile 2009-08-23 02:27:44 UTC (rev 7533) +++ trunk/matplotlib/Makefile 2009-08-23 02:28:52 UTC (rev 7534) @@ -28,10 +28,13 @@ tar cvfz pyback.tar.gz *.py lib src examples/*.py unit/*.py -build_osx105: +_build_osx105: CFLAGS="-Os -arch i386 -arch ppc" LDFLAGS="-Os -arch i386 -arch ppc" python setup.py build +build_osx105: + echo "Use 'make -f fetch deps mpl_install instead'" + jdh_doc_snapshot: svn up;\ python setup.py install --prefix=~/dev;\ Copied: trunk/matplotlib/README.osx (from rev 7533, branches/v0_99_maint/README.osx) =================================================================== --- trunk/matplotlib/README.osx (rev 0) +++ trunk/matplotlib/README.osx 2009-08-23 02:28:52 UTC (rev 7534) @@ -0,0 +1,13 @@ +Build mpl on OSX has proven to be a nightmare because of all the +different types of zlib, png and freetype that may be on your system. +The recommended and supported way to build is to use the make.osx file +in this directory. This script requires you to set a PREFIX +environment variable where you want to the install to go. It will +fetch the dependencies from a remove server and install them into your +PREFIX dir, and then build mpl against them. It should ignore any +lib, png or freetype on your system + +Example usage:: + + PREFIX=/Users/jdhunter/dev make -f make.osx fetch deps mpl_install + Modified: trunk/matplotlib/make.osx =================================================================== --- trunk/matplotlib/make.osx 2009-08-23 02:27:44 UTC (rev 7533) +++ trunk/matplotlib/make.osx 2009-08-23 02:28:52 UTC (rev 7534) @@ -1,13 +1,11 @@ -PREFIX=/Users/jdh2358/dev +# build mpl into a local install dir with +# PREFIX=/Users/jdhunter/dev make -f make.osx fetch deps mpl_install + PYVERSION=2.6 PYTHON=python${PYVERSION} -SRCDIR=${PWD} ZLIBVERSION=1.2.3 PNGVERSION=1.2.33 FREETYPEVERSION=2.3.7 -MPLVERSION=0.99.0 -BDISTMPKGVERSION=0.4.4 -MPLSRC=matplotlib-${MPLVERSION} MACOSX_DEPLOYMENT_TARGET=10.4 ## You shouldn't need to configure past this point @@ -26,9 +24,9 @@ zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION} fetch: - python -c 'import urllib; urllib.urlretrieve("http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz", "zlib-${ZLIBVERSION}.tar.gz")' &&\ - python -c 'import urllib; urllib.urlretrieve("http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-${PNGVERSION}.tar.bz2", "libpng-${PNGVERSION}.tar.bz2")' &&\ - python -c 'import urllib; urllib.urlretrieve("http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2", "freetype-${FREETYPEVERSION}.tar.bz2")' + ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz", "zlib-${ZLIBVERSION}.tar.gz")' &&\ + ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://internap.dl.sourceforge.net/sourceforge/libpng/libpng-${PNGVERSION}.tar.bz2", "libpng-${PNGVERSION}.tar.bz2")' &&\ + ${PYTHON} -c 'import urllib; urllib.urlretrieve("http://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPEVERSION}.tar.bz2", "freetype-${FREETYPEVERSION}.tar.bz2")' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-23 18:44:44
|
Revision: 7542 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7542&view=rev Author: jdh2358 Date: 2009-08-23 18:44:35 +0000 (Sun, 23 Aug 2009) Log Message: ----------- Merged revisions 7536,7541 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7536 | jdh2358 | 2009-08-23 00:27:40 -0500 (Sun, 23 Aug 2009) | 1 line fix some typos in the docs ........ r7541 | jdh2358 | 2009-08-23 13:42:37 -0500 (Sun, 23 Aug 2009) | 1 line more harness around locale ........ Modified Paths: -------------- trunk/matplotlib/doc/users/annotations_guide.rst trunk/matplotlib/doc/users/event_handling.rst trunk/matplotlib/doc/users/installing.rst trunk/matplotlib/doc/users/path_tutorial.rst trunk/matplotlib/doc/users/shell.rst trunk/matplotlib/doc/users/transforms_tutorial.rst trunk/matplotlib/lib/matplotlib/cbook.py Added Paths: ----------- trunk/matplotlib/examples/animation/animate_decay_tk_blit.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7533 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7541 Modified: trunk/matplotlib/doc/users/annotations_guide.rst =================================================================== --- trunk/matplotlib/doc/users/annotations_guide.rst 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/doc/users/annotations_guide.rst 2009-08-23 18:44:35 UTC (rev 7542) @@ -4,7 +4,7 @@ Annotating Axes **************** -Do not proceed unless you already have read +Do not proceed unless you already have read :func:`~matplotlib.pyplot.text` and :func:`~matplotlib.pyplot.annotate`! @@ -38,7 +38,7 @@ bb.set_boxstyle("rarrow", pad=0.6) The arguments are the name of the box style with its attributes as -keyword arguments. Currently, followign box styles are implemented. +keyword arguments. Currently, following box styles are implemented. ========== ============== ========================== Class Name Attrs @@ -55,7 +55,7 @@ .. plot:: mpl_examples/pylab_examples/fancybox_demo2.py -Note that the attrubutes arguments can be specified within the style +Note that the attributes arguments can be specified within the style name with separating comma (this form can be used as "boxstyle" value of bbox argument when initializing the text instance) :: @@ -103,7 +103,7 @@ 2. If patch object is given (*patchA* & *patchB*), the path is clipped to avoid the patch. -3. The path is further shrinked by given amount of pixels (*shirnkA* +3. The path is further shrunk by given amount of pixels (*shirnkA* & *shrinkB*) 4. The path is transmuted to arrow patch, which is controlled by the @@ -114,7 +114,7 @@ The creation of the connecting path between two points is controlled by -``connectionstyle`` key and follwing styles are available. +``connectionstyle`` key and following styles are available. ========== ============================================= Name Attrs @@ -197,7 +197,7 @@ ax2.add_artist(con) The above code connects point xy in data coordinate of ``ax1`` to -point xy int data coordiante of ``ax2``. Here is a simple example. +point xy int data coordinate of ``ax2``. Here is a simple example. .. plot:: users/plotting/examples/connect_simple01.py @@ -230,7 +230,7 @@ The *loc* keyword has same meaning as in the legend command. A simple application is when the size of the artist (or collection of -artists) is knwon in pixel size during the time of creation. For +artists) is known in pixel size during the time of creation. For example, If you want to draw a circle with fixed size of 20 pixel x 20 pixel (radius = 10 pixel), you can utilize ``AnchoredDrawingArea``. The instance is created with a size of the @@ -280,7 +280,7 @@ .. plot:: users/plotting/examples/anchored_box04.py Note that unlike the legend, the ``bbox_transform`` is set -to IdentityTransform by default. +to IdentityTransform by default. Advanced Topics *************** @@ -288,7 +288,7 @@ Zoom effect between Axes ======================== -mpl_toolkits.axes_grid.inset_locator defines some patch classs useful +mpl_toolkits.axes_grid.inset_locator defines some patch classes useful for interconnect two axes. Understanding the code requires some knowledge of how mpl's transform works. But, utilizing it will be straight forward. @@ -327,6 +327,6 @@ :include-source: -Similarly, you can define custom ConnectionStyle and Custome ArrowStyle. +Similarly, you can define custom ConnectionStyle and custom ArrowStyle. See the source code of ``lib/matplotlib/patches.py`` and check how each style class is defined. Modified: trunk/matplotlib/doc/users/event_handling.rst =================================================================== --- trunk/matplotlib/doc/users/event_handling.rst 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/doc/users/event_handling.rst 2009-08-23 18:44:35 UTC (rev 7542) @@ -5,7 +5,7 @@ ************************** matplotlib works with 6 user interface toolkits (wxpython, tkinter, -qt, gtk, fltk abd macosx) and in order to support features like interactive +qt, gtk, fltk and macosx) and in order to support features like interactive panning and zooming of figures, it is helpful to the developers to have an API for interacting with the figure via key presses and mouse movements that is "GUI neutral" so we don't have to repeat a lot of @@ -150,7 +150,7 @@ Write draggable rectangle class that is initialized with a :class:`~matplotlib.patches.Rectangle` instance but will move its x,y -location when dragged. Hint: you will need to store the orginal +location when dragged. Hint: you will need to store the original ``xy`` location of the rectangle which is stored as rect.xy and connect to the press, motion and release mouse events. When the mouse is pressed, check to see if the click occurs over your rectangle (see Modified: trunk/matplotlib/doc/users/installing.rst =================================================================== --- trunk/matplotlib/doc/users/installing.rst 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/doc/users/installing.rst 2009-08-23 18:44:35 UTC (rev 7542) @@ -22,7 +22,7 @@ One single click installer and you are done. -Ok, so you want to do it the hard way? +OK, so you want to do it the hard way? ====================================== For some people, the prepackaged pythons discussed above are not an @@ -109,7 +109,7 @@ packaging matplotlib. -.. _install_requrements: +.. _install_requirements: Build requirements ================== @@ -152,7 +152,7 @@ The Qt3 widgets library python wrappers for the QtAgg backend :term:`pyqt` 4.0 or later - The Qt4 widgets library python wrappersfor the Qt4Agg backend + The Qt4 widgets library python wrappers for the Qt4Agg backend :term:`pygtk` 2.2 or later The python wrappers for the GTK widgets library for use with the GTK or GTKAgg backend @@ -201,5 +201,5 @@ instruction in the README. This directory has a Makefile which will automatically grab the zlib, png and freetype dependencies from the web, build them with the right flags to make universal libraries, and -then build the matplotlib source and binary installers. - \ No newline at end of file +then build the matplotlib source and binary installers. + Modified: trunk/matplotlib/doc/users/path_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/path_tutorial.rst 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/doc/users/path_tutorial.rst 2009-08-23 18:44:35 UTC (rev 7542) @@ -71,7 +71,7 @@ control point and one end point, and CURVE4 has three vertices for the two control points and the end point. The example below shows a CURVE4 Bézier spline -- the bézier curve will be contained in the -convex hul of the start point, the two control points, and the end +convex hull of the start point, the two control points, and the end point .. plot:: @@ -123,7 +123,7 @@ like :meth:`~matplotlib.axes.Axes.hist` and :meth:`~matplotlib.axes.Axes.bar`, which create a number of primitives, eg a bunch of Rectangles, can usually be implemented more -efficiently using a compund path. The reason ``bar`` creates a list +efficiently using a compound path. The reason ``bar`` creates a list of rectangles and not a compound path is largely historical: the :class:`~matplotlib.path.Path` code is comparatively new and ``bar`` predates it. While we could change it now, it would break old code, Modified: trunk/matplotlib/doc/users/shell.rst =================================================================== --- trunk/matplotlib/doc/users/shell.rst 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/doc/users/shell.rst 2009-08-23 18:44:35 UTC (rev 7542) @@ -66,7 +66,7 @@ ========================= If you can't use ipython, and still want to use matplotlib/pylab from -an interactive python shell, eg the plain-ol standard python +an interactive python shell, eg the plain-ole standard python interactive interpreter, or the interpreter in your favorite IDE, you are going to need to understand what a matplotlib backend is :ref:`what-is-a-backend`. Modified: trunk/matplotlib/doc/users/transforms_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-23 18:44:35 UTC (rev 7542) @@ -225,7 +225,7 @@ :meth:`~matplotlib.axes.Axes.axvspan`) but for didactic purposes we will implement the horizontal span here using a blended transformation. This trick only works for separable transformations, -like you see in normal cartesian coordinate systems, but not on +like you see in normal Cartesian coordinate systems, but not on inseparable transformations like the :class:`~matplotlib.projections.polar.PolarAxes.PolarTransform`. @@ -301,7 +301,7 @@ shadow_transform = ax.transData + offset showing that can chain transformations using the addition operator. -This code says: first appy the data transformation ``ax.transData`` and +This code says: first apply the data transformation ``ax.transData`` and then translate the data by `dx` and `dy` points. .. plot:: @@ -352,7 +352,7 @@ in your axes which affects the affine transformation, but you may not need to compute the potentially expensive nonlinear scales or projections on simple navigation events. It is also possible to -multiply affine transformation matrices togeter, and then apply them +multiply affine transformation matrices together, and then apply them to coordinates in one step. This is not true of all possible transformations. @@ -404,7 +404,7 @@ The final piece is the ``self.transScale`` attribute, which is responsible for the optional non-linear scaling of the data, eg. for -logarithmic axes. When an Axes is initally setup, this is just set to +logarithmic axes. When an Axes is initially setup, this is just set to the identity transform, since the basic matplotlib axes has linear scale, but when you call a logarithmic scaling function like :meth:`~matplotlib.axes.Axes.semilogx` or explicitly set the scale to @@ -426,7 +426,7 @@ ``transProjection`` handles the projection from the space, eg. latitude and longitude for map data, or radius and theta for polar -data, to a separable cartesian coordinate system. There are several +data, to a separable Cartesian coordinate system. There are several projection examples in the ``matplotlib.projections`` package, and the best way to learn more is to open the source for those packages and see how to make your own, since matplotlib supports extensible axes Copied: trunk/matplotlib/examples/animation/animate_decay_tk_blit.py (from rev 7541, branches/v0_99_maint/examples/animation/animate_decay_tk_blit.py) =================================================================== --- trunk/matplotlib/examples/animation/animate_decay_tk_blit.py (rev 0) +++ trunk/matplotlib/examples/animation/animate_decay_tk_blit.py 2009-08-23 18:44:35 UTC (rev 7542) @@ -0,0 +1,58 @@ +import time, sys +import numpy as np +import matplotlib.pyplot as plt + + +def data_gen(): + t = data_gen.t + data_gen.t += 0.05 + return np.sin(2*np.pi*t) * np.exp(-t/10.) +data_gen.t = 0 + +fig = plt.figure() +ax = fig.add_subplot(111) +line, = ax.plot([], [], animated=True, lw=2) +ax.set_ylim(-1.1, 1.1) +ax.set_xlim(0, 5) +ax.grid() +xdata, ydata = [], [] +def run(*args): + background = fig.canvas.copy_from_bbox(ax.bbox) + # for profiling + tstart = time.time() + + while 1: + # restore the clean slate background + fig.canvas.restore_region(background) + # update the data + t = data_gen.t + y = data_gen() + xdata.append(t) + ydata.append(y) + xmin, xmax = ax.get_xlim() + if t>=xmax: + ax.set_xlim(xmin, 2*xmax) + fig.canvas.draw() + background = fig.canvas.copy_from_bbox(ax.bbox) + + line.set_data(xdata, ydata) + + # just draw the animated artist + ax.draw_artist(line) + # just redraw the axes rectangle + fig.canvas.blit(ax.bbox) + + if run.cnt==1000: + # print the timing info and quit + print 'FPS:' , 1000/(time.time()-tstart) + sys.exit() + + run.cnt += 1 +run.cnt = 0 + + + +manager = plt.get_current_fig_manager() +manager.window.after(100, run) + +plt.show() Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-23 18:42:37 UTC (rev 7541) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-23 18:44:35 UTC (rev 7542) @@ -26,7 +26,7 @@ try: preferredencoding = locale.getpreferredencoding() -except ValueError: +except (ValueError, ImportError): preferredencoding = None def unicode_safe(s): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-08-25 15:32:19
|
Revision: 7568 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7568&view=rev Author: mdboom Date: 2009-08-25 15:32:13 +0000 (Tue, 25 Aug 2009) Log Message: ----------- Merged revisions 7567 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint ........ r7567 | mdboom | 2009-08-25 11:31:10 -0400 (Tue, 25 Aug 2009) | 2 lines Support Line2D objects without associated Axes objects. ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/lines.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-7541 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7567 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,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7446,7475-7482,7484,7486,7489-7523,7567 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,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7446,7475-7482,7484,7486,7489-7523,7567 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 Modified: trunk/matplotlib/lib/matplotlib/lines.py =================================================================== --- trunk/matplotlib/lib/matplotlib/lines.py 2009-08-25 15:31:10 UTC (rev 7567) +++ trunk/matplotlib/lib/matplotlib/lines.py 2009-08-25 15:32:13 UTC (rev 7568) @@ -453,7 +453,7 @@ self._y = self._xy[:, 1] # just a view self._subslice = False - if len(x) > 100 and self._is_sorted(x): + if self.axes and len(x) > 100 and self._is_sorted(x): self._subslice = True if hasattr(self, '_path'): interpolation_steps = self._path._interpolation_steps @@ -490,7 +490,7 @@ def draw(self, renderer): if self._invalid: self.recache() - if self._subslice: + if self._subslice and self.axes: # Need to handle monotonically decreasing case also... x0, x1 = self.axes.get_xbound() i0, = self._x.searchsorted([x0], 'left') 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-08-25 20:06:25
|
Revision: 7570 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7570&view=rev Author: mdboom Date: 2009-08-25 20:06:13 +0000 (Tue, 25 Aug 2009) Log Message: ----------- Merged revisions 7569 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint ........ r7569 | mdboom | 2009-08-25 16:04:34 -0400 (Tue, 25 Aug 2009) | 2 lines Fix cohere_pairs docstring so it builds with new versions of Sphinx ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/mlab.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-7567 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7569 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,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7446,7475-7482,7484,7486,7489-7523,7567,7569 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,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7446,7475-7482,7484,7486,7489-7523,7567,7569 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 Modified: trunk/matplotlib/lib/matplotlib/mlab.py =================================================================== --- trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-25 20:04:34 UTC (rev 7569) +++ trunk/matplotlib/lib/matplotlib/mlab.py 2009-08-25 20:06:13 UTC (rev 7570) @@ -497,77 +497,80 @@ returnPxx=False): u""" - Cxy, Phase, freqs = cohere_pairs( X, ij, ...) + Call signature:: - Compute the coherence and phase for all pairs ij, in X. + Cxy, Phase, freqs = cohere_pairs( X, ij, ...) - Parameters - ---------- - X: array - a numSamples*numCols array + Compute the coherence and phase for all pairs *ij*, in *X*. - ij: list of tuples - Each tuple is a pair of indexes into the columns of X for which you want to - compute coherence. For example, if X has 64 columns, and you want to - compute all nonredundant pairs, define ij as + *X* is a *numSamples* * *numCols* array + *ij* is a list of tuples. Each tuple is a pair of indexes into + the columns of X for which you want to compute coherence. For + example, if *X* has 64 columns, and you want to compute all + nonredundant pairs, define *ij* as:: + ij = [] for i in range(64): for j in range(i+1,64): ij.append( (i,j) ) - preferSpeedOverMemory: optional, bool + *preferSpeedOverMemory* is an optional bool. Defaults to true. If + False, limits the caching by only making one, rather than two, + complex cache arrays. This is useful if memory becomes critical. + Even when *preferSpeedOverMemory* is False, :func:`cohere_pairs` + will still give significant performace gains over calling + :func:`cohere` for each pair, and will use subtantially less + memory than if *preferSpeedOverMemory* is True. In my tests with + a 43000,64 array over all nonredundant pairs, + *preferSpeedOverMemory* = True delivered a 33% performance boost + on a 1.7GHZ Athlon with 512MB RAM compared with + *preferSpeedOverMemory* = False. But both solutions were more + than 10x faster than naively crunching all possible pairs through + :func:`cohere`. - Defaults to true. If false, limits the caching by only making one, rather - than two, complex cache arrays. This is useful if memory becomes critical. - Even when preferSpeedOverMemory is false, cohere_pairs will still give - significant performace gains over calling cohere for each pair, and will - use subtantially less memory than if preferSpeedOverMemory is true. In my - tests with a 43000,64 array over all nonredundant pairs, - preferSpeedOverMemory=1 delivered a 33% performace boost on a 1.7GHZ Athlon - with 512MB RAM compared with preferSpeedOverMemory=0. But both solutions - were more than 10x faster than naievly crunching all possible pairs through - cohere. - - Returns - ------- + Returns:: - (Cxy, Phase, freqs), where: - - Cxy: dictionary of (i,j) tuples -> coherence vector for that - pair. Ie, Cxy[(i,j) = cohere(X[:,i], X[:,j]). Number of - dictionary keys is len(ij) + (Cxy, Phase, freqs) - Phase: dictionary of phases of the cross spectral density at - each frequency for each pair. keys are (i,j). + where: - freqs: vector of frequencies, equal in length to either the - coherence or phase vectors for any i,j key. + - *Cxy*: dictionary of (*i*, *j*) tuples -> coherence vector for + that pair. I.e., ``Cxy[(i,j) = cohere(X[:,i], X[:,j])``. + Number of dictionary keys is ``len(ij)``. - Eg, to make a coherence Bode plot: + - *Phase*: dictionary of phases of the cross spectral density at + each frequency for each pair. Keys are (*i*, *j*). + - *freqs*: vector of frequencies, equal in length to either the + coherence or phase vectors for any (*i*, *j*) key. + + Eg., to make a coherence Bode plot:: + subplot(211) plot( freqs, Cxy[(12,19)]) subplot(212) plot( freqs, Phase[(12,19)]) - For a large number of pairs, cohere_pairs can be much more - efficient than just calling cohere for each pair, because it - caches most of the intensive computations. If N is the number of - pairs, this function is O(N) for most of the heavy lifting, - whereas calling cohere for each pair is O(N^2). However, because - of the caching, it is also more memory intensive, making 2 - additional complex arrays with approximately the same number of - elements as X. + For a large number of pairs, :func:`cohere_pairs` can be much more + efficient than just calling :func:`cohere` for each pair, because + it caches most of the intensive computations. If :math:`N` is the + number of pairs, this function is :math:`O(N)` for most of the + heavy lifting, whereas calling cohere for each pair is + :math:`O(N^2)`. However, because of the caching, it is also more + memory intensive, making 2 additional complex arrays with + approximately the same number of elements as *X*. - See test/cohere_pairs_test.py in the src tree for an example - script that shows that this cohere_pairs and cohere give the same - results for a given pair. + See :file:`test/cohere_pairs_test.py` in the src tree for an + example script that shows that this :func:`cohere_pairs` and + :func:`cohere` give the same results for a given pair. - See also - -------- - :func: psd - """ + .. sealso:: + + :func:`psd` + For information about the methods used to compute + :math:`P_{xy}`, :math:`P_{xx}` and :math:`P_{yy}`. + """ numRows, numCols = X.shape # zero pad if X is too short 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ef...@us...> - 2009-08-29 18:14:45
|
Revision: 7585 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7585&view=rev Author: efiring Date: 2009-08-29 18:14:28 +0000 (Sat, 29 Aug 2009) Log Message: ----------- Merged revisions 7582-7584 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7582 | jdh2358 | 2009-08-29 06:35:35 -1000 (Sat, 29 Aug 2009) | 1 line added Michael Sarahan's image tutorial from the scipy mpl sprint ........ r7583 | jdh2358 | 2009-08-29 06:46:44 -1000 (Sat, 29 Aug 2009) | 1 line minor tweaks to the image tut ........ r7584 | efiring | 2009-08-29 07:48:37 -1000 (Sat, 29 Aug 2009) | 2 lines Semilogx, semilogy ensure one axis is linear; patch by Tony Yu ........ Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/_templates/layout.html trunk/matplotlib/doc/devel/coding_guide.rst trunk/matplotlib/doc/users/index.rst trunk/matplotlib/doc/users/transforms_tutorial.rst trunk/matplotlib/doc/users/whats_new.rst trunk/matplotlib/lib/matplotlib/axes.py Added Paths: ----------- trunk/matplotlib/doc/_static/stinkbug.png trunk/matplotlib/doc/users/image_tutorial.rst 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-7569 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7584 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,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Copied: trunk/matplotlib/doc/_static/stinkbug.png (from rev 7584, branches/v0_99_maint/doc/_static/stinkbug.png) =================================================================== (Binary files differ) Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-29 18:14:28 UTC (rev 7585) @@ -53,7 +53,7 @@ but it is a good idea to ping us on the mailing list too.</p> <p>For details on what's new, see the detailed <a href="{{ -pathto('_static/CHANGELOG', 1) }}">changelog</a>. Anything that could +pathto('_static/CHANGELOG', 1) }}">changelog</a> or browse the <a href="http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/">source code</a>. Anything that could require changes to your existing codes is logged in the <a href="{{ pathto('api/api_changes.html', 1) }}">api changes</a> file.</p> Modified: trunk/matplotlib/doc/_templates/layout.html =================================================================== --- trunk/matplotlib/doc/_templates/layout.html 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/doc/_templates/layout.html 2009-08-29 18:14:28 UTC (rev 7585) @@ -4,7 +4,7 @@ {% block rootrellink %} <li><a href="{{ pathto('index') }}">home</a>| </li> <li><a href="{{ pathto('search') }}">search</a>| </li> - <li><a href="examples/index.html">examples</a>| </li> + <li><a href="http://matplotlib.sf.net/examples/index.html">examples</a>| </li> <li><a href="{{ pathto('gallery') }}">gallery</a>| </li> <li><a href="{{ pathto('contents') }}">docs</a> »</li> {% endblock %} Modified: trunk/matplotlib/doc/devel/coding_guide.rst =================================================================== --- trunk/matplotlib/doc/devel/coding_guide.rst 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/doc/devel/coding_guide.rst 2009-08-29 18:14:28 UTC (rev 7585) @@ -1,4 +1,4 @@ -M.. _coding-guide: +.. _coding-guide: ************ Coding guide 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,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_gallery.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/doc/sphinxext/gen_rst.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Copied: trunk/matplotlib/doc/users/image_tutorial.rst (from rev 7584, branches/v0_99_maint/doc/users/image_tutorial.rst) =================================================================== --- trunk/matplotlib/doc/users/image_tutorial.rst (rev 0) +++ trunk/matplotlib/doc/users/image_tutorial.rst 2009-08-29 18:14:28 UTC (rev 7585) @@ -0,0 +1,324 @@ +.. _image_tutorial: + + +************** +Image tutorial +************** + +.. _imaging_startup: + +Startup commands +=================== + +At the very least, you'll need to have access to the :func:`~matplotlib.pyplot.imshow` function. There are a couple of ways to do it. The easy way for an interactive environment:: + + $ipython -pylab + +The imshow function is now directly accessible (it's in your +`namespace <http://bytebaker.com/2008/07/30/python-namespaces/>`_). +See also :ref:`pyplot-tutorial`. + +The more expressive, easier to understand later method (use this in +your scripts to make it easier for others (including your future self) +to read) is to use the matplotlib API (see :ref:`artist-tutorial`) where you use explicit namespaces and control object creation, etc... + +.. sourcecode:: ipython + + In [1]: import matplotlib.pyplot as plt + In [2]: import matplotlib.image as mpimg + In [3]: import numpy as np + +Examples below will use the latter method, for clarity. In these examples, if you use the -pylab method, you can skip the "mpimg." and "plt." prefixes. + +.. _importing_data: + +Importing image data into Numpy arrays +=============================================== + +Plotting image data is supported by the Python Image Library (`PIL <http://www.pythonware.com/products/pil/>`_), . Natively, matplotlib only supports PNG images. The commands shown below fall back on PIL if the native read fails. + +The image used in this example is a PNG file, but keep that PIL requirement in mind for your own data. + +Here's the image we're going to play with: + +.. image:: ../_static/stinkbug.png + +It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending +on where you get your data, the other kinds of image that you'll most +likely encounter are RGBA images, which allow for transparency, or +single-channel grayscale (luminosity) images. You can right click on +it and choose "Save image as" to download it to your computer for the +rest of this tutorial. + +And here we go... + +.. sourcecode:: ipython + + In [4]: img=mpimg.imread('stinkbug.png') + Out[4]: + array([[[ 0.40784314, 0.40784314, 0.40784314], + [ 0.40784314, 0.40784314, 0.40784314], + [ 0.40784314, 0.40784314, 0.40784314], + ..., + [ 0.42745098, 0.42745098, 0.42745098], + [ 0.42745098, 0.42745098, 0.42745098], + [ 0.42745098, 0.42745098, 0.42745098]], + + [[ 0.41176471, 0.41176471, 0.41176471], + [ 0.41176471, 0.41176471, 0.41176471], + [ 0.41176471, 0.41176471, 0.41176471], + ..., + [ 0.42745098, 0.42745098, 0.42745098], + [ 0.42745098, 0.42745098, 0.42745098], + [ 0.42745098, 0.42745098, 0.42745098]], + + [[ 0.41960785, 0.41960785, 0.41960785], + [ 0.41568628, 0.41568628, 0.41568628], + [ 0.41568628, 0.41568628, 0.41568628], + ..., + [ 0.43137255, 0.43137255, 0.43137255], + [ 0.43137255, 0.43137255, 0.43137255], + [ 0.43137255, 0.43137255, 0.43137255]], + + ..., + [[ 0.43921569, 0.43921569, 0.43921569], + [ 0.43529412, 0.43529412, 0.43529412], + [ 0.43137255, 0.43137255, 0.43137255], + ..., + [ 0.45490196, 0.45490196, 0.45490196], + [ 0.4509804 , 0.4509804 , 0.4509804 ], + [ 0.4509804 , 0.4509804 , 0.4509804 ]], + + [[ 0.44313726, 0.44313726, 0.44313726], + [ 0.44313726, 0.44313726, 0.44313726], + [ 0.43921569, 0.43921569, 0.43921569], + ..., + [ 0.4509804 , 0.4509804 , 0.4509804 ], + [ 0.44705883, 0.44705883, 0.44705883], + [ 0.44705883, 0.44705883, 0.44705883]], + + [[ 0.44313726, 0.44313726, 0.44313726], + [ 0.4509804 , 0.4509804 , 0.4509804 ], + [ 0.4509804 , 0.4509804 , 0.4509804 ], + ..., + [ 0.44705883, 0.44705883, 0.44705883], + [ 0.44705883, 0.44705883, 0.44705883], + [ 0.44313726, 0.44313726, 0.44313726]]], dtype=float32) + +Note the dtype there - float32. Matplotlib has rescaled the 8 bit data from each channel to floating point data between 0.0 and 1.0. As a side note, the only datatype that PIL can work with is uint8. Matplotlib plotting can handle float32 and uint8, but image reading/writing for any format other than PNG is limited to uint8 data. Why 8 bits? Most displays can only render 8 bits per channel worth of color gradation. Why can they only render 8 bits/channel? Because that's about all the human eye can see. More here (from a photography standpoint): `Luminous Landscape bit depth tutorial <http://www.luminous-landscape.com/tutorials/bit-depth.shtml>`_ + +Each inner list represents a pixel. Here, with an RGB image, there are 3 values. Since it's a black and white image, R, G, and B are all similar. An RGBA (where A is alpha, or transparency), has 4 values per inner list, and a simple luminance image just has one value (and is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, matplotlib supports float32 and uint8 data types. For grayscale, matplotlib supports only float32. If your array data does not meet one of these descriptions, you need to rescale it. + +.. _plotting_data: + +Plotting numpy arrays as images +=================================== + +So, you have your data in a numpy array (either by importing it, or by generating it). Let's render it. In Matplotlib, this is performed using the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab the plot object. This object gives you an easy way to manipulate the plot from the prompt. + +.. sourcecode:: ipython + + In [5]: imgplot = plt.imshow(img) + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + img = mpimg.imread('_static/stinkbug.png') + imgplot = plt.imshow(img) + +You can also plot any numpy array - just remember that the datatype must be float32 (and range from 0.0 to 1.0) or uint8. + +.. _Pseudocolor: + +Applying pseudocolor schemes to image plots +------------------------------------------------- + +Pseudocolor can be a useful tool for enhancing contrast and visualizing your data more easily. This is especially useful when making presentations of your data using projectors - their contrast is typically quite poor. + +Pseudocolor is only relevant to single-channel, grayscale, luminosity images. We currently have an RGB image. Since R, G, and B are all similar (see for yourself above or in your data), we can just pick on channel of our data: + +.. sourcecode:: ipython + + In [6]: lum_img = img[:,:,0] + +This is array slicing. You can read more `here <http://www.scipy.org/Tentative_NumPy_Tutorial>`_ + +.. sourcecode:: ipython + + In [7]: imgplot = mpimg.imshow(lum_img) + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + img = mpimg.imread('_static/stinkbug.png') + lum_img = img[:,:,0] + plt.imshow(lum_img) + +Now, with a luminosity image, the default colormap (aka lookup table, LUT), is applied. The default is called jet. There are plenty of others to choose from. Let's set some others using the :meth:`~matplotlib.image.Image.set_cmap` method on our image plot object: + +.. sourcecode:: ipython + + In [8]: imgplot.set_cmap('hot') + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + img = mpimg.imread('_static/stinkbug.png') + lum_img = img[:,:,0] + imgplot = plt.imshow(lum_img) + imgplot.set_cmap('hot') + +.. sourcecode:: ipython + + In [9]: imgplot.set_cmap('spectral') + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + img = mpimg.imread('_static/stinkbug.png') + lum_img = img[:,:,0] + imgplot = plt.imshow(lum_img) + imgplot.set_cmap('spectral') + +There are many other colormap schemes available. See a list and images of the colormaps `here <http://matplotlib.sourceforge.net/examples/pylab_examples/show_colormaps.html>`_ + +.. _Color Bars + +Color scale reference +------------------------ + +It's helpful to have an idea of what value a color represents. We can do that by adding color bars. It's as easy as one line: + +.. sourcecode:: ipython + In [10]: plt.colorbar() + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + img = mpimg.imread('_static/stinkbug.png') + lum_img = img[:,:,0] + imgplot = plt.imshow(lum_img) + imgplot.set_cmap('spectral') + plt.colorbar() + +This adds a colorbar to your existing figure. This won't automatically change if you change you switch to a different colormap - you have to re-create your plot, and add in the colorbar again. + +.. _Data ranges + +Examining a specific data range +--------------------------------- + +Sometimes you want to enhance the contrast in your image, or expand the contrast in a particular region while sacrificing the detail in colors that don't vary much, or don't matter. A good tool to find interesting regions is the histogram. To create a histogram of our image data, we use the :func:`~matplotlib.pyplot.hist` function. + +.. sourcecode:: ipython + + In[10]: plt.hist(lum_img) + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + img = mpimg.imread('_static/stinkbug.png') + lum_img = img[:,:,0] + plt.hist(lum_img, range=(0.0,1.0)) + +Most often, the "interesting" part of the image is around the peak, and you can get extra contrast by clipping the regions above and/or below the peak. In our histogram, it looks like there's not much useful information in the high end (not many white things in the image). Let's adjust the upper limit, so that we effectively "zoom in on" part of the histogram. We do this by calling the :meth:`~matplotlib.image.Image.set_clim` method of the image plot object. + +.. sourcecode:: ipython + + In[11]: imgplot.set_clim=(0.0,0.7) + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + fig = plt.figure() + a=fig.add_subplot(1,2,1) + img = mpimg.imread('_static/stinkbug.png') + lum_img = img[:,:,0] + imgplot = plt.imshow(lum_img) + a.set_title('Before') + plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation ='horizontal') + a=fig.add_subplot(1,2,2) + imgplot = plt.imshow(lum_img) + imgplot.set_clim(0.0,0.7) + a.set_title('After') + plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation='horizontal') + +.. _Interpolation: + +Array Interpolation schemes +----------------------------------- +Interpolation calculates what the color or value of a pixel "should" be, according to different mathematical schemes. One common place that this happens is when you resize an image. The number of pixels change, but you want the same information. Since pixels are discrete, there's missing space. Interpolation is how you fill that space. This is why your images sometimes come out looking pixelated when you blow them up. The effect is more pronounced when the difference between the original image and the expanded image is greater. Let's take our image and shrink it. We're effectively discarding pixels, only keeping a select few. Now when we plot it, that data gets blown up to the size on your screen. The old pixels aren't there anymore, and the computer has to draw in pixels to fill that space. + +.. sourcecode:: ipython + + In [8]: import Image + In [9]: img = Image.open('stinkbug.png') # Open image as PIL image object + In [10]: rsize = img.resize((img.size[0]/10,img.size[1]/10)) # Use PIL to resize + In [11]: rsizeArr = np.asarray(rsize) # Get array back + In [12]: imgplot = mpimg.imshow(rsizeArr) + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + import Image + img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet + rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image + rsizeArr = np.asarray(rsize) + lum_img = rsizeArr[:,:,0] + imgplot = plt.imshow(rsizeArr) + +Here we have the default interpolation, bilinear, since we did not give :func:`~matplotlib.pyplot.imshow` any interpolation argument. + +Let's try some others: + +.. sourcecode:: ipython + + In [10]: imgplot.set_interpolation('nearest') + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + import Image + img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet + rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image + rsizeArr = np.asarray(rsize) + lum_img = rsizeArr[:,:,0] + imgplot = plt.imshow(rsizeArr) + imgplot.set_interpolation('nearest') + +.. sourcecode:: ipython + + In [10]: imgplot.set_interpolation('bicubic') + +.. plot:: + + import matplotlib.pyplot as plt + import matplotlib.image as mpimg + import numpy as np + import Image + img = Image.open('_static/stinkbug.png') # opens the file using PIL - it's not an array yet + rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image + rsizeArr = np.asarray(rsize) + lum_img = rsizeArr[:,:,0] + imgplot = plt.imshow(rsizeArr) + imgplot.set_interpolation('bicubic') + +Bicubic interpolation is often used when blowing up photos - people tend to prefer blurry over pixelated. \ No newline at end of file Modified: trunk/matplotlib/doc/users/index.rst =================================================================== --- trunk/matplotlib/doc/users/index.rst 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/doc/users/index.rst 2009-08-29 18:14:28 UTC (rev 7585) @@ -19,6 +19,7 @@ customizing.rst shell.rst index_text.rst + image_tutorial.rst artists.rst legend_guide.rst event_handling.rst Modified: trunk/matplotlib/doc/users/transforms_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/doc/users/transforms_tutorial.rst 2009-08-29 18:14:28 UTC (rev 7585) @@ -1,4 +1,4 @@ -.. _transformstutorial: +.. _transforms_tutorial: ************************** Transformations Tutorial Modified: trunk/matplotlib/doc/users/whats_new.rst =================================================================== --- trunk/matplotlib/doc/users/whats_new.rst 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/doc/users/whats_new.rst 2009-08-29 18:14:28 UTC (rev 7585) @@ -12,6 +12,16 @@ .. _whats-new-mplot3d: +New documentation +----------------- + +Jae-Joon Lee has written two new guides :ref:`plotting-guide-legend` +and :ref:`plotting-guide-annotation`. Michael Sarahan has written +:ref:`image_tutorial`. John Hunter has written two new tutorials on +working with paths and transformations: :ref:`path_tutorial` and +:ref:`transforms_tutorial`. + + mplot3d -------- @@ -53,12 +63,6 @@ .. plot:: pyplots/whats_new_99_spines.py -New documentation ------------------ - -jae-Joon Lee has written two new guides :ref:`plotting-guide-legend` -and :ref:`plotting-guide-annotation`. - .. _whats-new-0-98-4: new in 0.98.4 Property changes on: trunk/matplotlib/examples/misc/multiprocess.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/misc/log.py:5753-5771 /branches/v0_98_5_maint/examples/misc/log.py: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 /branches/v0_99_maint/examples/misc/multiprocess.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Property changes on: trunk/matplotlib/examples/mplot3d/contour3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/mplot3d/contour.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contour.py: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 /branches/v0_99_maint/examples/mplot3d/contour3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Property changes on: trunk/matplotlib/examples/mplot3d/contourf3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/mplot3d/contourf.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/contourf.py: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 /branches/v0_99_maint/examples/mplot3d/contourf3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Property changes on: trunk/matplotlib/examples/mplot3d/polys3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/mplot3d/polys.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/polys.py: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 /branches/v0_99_maint/examples/mplot3d/polys3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Property changes on: trunk/matplotlib/examples/mplot3d/scatter3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/mplot3d/scatter.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/scatter.py: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 /branches/v0_99_maint/examples/mplot3d/scatter3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Property changes on: trunk/matplotlib/examples/mplot3d/surface3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/mplot3d/surface.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/surface.py: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 /branches/v0_99_maint/examples/mplot3d/surface3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Property changes on: trunk/matplotlib/examples/mplot3d/wire3d_demo.py ___________________________________________________________________ Modified: svn:mergeinfo - /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /branches/v0_91_maint/examples/mplot3d/wire.py:5753-5771 /branches/v0_98_5_maint/examples/mplot3d/wire.py: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 /branches/v0_99_maint/examples/mplot3d/wire3d_demo.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-29 17:48:37 UTC (rev 7584) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-29 18:14:28 UTC (rev 7585) @@ -3615,6 +3615,7 @@ } self.set_xscale('log', **d) + self.set_yscale('linear') b = self._hold self._hold = True # we've already processed the hold l = self.plot(*args, **kwargs) @@ -3665,6 +3666,7 @@ 'nonposy': kwargs.pop('nonposy', 'mask'), } self.set_yscale('log', **d) + self.set_xscale('linear') b = self._hold self._hold = True # we've already processed the hold l = self.plot(*args, **kwargs) 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/mathmpl.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/only_directives.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 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,7024-7025,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569 + /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,7033,7035,7042,7072,7080,7176,7209-7211,7227,7245 /branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py:7338,7393,7395-7404,7407-7424,7428-7433,7442-7444,7446,7475-7482,7484,7486,7489-7523,7567,7569,7582-7584 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-30 03:45:34
|
Revision: 7591 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7591&view=rev Author: jdh2358 Date: 2009-08-30 03:45:21 +0000 (Sun, 30 Aug 2009) Log Message: ----------- Merged revisions 7589 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7589 | jdh2358 | 2009-08-29 22:40:08 -0500 (Sat, 29 Aug 2009) | 1 line added minor kwarg to get_?ticklines and applied ginpu patch ........ Modified Paths: -------------- trunk/matplotlib/doc/users/license.rst trunk/matplotlib/lib/matplotlib/blocking_input.py trunk/matplotlib/lib/matplotlib/figure.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7584 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7590 Modified: trunk/matplotlib/doc/users/license.rst =================================================================== --- trunk/matplotlib/doc/users/license.rst 2009-08-30 03:44:06 UTC (rev 7590) +++ trunk/matplotlib/doc/users/license.rst 2009-08-30 03:45:21 UTC (rev 7591) @@ -28,7 +28,7 @@ derivative works, distribute, and otherwise use matplotlib |version| alone or in any derivative version, provided, however, that JDH's License Agreement and JDH's notice of copyright, i.e., "Copyright (c) -2002-2008 John D. Hunter; All Rights Reserved" are retained in +2002-2009 John D. Hunter; All Rights Reserved" are retained in matplotlib |version| alone or in any derivative version prepared by Licensee. Modified: trunk/matplotlib/lib/matplotlib/blocking_input.py =================================================================== --- trunk/matplotlib/lib/matplotlib/blocking_input.py 2009-08-30 03:44:06 UTC (rev 7590) +++ trunk/matplotlib/lib/matplotlib/blocking_input.py 2009-08-30 03:45:21 UTC (rev 7591) @@ -114,15 +114,25 @@ Class that creates a callable object to retrieve mouse clicks in a blocking way. - This class will also retrieve keyboard clicks and treat them like + This class will also retrieve keyboard clicks and treat them like appropriate mouse clicks (delete and backspace are like mouse button 3, enter is like mouse button 2 and all others are like mouse button 1). """ - def __init__(self, fig): + + button_add = 1 + button_pop = 3 + button_stop = 2 + + def __init__(self, fig, mouse_add=1, mouse_pop=3, mouse_stop=2): BlockingInput.__init__(self, fig=fig, eventslist=('button_press_event', 'key_press_event') ) + self.button_add = mouse_add + self.button_pop = mouse_pop + self.button_stop= mouse_stop + + def post_event(self): """ This will be called to process events @@ -133,19 +143,19 @@ self.key_event() else: self.mouse_event() - + def mouse_event(self): '''Process a mouse click event''' event = self.events[-1] button = event.button - if button == 3: - self.button3(event) - elif button == 2: - self.button2(event) + if button == self.button_pop: + self.mouse_event_pop(event,-1) + elif button == self.button_stop: + self.mouse_event_stop(event) else: - self.button1(event) + self.mouse_event_add(event) def key_event(self): ''' @@ -154,16 +164,16 @@ ''' event = self.events[-1] - key = event.key + key = event.key.lower() - if key == 'backspace' or key == 'delete': - self.button3(event) - elif key == 'enter': - self.button2(event) + if key in ['backspace', 'delete']: + self.mouse_event_pop(event) + elif key in ['escape', 'enter']: # on windows XP and wxAgg, the enter key doesn't seem to register + self.mouse_event_stop(event) else: - self.button1(event) + self.mouse_event_add(event) - def button1( self, event ): + def mouse_event_add( self, event ): """ Will be called for any event involving a button other than button 2 or 3. This will add a click if it is inside axes. @@ -171,34 +181,34 @@ if event.inaxes: self.add_click(event) else: # If not a valid click, remove from event list - BlockingInput.pop(self) + BlockingInput.pop(self,-1) - def button2( self, event ): + def mouse_event_stop( self, event ): """ Will be called for any event involving button 2. Button 2 ends blocking input. """ # Remove last event just for cleanliness - BlockingInput.pop(self) + BlockingInput.pop(self,-1) # This will exit even if not in infinite mode. This is # consistent with matlab and sometimes quite useful, but will # require the user to test how many points were actually # returned before using data. - self.fig.canvas.stop_event_loop() + self.fig.canvas.stop_event_loop(event) - def button3( self, event ): + def mouse_event_pop( self, event ): """ Will be called for any event involving button 3. Button 3 removes the last click. """ # Remove this last event - BlockingInput.pop(self) + BlockingInput.pop(self,-1) # Now remove any existing clicks if possible if len(self.events)>0: - self.pop() + self.pop(event,-1) def add_click(self,event): """ @@ -211,11 +221,23 @@ # If desired plot up click if self.show_clicks: + + # make sure we don't mess with the axes zoom + xlim = event.inaxes.get_xlim() + ylim = event.inaxes.get_ylim() + + # plot the clicks self.marks.extend( event.inaxes.plot([event.xdata,], [event.ydata,], 'r+') ) + + # before we draw, make sure to reset the limits + event.inaxes.set_xlim(xlim) + event.inaxes.set_ylim(ylim) self.fig.canvas.draw() - def pop_click(self,index=-1): + + + def pop_click(self,event,index=-1): """ This removes a click from the list of clicks. Defaults to removing the last click. @@ -223,25 +245,49 @@ self.clicks.pop(index) if self.show_clicks: + + # make sure we don't mess with the axes zoom + xlim = event.inaxes.get_xlim() + ylim = event.inaxes.get_ylim() + mark = self.marks.pop(index) mark.remove() + + # before we draw, make sure to reset the limits + event.inaxes.set_xlim(xlim) + event.inaxes.set_ylim(ylim) self.fig.canvas.draw() + # NOTE: I do NOT understand why the above 3 lines does not work + # for the keyboard backspace event on windows XP wxAgg. + # maybe event.inaxes here is a COPY of the actual axes? - def pop(self,index=-1): + + def pop(self,event,index=-1): """ This removes a click and the associated event from the object. Defaults to removing the last click, but any index can be supplied. """ - self.pop_click(index) + self.pop_click(event,index) BlockingInput.pop(self,index) - def cleanup(self): + def cleanup(self,event=None): # clean the figure if self.show_clicks: + if event: + # make sure we don't mess with the axes zoom + xlim = event.inaxes.get_xlim() + ylim = event.inaxes.get_ylim() + for mark in self.marks: mark.remove() self.marks = [] + + if event: + # before we draw, make sure to reset the limits + event.inaxes.set_xlim(xlim) + event.inaxes.set_ylim(ylim) + self.fig.canvas.draw() # Call base class to remove callbacks Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2009-08-30 03:44:06 UTC (rev 7590) +++ trunk/matplotlib/lib/matplotlib/figure.py 2009-08-30 03:45:21 UTC (rev 7591) @@ -1095,11 +1095,12 @@ ax.update_params() ax.set_position(ax.figbox) - def ginput(self, n=1, timeout=30, show_clicks=True): + def ginput(self, n=1, timeout=30, show_clicks=True, mouse_add=1, mouse_pop=3, mouse_stop=2): """ call signature:: - ginput(self, n=1, timeout=30, show_clicks=True) + ginput(self, n=1, timeout=30, show_clicks=True, + mouse_add=1, mouse_pop=3, mouse_stop=2) Blocking call to interact with the figure. @@ -1120,7 +1121,9 @@ manager) selects a point. """ - blocking_mouse_input = BlockingMouseInput(self) + blocking_mouse_input = BlockingMouseInput(self, mouse_add =mouse_add, + mouse_pop =mouse_pop, + mouse_stop=mouse_stop) return blocking_mouse_input(n=n, timeout=timeout, show_clicks=show_clicks) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <as...@us...> - 2009-08-30 04:44:38
|
Revision: 7595 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7595&view=rev Author: astraw Date: 2009-08-30 04:44:28 +0000 (Sun, 30 Aug 2009) Log Message: ----------- testing: add support for KnownFailures Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/setup.py trunk/matplotlib/test/mplTest/MplNosePlugin.py trunk/matplotlib/test/run-mpl-test.py trunk/matplotlib/test/test_matplotlib/TestAxes.py Added Paths: ----------- trunk/matplotlib/lib/matplotlib/testing/ trunk/matplotlib/lib/matplotlib/testing/__init__.py trunk/matplotlib/lib/matplotlib/testing/decorators.py trunk/matplotlib/lib/matplotlib/testing/noseclasses.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009-08-30 04:44:11 UTC (rev 7594) +++ trunk/matplotlib/CHANGELOG 2009-08-30 04:44:28 UTC (rev 7595) @@ -1,3 +1,7 @@ +2009-08-29 Added matplotlib.testing package, which contains a Nose + plugin and a decorator that lets tests be marked as + KnownFailures - ADS + 2009-08-20 Added scaled dict to AutoDateFormatter for customized scales - JDH Added: trunk/matplotlib/lib/matplotlib/testing/decorators.py =================================================================== --- trunk/matplotlib/lib/matplotlib/testing/decorators.py (rev 0) +++ trunk/matplotlib/lib/matplotlib/testing/decorators.py 2009-08-30 04:44:28 UTC (rev 7595) @@ -0,0 +1,24 @@ +from matplotlib.testing.noseclasses import KnownFailureTest +import sys + +def knownfailureif(fail_condition, msg=None): + # based on numpy.testing.dec.knownfailureif + if msg is None: + msg = 'Test known to fail' + def known_fail_decorator(f): + # Local import to avoid a hard nose dependency and only incur the + # import time overhead at actual test-time. + import nose + def failer(*args, **kwargs): + try: + # Always run the test (to generate images). + result = f(*args, **kwargs) + except: + if fail_condition: + raise KnownFailureTest(msg) + else: + raise + # Fixme: Should raise KnownFailureDidNotFail if fail_condition==True? + return result + return nose.tools.make_decorator(f)(failer) + return known_fail_decorator Added: trunk/matplotlib/lib/matplotlib/testing/noseclasses.py =================================================================== --- trunk/matplotlib/lib/matplotlib/testing/noseclasses.py (rev 0) +++ trunk/matplotlib/lib/matplotlib/testing/noseclasses.py 2009-08-30 04:44:28 UTC (rev 7595) @@ -0,0 +1,41 @@ +import os +from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin + +class KnownFailureTest(Exception): + '''Raise this exception to mark a test as a known failing test.''' + pass + +class KnownFailure(ErrorClassPlugin): + '''Plugin that installs a KNOWNFAIL error class for the + KnownFailureClass exception. When KnownFailureTest is raised, + the exception will be logged in the knownfail attribute of the + result, 'K' or 'KNOWNFAIL' (verbose) will be output, and the + exception will not be counted as an error or failure. + + This is based on numpy.testing.noseclasses.KnownFailure. + ''' + enabled = True + knownfail = ErrorClass(KnownFailureTest, + label='KNOWNFAIL', + isfailure=False) + + def options(self, parser, env=os.environ): + env_opt = 'NOSE_WITHOUT_KNOWNFAIL' + parser.add_option('--no-knownfail', action='store_true', + dest='noKnownFail', default=env.get(env_opt, False), + help='Disable special handling of KnownFailureTest ' + 'exceptions') + + def configure(self, options, conf): + if not self.can_configure: + return + self.conf = conf + disable = getattr(options, 'noKnownFail', False) + if disable: + self.enabled = False + + def addError( self, test, err ): + # Fixme (Really weird): if I don't leave empty method here, + # nose gets confused and KnownFails become testing errors when + # using the MplNosePlugin and MplTestCase. + pass Modified: trunk/matplotlib/setup.py =================================================================== --- trunk/matplotlib/setup.py 2009-08-30 04:44:11 UTC (rev 7594) +++ trunk/matplotlib/setup.py 2009-08-30 04:44:28 UTC (rev 7595) @@ -50,6 +50,7 @@ 'matplotlib', 'matplotlib.backends', 'matplotlib.projections', + 'matplotlib.testing', # 'matplotlib.toolkits', 'mpl_toolkits', 'mpl_toolkits.mplot3d', Modified: trunk/matplotlib/test/mplTest/MplNosePlugin.py =================================================================== --- trunk/matplotlib/test/mplTest/MplNosePlugin.py 2009-08-30 04:44:11 UTC (rev 7594) +++ trunk/matplotlib/test/mplTest/MplNosePlugin.py 2009-08-30 04:44:28 UTC (rev 7595) @@ -12,6 +12,7 @@ from path_utils import * import directories as dirs from MplTestCase import MplTestCase +from matplotlib.testing.noseclasses import KnownFailureTest #======================================================================= @@ -48,7 +49,8 @@ TEST_ERRORED = -1 TEST_FAILED = 0 - TEST_PASSED = 1 + TEST_KNOWN_FAILED = 1 + TEST_PASSED = 2 #-------------------------------------------------------------------- # Some 'property' functions @@ -148,7 +150,11 @@ err : 3-tuple sys.exc_info() tuple """ - self.testResults.append( (test, self.TEST_ERRORED, err) ) + (type, value, traceback) = err + if isinstance(value,KnownFailureTest): + self.testResults.append( (test, self.TEST_KNOWN_FAILED, err) ) + else: + self.testResults.append( (test, self.TEST_ERRORED, err) ) #-------------------------------------------------------------------- def addFailure( self, test, err ): Modified: trunk/matplotlib/test/run-mpl-test.py =================================================================== --- trunk/matplotlib/test/run-mpl-test.py 2009-08-30 04:44:11 UTC (rev 7594) +++ trunk/matplotlib/test/run-mpl-test.py 2009-08-30 04:44:28 UTC (rev 7595) @@ -44,6 +44,7 @@ import nose from mplTest import MplNosePlugin, path_utils +from matplotlib.testing.noseclasses import KnownFailure if '--clean' in args: # perform the cleaning process and exit @@ -90,7 +91,7 @@ ### Run nose success = nose.run( argv = args, - plugins = [ MplNosePlugin() ] ) + plugins = [ MplNosePlugin(), KnownFailure() ] ) ### do other stuff here Modified: trunk/matplotlib/test/test_matplotlib/TestAxes.py =================================================================== --- trunk/matplotlib/test/test_matplotlib/TestAxes.py 2009-08-30 04:44:11 UTC (rev 7594) +++ trunk/matplotlib/test/test_matplotlib/TestAxes.py 2009-08-30 04:44:28 UTC (rev 7595) @@ -3,6 +3,7 @@ #======================================================================= from mplTest import MplTestCase, units +from matplotlib.testing.decorators import knownfailureif #======================================================================= # Add import modules below. @@ -57,6 +58,7 @@ self.checkImage( fname ) #-------------------------------------------------------------------- + @knownfailureif(True, "Fails due to SF bug 2846058") def test_formatter_ticker( self ): """Test Some formatter and ticker issues.""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2009-08-30 10:33:12
|
Revision: 7597 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7597&view=rev Author: jouni Date: 2009-08-30 10:33:01 +0000 (Sun, 30 Aug 2009) Log Message: ----------- Improve multipage pdf documentation Modified Paths: -------------- trunk/matplotlib/doc/api/index_backend_api.rst trunk/matplotlib/doc/faq/howto_faq.rst trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py trunk/matplotlib/lib/matplotlib/figure.py Added Paths: ----------- trunk/matplotlib/doc/api/backend_pdf_api.rst Added: trunk/matplotlib/doc/api/backend_pdf_api.rst =================================================================== --- trunk/matplotlib/doc/api/backend_pdf_api.rst (rev 0) +++ trunk/matplotlib/doc/api/backend_pdf_api.rst 2009-08-30 10:33:01 UTC (rev 7597) @@ -0,0 +1,7 @@ + +:mod:`matplotlib.backends.backend_pdf` +====================================== + +.. automodule:: matplotlib.backends.backend_pdf + :members: + :show-inheritance: Modified: trunk/matplotlib/doc/api/index_backend_api.rst =================================================================== --- trunk/matplotlib/doc/api/index_backend_api.rst 2009-08-30 06:29:58 UTC (rev 7596) +++ trunk/matplotlib/doc/api/index_backend_api.rst 2009-08-30 10:33:01 UTC (rev 7597) @@ -8,5 +8,6 @@ backend_gtkagg_api.rst backend_qt4agg_api.rst backend_wxagg_api.rst + backend_pdf_api.rst dviread.rst type1font.rst Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2009-08-30 06:29:58 UTC (rev 7596) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2009-08-30 10:33:01 UTC (rev 7597) @@ -68,6 +68,35 @@ ax.set_xlabel('volts', alpha=0.5) +.. _howto-multipage: + +Save multiple plots in one pdf file +----------------------------------- + +Many image file formats can only have one image per file, but some +formats support multi-page files. Currently only the pdf backend has +support for this. To make a multi-page pdf file, first initialize the +file:: + + from matplotlib.backends.backend_pdf import PdfPages + pp = PdfPages('multipage.pdf') + +You can give the :class:`~matplotlib.backends.backend_pdf.PdfPages` +object to :func:`~matplotlib.pyplot.savefig`, but you have to specify +the format:: + + savefig(pp, format='pdf') + +A simpler way is to call +:meth:`PdfPages.savefig <matplotlib.backends.backend_pdf.PdfPages.savefig>`:: + + pp.savefig() + +Finally, the multipage pdf object has to be closed:: + + pp.close() + + .. _howto-subplots-adjust: Move the edge of an axes to make room for tick labels Modified: trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2009-08-30 06:29:58 UTC (rev 7596) +++ trunk/matplotlib/lib/matplotlib/backends/backend_pdf.py 2009-08-30 10:33:01 UTC (rev 7597) @@ -348,7 +348,7 @@ self.compressobj = None class PdfFile(object): - """PDF file with one page.""" + """PDF file object.""" def __init__(self, filename): self.nextObject = 1 # next free object id @@ -1923,18 +1923,18 @@ """ A multi-page PDF file. - Use like this: + Use like this:: - # Initialize: - pdf_pages = PdfPages('foo.pdf') + # Initialize: + pp = PdfPages('foo.pdf') - # As many times as you like, create a figure fig, then either: - fig.savefig(pdf_pages, format='pdf') # note the format argument! - # or: - pdf_pages.savefig(fig) + # As many times as you like, create a figure fig, then either: + fig.savefig(pp, format='pdf') # note the format argument! + # or: + pp.savefig(fig) - # Once you are done, remember to close the object: - pdf_pages.close() + # Once you are done, remember to close the object: + pp.close() (In reality PdfPages is a thin wrapper around PdfFile, in order to avoid confusion when using savefig and forgetting the format Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2009-08-30 06:29:58 UTC (rev 7596) +++ trunk/matplotlib/lib/matplotlib/figure.py 2009-08-30 10:33:01 UTC (rev 7597) @@ -981,10 +981,14 @@ Arguments: *fname*: - A string containing a path to a filename, or a Python file-like object. + A string containing a path to a filename, or a Python file-like object, + or possibly some backend-dependent object such as + :class:`~matplotlib.backends.backend_pdf.PdfPages`. If *format* is *None* and *fname* is a string, the output format is deduced from the extension of the filename. + If *fname* is not a string, remember to specify *format* to + ensure that the correct backend is used. Keyword arguments: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-30 16:25:54
|
Revision: 7601 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7601&view=rev Author: jdh2358 Date: 2009-08-30 16:25:46 +0000 (Sun, 30 Aug 2009) Log Message: ----------- Merged revisions 7598,7600 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7598 | jdh2358 | 2009-08-30 08:35:12 -0500 (Sun, 30 Aug 2009) | 1 line applied Gael's ginput patch ........ r7600 | jdh2358 | 2009-08-30 11:22:38 -0500 (Sun, 30 Aug 2009) | 1 line some unit cleanup; fix sf bug 2846058 ........ Modified Paths: -------------- trunk/matplotlib/examples/units/annotate_with_units.py trunk/matplotlib/examples/units/bar_demo2.py trunk/matplotlib/examples/units/radian_demo.py trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/blocking_input.py trunk/matplotlib/lib/matplotlib/collections.py trunk/matplotlib/lib/matplotlib/figure.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7590 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7600 Modified: trunk/matplotlib/examples/units/annotate_with_units.py =================================================================== --- trunk/matplotlib/examples/units/annotate_with_units.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/examples/units/annotate_with_units.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -1,8 +1,7 @@ - -import pylab +import matplotlib.pyplot as plt from basic_units import cm -fig = pylab.figure() +fig = plt.figure() ax = fig.add_subplot(111) @@ -23,5 +22,5 @@ ax.set_xlim(0*cm, 4*cm) ax.set_ylim(0*cm, 4*cm) -pylab.show() +plt.show() Modified: trunk/matplotlib/examples/units/bar_demo2.py =================================================================== --- trunk/matplotlib/examples/units/bar_demo2.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/examples/units/bar_demo2.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -25,11 +25,11 @@ ax3 = fig.add_subplot(2,2,3) ax3.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=cm) -ax3.set_xlim(3, 6) # scalars are interpreted in current units +ax3.set_xlim(2, 6) # scalars are interpreted in current units ax4 = fig.add_subplot(2,2,4) ax4.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=inch) #fig.savefig('simple_conversion_plot.png') -ax4.set_xlim(3*cm, 6*cm) # cm are converted to inches +ax4.set_xlim(2*cm, 6*cm) # cm are converted to inches show() Modified: trunk/matplotlib/examples/units/radian_demo.py =================================================================== --- trunk/matplotlib/examples/units/radian_demo.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/examples/units/radian_demo.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -7,15 +7,15 @@ from basic_units import radians, degrees, cos from matplotlib.pyplot import figure, show -x = np.arange(0, 15, 0.01) * radians +x = [val*radians for val in np.arange(0, 15, 0.01)] fig = figure() fig.subplots_adjust(hspace=0.3) ax = fig.add_subplot(211) -ax.plot(x, cos(x), xunits=radians) +line1, = ax.plot(x, cos(x), xunits=radians) ax = fig.add_subplot(212) -ax.plot(x, cos(x), xunits=degrees) +line2, = ax.plot(x, cos(x), xunits=degrees) show() Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/lib/matplotlib/axes.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -203,11 +203,25 @@ if self.axes.xaxis is not None and self.axes.yaxis is not None: bx = self.axes.xaxis.update_units(x) by = self.axes.yaxis.update_units(y) - if bx: - x = self.axes.convert_xunits(x) - if by: - y = self.axes.convert_yunits(y) + if self.command!='plot': + # the Line2D class can handle unitized data, with + # support for post hoc unit changes etc. Other mpl + # artists, eg Polygon which _process_plot_var_args + # also serves on calls to fill, cannot. So this is a + # hack to say: if you are not "plot", which is + # creating Line2D, then convert the data now to + # floats. If you are plot, pass the raw data through + # to Line2D which will handle the conversion. So + # polygons will not support post hoc conversions of + # the unit type since they are not storing the orig + # data. Hopefully we can rationalize this at a later + # date - JDH + if bx: + x = self.axes.convert_xunits(x) + if by: + y = self.axes.convert_yunits(y) + x = np.atleast_1d(x) #like asanyarray, but converts scalar to array y = np.atleast_1d(y) if x.shape[0] != y.shape[0]: @@ -4270,10 +4284,14 @@ if self.xaxis is not None: left = self.convert_xunits( left ) width = self.convert_xunits( width ) + if xerr is not None: + xerr = self.convert_xunits( xerr ) if self.yaxis is not None: bottom = self.convert_yunits( bottom ) height = self.convert_yunits( height ) + if yerr is not None: + yerr = self.convert_yunits( yerr ) if align == 'edge': pass Modified: trunk/matplotlib/lib/matplotlib/blocking_input.py =================================================================== --- trunk/matplotlib/lib/matplotlib/blocking_input.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/lib/matplotlib/blocking_input.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -17,9 +17,6 @@ Note: Subclass of BlockingMouseInput. Used by clabel """ -import time -import numpy as np - from matplotlib import path, verbose from matplotlib.cbook import is_sequence_of_strings @@ -151,7 +148,7 @@ button = event.button if button == self.button_pop: - self.mouse_event_pop(event,-1) + self.mouse_event_pop(event) elif button == self.button_stop: self.mouse_event_stop(event) else: @@ -162,7 +159,7 @@ Process a key click event. This maps certain keys to appropriate mouse click events. ''' - + event = self.events[-1] key = event.key.lower() Modified: trunk/matplotlib/lib/matplotlib/collections.py =================================================================== --- trunk/matplotlib/lib/matplotlib/collections.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/lib/matplotlib/collections.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -819,7 +819,9 @@ def set_segments(self, segments): if segments is None: return _segments = [] + for seg in segments: + if not np.ma.isMaskedArray(seg): seg = np.asarray(seg, np.float_) _segments.append(seg) Modified: trunk/matplotlib/lib/matplotlib/figure.py =================================================================== --- trunk/matplotlib/lib/matplotlib/figure.py 2009-08-30 16:22:38 UTC (rev 7600) +++ trunk/matplotlib/lib/matplotlib/figure.py 2009-08-30 16:25:46 UTC (rev 7601) @@ -12,12 +12,11 @@ """ import numpy as np -import time import artist from artist import Artist, allow_rasterization from axes import Axes, SubplotBase, subplot_class_factory -from cbook import flatten, allequal, Stack, iterable, dedent +from cbook import flatten, allequal, Stack, iterable import _image import colorbar as cbar from image import FigureImage @@ -1118,6 +1117,12 @@ Right clicking cancels last input. + The buttons used for the various actions (adding points, removing + points, terminating the inputs) can be overriden via the + arguments *mouse_add*, *mouse_pop* and *mouse_stop*, that give + the associated mouse button: 1 for left, 2 for middle, 3 for + right. + The keyboard can also be used to select points in case your mouse does not have one or more of the buttons. The delete and backspace keys act like right clicking (i.e., remove last point), the enter key This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2009-08-30 20:26:16
|
Revision: 7606 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7606&view=rev Author: leejjoon Date: 2009-08-30 20:26:05 +0000 (Sun, 30 Aug 2009) Log Message: ----------- add TextPath class in text.py. Update demo_text_path.py Modified Paths: -------------- trunk/matplotlib/examples/pylab_examples/demo_text_path.py trunk/matplotlib/lib/matplotlib/text.py Modified: trunk/matplotlib/examples/pylab_examples/demo_text_path.py =================================================================== --- trunk/matplotlib/examples/pylab_examples/demo_text_path.py 2009-08-30 18:30:29 UTC (rev 7605) +++ trunk/matplotlib/examples/pylab_examples/demo_text_path.py 2009-08-30 20:26:05 UTC (rev 7606) @@ -4,147 +4,54 @@ import matplotlib.pyplot as plt from matplotlib.image import BboxImage import numpy as np -from matplotlib.transforms import Affine2D, IdentityTransform +from matplotlib.transforms import 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 +from matplotlib.text import TextPath -class TextPatch(mpatches.PathPatch): - FONT_SCALE = 100. +class PathClippedImagePatch(mpatches.PathPatch): + """ + The given image is used to draw the face of the patch. Internally, + it uses BboxImage whose clippath set to the path of the patch. - 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) - + FIXME : The result is currently dpi dependent. + """ + def __init__(self, path, bbox_image, **kwargs): + mpatches.PathPatch.__init__(self, path, **kwargs) + self._facecolor = "none" self._init_bbox_image(bbox_image) - + def set_facecolor(self, color): + pass + 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 = BboxImage(self.get_window_extent, + norm = None, + origin=None, + ) + bbox_image.set_transform(IdentityTransform()) - bbox_image.set_data(im) - self.bbox_image = bbox_image + 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) + # the clip path must be updated every draw. any solution? -JJ + self.bbox_image.set_clip_path(self._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: fig = plt.figure(1) @@ -156,11 +63,13 @@ from matplotlib._png import read_png fn = get_sample_data("lena.png", asfileobj=False) arr = read_png(fn) - p = TextPatch((0, 0), "!?", size=150, fc="none", ec="k", - bbox_image=arr, - transform=IdentityTransform()) - p.set_clip_on(False) + text_path = TextPath((0, 0), "!?", size=150) + p = PathClippedImagePatch(text_path, arr, ec="k", + transform=IdentityTransform()) + + #p.set_clip_on(False) + # make offset box offsetbox = AuxTransformBox(IdentityTransform()) offsetbox.add_artist(p) @@ -176,21 +85,21 @@ ax = plt.subplot(212) - shadow1 = TextPatch((3, -2), "TextPath", size=70, fc="none", ec="0.6", lw=3, - transform=IdentityTransform()) - shadow2 = TextPatch((3, -2), "TextPath", size=70, fc="0.3", ec="none", - transform=IdentityTransform()) - arr = np.arange(256).reshape(1,256)/256. - text_path = TextPatch((0, 0), "TextPath", size=70, fc="none", ec="none", lw=1, - bbox_image=arr, - transform=IdentityTransform()) + text_path = TextPath((0, 0), "TextPath", size=70) + text_patch = PathClippedImagePatch(text_path, arr, ec="none", + transform=IdentityTransform()) + + shadow1 = mpatches.Shadow(text_patch, 3, -2, props=dict(fc="none", ec="0.6", lw=3)) + shadow2 = mpatches.Shadow(text_patch, 3, -2, props=dict(fc="0.3", ec="none")) + + # make offset box offsetbox = AuxTransformBox(IdentityTransform()) offsetbox.add_artist(shadow1) offsetbox.add_artist(shadow2) - offsetbox.add_artist(text_path) + offsetbox.add_artist(text_patch) # place the anchored offset box using AnnotationBbox ab = AnnotationBbox(offsetbox, (0.5, 0.5), @@ -198,16 +107,13 @@ boxcoords="offset points", box_alignment=(0.5,0.5), ) + #text_path.set_size(10) - ax.add_artist(ab) ax.set_xlim(0, 1) ax.set_ylim(0, 1) - - - plt.draw() plt.show() Modified: trunk/matplotlib/lib/matplotlib/text.py =================================================================== --- trunk/matplotlib/lib/matplotlib/text.py 2009-08-30 18:30:29 UTC (rev 7605) +++ trunk/matplotlib/lib/matplotlib/text.py 2009-08-30 20:26:05 UTC (rev 7606) @@ -23,6 +23,11 @@ import matplotlib.nxutils as nxutils +from matplotlib.path import Path +import matplotlib.font_manager as font_manager +from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, LOAD_NO_HINTING + + def _process_text_args(override, fontdict=None, **kwargs): "Return an override dict. See :func:`~pyplot.text' docstring for info" @@ -1764,3 +1769,174 @@ docstring.interpd.update(Annotation=Annotation.__init__.__doc__) + +class TextPath(Path): + """ + Create a path from the text. + """ + + # TODO : math text is currently not supported, but it would not be easy. + + FONT_SCALE = 100. + + def __init__(self, xy, s, size=None, prop=None, + _interpolation_steps=1, + *kl, **kwargs): + """ + Create a path from the text. No support for TeX yet. Note that + it simply is a path, not an artist. You need to use the + PathPatch (or other artists) to draw this path onto the + canvas. + + xy : position of the text. + s : text + size : font size + prop : font property + """ + + + if prop is None: + prop = FontProperties() + + if size is None: + size = prop.get_size_in_points() + + + self._xy = xy + self.set_size(size) + + self._cached_vertices = None + + self._vertices, self._codes = self.text_get_vertices_codes(prop, s) + + self.should_simplify = False + self.simplify_threshold = rcParams['path.simplify_threshold'] + self.has_nonfinite = False + self._interpolation_steps = _interpolation_steps + + + def set_size(self, size): + """ + set the size of the text + """ + self._size = size + self._invalid = True + + def get_size(self): + """ + get the size of the text + """ + return self._size + + def _get_vertices(self): + """ + Return the cached path after updating it if necessary. + """ + self._revalidate_path() + return self._cached_vertices + + def _get_codes(self): + """ + Return the codes + """ + return self._codes + + vertices = property(_get_vertices) + codes = property(_get_codes) + + def _revalidate_path(self): + """ + update the path if necessary. + + The path for the text is initially create with the font size + of FONT_SCALE, and this path is rescaled to other size when + necessary. + + """ + if self._invalid or \ + (self._cached_vertices is None): + tr = Affine2D().scale(self._size/self.FONT_SCALE, + self._size/self.FONT_SCALE).translate(*self._xy) + self._cached_vertices = tr.transform(self._vertices) + self._invalid = False + + + def glyph_char_path(self, glyph, currx=0.): + """ + convert the glyph to vertices and codes. Mostly copied from + backend_svg.py. + """ + 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_vertices_codes(self, prop, s): + """ + convert the string *s* to vertices and codes using the + provided font property *prop*. Mostly copied from + backend_svg.py. + """ + + 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 = [], [] + + + # I'm not sure if I get kernings right. Needs to be verified. -JJL + + 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 verts, codes + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lee...@us...> - 2009-08-31 00:38:49
|
Revision: 7608 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7608&view=rev Author: leejjoon Date: 2009-08-31 00:38:43 +0000 (Mon, 31 Aug 2009) Log Message: ----------- Merged revisions 7607 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7607 | leejjoon | 2009-08-30 20:32:12 -0400 (Sun, 30 Aug 2009) | 1 line fix sf bug #2839919 ........ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/legend.py Property Changed: ---------------- trunk/matplotlib/ Property changes on: trunk/matplotlib ___________________________________________________________________ Modified: svnmerge-integrated - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7600 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7607 Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2009-08-31 00:32:12 UTC (rev 7607) +++ trunk/matplotlib/lib/matplotlib/legend.py 2009-08-31 00:38:43 UTC (rev 7608) @@ -591,8 +591,9 @@ # We calculate number of lows in each column. The first # (num_largecol) columns will have (nrows+1) rows, and remaing # (num_smallcol) columns will have (nrows) rows. - nrows, num_largecol = divmod(len(handleboxes), self._ncol) - num_smallcol = self._ncol-num_largecol + ncol = min(self._ncol, len(handleboxes)) + nrows, num_largecol = divmod(len(handleboxes), ncol) + num_smallcol = ncol-num_largecol # starting index of each column and number of rows in it. largecol = safezip(range(0, num_largecol*(nrows+1), (nrows+1)), @@ -860,3 +861,4 @@ return ox, oy + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2009-08-31 02:33:28
|
Revision: 7609 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7609&view=rev Author: jdh2358 Date: 2009-08-31 02:33:21 +0000 (Mon, 31 Aug 2009) Log Message: ----------- update make.osx to find the local freetype etc Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/make.osx Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-31 00:38:43 UTC (rev 7608) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-31 02:33:21 UTC (rev 7609) @@ -140,9 +140,9 @@ # space) in the following call to draw_text_image). font.set_text(s, 0, flags=LOAD_FORCE_AUTOHINT) font.draw_glyphs_to_bitmap() + + #print x, y, int(x), int(y), s - #print x, y, int(x), int(y) - self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, angle, gc) def get_text_width_height_descent(self, s, prop, ismath): Modified: trunk/matplotlib/make.osx =================================================================== --- trunk/matplotlib/make.osx 2009-08-31 00:38:43 UTC (rev 7608) +++ trunk/matplotlib/make.osx 2009-08-31 02:33:21 UTC (rev 7609) @@ -10,10 +10,7 @@ ## You shouldn't need to configure past this point -CFLAGS="-Os -arch ppc -arch i386 -I{$PREFIX}/include" - -LDFLAGS="-arch ppc -arch i386 -L${PREFIX}/lib" - +PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" CFLAGS_DEPS="-arch i386 -arch ppc -I${PREFIX}/include -I${PREFIX}/include/freetype2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" LDFLAGS_DEPS="-arch i386 -arch ppc -L${PREFIX}/lib -syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" @@ -32,7 +29,7 @@ zlib: - unset PKG_CONFIG_PATH &&\ + export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} &&\ rm -rf zlib-${ZLIBVERSION} &&\ tar xvfz zlib-${ZLIBVERSION}.tar.gz &&\ cd zlib-${ZLIBVERSION} &&\ @@ -44,7 +41,7 @@ unset MACOSX_DEPLOYMENT_TARGET png: zlib - unset PKG_CONFIG_PATH &&\ + export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} &&\ rm -rf libpng-${PNGVERSION} &&\ tar xvfj libpng-${PNGVERSION}.tar.bz2 cd libpng-${PNGVERSION} &&\ @@ -58,7 +55,7 @@ freetype: zlib - unset PKG_CONFIG_PATH &&\ + export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} &&\ rm -rf ${FREETYPEVERSION} &&\ tar xvfj freetype-${FREETYPEVERSION}.tar.bz2 &&\ cd freetype-${FREETYPEVERSION} &&\ @@ -75,13 +72,17 @@ echo 'all done' mpl_build: + export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} &&\ export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ export CFLAGS=${CFLAGS_DEPS} &&\ export LDFLAGS=${LDFLAGS_DEPS} &&\ python setup.py build mpl_install: + export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} &&\ export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} &&\ export CFLAGS=${CFLAGS_DEPS} &&\ export LDFLAGS=${LDFLAGS_DEPS} &&\ + export LD_LIBRARY_PATH=${PREFIX}/lib &&\ + export DYLD_LIBRARY_PATH=${PREFIX}/lib &&\ python setup.py install --prefix=${PREFIX} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2009-08-31 15:31:54
|
Revision: 7614 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7614&view=rev Author: mdboom Date: 2009-08-31 15:31:46 +0000 (Mon, 31 Aug 2009) Log Message: ----------- [2832896] raster scale error in PDF, EPS output Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py trunk/matplotlib/lib/matplotlib/image.py trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py =================================================================== --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-31 05:23:37 UTC (rev 7613) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2009-08-31 15:31:46 UTC (rev 7614) @@ -140,7 +140,7 @@ # space) in the following call to draw_text_image). font.set_text(s, 0, flags=LOAD_FORCE_AUTOHINT) font.draw_glyphs_to_bitmap() - + #print x, y, int(x), int(y), s self._renderer.draw_text_image(font.get_image(), int(x), int(y) + 1, angle, gc) Modified: trunk/matplotlib/lib/matplotlib/image.py =================================================================== --- trunk/matplotlib/lib/matplotlib/image.py 2009-08-31 05:23:37 UTC (rev 7613) +++ trunk/matplotlib/lib/matplotlib/image.py 2009-08-31 15:31:46 UTC (rev 7614) @@ -141,7 +141,7 @@ gc = renderer.new_gc() gc.set_clip_rectangle(self.axes.bbox.frozen()) gc.set_clip_path(self.get_clip_path()) - renderer.draw_image(gc, round(l), round(b), im) + renderer.draw_image(gc, l, b, im) def contains(self, mouseevent): """ @@ -421,10 +421,8 @@ 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 *= magnification + widthDisplay = (round(r*magnification) + 0.5) - (round(l*magnification) - 0.5) + heightDisplay = (round(t*magnification) + 0.5) - (round(b*magnification) - 0.5) im.apply_translation(tx, ty) # resize viewport to display Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2009-08-31 05:23:37 UTC (rev 7613) +++ trunk/matplotlib/src/_backend_agg.cpp 2009-08-31 15:31:46 UTC (rev 7614) @@ -803,8 +803,8 @@ args.verify_length(4); GCAgg gc(args[0], dpi); - double x = Py::Float(args[1]); - double y = Py::Float(args[2]); + double x = mpl_round(Py::Float(args[1])); + double y = mpl_round(Py::Float(args[2])); Image *image = static_cast<Image*>(args[3].ptr()); bool has_clippath = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |