You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(4) |
2
|
3
(8) |
4
(16) |
5
(40) |
6
(16) |
7
(9) |
8
(15) |
9
(6) |
10
(4) |
11
(28) |
12
(6) |
13
(2) |
14
(7) |
15
(8) |
16
|
17
|
18
(9) |
19
(2) |
20
(7) |
21
(3) |
22
(6) |
23
(25) |
24
(16) |
25
(8) |
26
(7) |
27
(3) |
28
(1) |
29
(4) |
30
(21) |
31
(15) |
|
|
|
|
|
Revision: 7339 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7339&view=rev Author: jouni Date: 2009年08月03日 20:06:02 +0000 (2009年8月03日) Log Message: ----------- Merged revisions 7338 via svnmerge from https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7338 | jouni | 2009年08月03日 22:41:32 +0300 (2009年8月03日) | 2 lines Fixed boilerplate.py so it doesn't break the ReST docs. ........ Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/boilerplate.py trunk/matplotlib/lib/matplotlib/pyplot.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-7318 + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7318,7338 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_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 Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2009年08月03日 19:41:32 UTC (rev 7338) +++ trunk/matplotlib/CHANGELOG 2009年08月03日 20:06:02 UTC (rev 7339) @@ -1,3 +1,5 @@ +2009年08月03日 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS + ====================================================================== 2009年07月31日 Tagging 0.99.0.rc1 at 7314 - MGD Modified: trunk/matplotlib/boilerplate.py =================================================================== --- trunk/matplotlib/boilerplate.py 2009年08月03日 19:41:32 UTC (rev 7338) +++ trunk/matplotlib/boilerplate.py 2009年08月03日 20:06:02 UTC (rev 7339) @@ -21,7 +21,6 @@ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def %(func)s(%(argspec)s): - %(docstring)s %(ax)s = gca() # allow callers to override the hold state by passing hold=True|False %(washold)s = %(ax)s.ishold() @@ -35,16 +34,19 @@ %(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 def %(func)s(%(argspec)s): - %(docstring)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 @@ -138,19 +140,6 @@ """ return '\n'.join(x.rstrip() for x in string.split('\n')) -def make_docstring(cmd, mention_hold): - func = getattr(Axes, cmd) - docstring = inspect.getdoc(func) - if docstring is None: - return "" - escaped = re.sub(r'\\', r'\\\\', docstring) - if mention_hold: - escaped += ''' - -Additional kwargs: hold = [True|False] overrides default hold state -''' - return '"""'+escaped+'"""' - for fmt,cmdlist in (_fmtplot,_plotcommands),(_fmtmisc,_misccommands): for func in cmdlist: # For some commands, an additional line is needed to set the @@ -160,9 +149,6 @@ else: mappable = '' - # Format docstring - docstring = make_docstring(func, fmt is _fmtplot) - # Get argspec of wrapped function args, varargs, varkw, defaults = inspect.getargspec(getattr(Axes, func)) args.pop(0) # remove 'self' argument 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_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 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_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 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_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 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_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 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_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 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_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 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_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 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_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 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_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 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_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 Modified: trunk/matplotlib/lib/matplotlib/pyplot.py =================================================================== --- trunk/matplotlib/lib/matplotlib/pyplot.py 2009年08月03日 19:41:32 UTC (rev 7338) +++ trunk/matplotlib/lib/matplotlib/pyplot.py 2009年08月03日 20:06:02 UTC (rev 7339) @@ -1608,72 +1608,17 @@ draw_if_interactive() +# This is added to docstrings of autogenerated plotting functions +__docstring_addendum = """ + +Additional kwargs: hold = [True|False] overrides default hold state""" + ## Plotting part 2: autogenerated wrappers for axes methods ## # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def acorr(x, hold=None, **kwargs): - """call signature:: - - acorr(x, normed=True, detrend=mlab.detrend_none, usevlines=True, - maxlags=10, **kwargs) - -Plot the autocorrelation of *x*. If *normed* = *True*, -normalize the data by the autocorrelation at 0-th lag. *x* is -detrended by the *detrend* callable (default no normalization). - -Data are plotted as ``plot(lags, c, **kwargs)`` - -Return value is a tuple (*lags*, *c*, *line*) where: - - - *lags* are a length 2*maxlags+1 lag vector - - - *c* is the 2*maxlags+1 auto correlation vector - - - *line* is a :class:`~matplotlib.lines.Line2D` instance - returned by :meth:`plot` - -The default *linestyle* is None and the default *marker* is -``'o'``, though these can be overridden with keyword args. -The cross correlation is performed with -:func:`numpy.correlate` with *mode* = 2. - -If *usevlines* is *True*, :meth:`~matplotlib.axes.Axes.vlines` -rather than :meth:`~matplotlib.axes.Axes.plot` is used to draw -vertical lines from the origin to the acorr. Otherwise, the -plot style is determined by the kwargs, which are -:class:`~matplotlib.lines.Line2D` properties. - -*maxlags* is a positive integer detailing the number of lags -to show. The default value of *None* will return all -:math:`2 \\mathrm{len}(x) - 1` lags. - -The return value is a tuple (*lags*, *c*, *linecol*, *b*) -where - -- *linecol* is the - :class:`~matplotlib.collections.LineCollection` - -- *b* is the *x*-axis. - -.. seealso:: - - :meth:`~matplotlib.axes.Axes.plot` or - :meth:`~matplotlib.axes.Axes.vlines` - For documentation on valid kwargs. - -**Example:** - -:func:`~matplotlib.pyplot.xcorr` above, and -:func:`~matplotlib.pyplot.acorr` below. - -**Example:** - -.. plot:: mpl_examples/pylab_examples/xcorr_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1687,51 +1632,12 @@ ax.hold(washold) return ret +if Axes.acorr.__doc__ is not None: + acorr.__doc__ = dedent(Axes.acorr.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def arrow(x, y, dx, dy, hold=None, **kwargs): - """call signature:: - - arrow(x, y, dx, dy, **kwargs) - -Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*, -*y* + *dy*). - -Optional kwargs control the arrow properties: - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -**Example:** - -.. plot:: mpl_examples/pylab_examples/arrow_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1745,90 +1651,12 @@ ax.hold(washold) return ret +if Axes.arrow.__doc__ is not None: + arrow.__doc__ = dedent(Axes.arrow.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs): - """call signature:: - - axhline(y=0, xmin=0, xmax=1, **kwargs) - -Axis Horizontal Line - -Draw a horizontal line at *y* from *xmin* to *xmax*. With the -default values of *xmin* = 0 and *xmax* = 1, this line will -always span the horizontal extent of the axes, regardless of -the xlim settings, even if you change them, eg. with the -:meth:`set_xlim` command. That is, the horizontal extent is -in axes coords: 0=left, 0.5=middle, 1.0=right but the *y* -location is in data coordinates. - -Return value is the :class:`~matplotlib.lines.Line2D` -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. Eg., - -* draw a thick red hline at *y* = 0 that spans the xrange - - >>> axhline(linewidth=4, color='r') - -* draw a default hline at *y* = 1 that spans the xrange - - >>> axhline(y=1) - -* draw a default hline at *y* = .5 that spans the the middle half of - the xrange - - >>> axhline(y=.5, xmin=0.25, xmax=0.75) - -Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'bevel'] - transform: a :class:`matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - xdata: 1D array - ydata: 1D array - zorder: any number - -.. seealso:: - - :meth:`axhspan` - for example plot and source code - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1842,72 +1670,12 @@ ax.hold(washold) return ret +if Axes.axhline.__doc__ is not None: + axhline.__doc__ = dedent(Axes.axhline.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs): - """call signature:: - - axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs) - -Axis Horizontal Span. - -*y* coords are in data units and *x* coords are in axes (relative -0-1) units. - -Draw a horizontal span (rectangle) from *ymin* to *ymax*. -With the default values of *xmin* = 0 and *xmax* = 1, this -always spans the xrange, regardless of the xlim settings, even -if you change them, eg. with the :meth:`set_xlim` command. -That is, the horizontal extent is in axes coords: 0=left, -0.5=middle, 1.0=right but the *y* location is in data -coordinates. - -Return value is a :class:`matplotlib.patches.Polygon` -instance. - -Examples: - -* draw a gray rectangle from *y* = 0.25-0.75 that spans the - horizontal extent of the axes - - >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5) - -Valid kwargs are :class:`~matplotlib.patches.Polygon` properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -**Example:** - -.. plot:: mpl_examples/pylab_examples/axhspan_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1921,90 +1689,12 @@ ax.hold(washold) return ret +if Axes.axhspan.__doc__ is not None: + axhspan.__doc__ = dedent(Axes.axhspan.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs): - """call signature:: - - axvline(x=0, ymin=0, ymax=1, **kwargs) - -Axis Vertical Line - -Draw a vertical line at *x* from *ymin* to *ymax*. With the -default values of *ymin* = 0 and *ymax* = 1, this line will -always span the vertical extent of the axes, regardless of the -ylim settings, even if you change them, eg. with the -:meth:`set_ylim` command. That is, the vertical extent is in -axes coords: 0=bottom, 0.5=middle, 1.0=top but the *x* location -is in data coordinates. - -Return value is the :class:`~matplotlib.lines.Line2D` -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. Eg., - -* draw a thick red vline at *x* = 0 that spans the yrange - - >>> axvline(linewidth=4, color='r') - -* draw a default vline at *x* = 1 that spans the yrange - - >>> axvline(x=1) - -* draw a default vline at *x* = .5 that spans the the middle half of - the yrange - - >>> axvline(x=.5, ymin=0.25, ymax=0.75) - -Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'bevel'] - transform: a :class:`matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - xdata: 1D array - ydata: 1D array - zorder: any number - -.. seealso:: - - :meth:`axhspan` - for example plot and source code - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2018,73 +1708,12 @@ ax.hold(washold) return ret +if Axes.axvline.__doc__ is not None: + axvline.__doc__ = dedent(Axes.axvline.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs): - """call signature:: - - axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs) - -Axis Vertical Span. - -*x* coords are in data units and *y* coords are in axes (relative -0-1) units. - -Draw a vertical span (rectangle) from *xmin* to *xmax*. With -the default values of *ymin* = 0 and *ymax* = 1, this always -spans the yrange, regardless of the ylim settings, even if you -change them, eg. with the :meth:`set_ylim` command. That is, -the vertical extent is in axes coords: 0=bottom, 0.5=middle, -1.0=top but the *y* location is in data coordinates. - -Return value is the :class:`matplotlib.patches.Polygon` -instance. - -Examples: - -* draw a vertical green translucent rectangle from x=1.25 to 1.55 that - spans the yrange of the axes - - >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5) - -Valid kwargs are :class:`~matplotlib.patches.Polygon` -properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -.. seealso:: - - :meth:`axhspan` - for example plot and source code - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2098,110 +1727,12 @@ ax.hold(washold) return ret +if Axes.axvspan.__doc__ is not None: + axvspan.__doc__ = dedent(Axes.axvspan.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def bar(left, height, width=0.80000000000000004, bottom=None, color=None, edgecolor=None, linewidth=None, yerr=None, xerr=None, ecolor=None, capsize=3, align='edge', orientation='vertical', log=False, hold=None, **kwargs): - """call signature:: - - bar(left, height, width=0.8, bottom=0, - color=None, edgecolor=None, linewidth=None, - yerr=None, xerr=None, ecolor=None, capsize=3, - align='edge', orientation='vertical', log=False) - -Make a bar plot with rectangles bounded by: - - *left*, *left* + *width*, *bottom*, *bottom* + *height* - (left, right, bottom and top edges) - -*left*, *height*, *width*, and *bottom* can be either scalars -or sequences - -Return value is a list of -:class:`matplotlib.patches.Rectangle` instances. - -Required arguments: - - ======== =============================================== - Argument Description - ======== =============================================== - *left* the x coordinates of the left sides of the bars - *height* the heights of the bars - ======== =============================================== - -Optional keyword arguments: - - =============== ========================================== - Keyword Description - =============== ========================================== - *width* the widths of the bars - *bottom* the y coordinates of the bottom edges of - the bars - *color* the colors of the bars - *edgecolor* the colors of the bar edges - *linewidth* width of bar edges; None means use default - linewidth; 0 means don't draw edges. - *xerr* if not None, will be used to generate - errorbars on the bar chart - *yerr* if not None, will be used to generate - errorbars on the bar chart - *ecolor* specifies the color of any errorbar - *capsize* (default 3) determines the length in - points of the error bar caps - *align* 'edge' (default) | 'center' - *orientation* 'vertical' | 'horizontal' - *log* [False|True] False (default) leaves the - orientation axis as-is; True sets it to - log scale - =============== ========================================== - -For vertical bars, *align* = 'edge' aligns bars by their left -edges in left, while *align* = 'center' interprets these -values as the *x* coordinates of the bar centers. For -horizontal bars, *align* = 'edge' aligns bars by their bottom -edges in bottom, while *align* = 'center' interprets these -values as the *y* coordinates of the bar centers. - -The optional arguments *color*, *edgecolor*, *linewidth*, -*xerr*, and *yerr* can be either scalars or sequences of -length equal to the number of bars. This enables you to use -bar as the basis for stacked bar charts, or candlestick plots. - -Other optional kwargs: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -**Example:** A stacked bar chart. - -.. plot:: mpl_examples/pylab_examples/bar_stacked.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2215,100 +1746,12 @@ ax.hold(washold) return ret +if Axes.bar.__doc__ is not None: + bar.__doc__ = dedent(Axes.bar.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def barh(bottom, width, height=0.80000000000000004, left=None, hold=None, **kwargs): - """call signature:: - - barh(bottom, width, height=0.8, left=0, **kwargs) - -Make a horizontal bar plot with rectangles bounded by: - - *left*, *left* + *width*, *bottom*, *bottom* + *height* - (left, right, bottom and top edges) - -*bottom*, *width*, *height*, and *left* can be either scalars -or sequences - -Return value is a list of -:class:`matplotlib.patches.Rectangle` instances. - -Required arguments: - - ======== ====================================================== - Argument Description - ======== ====================================================== - *bottom* the vertical positions of the bottom edges of the bars - *width* the lengths of the bars - ======== ====================================================== - -Optional keyword arguments: - - =============== ========================================== - Keyword Description - =============== ========================================== - *height* the heights (thicknesses) of the bars - *left* the x coordinates of the left edges of the - bars - *color* the colors of the bars - *edgecolor* the colors of the bar edges - *linewidth* width of bar edges; None means use default - linewidth; 0 means don't draw edges. - *xerr* if not None, will be used to generate - errorbars on the bar chart - *yerr* if not None, will be used to generate - errorbars on the bar chart - *ecolor* specifies the color of any errorbar - *capsize* (default 3) determines the length in - points of the error bar caps - *align* 'edge' (default) | 'center' - *log* [False|True] False (default) leaves the - horizontal axis as-is; True sets it to log - scale - =============== ========================================== - -Setting *align* = 'edge' aligns bars by their bottom edges in -bottom, while *align* = 'center' interprets these values as -the *y* coordinates of the bar centers. - -The optional arguments *color*, *edgecolor*, *linewidth*, -*xerr*, and *yerr* can be either scalars or sequences of -length equal to the number of bars. This enables you to use -barh as the basis for stacked bar charts, or candlestick -plots. - -other optional kwargs: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2322,77 +1765,12 @@ ax.hold(washold) return ret +if Axes.barh.__doc__ is not None: + barh.__doc__ = dedent(Axes.barh.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def broken_barh(xranges, yrange, hold=None, **kwargs): - """call signature:: - - broken_barh(self, xranges, yrange, **kwargs) - -A collection of horizontal bars spanning *yrange* with a sequence of -*xranges*. - -Required arguments: - - ========= ============================== - Argument Description - ========= ============================== - *xranges* sequence of (*xmin*, *xwidth*) - *yrange* sequence of (*ymin*, *ywidth*) - ========= ============================== - -kwargs are -:class:`matplotlib.collections.BrokenBarHCollection` -properties: - - alpha: float - animated: [True | False] - antialiased or antialiaseds: Boolean or sequence of booleans - array: unknown - axes: an :class:`~matplotlib.axes.Axes` instance - clim: a length 2 sequence of floats - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - cmap: a colormap - color: matplotlib color arg or sequence of rgba tuples - colorbar: unknown - contains: a callable function - edgecolor or edgecolors: matplotlib color arg or sequence of rgba tuples - facecolor or facecolors: matplotlib color arg or sequence of rgba tuples - figure: a :class:`matplotlib.figure.Figure` instance - gid: an id string - label: any string - linestyle or linestyles or dashes: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ] - linewidth or lw or linewidths: float or sequence of floats - lod: [True | False] - norm: unknown - offsets: float or sequence of floats - picker: [None|float|boolean|callable] - pickradius: unknown - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - urls: unknown - visible: [True | False] - zorder: any number - -these can either be a single argument, ie:: - - facecolors = 'black' - -or a sequence of arguments for the various bars, ie:: - - facecolors = ('black', 'red', 'green') - -**Example:** - -.. plot:: mpl_examples/pylab_examples/broken_barh.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2406,55 +1784,12 @@ ax.hold(washold) return ret +if Axes.broken_barh.__doc__ is not None: + broken_barh.__doc__ = dedent(Axes.broken_barh.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, hold=None): - """call signature:: - - boxplot(x, notch=0, sym='+', vert=1, whis=1.5, - positions=None, widths=None) - -Make a box and whisker plot for each column of *x* or each -vector in sequence *x*. The box extends from the lower to -upper quartile values of the data, with a line at the median. -The whiskers extend from the box to show the range of the -data. Flier points are those past the end of the whiskers. - -- *notch* = 0 (default) produces a rectangular box plot. -- *notch* = 1 will produce a notched box plot - -*sym* (default 'b+') is the default symbol for flier points. -Enter an empty string ('') if you don't want to show fliers. - -- *vert* = 1 (default) makes the boxes vertical. -- *vert* = 0 makes horizontal boxes. This seems goofy, but - that's how Matlab did it. - -*whis* (default 1.5) defines the length of the whiskers as -a function of the inner quartile range. They extend to the -most extreme data point within ( ``whis*(75%-25%)`` ) data range. - -*positions* (default 1,2,...,n) sets the horizontal positions of -the boxes. The ticks and limits are automatically set to match -the positions. - -*widths* is either a scalar or a vector and sets the width of -each box. The default is 0.5, or ``0.15*(distance between extreme -positions)`` if that is smaller. - -*x* is an array or a sequence of vectors. - -Returns a dictionary mapping each component of the boxplot -to a list of the :class:`matplotlib.lines.Line2D` -instances created. - -**Example:** - -.. plot:: pyplots/boxplot_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2468,145 +1803,12 @@ ax.hold(washold) return ret +if Axes.boxplot.__doc__ is not None: + boxplot.__doc__ = dedent(Axes.boxplot.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def cohere(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, hold=None, **kwargs): - """call signature:: - - cohere(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) - -cohere the coherence between *x* and *y*. Coherence is the normalized -cross spectral density: - -.. math:: - - C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}P_{yy}} - -Keyword arguments: - - *NFFT*: integer - The number of data points used in each block for the FFT. - Must be even; a power 2 is most efficient. The default value is 256. - - *Fs*: scalar - The sampling frequency (samples per time unit). It is used - to calculate the Fourier frequencies, freqs, in cycles per time - unit. The default value is 2. - - *detrend*: callable - The function applied to each segment before fft-ing, - designed to remove the mean or linear trend. Unlike in - matlab, where the *detrend* parameter is a vector, in - matplotlib is it a function. The :mod:`~matplotlib.pylab` - module defines :func:`~matplotlib.pylab.detrend_none`, - :func:`~matplotlib.pylab.detrend_mean`, and - :func:`~matplotlib.pylab.detrend_linear`, but you can use - a custom function as well. - - *window*: callable or ndarray - A function or a vector of length *NFFT*. To create window - vectors see :func:`window_hanning`, :func:`window_none`, - :func:`numpy.blackman`, :func:`numpy.hamming`, - :func:`numpy.bartlett`, :func:`scipy.signal`, - :func:`scipy.signal.get_window`, etc. The default is - :func:`window_hanning`. If a function is passed as the - argument, it must take a data segment as an argument and - return the windowed version of the segment. - - *noverlap*: integer - The number of points of overlap between blocks. The default value - is 0 (no overlap). - - *pad_to*: integer - The number of points to which the data segment is padded when - performing the FFT. This can be different from *NFFT*, which - specifies the number of data points used. While not increasing - the actual resolution of the psd (the minimum distance between - resolvable peaks), this can give more points in the plot, - allowing for more detail. This corresponds to the *n* parameter - in the call to fft(). The default is None, which sets *pad_to* - equal to *NFFT* - - *sides*: [ 'default' | 'onesided' | 'twosided' ] - Specifies which sides of the PSD to return. Default gives the - default behavior, which returns one-sided for real data and both - for complex data. 'onesided' forces the return of a one-sided PSD, - while 'twosided' forces two-sided. - - *scale_by_freq*: boolean - Specifies whether the resulting density values should be scaled - 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. - - *Fc*: integer - The center frequency of *x* (defaults to 0), which offsets - the x extents of the plot to reflect the frequency range used - when a signal is acquired and then filtered and downsampled to - baseband. - -The return value is a tuple (*Cxy*, *f*), where *f* are the -frequencies of the coherence vector. - -kwargs are applied to the lines. - -References: - - * Bendat & Piersol -- Random Data: Analysis and Measurement - Procedures, John Wiley & Sons (1986) - -kwargs control the :class:`~matplotlib.lines.Line2D` -properties of the coherence plot: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'bevel'] - transform: a :class:`matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - xdata: 1D array - ydata: 1D array - zorder: any number - -**Example:** - -.. plot:: mpl_examples/pylab_examples/cohere_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2620,75 +1822,12 @@ ax.hold(washold) return ret +if Axes.cohere.__doc__ is not None: + cohere.__doc__ = dedent(Axes.cohere.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def clabel(CS, *args, **kwargs): - """call signature:: - - clabel(cs, **kwargs) - -adds labels to line contours in *cs*, where *cs* is a -:class:`~matplotlib.contour.ContourSet` object returned by -contour. - -:: - - clabel(cs, v, **kwargs) - -only labels contours listed in *v*. - -Optional keyword arguments: - - *fontsize*: - See http://matplotlib.sf.net/fonts.html - - *colors*: - - if *None*, the color of each label matches the color of - the corresponding contour - - - if one string color, e.g. *colors* = 'r' or *colors* = - 'red', all labels will be plotted in this color - - - if a tuple of matplotlib color args (string, float, rgb, etc), - different labels will be plotted in different colors in the order - specified - - *inline*: - controls whether the underlying contour is removed or - not. Default is *True*. - - *inline_spacing*: - space in pixels to leave on each side of label when - placing inline. Defaults to 5. This spacing will be - exact for labels at locations where the contour is - straight, less so for labels on curved contours. - - *fmt*: - a format string for the label. Default is '%1.3f' - Alternatively, this can be a dictionary matching contour - levels with arbitrary strings to use for each contour level - (i.e., fmt[level]=string) - - *manual*: - if *True*, contour labels will be placed manually using - mouse clicks. Click the first button near a contour to - add a label, click the second button (or potentially both - mouse buttons at once) to finish adding labels. The third - button can be used to remove the last label added, but - only if labels are not inline. Alternatively, the keyboard - can be used to select label locations (enter to end label - placement, delete or backspace act like the third mouse button, - and any other key will select a label location). - - *rightside_up*: - if *True* (default), label rotations will always be plus - or minus 90 degrees from level. - -.. plot:: mpl_examples/pylab_examples/contour_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2702,172 +1841,12 @@ ax.hold(washold) return ret +if Axes.clabel.__doc__ is not None: + clabel.__doc__ = dedent(Axes.clabel.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def contour(*args, **kwargs): - """:func:`~matplotlib.pyplot.contour` and -:func:`~matplotlib.pyplot.contourf` draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions. - -:func:`~matplotlib.pyplot.contourf` differs from the Matlab -(TM) version in that it does not draw the polygon edges, -because the contouring engine yields simply connected regions -with branch cuts. To draw the edges, add line contours with -calls to :func:`~matplotlib.pyplot.contour`. - - -call signatures:: - - contour(Z) - -make a contour plot of an array *Z*. The level values are chosen -automatically. - -:: - - contour(X,Y,Z) - -*X*, *Y* specify the (*x*, *y*) coordinates of the surface - -:: - - contour(Z,N) - contour(X,Y,Z,N) - -contour *N* automatically-chosen levels. - -:: - - contour(Z,V) - contour(X,Y,Z,V) - -draw contour lines at the values specified in sequence *V* - -:: - - contourf(..., V) - -fill the (len(*V*)-1) regions between the values in *V* - -:: - - contour(Z, **kwargs) - -Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details. - -*X*, *Y*, and *Z* must be arrays with the same dimensions. - -*Z* may be a masked array, but filled contouring may not -handle internal masked regions correctly. - -``C = contour(...)`` returns a -:class:`~matplotlib.contour.ContourSet` object. - -Optional keyword arguments: - - *colors*: [ None | string | (mpl_colors) ] - If *None*, the colormap specified by cmap will be used. - - If a string, like 'r' or 'red', all levels will be plotted in this - color. - - If a tuple of matplotlib color args (string, float, rgb, etc), - different levels will be plotted in different colors in the order - specified. - - *alpha*: float - The alpha blending value - - *cmap*: [ None | Colormap ] - A cm :class:`~matplotlib.cm.Colormap` instance or - *None*. If *cmap* is *None* and *colors* is *None*, a - default Colormap is used. - - *norm*: [ None | Normalize ] - A :class:`matplotlib.colors.Normalize` instance for - scaling data values to colors. If *norm* is *None* and - *colors* is *None*, the default linear scaling is used. - - *origin*: [ None | 'upper' | 'lower' | 'image' ] - If *None*, the first value of *Z* will correspond to the - lower left corner, location (0,0). If 'image', the rc - value for ``image.origin`` will be used. - - This keyword is not active if *X* and *Y* are specified in - the call to contour. - - *extent*: [ None | (x0,x1,y0,y1) ] - - If *origin* is not *None*, then *extent* is interpreted as - in :func:`matplotlib.pyplot.imshow`: it gives the outer - pixel boundaries. In this case, the position of Z[0,0] - is the center of the pixel, not a corner. If *origin* is - *None*, then (*x0*, *y0*) is the position of Z[0,0], and - (*x1*, *y1*) is the position of Z[-1,-1]. - - This keyword is not active if *X* and *Y* are specified in - the call to contour. - - *locator*: [ None | ticker.Locator subclass ] - If *locator* is None, the default - :class:`~matplotlib.ticker.MaxNLocator` is used. The - locator is used to determine the cont... [truncated message content]
Revision: 7338 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7338&view=rev Author: jouni Date: 2009年08月03日 19:41:32 +0000 (2009年8月03日) Log Message: ----------- Fixed boilerplate.py so it doesn't break the ReST docs. Modified Paths: -------------- branches/v0_99_maint/CHANGELOG branches/v0_99_maint/boilerplate.py branches/v0_99_maint/lib/matplotlib/pyplot.py Modified: branches/v0_99_maint/CHANGELOG =================================================================== --- branches/v0_99_maint/CHANGELOG 2009年08月03日 19:31:05 UTC (rev 7337) +++ branches/v0_99_maint/CHANGELOG 2009年08月03日 19:41:32 UTC (rev 7338) @@ -1,3 +1,5 @@ +2009年08月03日 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS + ====================================================================== 2009年07月31日 Tagging 0.99.0.rc1 at 7314 - MGD Modified: branches/v0_99_maint/boilerplate.py =================================================================== --- branches/v0_99_maint/boilerplate.py 2009年08月03日 19:31:05 UTC (rev 7337) +++ branches/v0_99_maint/boilerplate.py 2009年08月03日 19:41:32 UTC (rev 7338) @@ -21,7 +21,6 @@ # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def %(func)s(%(argspec)s): - %(docstring)s %(ax)s = gca() # allow callers to override the hold state by passing hold=True|False %(washold)s = %(ax)s.ishold() @@ -35,16 +34,19 @@ %(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 def %(func)s(%(argspec)s): - %(docstring)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 @@ -138,19 +140,6 @@ """ return '\n'.join(x.rstrip() for x in string.split('\n')) -def make_docstring(cmd, mention_hold): - func = getattr(Axes, cmd) - docstring = inspect.getdoc(func) - if docstring is None: - return "" - escaped = re.sub(r'\\', r'\\\\', docstring) - if mention_hold: - escaped += ''' - -Additional kwargs: hold = [True|False] overrides default hold state -''' - return '"""'+escaped+'"""' - for fmt,cmdlist in (_fmtplot,_plotcommands),(_fmtmisc,_misccommands): for func in cmdlist: # For some commands, an additional line is needed to set the @@ -160,9 +149,6 @@ else: mappable = '' - # Format docstring - docstring = make_docstring(func, fmt is _fmtplot) - # Get argspec of wrapped function args, varargs, varkw, defaults = inspect.getargspec(getattr(Axes, func)) args.pop(0) # remove 'self' argument Modified: branches/v0_99_maint/lib/matplotlib/pyplot.py =================================================================== --- branches/v0_99_maint/lib/matplotlib/pyplot.py 2009年08月03日 19:31:05 UTC (rev 7337) +++ branches/v0_99_maint/lib/matplotlib/pyplot.py 2009年08月03日 19:41:32 UTC (rev 7338) @@ -1608,72 +1608,17 @@ draw_if_interactive() +# This is added to docstrings of autogenerated plotting functions +__docstring_addendum = """ + +Additional kwargs: hold = [True|False] overrides default hold state""" + ## Plotting part 2: autogenerated wrappers for axes methods ## # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def acorr(x, hold=None, **kwargs): - """call signature:: - - acorr(x, normed=True, detrend=mlab.detrend_none, usevlines=True, - maxlags=10, **kwargs) - -Plot the autocorrelation of *x*. If *normed* = *True*, -normalize the data by the autocorrelation at 0-th lag. *x* is -detrended by the *detrend* callable (default no normalization). - -Data are plotted as ``plot(lags, c, **kwargs)`` - -Return value is a tuple (*lags*, *c*, *line*) where: - - - *lags* are a length 2*maxlags+1 lag vector - - - *c* is the 2*maxlags+1 auto correlation vector - - - *line* is a :class:`~matplotlib.lines.Line2D` instance - returned by :meth:`plot` - -The default *linestyle* is None and the default *marker* is -``'o'``, though these can be overridden with keyword args. -The cross correlation is performed with -:func:`numpy.correlate` with *mode* = 2. - -If *usevlines* is *True*, :meth:`~matplotlib.axes.Axes.vlines` -rather than :meth:`~matplotlib.axes.Axes.plot` is used to draw -vertical lines from the origin to the acorr. Otherwise, the -plot style is determined by the kwargs, which are -:class:`~matplotlib.lines.Line2D` properties. - -*maxlags* is a positive integer detailing the number of lags -to show. The default value of *None* will return all -:math:`2 \\mathrm{len}(x) - 1` lags. - -The return value is a tuple (*lags*, *c*, *linecol*, *b*) -where - -- *linecol* is the - :class:`~matplotlib.collections.LineCollection` - -- *b* is the *x*-axis. - -.. seealso:: - - :meth:`~matplotlib.axes.Axes.plot` or - :meth:`~matplotlib.axes.Axes.vlines` - For documentation on valid kwargs. - -**Example:** - -:func:`~matplotlib.pyplot.xcorr` above, and -:func:`~matplotlib.pyplot.acorr` below. - -**Example:** - -.. plot:: mpl_examples/pylab_examples/xcorr_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1687,51 +1632,12 @@ ax.hold(washold) return ret +if Axes.acorr.__doc__ is not None: + acorr.__doc__ = dedent(Axes.acorr.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def arrow(x, y, dx, dy, hold=None, **kwargs): - """call signature:: - - arrow(x, y, dx, dy, **kwargs) - -Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*, -*y* + *dy*). - -Optional kwargs control the arrow properties: - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -**Example:** - -.. plot:: mpl_examples/pylab_examples/arrow_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1745,90 +1651,12 @@ ax.hold(washold) return ret +if Axes.arrow.__doc__ is not None: + arrow.__doc__ = dedent(Axes.arrow.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs): - """call signature:: - - axhline(y=0, xmin=0, xmax=1, **kwargs) - -Axis Horizontal Line - -Draw a horizontal line at *y* from *xmin* to *xmax*. With the -default values of *xmin* = 0 and *xmax* = 1, this line will -always span the horizontal extent of the axes, regardless of -the xlim settings, even if you change them, eg. with the -:meth:`set_xlim` command. That is, the horizontal extent is -in axes coords: 0=left, 0.5=middle, 1.0=right but the *y* -location is in data coordinates. - -Return value is the :class:`~matplotlib.lines.Line2D` -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. Eg., - -* draw a thick red hline at *y* = 0 that spans the xrange - - >>> axhline(linewidth=4, color='r') - -* draw a default hline at *y* = 1 that spans the xrange - - >>> axhline(y=1) - -* draw a default hline at *y* = .5 that spans the the middle half of - the xrange - - >>> axhline(y=.5, xmin=0.25, xmax=0.75) - -Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'bevel'] - transform: a :class:`matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - xdata: 1D array - ydata: 1D array - zorder: any number - -.. seealso:: - - :meth:`axhspan` - for example plot and source code - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1842,72 +1670,12 @@ ax.hold(washold) return ret +if Axes.axhline.__doc__ is not None: + axhline.__doc__ = dedent(Axes.axhline.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs): - """call signature:: - - axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs) - -Axis Horizontal Span. - -*y* coords are in data units and *x* coords are in axes (relative -0-1) units. - -Draw a horizontal span (rectangle) from *ymin* to *ymax*. -With the default values of *xmin* = 0 and *xmax* = 1, this -always spans the xrange, regardless of the xlim settings, even -if you change them, eg. with the :meth:`set_xlim` command. -That is, the horizontal extent is in axes coords: 0=left, -0.5=middle, 1.0=right but the *y* location is in data -coordinates. - -Return value is a :class:`matplotlib.patches.Polygon` -instance. - -Examples: - -* draw a gray rectangle from *y* = 0.25-0.75 that spans the - horizontal extent of the axes - - >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5) - -Valid kwargs are :class:`~matplotlib.patches.Polygon` properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -**Example:** - -.. plot:: mpl_examples/pylab_examples/axhspan_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -1921,90 +1689,12 @@ ax.hold(washold) return ret +if Axes.axhspan.__doc__ is not None: + axhspan.__doc__ = dedent(Axes.axhspan.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs): - """call signature:: - - axvline(x=0, ymin=0, ymax=1, **kwargs) - -Axis Vertical Line - -Draw a vertical line at *x* from *ymin* to *ymax*. With the -default values of *ymin* = 0 and *ymax* = 1, this line will -always span the vertical extent of the axes, regardless of the -ylim settings, even if you change them, eg. with the -:meth:`set_ylim` command. That is, the vertical extent is in -axes coords: 0=bottom, 0.5=middle, 1.0=top but the *x* location -is in data coordinates. - -Return value is the :class:`~matplotlib.lines.Line2D` -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. Eg., - -* draw a thick red vline at *x* = 0 that spans the yrange - - >>> axvline(linewidth=4, color='r') - -* draw a default vline at *x* = 1 that spans the yrange - - >>> axvline(x=1) - -* draw a default vline at *x* = .5 that spans the the middle half of - the yrange - - >>> axvline(x=.5, ymin=0.25, ymax=0.75) - -Valid kwargs are :class:`~matplotlib.lines.Line2D` properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'bevel'] - transform: a :class:`matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - xdata: 1D array - ydata: 1D array - zorder: any number - -.. seealso:: - - :meth:`axhspan` - for example plot and source code - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2018,73 +1708,12 @@ ax.hold(washold) return ret +if Axes.axvline.__doc__ is not None: + axvline.__doc__ = dedent(Axes.axvline.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs): - """call signature:: - - axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs) - -Axis Vertical Span. - -*x* coords are in data units and *y* coords are in axes (relative -0-1) units. - -Draw a vertical span (rectangle) from *xmin* to *xmax*. With -the default values of *ymin* = 0 and *ymax* = 1, this always -spans the yrange, regardless of the ylim settings, even if you -change them, eg. with the :meth:`set_ylim` command. That is, -the vertical extent is in axes coords: 0=bottom, 0.5=middle, -1.0=top but the *y* location is in data coordinates. - -Return value is the :class:`matplotlib.patches.Polygon` -instance. - -Examples: - -* draw a vertical green translucent rectangle from x=1.25 to 1.55 that - spans the yrange of the axes - - >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5) - -Valid kwargs are :class:`~matplotlib.patches.Polygon` -properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -.. seealso:: - - :meth:`axhspan` - for example plot and source code - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2098,110 +1727,12 @@ ax.hold(washold) return ret +if Axes.axvspan.__doc__ is not None: + axvspan.__doc__ = dedent(Axes.axvspan.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def bar(left, height, width=0.80000000000000004, bottom=None, color=None, edgecolor=None, linewidth=None, yerr=None, xerr=None, ecolor=None, capsize=3, align='edge', orientation='vertical', log=False, hold=None, **kwargs): - """call signature:: - - bar(left, height, width=0.8, bottom=0, - color=None, edgecolor=None, linewidth=None, - yerr=None, xerr=None, ecolor=None, capsize=3, - align='edge', orientation='vertical', log=False) - -Make a bar plot with rectangles bounded by: - - *left*, *left* + *width*, *bottom*, *bottom* + *height* - (left, right, bottom and top edges) - -*left*, *height*, *width*, and *bottom* can be either scalars -or sequences - -Return value is a list of -:class:`matplotlib.patches.Rectangle` instances. - -Required arguments: - - ======== =============================================== - Argument Description - ======== =============================================== - *left* the x coordinates of the left sides of the bars - *height* the heights of the bars - ======== =============================================== - -Optional keyword arguments: - - =============== ========================================== - Keyword Description - =============== ========================================== - *width* the widths of the bars - *bottom* the y coordinates of the bottom edges of - the bars - *color* the colors of the bars - *edgecolor* the colors of the bar edges - *linewidth* width of bar edges; None means use default - linewidth; 0 means don't draw edges. - *xerr* if not None, will be used to generate - errorbars on the bar chart - *yerr* if not None, will be used to generate - errorbars on the bar chart - *ecolor* specifies the color of any errorbar - *capsize* (default 3) determines the length in - points of the error bar caps - *align* 'edge' (default) | 'center' - *orientation* 'vertical' | 'horizontal' - *log* [False|True] False (default) leaves the - orientation axis as-is; True sets it to - log scale - =============== ========================================== - -For vertical bars, *align* = 'edge' aligns bars by their left -edges in left, while *align* = 'center' interprets these -values as the *x* coordinates of the bar centers. For -horizontal bars, *align* = 'edge' aligns bars by their bottom -edges in bottom, while *align* = 'center' interprets these -values as the *y* coordinates of the bar centers. - -The optional arguments *color*, *edgecolor*, *linewidth*, -*xerr*, and *yerr* can be either scalars or sequences of -length equal to the number of bars. This enables you to use -bar as the basis for stacked bar charts, or candlestick plots. - -Other optional kwargs: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -**Example:** A stacked bar chart. - -.. plot:: mpl_examples/pylab_examples/bar_stacked.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2215,100 +1746,12 @@ ax.hold(washold) return ret +if Axes.bar.__doc__ is not None: + bar.__doc__ = dedent(Axes.bar.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def barh(bottom, width, height=0.80000000000000004, left=None, hold=None, **kwargs): - """call signature:: - - barh(bottom, width, height=0.8, left=0, **kwargs) - -Make a horizontal bar plot with rectangles bounded by: - - *left*, *left* + *width*, *bottom*, *bottom* + *height* - (left, right, bottom and top edges) - -*bottom*, *width*, *height*, and *left* can be either scalars -or sequences - -Return value is a list of -:class:`matplotlib.patches.Rectangle` instances. - -Required arguments: - - ======== ====================================================== - Argument Description - ======== ====================================================== - *bottom* the vertical positions of the bottom edges of the bars - *width* the lengths of the bars - ======== ====================================================== - -Optional keyword arguments: - - =============== ========================================== - Keyword Description - =============== ========================================== - *height* the heights (thicknesses) of the bars - *left* the x coordinates of the left edges of the - bars - *color* the colors of the bars - *edgecolor* the colors of the bar edges - *linewidth* width of bar edges; None means use default - linewidth; 0 means don't draw edges. - *xerr* if not None, will be used to generate - errorbars on the bar chart - *yerr* if not None, will be used to generate - errorbars on the bar chart - *ecolor* specifies the color of any errorbar - *capsize* (default 3) determines the length in - points of the error bar caps - *align* 'edge' (default) | 'center' - *log* [False|True] False (default) leaves the - horizontal axis as-is; True sets it to log - scale - =============== ========================================== - -Setting *align* = 'edge' aligns bars by their bottom edges in -bottom, while *align* = 'center' interprets these values as -the *y* coordinates of the bar centers. - -The optional arguments *color*, *edgecolor*, *linewidth*, -*xerr*, and *yerr* can be either scalars or sequences of -length equal to the number of bars. This enables you to use -barh as the basis for stacked bar charts, or candlestick -plots. - -other optional kwargs: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] or None for default - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color: matplotlib color arg or sequence of rgba tuples - contains: a callable function - edgecolor or ec: mpl color spec, or None for default, or 'none' for no color - facecolor or fc: mpl color spec, or None for default, or 'none' for no color - figure: a :class:`matplotlib.figure.Figure` instance - fill: [True | False] - gid: an id string - hatch: [ '/' | '\\\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ] - label: any string - linestyle or ls: ['solid' | 'dashed' | 'dashdot' | 'dotted'] - linewidth or lw: float or None for default - lod: [True | False] - picker: [None|float|boolean|callable] - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - zorder: any number - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2322,77 +1765,12 @@ ax.hold(washold) return ret +if Axes.barh.__doc__ is not None: + barh.__doc__ = dedent(Axes.barh.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def broken_barh(xranges, yrange, hold=None, **kwargs): - """call signature:: - - broken_barh(self, xranges, yrange, **kwargs) - -A collection of horizontal bars spanning *yrange* with a sequence of -*xranges*. - -Required arguments: - - ========= ============================== - Argument Description - ========= ============================== - *xranges* sequence of (*xmin*, *xwidth*) - *yrange* sequence of (*ymin*, *ywidth*) - ========= ============================== - -kwargs are -:class:`matplotlib.collections.BrokenBarHCollection` -properties: - - alpha: float - animated: [True | False] - antialiased or antialiaseds: Boolean or sequence of booleans - array: unknown - axes: an :class:`~matplotlib.axes.Axes` instance - clim: a length 2 sequence of floats - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - cmap: a colormap - color: matplotlib color arg or sequence of rgba tuples - colorbar: unknown - contains: a callable function - edgecolor or edgecolors: matplotlib color arg or sequence of rgba tuples - facecolor or facecolors: matplotlib color arg or sequence of rgba tuples - figure: a :class:`matplotlib.figure.Figure` instance - gid: an id string - label: any string - linestyle or linestyles or dashes: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ] - linewidth or lw or linewidths: float or sequence of floats - lod: [True | False] - norm: unknown - offsets: float or sequence of floats - picker: [None|float|boolean|callable] - pickradius: unknown - rasterized: [True | False | None] - snap: unknown - transform: :class:`~matplotlib.transforms.Transform` instance - url: a url string - urls: unknown - visible: [True | False] - zorder: any number - -these can either be a single argument, ie:: - - facecolors = 'black' - -or a sequence of arguments for the various bars, ie:: - - facecolors = ('black', 'red', 'green') - -**Example:** - -.. plot:: mpl_examples/pylab_examples/broken_barh.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2406,55 +1784,12 @@ ax.hold(washold) return ret +if Axes.broken_barh.__doc__ is not None: + broken_barh.__doc__ = dedent(Axes.broken_barh.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def boxplot(x, notch=0, sym='b+', vert=1, whis=1.5, positions=None, widths=None, hold=None): - """call signature:: - - boxplot(x, notch=0, sym='+', vert=1, whis=1.5, - positions=None, widths=None) - -Make a box and whisker plot for each column of *x* or each -vector in sequence *x*. The box extends from the lower to -upper quartile values of the data, with a line at the median. -The whiskers extend from the box to show the range of the -data. Flier points are those past the end of the whiskers. - -- *notch* = 0 (default) produces a rectangular box plot. -- *notch* = 1 will produce a notched box plot - -*sym* (default 'b+') is the default symbol for flier points. -Enter an empty string ('') if you don't want to show fliers. - -- *vert* = 1 (default) makes the boxes vertical. -- *vert* = 0 makes horizontal boxes. This seems goofy, but - that's how Matlab did it. - -*whis* (default 1.5) defines the length of the whiskers as -a function of the inner quartile range. They extend to the -most extreme data point within ( ``whis*(75%-25%)`` ) data range. - -*positions* (default 1,2,...,n) sets the horizontal positions of -the boxes. The ticks and limits are automatically set to match -the positions. - -*widths* is either a scalar or a vector and sets the width of -each box. The default is 0.5, or ``0.15*(distance between extreme -positions)`` if that is smaller. - -*x* is an array or a sequence of vectors. - -Returns a dictionary mapping each component of the boxplot -to a list of the :class:`matplotlib.lines.Line2D` -instances created. - -**Example:** - -.. plot:: pyplots/boxplot_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2468,145 +1803,12 @@ ax.hold(washold) return ret +if Axes.boxplot.__doc__ is not None: + boxplot.__doc__ = dedent(Axes.boxplot.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def cohere(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, hold=None, **kwargs): - """call signature:: - - cohere(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) - -cohere the coherence between *x* and *y*. Coherence is the normalized -cross spectral density: - -.. math:: - - C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}P_{yy}} - -Keyword arguments: - - *NFFT*: integer - The number of data points used in each block for the FFT. - Must be even; a power 2 is most efficient. The default value is 256. - - *Fs*: scalar - The sampling frequency (samples per time unit). It is used - to calculate the Fourier frequencies, freqs, in cycles per time - unit. The default value is 2. - - *detrend*: callable - The function applied to each segment before fft-ing, - designed to remove the mean or linear trend. Unlike in - matlab, where the *detrend* parameter is a vector, in - matplotlib is it a function. The :mod:`~matplotlib.pylab` - module defines :func:`~matplotlib.pylab.detrend_none`, - :func:`~matplotlib.pylab.detrend_mean`, and - :func:`~matplotlib.pylab.detrend_linear`, but you can use - a custom function as well. - - *window*: callable or ndarray - A function or a vector of length *NFFT*. To create window - vectors see :func:`window_hanning`, :func:`window_none`, - :func:`numpy.blackman`, :func:`numpy.hamming`, - :func:`numpy.bartlett`, :func:`scipy.signal`, - :func:`scipy.signal.get_window`, etc. The default is - :func:`window_hanning`. If a function is passed as the - argument, it must take a data segment as an argument and - return the windowed version of the segment. - - *noverlap*: integer - The number of points of overlap between blocks. The default value - is 0 (no overlap). - - *pad_to*: integer - The number of points to which the data segment is padded when - performing the FFT. This can be different from *NFFT*, which - specifies the number of data points used. While not increasing - the actual resolution of the psd (the minimum distance between - resolvable peaks), this can give more points in the plot, - allowing for more detail. This corresponds to the *n* parameter - in the call to fft(). The default is None, which sets *pad_to* - equal to *NFFT* - - *sides*: [ 'default' | 'onesided' | 'twosided' ] - Specifies which sides of the PSD to return. Default gives the - default behavior, which returns one-sided for real data and both - for complex data. 'onesided' forces the return of a one-sided PSD, - while 'twosided' forces two-sided. - - *scale_by_freq*: boolean - Specifies whether the resulting density values should be scaled - 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. - - *Fc*: integer - The center frequency of *x* (defaults to 0), which offsets - the x extents of the plot to reflect the frequency range used - when a signal is acquired and then filtered and downsampled to - baseband. - -The return value is a tuple (*Cxy*, *f*), where *f* are the -frequencies of the coherence vector. - -kwargs are applied to the lines. - -References: - - * Bendat & Piersol -- Random Data: Analysis and Measurement - Procedures, John Wiley & Sons (1986) - -kwargs control the :class:`~matplotlib.lines.Line2D` -properties of the coherence plot: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'bevel'] - transform: a :class:`matplotlib.transforms.Transform` instance - url: a url string - visible: [True | False] - xdata: 1D array - ydata: 1D array - zorder: any number - -**Example:** - -.. plot:: mpl_examples/pylab_examples/cohere_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2620,75 +1822,12 @@ ax.hold(washold) return ret +if Axes.cohere.__doc__ is not None: + cohere.__doc__ = dedent(Axes.cohere.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def clabel(CS, *args, **kwargs): - """call signature:: - - clabel(cs, **kwargs) - -adds labels to line contours in *cs*, where *cs* is a -:class:`~matplotlib.contour.ContourSet` object returned by -contour. - -:: - - clabel(cs, v, **kwargs) - -only labels contours listed in *v*. - -Optional keyword arguments: - - *fontsize*: - See http://matplotlib.sf.net/fonts.html - - *colors*: - - if *None*, the color of each label matches the color of - the corresponding contour - - - if one string color, e.g. *colors* = 'r' or *colors* = - 'red', all labels will be plotted in this color - - - if a tuple of matplotlib color args (string, float, rgb, etc), - different labels will be plotted in different colors in the order - specified - - *inline*: - controls whether the underlying contour is removed or - not. Default is *True*. - - *inline_spacing*: - space in pixels to leave on each side of label when - placing inline. Defaults to 5. This spacing will be - exact for labels at locations where the contour is - straight, less so for labels on curved contours. - - *fmt*: - a format string for the label. Default is '%1.3f' - Alternatively, this can be a dictionary matching contour - levels with arbitrary strings to use for each contour level - (i.e., fmt[level]=string) - - *manual*: - if *True*, contour labels will be placed manually using - mouse clicks. Click the first button near a contour to - add a label, click the second button (or potentially both - mouse buttons at once) to finish adding labels. The third - button can be used to remove the last label added, but - only if labels are not inline. Alternatively, the keyboard - can be used to select label locations (enter to end label - placement, delete or backspace act like the third mouse button, - and any other key will select a label location). - - *rightside_up*: - if *True* (default), label rotations will always be plus - or minus 90 degrees from level. - -.. plot:: mpl_examples/pylab_examples/contour_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2702,172 +1841,12 @@ ax.hold(washold) return ret +if Axes.clabel.__doc__ is not None: + clabel.__doc__ = dedent(Axes.clabel.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def contour(*args, **kwargs): - """:func:`~matplotlib.pyplot.contour` and -:func:`~matplotlib.pyplot.contourf` draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions. - -:func:`~matplotlib.pyplot.contourf` differs from the Matlab -(TM) version in that it does not draw the polygon edges, -because the contouring engine yields simply connected regions -with branch cuts. To draw the edges, add line contours with -calls to :func:`~matplotlib.pyplot.contour`. - - -call signatures:: - - contour(Z) - -make a contour plot of an array *Z*. The level values are chosen -automatically. - -:: - - contour(X,Y,Z) - -*X*, *Y* specify the (*x*, *y*) coordinates of the surface - -:: - - contour(Z,N) - contour(X,Y,Z,N) - -contour *N* automatically-chosen levels. - -:: - - contour(Z,V) - contour(X,Y,Z,V) - -draw contour lines at the values specified in sequence *V* - -:: - - contourf(..., V) - -fill the (len(*V*)-1) regions between the values in *V* - -:: - - contour(Z, **kwargs) - -Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details. - -*X*, *Y*, and *Z* must be arrays with the same dimensions. - -*Z* may be a masked array, but filled contouring may not -handle internal masked regions correctly. - -``C = contour(...)`` returns a -:class:`~matplotlib.contour.ContourSet` object. - -Optional keyword arguments: - - *colors*: [ None | string | (mpl_colors) ] - If *None*, the colormap specified by cmap will be used. - - If a string, like 'r' or 'red', all levels will be plotted in this - color. - - If a tuple of matplotlib color args (string, float, rgb, etc), - different levels will be plotted in different colors in the order - specified. - - *alpha*: float - The alpha blending value - - *cmap*: [ None | Colormap ] - A cm :class:`~matplotlib.cm.Colormap` instance or - *None*. If *cmap* is *None* and *colors* is *None*, a - default Colormap is used. - - *norm*: [ None | Normalize ] - A :class:`matplotlib.colors.Normalize` instance for - scaling data values to colors. If *norm* is *None* and - *colors* is *None*, the default linear scaling is used. - - *origin*: [ None | 'upper' | 'lower' | 'image' ] - If *None*, the first value of *Z* will correspond to the - lower left corner, location (0,0). If 'image', the rc - value for ``image.origin`` will be used. - - This keyword is not active if *X* and *Y* are specified in - the call to contour. - - *extent*: [ None | (x0,x1,y0,y1) ] - - If *origin* is not *None*, then *extent* is interpreted as - in :func:`matplotlib.pyplot.imshow`: it gives the outer - pixel boundaries. In this case, the position of Z[0,0] - is the center of the pixel, not a corner. If *origin* is - *None*, then (*x0*, *y0*) is the position of Z[0,0], and - (*x1*, *y1*) is the position of Z[-1,-1]. - - This keyword is not active if *X* and *Y* are specified in - the call to contour. - - *locator*: [ None | ticker.Locator subclass ] - If *locator* is None, the default - :class:`~matplotlib.ticker.MaxNLocator` is used. The - locator is used to determine the contour levels if they - are not given explicitly via the *V* argument. - - *extend*: [ 'neither' | 'both' | 'min' | 'max' ] - Unless this is 'neither', contour levels are automatically - added to one or both ends of the range so that all data - are included. These added ranges are then mapped to the - special colormap values which default to the ends of the - colormap range, but can be set via - :meth:`matplotlib.cm.Colormap.set_under` and - :meth:`matplotlib.cm.Colormap.set_over` methods. - -contour-only keyword arguments: - - *linewidths*: [ None | number | tuple of numbers ] - If *linewidths* is *None*, the default width in - ``lines.linewidth`` in ``matplotlibrc`` is used. - - If a number, all levels will be plotted with this linewidth. - - If a tuple, different levels will be plotted with different - linewidths in the order specified - - *linestyles*: [None | 'solid' | 'dashed' | 'dashdot' | 'dotted' ] - If *linestyles* is *None*, the 'solid' is used. - - *linestyles* can also be an iterable of the above strings - specifying a set of linestyles to be used. If this - iterable is shorter than the number of contour levels - it will be repeated as necessary. - - If contour is using a monochrome colormap and the contour - level is less than 0, then the linestyle specified - in ``contour.negative_linestyle`` in ``matplotlibrc`` - will be used. - -contourf-only keyword arguments: - - *antialiased*: [ True | False ] - enable antialiasing - - *nchunk*: [ 0 | integer ] - If 0, no subdivision of the domain. Specify a positive integer to - divide the domain into subdomains of roughly *nchunk* by *nchunk* - points. This may never actually be advantageous, so this option may - be removed. Chunking introduces artifacts at the chunk boundaries - unless *antialiased* is *False*. - -**Example:** - -.. plot:: mpl_examples/pylab_examples/contour_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -2881,172 +1860,12 @@ ax.hold(washold) if ret._A is not None: gci._current = ret return ret +if Axes.contour.__doc__ is not None: + contour.__doc__ = dedent(Axes.contour.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def contourf(*args, **kwargs): - """:func:`~matplotlib.pyplot.contour` and -:func:`~matplotlib.pyplot.contourf` draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions. - -:func:`~matplotlib.pyplot.contourf` differs from the Matlab -(TM) version in that it does not draw the polygon edges, -because the contouring engine yields simply connected regions -with branch cuts. To draw the edges, add line contours with -calls to :func:`~matplotlib.pyplot.contour`. - - -call signatures:: - - contour(Z) - -make a contour plot of an array *Z*. The level values are chosen -automatically. - -:: - - contour(X,Y,Z) - -*X*, *Y* specify the (*x*, *y*) coordinates of the surface - -:: - - contour(Z,N) - contour(X,Y,Z,N) - -contour *N* automatically-chosen levels. - -:: - - contour(Z,V) - contour(X,Y,Z,V) - -draw contour lines at the values specified in sequence *V* - -:: - - contourf(..., V) - -fill the (len(*V*)-1) regions between the values in *V* - -:: - - contour(Z, **kwargs) - -Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details. - -*X*, *Y*, and *Z* must be arrays with the same dimensions. - -*Z* may be a masked array, but filled contouring may not -handle internal masked regions correctly. - -``C = contour(...)`` returns a -:class:`~matplotlib.contour.ContourSet` object. - -Optional keyword arguments: - - *colors*: [ None | string | (mpl_colors) ] - If *None*, the colormap specified by cmap will be used. - - If a string, like 'r' or 'red', all levels will be plotted in this - color. - - If a tuple of matplotlib color args (string, float, rgb, etc), - different levels will be plotted in different colors in the order - specified. - - *alpha*: float - The alpha blending value - - *cmap*: [ None | Colormap ] - A cm :class:`~matplotlib.cm.Colormap` instance or - *None*. If *cmap* is *None* and *colors* is *None*, a - default Colormap is used. - - *norm*: [ None | Normalize ] - A :class:`matplotlib.colors.Normalize` instance for - scaling data values to colors. If *norm* is *None* and - *colors* is *None*, the default linear scaling is used. - - *origin*: [ None | 'upper' | 'lower' | 'image' ] - If *None*, the first value of *Z* will correspond to the - lower left corner, location (0,0). If 'image', the rc - value for ``image.origin`` will be used. - - This keyword is not active if *X* and *Y* are specified in - the call to contour. - - *extent*: [ None | (x0,x1,y0,y1) ] - - If *origin* is not *None*, then *extent* is interpreted as - in :func:`matplotlib.pyplot.imshow`: it gives the outer - pixel boundaries. In this case, the position of Z[0,0] - is the center of the pixel, not a corner. If *origin* is - *None*, then (*x0*, *y0*) is the position of Z[0,0], and - (*x1*, *y1*) is the position of Z[-1,-1]. - - This keyword is not active if *X* and *Y* are specified in - the call to contour. - - *locator*: [ None | ticker.Locator subclass ] - If *locator* is None, the default - :class:`~matplotlib.ticker.MaxNLocator` is used. The - locator is used to determine the contour levels if they - are not given explicitly via the *V* argument. - - *extend*: [ 'neither' | 'both' | 'min' | 'max' ] - Unless this is 'neither', contour levels are automatically - added to one or both ends of the range so that all data - are included. These added ranges are then mapped to the - special colormap values which default to the ends of the - colormap range, but can be set via - :meth:`matplotlib.cm.Colormap.set_under` and - :meth:`matplotlib.cm.Colormap.set_over` methods. - -contour-only keyword arguments: - - *linewidths*: [ None | number | tuple of numbers ] - If *linewidths* is *None*, the default width in - ``lines.linewidth`` in ``matplotlibrc`` is used. - - If a number, all levels will be plotted with this linewidth. - - If a tuple, different levels will be plotted with different - linewidths in the order specified - - *linestyles*: [None | 'solid' | 'dashed' | 'dashdot' | 'dotted' ] - If *linestyles* is *None*, the 'solid' is used. - - *linestyles* can also be an iterable of the above strings - specifying a set of linestyles to be used. If this - iterable is shorter than the number of contour levels - it will be repeated as necessary. - - If contour is using a monochrome colormap and the contour - level is less than 0, then the linestyle specified - in ``contour.negative_linestyle`` in ``matplotlibrc`` - will be used. - -contourf-only keyword arguments: - - *antialiased*: [ True | False ] - enable antialiasing - - *nchunk*: [ 0 | integer ] - If 0, no subdivision of the domain. Specify a positive integer to - divide the domain into subdomains of roughly *nchunk* by *nchunk* - points. This may never actually be advantageous, so this option may - be removed. Chunking introduces artifacts at the chunk boundaries - unless *antialiased* is *False*. - -**Example:** - -.. plot:: mpl_examples/pylab_examples/contour_demo.py - -Additional kwargs: hold = [True|False] overrides default hold state -""" ax = gca() # allow callers to override the hold state by passing hold=True|False washold = ax.ishold() @@ -3060,148 +1879,12 @@ ax.hold(washold) if ret._A is not None: gci._current = ret return ret +if Axes.contourf.__doc__ is not None: + contourf.__doc__ = dedent(Axes.contourf.__doc__) + __docstring_addendum # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost def csd(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, hold=None, **kwargs): - """call signature:: - - csd(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) - -The cross spectral density :math:`P_{xy}` by Welch's average -periodogram method. The vectors *x* and *y* are divided into -*NFFT* length segments. Each segment is detrended by function -*detrend* and windowed by function *window*. The product of -the direct FFTs of *x* and *y* are averaged over each segment -to compute :math:`P_{xy}`, with a scaling to correct for power -loss due to windowing. - -Returns the tuple (*Pxy*, *freqs*). *P* is the cross spectrum -(complex valued), and :math:`10\\log_{10}|P_{xy}|` is -plotted. - -Keyword arguments: - - *NFFT*: integer - The number of data points used in each block for the FFT. - Must be even; a power 2 is most efficient. The default value is 256. - - *Fs*: scalar - The sampling frequency (samples per time unit). It is used - to calculate the Fourier frequencies, freqs, in cycles per time - unit. The default value is 2. - - *detrend*: callable - The function applied to each segment before fft-ing, - designed to remove the mean or linear trend. Unlike in - matlab, where the *detrend* parameter is a vector, in - matplotlib is it a function. The :mod:`~matplotlib.pylab` - module defines :func:`~matplotlib.pylab.detrend_none`, - :func:`~matplotlib.pylab.detrend_mean`, and - :func:`~matplotlib.pylab.detrend_linear`, but you can use - a custom function as well. - - *window*: callable or ndarray - A function or a vector of length *NFFT*. To create window - vectors see :func:`window_hanning`, :func:`window_none`, - :func:`numpy.blackman`, :func:`numpy.hamming`, - :func:`numpy.bartlett`, :func:`scipy.signal`, - :func:`scipy.signal.get_window`, etc. The default is - :func:`window_hanning`. If a function is passed as the - argument, it must take a data segment as an argument and - return the windowed version of the segment. - - *noverlap*: integer - The number of points of overlap between blocks. The default value - is 0 (no overlap). - - *pad_to*: integer - The number of points to which the data segment is padded when - performing the FFT. This can be different from *NFFT*, which - specifies the number of data points used. While not increasing - the actual resolution of the psd (the minimum distance between - resolvable peaks), this can give more points in the plot, - allowing for more detail. This corresponds to the *n* parameter - in the call to fft(). The default is None, which sets *pad_to* - equal to *NFFT* - - *sides*: [ 'default' | 'onesided' | 'twosided' ] - Specifies which sides of the PSD to return. Default gives the - default behavior, which returns one-sided for real data and both - for complex data. 'onesided' forces the return of a one-sided PSD, - while 'twosided' forces two-sided. - - *scale_by_freq*: boolean - Specifies whether the resulting density values should be scaled - 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. - - *Fc*: integer - The center frequency of *x* (defaults to 0), which offsets - the x extents of the plot to reflect the frequency range used - when a signal is acquired and then filtered and downsampled to - baseband. - -References: - Bendat & Piersol -- Random Data: Analysis and Measurement - Procedures, John Wiley & Sons (1986) - -kwargs control the Line2D properties: - - alpha: float (0.0 transparent through 1.0 opaque) - animated: [True | False] - antialiased or aa: [True | False] - axes: an :class:`~matplotlib.axes.Axes` instance - clip_box: a :class:`matplotlib.transforms.Bbox` instance - clip_on: [True | False] - clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ] - color or c: any matplotlib color - contains: a callable function - dash_capstyle: ['butt' | 'round' | 'projecting'] - dash_joinstyle: ['miter' | 'round' | 'bevel'] - dashes: sequence of on/off ink in points - data: 2D array - drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] - figure: a :class:`matplotlib.figure.Figure` instance - fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top'] - gid: an id string - label: any string - linestyle or ls: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'. - linewidth or lw: float value in points - lod: [True | False] - marker: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ] - markeredgecolor or mec: any matplotlib color - markeredgewidth or mew: float value in points - markerfacecolor or mfc: any matplotlib color - markersize or ms: float - markevery: None | integer | (startind, stride) - picker: float distance in points or callable pick function ``fn(artist, event)`` - pickradius: float distance in points - rasterized: [True | False | None] - snap: unknown - solid_capstyle: ['butt' | 'round' | 'projecting'] - solid_joinstyle: ['miter' | 'round' | 'be... [truncated message content]
Revision: 7337 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7337&view=rev Author: jdh2358 Date: 2009年08月03日 19:31:05 +0000 (2009年8月03日) Log Message: ----------- removed a couple of cases of mlab.load Modified Paths: -------------- branches/v0_99_maint/doc/_templates/indexsidebar.html branches/v0_99_maint/doc/api/spine_api.rst branches/v0_99_maint/doc/pyplots/plotmap.py branches/v0_99_maint/examples/pylab_examples/load_converter.py Modified: branches/v0_99_maint/doc/_templates/indexsidebar.html =================================================================== --- branches/v0_99_maint/doc/_templates/indexsidebar.html 2009年08月03日 17:40:17 UTC (rev 7336) +++ branches/v0_99_maint/doc/_templates/indexsidebar.html 2009年08月03日 19:31:05 UTC (rev 7337) @@ -3,17 +3,12 @@ <p>Please <a href="http://sourceforge.net/project/project_donations.php?group_id=80706">donate</a> to support matplotlib development.</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>A release candidate rc1 of matplotlib-0.99.0 is <a href="http://drop.io/xortel1#">available</a> for testing. Please post any bugs to the <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a> </p> -<p>Nominate matplotlib for a community choice award by clicking the -image below -- suggested category "Best Project for Academia" for -software which "helps you hit the books, analyze global trends, or -just understand the world a little bit better than you did before": -<a href=" src="http://sourceforge.net/images/cca/cca_nominate.png" border="0"/></a> +<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> - <h3>Download</h3> <p>Current version: <b>{{ version }}</b></p> Modified: branches/v0_99_maint/doc/api/spine_api.rst =================================================================== --- branches/v0_99_maint/doc/api/spine_api.rst 2009年08月03日 17:40:17 UTC (rev 7336) +++ branches/v0_99_maint/doc/api/spine_api.rst 2009年08月03日 19:31:05 UTC (rev 7337) @@ -4,7 +4,7 @@ :mod:`matplotlib.spine` -====================== +======================== .. automodule:: matplotlib.spine :members: Modified: branches/v0_99_maint/doc/pyplots/plotmap.py =================================================================== --- branches/v0_99_maint/doc/pyplots/plotmap.py 2009年08月03日 17:40:17 UTC (rev 7336) +++ branches/v0_99_maint/doc/pyplots/plotmap.py 2009年08月03日 19:31:05 UTC (rev 7337) @@ -5,7 +5,9 @@ # the data is interpolated to the native projection grid. import os from mpl_toolkits.basemap import Basemap, shiftgrid -from pylab import title, colorbar, show, axes, cm, load, arange, figure, \ +import numpy as np + +from pylab import title, colorbar, show, axes, cm, arange, figure, \ text # read in topo data (on a regular lat/lon grid) @@ -15,9 +17,9 @@ if not os.path.exists(datadir): raise SystemExit('You need to download the data with svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/htdocs/screenshots/data/" and set the datadir variable in %s'%__file__) -topoin = load(os.path.join(datadir, 'etopo20data.gz')) -lons = load(os.path.join(datadir, 'etopo20lons.gz')) -lats = load(os.path.join(datadir, 'etopo20lats.gz')) +topoin = np.loadtxt(os.path.join(datadir, 'etopo20data.gz')) +lons = np.loadtxt(os.path.join(datadir, 'etopo20lons.gz')) +lats = np.loadtxt(os.path.join(datadir, 'etopo20lats.gz')) # shift data so lons go from -180 to 180 instead of 20 to 380. topoin,lons = shiftgrid(180.,topoin,lons,start=False) Modified: branches/v0_99_maint/examples/pylab_examples/load_converter.py =================================================================== --- branches/v0_99_maint/examples/pylab_examples/load_converter.py 2009年08月03日 17:40:17 UTC (rev 7336) +++ branches/v0_99_maint/examples/pylab_examples/load_converter.py 2009年08月03日 19:31:05 UTC (rev 7337) @@ -1,8 +1,9 @@ from matplotlib.dates import strpdate2num -from matplotlib.mlab import load +#from matplotlib.mlab import load +import numpy as np from pylab import figure, show -dates, closes = load( +dates, closes = np.loadtxt( '../data/msft.csv', delimiter=',', converters={0:strpdate2num('%d-%b-%y')}, skiprows=1, usecols=(0,2), unpack=True) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7336 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7336&view=rev Author: jdh2358 Date: 2009年08月03日 17:40:17 +0000 (2009年8月03日) Log Message: ----------- fixed rec2csv win32 file handle bug from sf patch 2831018 Modified Paths: -------------- branches/v0_99_maint/lib/matplotlib/mlab.py Modified: branches/v0_99_maint/lib/matplotlib/mlab.py =================================================================== --- branches/v0_99_maint/lib/matplotlib/mlab.py 2009年08月03日 17:19:42 UTC (rev 7335) +++ branches/v0_99_maint/lib/matplotlib/mlab.py 2009年08月03日 17:40:17 UTC (rev 7336) @@ -2595,7 +2595,7 @@ for i, name in enumerate(r.dtype.names): funcs.append(with_mask(csvformat_factory(formatd[name]).tostr)) - fh, opened = cbook.to_filehandle(fname, 'w', return_opened=True) + fh, opened = cbook.to_filehandle(fname, 'wb', return_opened=True) writer = csv.writer(fh, delimiter=delimiter) header = r.dtype.names if withheader: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7335 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7335&view=rev Author: jdh2358 Date: 2009年08月03日 17:19:42 +0000 (2009年8月03日) Log Message: ----------- added two examples from Josh Hemann Added Paths: ----------- branches/v0_99_maint/examples/pylab_examples/barchart_demo2.py branches/v0_99_maint/examples/pylab_examples/boxplot_demo2.py Added: branches/v0_99_maint/examples/pylab_examples/barchart_demo2.py =================================================================== --- branches/v0_99_maint/examples/pylab_examples/barchart_demo2.py (rev 0) +++ branches/v0_99_maint/examples/pylab_examples/barchart_demo2.py 2009年08月03日 17:19:42 UTC (rev 7335) @@ -0,0 +1,107 @@ +""" +Thanks Josh Hemann for the example + +This examples comes from an application in which grade school gym +teachers wanted to be able to show parents how their child did across +a handful of fitness tests, and importantly, relative to how other +children did. To extract the plotting code for demo purposes, we'll +just make up some data for little Johnny Doe... + +""" +import numpy as np +import matplotlib.pyplot as plt +import pylab +from matplotlib.patches import Polygon +from matplotlib.ticker import MaxNLocator + + + +student = 'Johnny Doe' +grade = 2 +gender = 'boy' +cohortSize = 62 #The number of other 2nd grade boys + +numTests = 5 +testNames = ['Pacer Test', 'Flexed Arm\n Hang', 'Mile Run', 'Agility', + 'Push Ups'] +testMeta = ['laps', 'sec', 'min:sec', 'sec', ''] +scores = ['7', '48', '12:52', '17', '14'] +rankings = np.round(np.random.uniform(0, 1, numTests)*100, 0) + +fig = plt.figure(figsize=(9,7)) +ax1 = fig.add_subplot(111) +plt.subplots_adjust(left=0.115, right=0.88) +fig.canvas.set_window_title('Eldorado K-8 Fitness Chart') +pos = np.arange(numTests)+0.5 #Center bars on the Y-axis ticks +rects = ax1.barh(pos, rankings, align='center', height=0.5, color='m') + +ax1.axis([0,100,0,5]) +pylab.yticks(pos, testNames) +ax1.set_title('Johnny Doe') +plt.text(50, -0.5, 'Cohort Size: ' + str(cohortSize), + horizontalalignment='center', size='small') + +# Set the right-hand Y-axis ticks and labels and set X-axis tick marks at the +# deciles +ax2 = ax1.twinx() +ax2.plot([100,100], [0, 5], 'white', alpha=0.1) +ax2.xaxis.set_major_locator(MaxNLocator(11)) +xticks = pylab.setp(ax2, xticklabels=['0','10','20','30','40','50','60', +'70', + '80','90','100']) +ax2.xaxis.grid(True, linestyle='--', which='major', color='grey', +alpha=0.25) +#Plot a solid vertical gridline to highlight the median position +plt.plot([50,50], [0, 5], 'grey', alpha=0.25) + +# Build up the score labels for the right Y-axis by first appending a carriage +# return to each string and then tacking on the appropriate meta information +# (i.e., 'laps' vs 'seconds'). We want the labels centered on the ticks, so if +# there is no meta info (like for pushups) then don't add the carriage return to +# the string + +def withnew(i, scr): + if testMeta[i] != '' : return '%s\n'%scr + else: return scr +scoreLabels = [withnew(i, scr) for i,scr in enumerate(scores)] +scoreLabels = [i+j for i,j in zip(scoreLabels, testMeta)] +pylab.yticks(pos, scoreLabels) +ax2.set_ylabel('Test Scores') +#Make list of numerical suffixes corresponding to position in a list +# 0 1 2 3 4 5 6 7 8 9 +suffixes =['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'] +ax2.set_xlabel('Percentile Ranking Across ' + str(grade) + suffixes[grade] \ + + ' Grade ' + gender.title() + 's') + +# Lastly, write in the ranking inside each bar to aid in interpretation +for rect in rects: + # Rectangle widths are already integer-valued but are floating + # type, so it helps to remove the trailing decimal point and 0 by + # converting width to int type + width = int(rect.get_width()) + + # Figure out what the last digit (width modulo 10) so we can add + # the appropriate numerical suffix (e.g. 1st, 2nd, 3rd, etc) + lastDigit = width % 10 + # Note that 11, 12, and 13 are special cases + if (width == 11) or (width == 12) or (width == 13): + suffix = 'th' + else: + suffix = suffixes[lastDigit] + + rankStr = str(width) + suffix + if (width < 5): # The bars aren't wide enough to print the ranking inside + xloc = width + 1 # Shift the text to the right side of the right edge + clr = 'black' # Black against white background + align = 'left' + else: + xloc = 0.98*width # Shift the text to the left side of the right edge + clr = 'white' # White on magenta + align = 'right' + + yloc = rect.get_y()+rect.get_height()/2.0 #Center the text vertically in the bar + ax1.text(xloc, yloc, rankStr, horizontalalignment=align, + verticalalignment='center', color=clr, weight='bold') + +plt.show() + Added: branches/v0_99_maint/examples/pylab_examples/boxplot_demo2.py =================================================================== --- branches/v0_99_maint/examples/pylab_examples/boxplot_demo2.py (rev 0) +++ branches/v0_99_maint/examples/pylab_examples/boxplot_demo2.py 2009年08月03日 17:19:42 UTC (rev 7335) @@ -0,0 +1,121 @@ +""" +Thanks Josh Hemann for the example +""" + +import numpy as np +import matplotlib.pyplot as plt +from matplotlib.patches import Polygon + + +# Generate some data from five different probability distributions, +# each with different characteristics. We want to play with how an IID +# bootstrap resample of the data preserves the distributional +# properties of the original sample, and a boxplot is one visual tool +# to make this assessment +numDists = 5 +randomDists = ['Normal(1,1)',' Lognormal(1,1)', 'Exp(1)', 'Gumbel(6,4)', + 'Triangular(2,9,11)'] +N = 500 +norm = np.random.normal(1,1, N) +logn = np.random.lognormal(1,1, N) +expo = np.random.exponential(1, N) +gumb = np.random.gumbel(6, 4, N) +tria = np.random.triangular(2, 9, 11, N) + +# Generate some random indices that we'll use to resample the original data +# arrays. For code brevity, just use the same random indices for each array +bootstrapIndices = np.random.random_integers(0, N-1, N) +normBoot = norm[bootstrapIndices] +expoBoot = expo[bootstrapIndices] +gumbBoot = gumb[bootstrapIndices] +lognBoot = logn[bootstrapIndices] +triaBoot = tria[bootstrapIndices] + +data = [norm, normBoot, logn, lognBoot, expo, expoBoot, gumb, gumbBoot, + tria, triaBoot] + +fig = plt.figure(figsize=(10,6)) +fig.canvas.set_window_title('A Boxplot Example') +ax1 = fig.add_subplot(111) +plt.subplots_adjust(left=0.075, right=0.95, top=0.9, bottom=0.25) + +bp = plt.boxplot(data, notch=0, sym='+', vert=1, whis=1.5) +plt.setp(bp['boxes'], color='black') +plt.setp(bp['whiskers'], color='black') +plt.setp(bp['fliers'], color='red', marker='+') + +# Add a horizontal grid to the plot, but make it very light in color +# so we can use it for reading data values but not be distracting +ax1.yaxis.grid(True, linestyle='-', which='major', color='lightgrey', + alpha=0.5) + +# Hide these grid behind plot objects +ax1.set_axisbelow(True) +ax1.set_title('Comparison of IID Bootstrap Resampling Across Five Distributions') +ax1.set_xlabel('Distribution') +ax1.set_ylabel('Value') + +# Now fill the boxes with desired colors +boxColors = ['darkkhaki','royalblue'] +numBoxes = numDists*2 +medians = range(numBoxes) +for i in range(numBoxes): + box = bp['boxes'][i] + boxX = [] + boxY = [] + for j in range(5): + boxX.append(box.get_xdata()[j]) + boxY.append(box.get_ydata()[j]) + boxCoords = zip(boxX,boxY) + # Alternate between Dark Khaki and Royal Blue + k = i % 2 + boxPolygon = Polygon(boxCoords, facecolor=boxColors[k]) + ax1.add_patch(boxPolygon) + # Now draw the median lines back over what we just filled in + med = bp['medians'][i] + medianX = [] + medianY = [] + for j in range(2): + medianX.append(med.get_xdata()[j]) + medianY.append(med.get_ydata()[j]) + plt.plot(medianX, medianY, 'k') + medians[i] = medianY[0] + # Finally, overplot the sample averages, with horixzontal alignment + # in the center of each box + plt.plot([np.average(med.get_xdata())], [np.average(data[i])], + color='w', marker='*', markeredgecolor='k') + +# Set the axes ranges and axes labels +ax1.set_xlim(0.5, numBoxes+0.5) +top = 40 +bottom = -5 +ax1.set_ylim(bottom, top) +xtickNames = plt.setp(ax1, xticklabels=np.repeat(randomDists, 2)) +plt.setp(xtickNames, rotation=45, fontsize=8) + +# Due to the Y-axis scale being different across samples, it can be +# hard to compare differences in medians across the samples. Add upper +# X-axis tick labels with the sample medians to aid in comparison +# (just use two decimal places of precision) +pos = np.arange(numBoxes)+1 +upperLabels = [str(np.round(s, 2)) for s in medians] +weights = ['bold', 'semibold'] +for tick,label in zip(range(numBoxes),ax1.get_xticklabels()): + k = tick % 2 + ax1.text(pos[tick], top-(top*0.05), upperLabels[tick], + horizontalalignment='center', size='x-small', weight=weights[k], + color=boxColors[k]) + +# Finally, add a basic legend +plt.figtext(0.80, 0.08, str(N) + ' Random Numbers' , + backgroundcolor=boxColors[0], color='black', weight='roman', + size='x-small') +plt.figtext(0.80, 0.045, 'IID Bootstrap Resample', +backgroundcolor=boxColors[1], + color='white', weight='roman', size='x-small') +plt.figtext(0.80, 0.015, '*', color='white', backgroundcolor='silver', + weight='roman', size='medium') +plt.figtext(0.815, 0.013, ' Average Value', color='black', weight='roman', + size='x-small') + +plt.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7334 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7334&view=rev Author: jdh2358 Date: 2009年08月03日 16:38:25 +0000 (2009年8月03日) Log Message: ----------- handled sf bugs 2831556 and 2830525; better bar error messages and backend driver configs Modified Paths: -------------- branches/v0_99_maint/examples/tests/backend_driver.py branches/v0_99_maint/lib/matplotlib/axes.py Modified: branches/v0_99_maint/examples/tests/backend_driver.py =================================================================== --- branches/v0_99_maint/examples/tests/backend_driver.py 2009年08月03日 16:32:38 UTC (rev 7333) +++ branches/v0_99_maint/examples/tests/backend_driver.py 2009年08月03日 16:38:25 UTC (rev 7334) @@ -374,7 +374,7 @@ if backend in rcsetup.interactive_bk: tmpfile.write('show()') else: - tmpfile.write('\nsavefig("%s", dpi=150)' % outfile) + tmpfile.write('\nsavefig(r"%s", dpi=150)' % outfile) tmpfile.close() start_time = time.time() @@ -458,7 +458,7 @@ python = ['valgrind', '--tool=memcheck', '--leak-check=yes', '--log-file=%(name)s', 'python'] elif sys.platform == 'win32': - python = [r'c:\Python24\python.exe'] + python = [sys.executable] else: python = ['python'] Modified: branches/v0_99_maint/lib/matplotlib/axes.py =================================================================== --- branches/v0_99_maint/lib/matplotlib/axes.py 2009年08月03日 16:32:38 UTC (rev 7333) +++ branches/v0_99_maint/lib/matplotlib/axes.py 2009年08月03日 16:38:25 UTC (rev 7334) @@ -4229,20 +4229,20 @@ # FIXME: convert the following to proper input validation # raising ValueError; don't use assert for this. - assert len(left)==nbars, "argument 'left' must be %d or scalar" % nbars - assert len(height)==nbars, ("argument 'height' must be %d or scalar" % + assert len(left)==nbars, "incompatible sizes: argument 'left' must be length %d or scalar" % nbars + assert len(height)==nbars, ("incompatible sizes: argument 'height' must be length %d or scalar" % nbars) - assert len(width)==nbars, ("argument 'width' must be %d or scalar" % + assert len(width)==nbars, ("incompatible sizes: argument 'width' must be length %d or scalar" % nbars) - assert len(bottom)==nbars, ("argument 'bottom' must be %d or scalar" % + assert len(bottom)==nbars, ("incompatible sizes: argument 'bottom' must be length %d or scalar" % nbars) if yerr is not None and len(yerr)!=nbars: raise ValueError( - "bar() argument 'yerr' must be len(%s) or scalar" % nbars) + "incompatible sizes: bar() argument 'yerr' must be len(%s) or scalar" % nbars) if xerr is not None and len(xerr)!=nbars: raise ValueError( - "bar() argument 'xerr' must be len(%s) or scalar" % nbars) + "incompatible sizes: bar() argument 'xerr' must be len(%s) or scalar" % nbars) patches = [] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 7333 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7333&view=rev Author: evilguru Date: 2009年08月03日 16:32:38 +0000 (2009年8月03日) Log Message: ----------- Update the mathtex branch so that it includes the latest fixes from trunk. Modified Paths: -------------- branches/mathtex/CHANGELOG branches/mathtex/doc/_templates/indexsidebar.html branches/mathtex/doc/api/api_changes.rst branches/mathtex/doc/devel/coding_guide.rst branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst branches/mathtex/doc/users/toolkits.rst branches/mathtex/examples/pylab_examples/custom_cmap.py branches/mathtex/examples/pylab_examples/log_demo.py branches/mathtex/examples/tests/backend_driver.py branches/mathtex/lib/matplotlib/__init__.py branches/mathtex/lib/matplotlib/_cm.py branches/mathtex/lib/matplotlib/axes.py branches/mathtex/lib/matplotlib/cm.py branches/mathtex/lib/matplotlib/figure.py branches/mathtex/lib/matplotlib/image.py branches/mathtex/lib/matplotlib/legend.py branches/mathtex/lib/matplotlib/offsetbox.py branches/mathtex/lib/matplotlib/projections/polar.py branches/mathtex/lib/matplotlib/pyplot.py Property Changed: ---------------- branches/mathtex/ branches/mathtex/doc/pyplots/README branches/mathtex/doc/sphinxext/gen_gallery.py branches/mathtex/doc/sphinxext/gen_rst.py branches/mathtex/examples/misc/multiprocess.py branches/mathtex/examples/mplot3d/contour3d_demo.py branches/mathtex/examples/mplot3d/contourf3d_demo.py branches/mathtex/examples/mplot3d/polys3d_demo.py branches/mathtex/examples/mplot3d/scatter3d_demo.py branches/mathtex/examples/mplot3d/surface3d_demo.py branches/mathtex/examples/mplot3d/wire3d_demo.py branches/mathtex/lib/matplotlib/sphinxext/mathmpl.py branches/mathtex/lib/matplotlib/sphinxext/only_directives.py branches/mathtex/lib/matplotlib/sphinxext/plot_directive.py Property changes on: branches/mathtex ___________________________________________________________________ Modified: svnmerge-integrated - /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7305 + /branches/v0_91_maint:1-6428 /branches/v0_98_5_maint:1-7253 /trunk/matplotlib:1-7332 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 /trunk/matplotlib:7265-7303 + /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 /trunk/matplotlib:7265-7303,7308-7317,7321 Modified: branches/mathtex/CHANGELOG =================================================================== --- branches/mathtex/CHANGELOG 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/CHANGELOG 2009年08月03日 16:32:38 UTC (rev 7333) @@ -1,3 +1,11 @@ +====================================================================== + +2009年07月31日 Tagging 0.99.0.rc1 at 7314 - MGD + +2009年07月30日 Add set_cmap and register_cmap, and improve get_cmap, + to provide convenient handling of user-generated + colormaps. Reorganized _cm and cm modules. - EF + 2009年07月28日 Quiver speed improved, thanks to tip by Ray Speth. -EF 2009年07月27日 Simplify argument handling code for plot method. -EF @@ -4417,4 +4425,3 @@ 2003年11月21日 - make a dash-dot dict for the GC 2003年12月15日 - fix install path bug -t Modified: branches/mathtex/doc/_templates/indexsidebar.html =================================================================== --- branches/mathtex/doc/_templates/indexsidebar.html 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/_templates/indexsidebar.html 2009年08月03日 16:32:38 UTC (rev 7333) @@ -1,19 +1,13 @@ <h3>News</h3> + <p>Please <a href="http://sourceforge.net/project/project_donations.php?group_id=80706">donate</a> to support matplotlib development.</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> -<p>Nominate matplotlib for a community choice award by clicking the -image below -- suggested category "Best Project for Academia" for -software which "helps you hit the books, analyze global trends, or -just understand the world a little bit better than you did before": -<a href=" src="http://sourceforge.net/images/cca/cca_nominate.png" border="0"/></a> -</p> - - <h3>Download</h3> <p>Current version: <b>{{ version }}</b></p> Modified: branches/mathtex/doc/api/api_changes.rst =================================================================== --- branches/mathtex/doc/api/api_changes.rst 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/api/api_changes.rst 2009年08月03日 16:32:38 UTC (rev 7333) @@ -21,6 +21,11 @@ Changes beyond 0.98.x ===================== +* User-generated colormaps can now be added to the set recognized + by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the + default and applied to the current image using + :func:`matplotlib.pyplot.set_cmap`. + * changed use_mrecords default to False in mlab.csv2rec since this is partially broken Modified: branches/mathtex/doc/devel/coding_guide.rst =================================================================== --- branches/mathtex/doc/devel/coding_guide.rst 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/devel/coding_guide.rst 2009年08月03日 16:32:38 UTC (rev 7333) @@ -27,12 +27,12 @@ Branch checkouts, eg the maintenance branch:: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/\ - v0_91_maint mpl91 --username=youruser --password=yourpass + v0_99_maint mpl99 --username=youruser --password=yourpass -The current release of the trunk is in the 0.98.5 maintenance branch:: +The current release of the trunk is in the 0.99.x maintenance branch:: svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/\ - v0_98_5_maint mpl98.5 --username=youruser --password=yourpass + v0_99_maint mpl99 --username=youruser --password=yourpass Committing changes @@ -96,7 +96,7 @@ svnmerge.py merge -S BRANCHNAME Where BRANCHNAME is the name of the branch to merge *from*, - e.g. v0_98_5_maint. + e.g. v0_99_maint. If you wish to merge only specific revisions (in an unusual situation), do:: @@ -130,17 +130,17 @@ with this. * Creating a new branch from the trunk (if the release version is - 0.98.5 at revision 6573):: + 0.99 at revision 6573):: > svn copy \ - https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib@6573 \ - https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_98_5_maint \ - -m "Creating maintenance branch for 0.98.5" + https://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib@7315 \ + https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint \ + -m "Creating maintenance branch for 0.99" * You can add a new branch for the trunk to "track" using "svnmerge.py init", e.g., from a working copy of the trunk:: - > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_98_5_maint + > svnmerge.py init https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint property 'svnmerge-integrated' set on '.' After doing a "svn commit" on this, this merge tracking is available @@ -150,7 +150,7 @@ * Tracking can later be removed with the "svnmerge.py uninit" command, e.g.:: - > svnmerge.py -S v0_9_5_maint uninit + > svnmerge.py -S v0_99_maint uninit .. _using-git: Modified: branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst =================================================================== --- branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/mpl_toolkits/mplot3d/api.rst 2009年08月03日 16:32:38 UTC (rev 7333) @@ -7,7 +7,6 @@ .. automodule:: mpl_toolkits.mplot3d.axes3d :members: - :exclude-members: contour3D, contourf3D, plot3D, scatter3D :show-inheritance: :mod:`mpl_toolkits.mplot3d.art3d` Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/pyplots/README:7265-7303 + /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 /trunk/matplotlib/doc/pyplots/README:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303 + /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 /trunk/matplotlib/doc/sphinxext/gen_gallery.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/doc/sphinxext/gen_rst.py:7265-7303 + /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 /trunk/matplotlib/doc/sphinxext/gen_rst.py:7265-7303,7308-7317,7321 Modified: branches/mathtex/doc/users/toolkits.rst =================================================================== --- branches/mathtex/doc/users/toolkits.rst 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/doc/users/toolkits.rst 2009年08月03日 16:32:38 UTC (rev 7333) @@ -66,5 +66,5 @@ distributed with matplotlib source. .. image:: ../_static/demo_axes_grid.png - + See :ref:`toolkit_axesgrid-index` for documentations. Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/misc/multiprocess.py:7265-7303 + /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 /trunk/matplotlib/examples/misc/multiprocess.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/contour3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/contour3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/contourf3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/contourf3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/polys3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/polys3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/scatter3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/scatter3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/surface3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/surface3d_demo.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/examples/mplot3d/wire3d_demo.py:7265-7303 + /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 /trunk/matplotlib/examples/mplot3d/wire3d_demo.py:7265-7303,7308-7317,7321 Modified: branches/mathtex/examples/pylab_examples/custom_cmap.py =================================================================== --- branches/mathtex/examples/pylab_examples/custom_cmap.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/examples/pylab_examples/custom_cmap.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -103,11 +103,25 @@ (1.0, 0.0, 0.0)) } +# Now we will use this example to illustrate 3 ways of +# handling custom colormaps. +# First, the most direct and explicit: blue_red1 = LinearSegmentedColormap('BlueRed1', cdict1) + +# Second, create the map explicitly and register it. +# Like the first method, this method works with any kind +# of Colormap, not just +# a LinearSegmentedColormap: + blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2) -blue_red3 = LinearSegmentedColormap('BlueRed3', cdict3) +plt.register_cmap(cmap=blue_red2) +# Third, for LinearSegmentedColormap only, +# leave everything to register_cmap: + +plt.register_cmap(name='BlueRed3', data=cdict3) # optional lut kwarg + x = np.arange(0, np.pi, 0.1) y = np.arange(0, 2*np.pi, 0.1) X, Y = np.meshgrid(x,y) @@ -121,13 +135,33 @@ plt.colorbar() plt.subplot(1,3,2) -plt.imshow(Z, interpolation='nearest', cmap=blue_red2) +cmap = plt.get_cmap('BlueRed2') +plt.imshow(Z, interpolation='nearest', cmap=cmap) plt.colorbar() +# Now we will set the third cmap as the default. One would +# not normally do this in the middle of a script like this; +# it is done here just to illustrate the method. + +plt.rcParams['image.cmap'] = 'BlueRed3' + +# Also see below for an alternative, particularly for +# interactive use. + plt.subplot(1,3,3) -plt.imshow(Z, interpolation='nearest', cmap=blue_red3) +plt.imshow(Z, interpolation='nearest') plt.colorbar() +# Or as yet another variation, we could replace the rcParams +# specification *before* the imshow with the following *after* +# imshow: +# +# plt.set_cmap('BlueRed3') +# +# This sets the new default *and* sets the colormap of the last +# image-like item plotted via pyplot, if any. + + plt.suptitle('Custom Blue-Red colormaps') plt.show() Modified: branches/mathtex/examples/pylab_examples/log_demo.py =================================================================== --- branches/mathtex/examples/pylab_examples/log_demo.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/examples/pylab_examples/log_demo.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -19,7 +19,7 @@ # log x and y axis plt.subplot(223) -plt.loglog(t, 20*np.exp(-t/10.0), basex=4) +plt.loglog(t, 20*np.exp(-t/10.0), basex=2) plt.grid(True) plt.title('loglog base 4 on x') Modified: branches/mathtex/examples/tests/backend_driver.py =================================================================== --- branches/mathtex/examples/tests/backend_driver.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/examples/tests/backend_driver.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -336,7 +336,6 @@ for fullpath in testcases: print ('\tdriving %-40s' % (fullpath)), sys.stdout.flush() - fpath, fname = os.path.split(fullpath) if fname in exclude: @@ -392,7 +391,8 @@ doc = __doc__.split('\n\n') op = OptionParser(description=doc[0].strip(), usage='%prog [options] [--] [backends and switches]', - epilog='\n'.join(doc[1:])) + #epilog='\n'.join(doc[1:]) # epilog not supported on my python2.4 machine: JDH + ) op.disable_interspersed_args() op.set_defaults(dirs='pylab,api,units,mplot3d', clean=False, coverage=False, valgrind=False) Modified: branches/mathtex/lib/matplotlib/__init__.py =================================================================== --- branches/mathtex/lib/matplotlib/__init__.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/__init__.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -89,7 +89,7 @@ """ from __future__ import generators -__version__ = '0.98.6svn' +__version__ = '0.99.0.rc1' __revision__ = '$Revision$' __date__ = '$Date$' Modified: branches/mathtex/lib/matplotlib/_cm.py =================================================================== --- branches/mathtex/lib/matplotlib/_cm.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/_cm.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -1,25 +1,15 @@ """ -Color data and pre-defined cmap objects. +Nothing here but dictionaries for generating LinearSegmentedColormaps, +and a dictionary of these dictionaries. -This is a helper for cm.py, originally part of that file. -Separating the data (this file) from cm.py makes both easier -to deal with. - -Objects visible in cm.py are the individual cmap objects ('autumn', -etc.) and a dictionary, 'datad', including all of these objects. """ -import matplotlib as mpl -import matplotlib.colors as colors -LUTSIZE = mpl.rcParams['image.lut'] - _binary_data = { 'red' : ((0., 1., 1.), (1., 0., 0.)), 'green': ((0., 1., 1.), (1., 0., 0.)), 'blue' : ((0., 1., 1.), (1., 0., 0.)) } - _bone_data = {'red': ((0., 0., 0.),(1.0, 1.0, 1.0)), 'green': ((0., 0., 0.),(1.0, 1.0, 1.0)), 'blue': ((0., 0., 0.),(1.0, 1.0, 1.0))} @@ -379,44 +369,6 @@ (1.0, 0.80, 0.80)]} -autumn = colors.LinearSegmentedColormap('autumn', _autumn_data, LUTSIZE) -bone = colors.LinearSegmentedColormap('bone ', _bone_data, LUTSIZE) -binary = colors.LinearSegmentedColormap('binary ', _binary_data, LUTSIZE) -cool = colors.LinearSegmentedColormap('cool', _cool_data, LUTSIZE) -copper = colors.LinearSegmentedColormap('copper', _copper_data, LUTSIZE) -flag = colors.LinearSegmentedColormap('flag', _flag_data, LUTSIZE) -gray = colors.LinearSegmentedColormap('gray', _gray_data, LUTSIZE) -hot = colors.LinearSegmentedColormap('hot', _hot_data, LUTSIZE) -hsv = colors.LinearSegmentedColormap('hsv', _hsv_data, LUTSIZE) -jet = colors.LinearSegmentedColormap('jet', _jet_data, LUTSIZE) -pink = colors.LinearSegmentedColormap('pink', _pink_data, LUTSIZE) -prism = colors.LinearSegmentedColormap('prism', _prism_data, LUTSIZE) -spring = colors.LinearSegmentedColormap('spring', _spring_data, LUTSIZE) -summer = colors.LinearSegmentedColormap('summer', _summer_data, LUTSIZE) -winter = colors.LinearSegmentedColormap('winter', _winter_data, LUTSIZE) -spectral = colors.LinearSegmentedColormap('spectral', _spectral_data, LUTSIZE) - - - -datad = { - 'autumn': _autumn_data, - 'bone': _bone_data, - 'binary': _binary_data, - 'cool': _cool_data, - 'copper': _copper_data, - 'flag': _flag_data, - 'gray' : _gray_data, - 'hot': _hot_data, - 'hsv': _hsv_data, - 'jet' : _jet_data, - 'pink': _pink_data, - 'prism': _prism_data, - 'spring': _spring_data, - 'summer': _summer_data, - 'winter': _winter_data, - 'spectral': _spectral_data - } - # 34 colormaps based on color specifications and designs # developed by Cynthia Brewer (http://colorbrewer.org). # The ColorBrewer palettes have been included under the terms @@ -5859,48 +5811,26 @@ 0.0078431377187371254, 0.0078431377187371254), (1.0, 0.0039215688593685627, 0.0039215688593685627)]} -Accent = colors.LinearSegmentedColormap('Accent', _Accent_data, LUTSIZE) -Blues = colors.LinearSegmentedColormap('Blues', _Blues_data, LUTSIZE) -BrBG = colors.LinearSegmentedColormap('BrBG', _BrBG_data, LUTSIZE) -BuGn = colors.LinearSegmentedColormap('BuGn', _BuGn_data, LUTSIZE) -BuPu = colors.LinearSegmentedColormap('BuPu', _BuPu_data, LUTSIZE) -Dark2 = colors.LinearSegmentedColormap('Dark2', _Dark2_data, LUTSIZE) -GnBu = colors.LinearSegmentedColormap('GnBu', _GnBu_data, LUTSIZE) -Greens = colors.LinearSegmentedColormap('Greens', _Greens_data, LUTSIZE) -Greys = colors.LinearSegmentedColormap('Greys', _Greys_data, LUTSIZE) -Oranges = colors.LinearSegmentedColormap('Oranges', _Oranges_data, LUTSIZE) -OrRd = colors.LinearSegmentedColormap('OrRd', _OrRd_data, LUTSIZE) -Paired = colors.LinearSegmentedColormap('Paired', _Paired_data, LUTSIZE) -Pastel1 = colors.LinearSegmentedColormap('Pastel1', _Pastel1_data, LUTSIZE) -Pastel2 = colors.LinearSegmentedColormap('Pastel2', _Pastel2_data, LUTSIZE) -PiYG = colors.LinearSegmentedColormap('PiYG', _PiYG_data, LUTSIZE) -PRGn = colors.LinearSegmentedColormap('PRGn', _PRGn_data, LUTSIZE) -PuBu = colors.LinearSegmentedColormap('PuBu', _PuBu_data, LUTSIZE) -PuBuGn = colors.LinearSegmentedColormap('PuBuGn', _PuBuGn_data, LUTSIZE) -PuOr = colors.LinearSegmentedColormap('PuOr', _PuOr_data, LUTSIZE) -PuRd = colors.LinearSegmentedColormap('PuRd', _PuRd_data, LUTSIZE) -Purples = colors.LinearSegmentedColormap('Purples', _Purples_data, LUTSIZE) -RdBu = colors.LinearSegmentedColormap('RdBu', _RdBu_data, LUTSIZE) -RdGy = colors.LinearSegmentedColormap('RdGy', _RdGy_data, LUTSIZE) -RdPu = colors.LinearSegmentedColormap('RdPu', _RdPu_data, LUTSIZE) -RdYlBu = colors.LinearSegmentedColormap('RdYlBu', _RdYlBu_data, LUTSIZE) -RdYlGn = colors.LinearSegmentedColormap('RdYlGn', _RdYlGn_data, LUTSIZE) -Reds = colors.LinearSegmentedColormap('Reds', _Reds_data, LUTSIZE) -Set1 = colors.LinearSegmentedColormap('Set1', _Set1_data, LUTSIZE) -Set2 = colors.LinearSegmentedColormap('Set2', _Set2_data, LUTSIZE) -Set3 = colors.LinearSegmentedColormap('Set3', _Set3_data, LUTSIZE) -Spectral = colors.LinearSegmentedColormap('Spectral', _Spectral_data, LUTSIZE) -YlGn = colors.LinearSegmentedColormap('YlGn', _YlGn_data, LUTSIZE) -YlGnBu = colors.LinearSegmentedColormap('YlGnBu', _YlGnBu_data, LUTSIZE) -YlOrBr = colors.LinearSegmentedColormap('YlOrBr', _YlOrBr_data, LUTSIZE) -YlOrRd = colors.LinearSegmentedColormap('YlOrRd', _YlOrRd_data, LUTSIZE) -gist_earth = colors.LinearSegmentedColormap('gist_earth', _gist_earth_data, LUTSIZE) -gist_gray = colors.LinearSegmentedColormap('gist_gray', _gist_gray_data, LUTSIZE) -gist_heat = colors.LinearSegmentedColormap('gist_heat', _gist_heat_data, LUTSIZE) -gist_ncar = colors.LinearSegmentedColormap('gist_ncar', _gist_ncar_data, LUTSIZE) -gist_rainbow = colors.LinearSegmentedColormap('gist_rainbow', _gist_rainbow_data, LUTSIZE) -gist_stern = colors.LinearSegmentedColormap('gist_stern', _gist_stern_data, LUTSIZE) -gist_yarg = colors.LinearSegmentedColormap('gist_yarg', _gist_yarg_data, LUTSIZE) +datad = { + 'autumn': _autumn_data, + 'bone': _bone_data, + 'binary': _binary_data, + 'cool': _cool_data, + 'copper': _copper_data, + 'flag': _flag_data, + 'gray' : _gray_data, + 'hot': _hot_data, + 'hsv': _hsv_data, + 'jet' : _jet_data, + 'pink': _pink_data, + 'prism': _prism_data, + 'spring': _spring_data, + 'summer': _summer_data, + 'winter': _winter_data, + 'spectral': _spectral_data + } + + datad['Accent']=_Accent_data datad['Blues']=_Blues_data datad['BrBG']=_BrBG_data @@ -5944,19 +5874,7 @@ datad['gist_stern']=_gist_stern_data datad['gist_yarg']=_gist_yarg_data -# reverse all the colormaps. -# reversed colormaps have '_r' appended to the name. -def revcmap(data): - data_r = {} - for key, val in data.iteritems(): - valnew = [(1.-a, b, c) for a, b, c in reversed(val)] - data_r[key] = valnew - return data_r -cmapnames = datad.keys() -for cmapname in cmapnames: - cmapname_r = cmapname+'_r' - cmapdat_r = revcmap(datad[cmapname]) - datad[cmapname_r] = cmapdat_r - locals()[cmapname_r] = colors.LinearSegmentedColormap(cmapname_r, cmapdat_r, LUTSIZE) + + Modified: branches/mathtex/lib/matplotlib/axes.py =================================================================== --- branches/mathtex/lib/matplotlib/axes.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/axes.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -3906,31 +3906,66 @@ 'center' 10 =============== ============= - If none of these are locations are suitable, loc can be a 2-tuple - giving x,y in axes coords, ie:: - loc = 0, 1 # left top - loc = 0.5, 0.5 # center + Users can specify any arbitrary location for the legend using the + *bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance + of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. + For example, + loc = 'upper right', bbox_to_anchor = (0.5, 0.5) + + will place the legend so that the upper right corner of the legend at + the center of the axes. + + The legend location can be specified in other coordinate, by using the + *bbox_transform* keyword. + + The loc itslef can be a 2-tuple giving x,y of the lower-left corner of + the legend in axes coords (*bbox_to_anchor* is ignored). + + Keyword arguments: - *isaxes*: [ True | False ] - Indicates that this is an axes legend + *prop*: [ None | FontProperties | dict ] + A :class:`matplotlib.font_manager.FontProperties` + instance. If *prop* is a dictionary, a new instance will be + created with *prop*. If *None*, use rc settings. *numpoints*: integer - The number of points in the legend line, default is 4 + The number of points in the legend for line - *prop*: [ None | FontProperties ] - A :class:`matplotlib.font_manager.FontProperties` - instance, or *None* to use rc settings. + *scatterpoints*: integer + The number of points in the legend for scatter plot + *scatteroffsets*: list of floats + a list of yoffsets for scatter symbols in legend + *markerscale*: [ None | scalar ] The relative size of legend markers vs. original. If *None*, use rc settings. + *fancybox*: [ None | False | True ] + if True, draw a frame with a round fancybox. If None, use rc + *shadow*: [ None | False | True ] If *True*, draw a shadow behind legend. If *None*, use rc settings. + *ncol* : integer + number of columns. default is 1 + + *mode* : [ "expand" | None ] + if mode is "expand", the legend will be horizontally expanded + to fill the axes area (or *bbox_to_anchor*) + + *bbox_to_anchor* : an instance of BboxBase or a tuple of 2 or 4 floats + the bbox that the legend will be anchored. + + *bbox_transform* : [ an instance of Transform | None ] + the transform for the bbox. transAxes if None. + + *title* : string + the legend title + Padding and spacing between various elements use following keywords parameters. The dimensions of these values are given as a fraction of the fontsize. Values from rcParams will be used if None. @@ -3946,9 +3981,13 @@ columnspacing the spacing between columns ================ ================================================================== + **Example:** .. plot:: mpl_examples/api/legend_demo.py + + Also see :ref:`plotting-guide-legend`. + """ if len(args)==0: @@ -5133,9 +5172,9 @@ arguments will be used only if *c* is an array of floats. *cmap*: [ None | Colormap ] - A :class:`matplotlib.colors.Colormap` instance. If *None*, - defaults to rc ``image.cmap``. *cmap* is only used if *c* - is an array of floats. + A :class:`matplotlib.colors.Colormap` instance or registered + name. If *None*, defaults to rc ``image.cmap``. *cmap* is + only used if *c* is an array of floats. *norm*: [ None | Normalize ] A :class:`matplotlib.colors.Normalize` instance is used to @@ -5331,7 +5370,6 @@ if colors is None: if norm is not None: assert(isinstance(norm, mcolors.Normalize)) - if cmap is not None: assert(isinstance(cmap, mcolors.Colormap)) collection.set_array(np.asarray(c)) collection.set_cmap(cmap) collection.set_norm(norm) @@ -5673,7 +5711,6 @@ accum = bins.searchsorted(accum) if norm is not None: assert(isinstance(norm, mcolors.Normalize)) - if cmap is not None: assert(isinstance(cmap, mcolors.Colormap)) collection.set_array(accum) collection.set_cmap(cmap) collection.set_norm(norm) @@ -6206,7 +6243,6 @@ if not self._hold: self.cla() if norm is not None: assert(isinstance(norm, mcolors.Normalize)) - if cmap is not None: assert(isinstance(cmap, mcolors.Colormap)) if aspect is None: aspect = rcParams['image.aspect'] self.set_aspect(aspect) im = mimage.AxesImage(self, cmap, norm, interpolation, origin, extent, @@ -6451,7 +6487,6 @@ collection.set_alpha(alpha) collection.set_array(C) if norm is not None: assert(isinstance(norm, mcolors.Normalize)) - if cmap is not None: assert(isinstance(cmap, mcolors.Colormap)) collection.set_cmap(cmap) collection.set_norm(norm) if vmin is not None or vmax is not None: @@ -6573,7 +6608,6 @@ collection.set_alpha(alpha) collection.set_array(C) if norm is not None: assert(isinstance(norm, mcolors.Normalize)) - if cmap is not None: assert(isinstance(cmap, mcolors.Colormap)) collection.set_cmap(cmap) collection.set_norm(norm) if vmin is not None or vmax is not None: @@ -6680,7 +6714,6 @@ vmin = kwargs.pop('vmin', None) vmax = kwargs.pop('vmax', None) if norm is not None: assert(isinstance(norm, mcolors.Normalize)) - if cmap is not None: assert(isinstance(cmap, mcolors.Colormap)) C = args[-1] nr, nc = C.shape Modified: branches/mathtex/lib/matplotlib/cm.py =================================================================== --- branches/mathtex/lib/matplotlib/cm.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/cm.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -1,26 +1,114 @@ """ -This module contains the instantiations of color mapping classes +This module provides a large set of colormaps, functions for +registering new colormaps and for getting a colormap by name, +and a mixin class for adding color mapping functionality. + """ +import os + import numpy as np from numpy import ma import matplotlib as mpl import matplotlib.colors as colors import matplotlib.cbook as cbook -from matplotlib._cm import * +from matplotlib._cm import datad +cmap_d = dict() +# reverse all the colormaps. +# reversed colormaps have '_r' appended to the name. + +def revcmap(data): + data_r = {} + for key, val in data.iteritems(): + valnew = [(1.0-a, b, c) for a, b, c in reversed(val)] + data_r[key] = valnew + return data_r + +LUTSIZE = mpl.rcParams['image.lut'] + +_cmapnames = datad.keys() # need this list because datad is changed in loop + +for cmapname in _cmapnames: + cmapname_r = cmapname+'_r' + cmapdat_r = revcmap(datad[cmapname]) + datad[cmapname_r] = cmapdat_r + cmap_d[cmapname] = colors.LinearSegmentedColormap( + cmapname, datad[cmapname], LUTSIZE) + cmap_d[cmapname_r] = colors.LinearSegmentedColormap( + cmapname_r, cmapdat_r, LUTSIZE) + +locals().update(cmap_d) + +def register_cmap(name=None, cmap=None, data=None, lut=None): + """ + Add a colormap to the set recognized by :func:`get_cmap`. + + It can be used in two ways:: + + register_cmap(name='swirly', cmap=swirly_cmap) + + register_cmap(name='choppy', data=choppydata, lut=128) + + In the first case, *cmap* must be a :class:`colors.Colormap` + instance. The *name* is optional; if absent, the name will + be the :attr:`name` attribute of the *cmap*. + + In the second case, the three arguments are passed to + the :class:`colors.LinearSegmentedColormap` initializer, + and the resulting colormap is registered. + + """ + if name is None: + try: + name = cmap.name + except AttributeError: + raise ValueError("Arguments must include a name or a Colormap") + + if not cbook.is_string_like(name): + raise ValueError("Colormap name must be a string") + + if isinstance(cmap, colors.Colormap): + cmap_d[name] = cmap + return + + # For the remainder, let exceptions propagate. + if lut is None: + lut = mpl.rcParams['image.lut'] + cmap = colors.LinearSegmentedColormap(name, data, lut) + cmap_d[name] = cmap + def get_cmap(name=None, lut=None): """ - Get a colormap instance, defaulting to rc values if *name* is None + Get a colormap instance, defaulting to rc values if *name* is None. + + Colormaps added with :func:`register_cmap` take precedence over + builtin colormaps. + + If *name* is a :class:`colors.Colormap` instance, it will be + returned. + + If *lut* is not None it must be an integer giving the number of + entries desired in the lookup table, and *name* must be a + standard mpl colormap name with a corresponding data dictionary + in *datad*. """ - if name is None: name = mpl.rcParams['image.cmap'] - if lut is None: lut = mpl.rcParams['image.lut'] + if name is None: + name = mpl.rcParams['image.cmap'] - assert(name in datad.keys()) - return colors.LinearSegmentedColormap(name, datad[name], lut) + if isinstance(name, colors.Colormap): + return name + if name in cmap_d: + if lut is None: + return cmap_d[name] + elif name in datad: + return colors.LinearSegmentedColormap(name, datad[name], lut) + else: + raise ValueError("Colormap %s is not recognized" % name) + class ScalarMappable: """ This is a mixin class to support scalar -> RGBA mapping. Handles @@ -42,7 +130,7 @@ self._A = None self.norm = norm - self.cmap = cmap + self.cmap = get_cmap(cmap) self.colorbar = None self.update_dict = {'array':False} @@ -116,9 +204,9 @@ """ set the colormap for luminance data - ACCEPTS: a colormap + ACCEPTS: a colormap or registered colormap name """ - if cmap is None: cmap = get_cmap() + cmap = get_cmap(cmap) self.cmap = cmap self.changed() Modified: branches/mathtex/lib/matplotlib/figure.py =================================================================== --- branches/mathtex/lib/matplotlib/figure.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/figure.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -829,29 +829,60 @@ (0,0) is the left, bottom of the figure and 1,1 is the right, top. - The legend instance is returned. The following kwargs are supported + Keyword arguments: - *loc* - the location of the legend - *numpoints* - the number of points in the legend line - *prop* - a :class:`matplotlib.font_manager.FontProperties` instance - *pad* - the fractional whitespace inside the legend border - *markerscale* - the relative size of legend markers vs. original - *shadow* - if True, draw a shadow behind legend - *labelsep* - the vertical space between the legend entries - *handlelen* - the length of the legend lines - *handletextsep* - the space between the legend line and legend text - *axespad* - the border between the axes and legend edge + *prop*: [ None | FontProperties | dict ] + A :class:`matplotlib.font_manager.FontProperties` + instance. If *prop* is a dictionary, a new instance will be + created with *prop*. If *None*, use rc settings. + *numpoints*: integer + The number of points in the legend line, default is 4 + + *scatterpoints*: integer + The number of points in the legend line, default is 4 + + *scatteroffsets*: list of floats + a list of yoffsets for scatter symbols in legend + + *markerscale*: [ None | scalar ] + The relative size of legend markers vs. original. If *None*, use rc + settings. + + *fancybox*: [ None | False | True ] + if True, draw a frame with a round fancybox. If None, use rc + + *shadow*: [ None | False | True ] + If *True*, draw a shadow behind legend. If *None*, use rc settings. + + *ncol* : integer + number of columns. default is 1 + + *mode* : [ "expand" | None ] + if mode is "expand", the legend will be horizontally expanded + to fill the axes area (or *bbox_to_anchor*) + + *title* : string + the legend title + + Padding and spacing between various elements use following keywords + parameters. The dimensions of these values are given as a fraction + of the fontsize. Values from rcParams will be used if None. + + ================ ================================================================== + Keyword Description + ================ ================================================================== + borderpad the fractional whitespace inside the legend border + labelspacing the vertical space between the legend entries + handlelength the length of the legend handles + handletextpad the pad between the legend handle and text + borderaxespad the pad between the axes and legend border + columnspacing the spacing between columns + ================ ================================================================== + + + **Example:** + .. plot:: mpl_examples/pylab_examples/figlegend_demo.py """ handles = flatten(handles) Modified: branches/mathtex/lib/matplotlib/image.py =================================================================== --- branches/mathtex/lib/matplotlib/image.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/image.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -512,7 +512,7 @@ def set_cmap(self, cmap): if self._A is not None: raise RuntimeError('Cannot change colors after loading data') - cm.ScalarMappable.set_cmap(self, norm) + cm.ScalarMappable.set_cmap(self, cmap) class PcolorImage(martist.Artist, cm.ScalarMappable): ''' Modified: branches/mathtex/lib/matplotlib/legend.py =================================================================== --- branches/mathtex/lib/matplotlib/legend.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/legend.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -126,13 +126,15 @@ ================ ================================================================== Keyword Description ================ ================================================================== - loc a location code or a tuple of coordinates - numpoints the number of points in the legend line + loc a location code prop the font property markerscale the relative size of legend markers vs. original + numpoints the number of points in the legend for line + scatterpoints the number of points in the legend for scatter plot + scatteryoffsets a list of yoffsets for scatter symbols in legend fancybox if True, draw a frame with a round fancybox. If None, use rc shadow if True, draw a shadow behind legend - scatteryoffsets a list of yoffsets for scatter symbols in legend + ncol number of columns borderpad the fractional whitespace inside the legend border labelspacing the vertical space between the legend entries handlelength the length of the legend handles @@ -147,9 +149,14 @@ The dimensions of pad and spacing are given as a fraction of the _fontsize. Values from rcParams will be used if None. -bbox_to_anchor can be an instance of BboxBase(or its derivatives) or a -tuple of 2 or 4 floats. See :meth:`set_bbox_to_anchor` for more -detail. +Users can specify any arbitrary location for the legend using the +*bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance +of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. +See :meth:`set_bbox_to_anchor` for more detail. + +The legend location can be specified by setting *loc* with a tuple of +2 floats, which is interpreted as the lower-left corner of the legend +in the normalized axes coordinate. """ from matplotlib.axes import Axes # local import only to avoid circularity from matplotlib.figure import Figure # local import only to avoid circularity @@ -158,8 +165,13 @@ if prop is None: self.prop=FontProperties(size=rcParams["legend.fontsize"]) + elif isinstance(prop, dict): + self.prop=FontProperties(**prop) + if "size" not in prop: + self.prop.set_size(rcParams["legend.fontsize"]) else: self.prop=prop + self._fontsize = self.prop.get_size_in_points() propnames=['numpoints', 'markerscale', 'shadow', "columnspacing", Modified: branches/mathtex/lib/matplotlib/offsetbox.py =================================================================== --- branches/mathtex/lib/matplotlib/offsetbox.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/offsetbox.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -833,6 +833,10 @@ if prop is None: self.prop=FontProperties(size=rcParams["legend.fontsize"]) + elif isinstance(prop, dict): + self.prop=FontProperties(**prop) + if "size" not in prop: + self.prop.set_size(rcParams["legend.fontsize"]) else: self.prop = prop Modified: branches/mathtex/lib/matplotlib/projections/polar.py =================================================================== --- branches/mathtex/lib/matplotlib/projections/polar.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/projections/polar.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -397,7 +397,7 @@ self._r_label2_position.clear().translate(angle, -self._rpad * rmax) for t in self.yaxis.get_ticklabels(): t.update(kwargs) - return self.yaxis.get_ticklines(), self.yaxis.get_ticklabels() + return self.yaxis.get_gridlines(), self.yaxis.get_ticklabels() set_rgrids.__doc__ = cbook.dedent(set_rgrids.__doc__) % kwdocd Modified: branches/mathtex/lib/matplotlib/pyplot.py =================================================================== --- branches/mathtex/lib/matplotlib/pyplot.py 2009年08月03日 12:21:30 UTC (rev 7332) +++ branches/mathtex/lib/matplotlib/pyplot.py 2009年08月03日 16:32:38 UTC (rev 7333) @@ -17,7 +17,7 @@ from matplotlib.scale import get_scale_docs, get_scale_names from matplotlib import cm -from matplotlib.cm import get_cmap +from matplotlib.cm import get_cmap, register_cmap import numpy as np @@ -438,7 +438,7 @@ .. seealso:: :func:`~matplotlib.pyplot.legend` - For information about the location codes + """ l = gcf().legend(handles, labels, loc, **kwargs) draw_if_interactive() @@ -1102,7 +1102,7 @@ if not isinstance(ax, PolarAxes): raise RuntimeError('rgrids only defined for polar axes') if len(args)==0: - lines = ax.yaxis.get_ticklines() + lines = ax.yaxis.get_gridlines() labels = ax.yaxis.get_ticklabels() else: lines, labels = ax.set_rgrids(*args, **kwargs) @@ -1396,8 +1396,26 @@ im.set_clim(vmin, vmax) draw_if_interactive() +def set_cmap(cmap): + ''' + set the default colormap to *cmap* and apply to current image if any. + See help(colormaps) for more information. + *cmap* must be a :class:`colors.Colormap` instance, or + the name of a registered colormap. + See :func:`register_cmap` and :func:`get_cmap`. + ''' + cmap = cm.get_cmap(cmap) + + rc('image', cmap=cmap.name) + im = gci() + + if im is not None: + im.set_cmap(cmap) + draw_if_interactive() + + def imread(*args, **kwargs): return _imread(*args, **kwargs) if _imread.__doc__ is not None: @@ -6322,31 +6340,69 @@ 'center' 10 =============== ============= -If none of these are locations are suitable, loc can be a 2-tuple -giving x,y in axes coords, ie:: - loc = 0, 1 # left top - loc = 0.5, 0.5 # center +Users can specify any arbitrary location for the legend using the +*bbox_to_anchor* keyword argument. bbox_to_anchor can be an instance +of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. +For example, :: + loc = 'upper right', bbox_to_anchor = (0.5, 0.5) + +will place the legend so that the upper right corner of the legend at +the center of the axes. + +The legend location can be specified in other coordinate, by using the +*bbox_transform* keyword. + +The loc itslef can be a 2-tuple giving x,y of the lower-left corner of +the legend in axes coords (*bbox_to_anchor* is ignored). + + Keyword arguments: *isaxes*: [ True | False ] Indicates that this is an axes legend + *prop*: [ None | FontProperties | dict ] + A :class:`matplotlib.font_manager.FontProperties` + instance. If *prop* is a dictionary, a new instance will be + created with *prop*. If *None*, use rc settings. + *numpoints*: integer - The number of points in the legend line, default is 4 + The number of points in the legend for line - *prop*: [ None | FontProperties ] - A :class:`matplotlib.font_manager.FontProperties` - instance, or *None* to use rc settings. + *scatterpoints*: integer + The number of points in the legend for scatter plot + *scatteroffsets*: list of floats + a list of yoffsets for scatter symbols in legend + *markerscale*: [ None | scalar ] The relative size of legend markers vs. original. If *None*, use rc settings. + *fancybox*: [ None | False | True ] + if True, draw a frame with a round fancybox. If None, use rc + *shadow*: [ None | False | True ] If *True*, draw a shadow behind legend. If *None*, use rc settings. + *ncol* : integer + number of columns. default is 1 + + *mode* : [ "expand" | None ] + if mode is "expand", the legend will be horizontally expanded + to fill the axes area (or *bbox_to_anchor*) + + *bbox_to_anchor* : an instance of BboxBase or a tuple of 2 or 4 floats + the bbox that the legend will be anchored. + + *bbox_transform* : [ an instance of Transform | None ] + the transform for the bbox. transAxes if None. + + *title* : string + the legend title + Padding and spacing between various elements use following keywords parameters. The dimensions of these values are given as a fraction of the fontsize. Values from rcParams will be used if None. @@ -6362,9 +6418,14 @@ columnspacing the spacing between columns ================ ================================================================== + **Example:** -.. plot:: mpl_examples/api/legend_demo.py""" +.. plot:: mpl_examples/api/legend_demo.py + +Also see :ref:`plotting-guide-legend`. + +""" ret = gca().legend(*args, **kwargs) draw_if_interactive() return ret Property changes on: branches/mathtex/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 /trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py:7265-7303 + /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 /trunk/matplotlib/lib/matplotlib/sphinxext/mathmpl.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py:7265-7303 + /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 /trunk/matplotlib/lib/matplotlib/sphinxext/only_directives.py:7265-7303,7308-7317,7321 Property changes on: branches/mathtex/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 /trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py:7265-7303 + /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 /trunk/matplotlib/lib/matplotlib/sphinxext/plot_directive.py:7265-7303,7308-7317,7321 This was sent by the SourceForge.net collaborative development platform, the worl... [truncated message content]
Revision: 7332 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7332&view=rev Author: jswhit Date: 2009年08月03日 12:21:30 +0000 (2009年8月03日) Log Message: ----------- prepare for new release Modified Paths: -------------- trunk/toolkits/basemap/Changelog Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2009年08月01日 19:34:05 UTC (rev 7331) +++ trunk/toolkits/basemap/Changelog 2009年08月03日 12:21:30 UTC (rev 7332) @@ -1,4 +1,4 @@ -version 0.99.4 (not yet released) +version 0.99.4 (svn revision 7332) * ax.frame replaced with ax.spines to maintain compatibility with matplotlib spines support. * added latmax kwarg to drawparallels and drawmeridians This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.