SourceForge logo
SourceForge logo
Menu

matplotlib-checkins — Commit notification. DO NOT POST to this list, just subscribe to it.

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
(6)
2
(17)
3
(11)
4
(12)
5
(16)
6
(6)
7
(5)
8
(8)
9
(24)
10
(15)
11
(12)
12
(22)
13
(30)
14
(16)
15
(6)
16
(15)
17
(20)
18
(4)
19
(11)
20
(16)
21
(2)
22
(17)
23
(16)
24
(18)
25
(4)
26
(9)
27
(12)
28
(2)
29
30
(4)





Showing 11 results of 11

From: <md...@us...> - 2008年06月19日 19:56:26
Revision: 5601
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5601&view=rev
Author: mdboom
Date: 2008年06月19日 12:55:41 -0700 (2008年6月19日)
Log Message:
-----------
Add initial support for inheritance diagrams.
Modified Paths:
--------------
 trunk/matplotlib/doc/api/artist_api.rst
 trunk/matplotlib/doc/api/collections_api.rst
 trunk/matplotlib/doc/conf.py
 trunk/matplotlib/doc/devel/transformations.rst
Added Paths:
-----------
 trunk/matplotlib/doc/sphinxext/inheritance_diagram.py
Modified: trunk/matplotlib/doc/api/artist_api.rst
===================================================================
--- trunk/matplotlib/doc/api/artist_api.rst	2008年06月19日 19:53:12 UTC (rev 5600)
+++ trunk/matplotlib/doc/api/artist_api.rst	2008年06月19日 19:55:41 UTC (rev 5601)
@@ -2,6 +2,8 @@
 matplotlib artists
 *******************
 
+.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text
+
 :mod:`matplotlib.artist`
 =============================
 
Modified: trunk/matplotlib/doc/api/collections_api.rst
===================================================================
--- trunk/matplotlib/doc/api/collections_api.rst	2008年06月19日 19:53:12 UTC (rev 5600)
+++ trunk/matplotlib/doc/api/collections_api.rst	2008年06月19日 19:55:41 UTC (rev 5601)
@@ -2,6 +2,7 @@
 matplotlib collections
 **********************
 
+.. inheritance-diagram:: matplotlib.collections
 
 :mod:`matplotlib.collections`
 =============================
Modified: trunk/matplotlib/doc/conf.py
===================================================================
--- trunk/matplotlib/doc/conf.py	2008年06月19日 19:53:12 UTC (rev 5600)
+++ trunk/matplotlib/doc/conf.py	2008年06月19日 19:55:41 UTC (rev 5601)
@@ -28,7 +28,7 @@
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = ['mathpng', 'math_symbol_table', 'sphinx.ext.autodoc',
- 'only_directives', 'plot_directive']
+ 'only_directives', 'plot_directive', 'inheritance_diagram']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
Modified: trunk/matplotlib/doc/devel/transformations.rst
===================================================================
--- trunk/matplotlib/doc/devel/transformations.rst	2008年06月19日 19:53:12 UTC (rev 5600)
+++ trunk/matplotlib/doc/devel/transformations.rst	2008年06月19日 19:55:41 UTC (rev 5601)
@@ -2,6 +2,8 @@
 Working with transformations
 ==============================
 
+.. inheritance-diagram:: matplotlib.transforms matplotlib.path
+
 :mod:`matplotlib.transforms`
 =============================
 
Added: trunk/matplotlib/doc/sphinxext/inheritance_diagram.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/inheritance_diagram.py	 (rev 0)
+++ trunk/matplotlib/doc/sphinxext/inheritance_diagram.py	2008年06月19日 19:55:41 UTC (rev 5601)
@@ -0,0 +1,414 @@
+"""
+Defines a docutils directive for inserting inheritance diagrams.
+
+Provide the directive with one or more classes or modules (separated
+by whitespace). For modules, all of the classes in that module will
+be used.
+
+Example::
+
+ Given the following classes:
+
+ class A: pass
+ class B(A): pass
+ class C(A): pass
+ class D(B, C): pass
+ class E(B): pass
+
+ .. inheritance-diagram: D E
+
+ Produces a graph like the following:
+
+ A
+ / \
+ B C
+ / \ /
+ E D
+
+The graph is inserted as a PNG+image map into HTML and a PDF in
+LaTeX.
+"""
+
+import inspect
+import os
+import subprocess
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5
+
+from docutils.nodes import Body, Element
+from docutils.writers.html4css1 import HTMLTranslator
+from sphinx.latexwriter import LaTeXTranslator
+from docutils.parsers.rst import directives
+from sphinx.roles import xfileref_role
+from sphinx.directives.desc import py_sig_re
+
+class DotException(Exception):
+ pass
+
+class InheritanceGraph(object):
+ """
+ Given a list of classes, determines the set of classes that
+ they inherit from all the way to the root "object", and then
+ is able to generate a graphviz dot graph from them.
+ """
+ def __init__(self, class_names, show_builtins=False):
+ """
+ *class_names* is a list of child classes to show bases from.
+
+ If *show_builtins* is True, then Python builtins will be shown
+ in the graph.
+ """
+ self.class_names = class_names
+ self.classes = self._import_classes(class_names)
+ self.all_classes = self._all_classes(self.classes)
+ if len(self.all_classes) == 0:
+ raise ValueError("No classes found for inheritance diagram")
+ self.show_builtins = show_builtins
+
+ def _import_class_or_module(self, name):
+ """
+ Import a class using its fully-qualified *name*.
+ """
+ try:
+ path, base, signature = py_sig_re.match(name).groups()
+ except:
+ raise ValueError(
+ "Invalid class '%s' specified for inheritance diagram" % name)
+ fullname = (path or '') + base
+ path = path and path.rstrip('.')
+ if not path:
+ raise ValueError(
+ "Invalid class '%s' specified for inheritance diagram" % name)
+ try:
+ module = __import__(path, None, None, [])
+ except ImportError:
+ raise ValueError(
+ "Could not import class '%s' specified for inheritance diagram" % name)
+
+ try:
+ todoc = module
+ for comp in fullname.split('.')[1:]:
+ todoc = getattr(todoc, comp)
+ except AttributeError:
+ raise ValueError(
+ "Could not find class '%s' specified for inheritance diagram" % name)
+
+ # If a class, just return it
+ if inspect.isclass(todoc):
+ return [todoc]
+ elif inspect.ismodule(todoc):
+ classes = []
+ for cls in todoc.__dict__.values():
+ if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
+ classes.append(cls)
+ return classes
+ raise ValueError(
+ "'%s' does not resolve to a class or module" % name)
+
+ def _import_classes(self, class_names):
+ """
+ Import a list of classes.
+ """
+ classes = []
+ for name in class_names:
+ classes.extend(self._import_class_or_module(name))
+ return classes
+
+ def _all_classes(self, classes):
+ """
+ Return a list of all classes that are ancestors of *classes*.
+ """
+ all_classes = {}
+
+ def recurse(cls):
+ all_classes[cls] = None
+ for c in cls.__bases__:
+ if c not in all_classes:
+ recurse(c)
+
+ for cls in classes:
+ recurse(cls)
+
+ return all_classes.keys()
+
+ def class_name(self, cls):
+ """
+ Given a class object, return a fully-qualified name. This
+ works for things I've tested in matplotlib so far, but may
+ not be completely general.
+ """
+ module = cls.__module__
+ if module == '__builtin__':
+ return cls.__name__
+ return '.'.join([module, cls.__name__])
+
+ def get_all_class_names(self):
+ """
+ Get all of the class names involved in the graph.
+ """
+ return [self.class_name(x) for x in self.all_classes]
+
+ # These are the default options for
+ default_graph_options = {
+ "rankdir": "LR",
+ "size": '"11.0, 11.0"'
+ }
+ default_node_options = {
+ "shape": "box",
+ "fontsize": 10,
+ "height": 0.25,
+ "fontname": "sans",
+ "style": '"setlinewidth(0.5)"'
+ }
+ default_edge_options = {
+ "arrowsize": 0.5,
+ "style": '"setlinewidth(0.5)"'
+ }
+
+ def _format_node_options(self, options):
+ return ','.join(["%s=%s" % x for x in options.items()])
+ def _format_graph_options(self, options):
+ return ''.join(["%s=%s;\n" % x for x in options.items()])
+
+ def generate_dot(self, fd, name, urls={},
+ graph_options={}, node_options={},
+ edge_options={}):
+ """
+ Generate a graphviz dot graph from the classes that
+ were passed in to __init__.
+
+ *fd* is a Python file-like object to write to.
+
+ *name* is the name of the graph
+
+ *urls* is a dictionary mapping class names to http urls
+
+ *graph_options*, *node_options*, *edge_options* are
+ dictionaries containing key/value pairs to pass on as graphviz
+ properties.
+ """
+ g_options = self.default_graph_options.copy()
+ g_options.update(graph_options)
+ n_options = self.default_node_options.copy()
+ n_options.update(node_options)
+ e_options = self.default_edge_options.copy()
+ e_options.update(edge_options)
+
+ fd.write('digraph %s {\n' % name)
+ fd.write(self._format_graph_options(g_options))
+
+ for cls in self.all_classes:
+ if not self.show_builtins and cls in __builtins__.values():
+ continue
+
+ name = self.class_name(cls)
+
+ # Write the node
+ this_node_options = n_options.copy()
+ url = urls.get(name)
+ if url is not None:
+ this_node_options['URL'] = '"%s"' % url
+ fd.write(' "%s" [%s];\n' %
+ (name, self._format_node_options(this_node_options)))
+
+ # Write the edges
+ for base in cls.__bases__:
+ if not self.show_builtins and base in __builtins__.values():
+ continue
+
+ base_name = self.class_name(base)
+ fd.write(' "%s" -> "%s" [%s];\n' %
+ (self.class_name(base), name,
+ self._format_node_options(e_options)))
+ fd.write('}\n')
+
+ def run_dot(self, args, name, urls={},
+ graph_options={}, node_options={}, edge_options={}):
+ """
+ Run graphviz 'dot' over this graph, returning whatever 'dot'
+ writes to stdout.
+
+ *args* will be passed along as commandline arguments.
+
+ *name* is the name of the graph
+
+ *urls* is a dictionary mapping class names to http urls
+
+ Raises DotException for any of the many os and
+ installation-related errors that may occur.
+ """
+ try:
+ dot = subprocess.Popen(['dot'] + list(args),
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ close_fds=True)
+ except OSError:
+ raise DotException("Could not execute 'dot'. Are you sure you have 'graphviz' installed?")
+ except ValueError:
+ raise DotException("'dot' called with invalid arguments")
+ except:
+ raise DotException("Unexpected error calling 'dot'")
+
+ self.generate_dot(dot.stdin, name, urls, graph_options, node_options,
+ edge_options)
+ dot.stdin.close()
+ result = dot.stdout.read()
+ returncode = dot.wait()
+ if returncode != 0:
+ raise DotException("'dot' returned the errorcode %d" % returncode)
+ return result
+
+class inheritance_diagram(Body, Element):
+ """
+ A docutils node to use as a placeholder for the inheritance
+ diagram.
+ """
+ pass
+
+def inheritance_diagram_directive_run(clstexts, state):
+ """
+ Run when the inheritance_diagram directive is first encountered.
+ """
+ node = inheritance_diagram()
+
+ # Create a graph starting with the list of classes
+ graph = InheritanceGraph(clstexts)
+
+ # Create xref nodes for each target of the graph's image map and
+ # add them to the doc tree so that Sphinx can resolve the
+ # references to real URLs later. These nodes will eventually be
+ # removed from the doctree after we're done with them.
+ for name in graph.get_all_class_names():
+ refnodes, x = xfileref_role(
+ 'class', ':class:`%s`' % name, name, 0, state)
+ node.extend(refnodes)
+ # Store the graph object so we can use it to generate the
+ # dot file later
+ node['graph'] = graph
+ # Store the original content for use as a hash
+ node['content'] = " ".join(clstexts)
+ return [node]
+
+def html_output_graph(self, node):
+ """
+ Output the graph for HTML. This will insert a PNG with clickable
+ image map.
+ """
+ graph = node['graph']
+
+ # Determine where to write the PNG to. This follows
+ # the same procedure as mathpng.py
+ name = 'inheritance%s' % md5(node['content']).hexdigest()[-10:]
+ png_path = '_static/%s.png' % name
+
+ path = '_static'
+ source = self.document.attributes['source']
+ count = source.split('/doc/')[-1].count('/')
+ for i in range(count):
+ if os.path.exists(path): break
+ path = '../'+path
+ path = '../'+path #specifically added for matplotlib
+
+ # Create a mapping from fully-qualified class names to URLs.
+ urls = {}
+ for child in node:
+ try:
+ urls[child['reftitle']] = child['refuri']
+ except KeyError:
+ try:
+ urls[child['reftitle']] = '#' + child['refid']
+ except KeyError:
+ pass
+
+ # These arguments to dot will save a PNG file to disk and write
+ # an HTML image map to stdout.
+ image_map = graph.run_dot(['-Tpng', '-o%s' % png_path, '-Tcmapx'],
+ name, urls)
+ return ('<img src="%s/%s.png" usemap="#%s"/>%s' %
+ (path, name, name, image_map))
+
+def latex_output_graph(self, node):
+ """
+ Output the graph for LaTeX. This will insert a PDF.
+ """
+ graph = node['graph']
+
+ # Determine where to write the PNG to. This follows
+ # the same procedure as mathpng.py
+ name = 'inheritance%s' % md5(node['content']).hexdigest()[-10:]
+ pdf_path = '_static/%s.pdf' % name
+
+ path = '_static'
+ source = self.document.attributes['source']
+ count = source.split('/doc/')[-1].count('/')
+ for i in range(count):
+ if os.path.exists(path): break
+ path = '../'+path
+ path = '../'+path #specifically added for matplotlib
+
+ graph.run_dot(['-Tpdf', '-o%s' % pdf_path], name,
+ graph_options={'size': '"6.0,6.0"'})
+ return '\\includegraphics{../../_static/%s.pdf}' % name
+
+def visit_inheritance_diagram(inner_func):
+ """
+ This is just a wrapper around html/latex_output_graph to make it
+ easier to handle errors and insert warnings.
+ """
+ def visitor(self, node):
+ try:
+ content = inner_func(self, node)
+ except DotException, e:
+ # Insert the exception as a warning in the document
+ warning = self.document.reporter.warning(str(e), line=node.line)
+ warning.parent = node
+ node.children = [warning]
+ else:
+ source = self.document.attributes['source']
+ self.body.append(content)
+ node.children = []
+ return visitor
+
+def do_nothing(self, node):
+ pass
+
+# Deal with the old and new way of registering directives
+try:
+ from docutils.parsers.rst import Directive
+except ImportError:
+ from docutils.parsers.rst.directives import _directives
+ def inheritance_diagram_directive(name, arguments, options, content, lineno,
+ content_offset, block_text, state,
+ state_machine):
+ return inheritance_diagram_directive_run(arguments, state)
+ inheritance_diagram_directive.__doc__ = __doc__
+ inheritance_diagram_directive.arguments = (1, 100, 0)
+ inheritance_diagram_directive.options = {}
+ inheritance_diagram_directive.content = 0
+ _directives['inheritance-diagram'] = inheritance_diagram_directive
+else:
+ class inheritance_diagram_directive(Directive):
+ has_content = False
+ required_arguments = 1
+ optional_arguments = 100
+ final_argument_whitespace = False
+ option_spec = {}
+
+ def run(self):
+ return inheritance_diagram_directive_run(self.arguments, self.state)
+ inheritance_diagram_directive.__doc__ = __doc__
+
+ directives.register_directive('inheritance-diagram',
+ inheritance_diagram_directive)
+
+def setup(app):
+ app.add_node(inheritance_diagram)
+
+ HTMLTranslator.visit_inheritance_diagram = \
+ visit_inheritance_diagram(html_output_graph)
+ HTMLTranslator.depart_inheritance_diagram = do_nothing
+
+ LaTeXTranslator.visit_inheritance_diagram = \
+ visit_inheritance_diagram(latex_output_graph)
+ LaTeXTranslator.depart_inheritance_diagram = do_nothing
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年06月19日 19:53:55
Revision: 5600
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5600&view=rev
Author: mdboom
Date: 2008年06月19日 12:53:12 -0700 (2008年6月19日)
Log Message:
-----------
docstring formatting fixes.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/artist.py
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py	2008年06月19日 19:24:45 UTC (rev 5599)
+++ trunk/matplotlib/lib/matplotlib/artist.py	2008年06月19日 19:53:12 UTC (rev 5600)
@@ -23,7 +23,8 @@
 
 class Artist(object):
 """
- Abstract base class for someone who renders into a FigureCanvas
+ Abstract base class for someone who renders into a
+ :class:`FigureCanvas`.
 """
 
 aname = 'Artist'
@@ -52,12 +53,15 @@
 
 def remove(self):
 """
- Remove the artist from the figure if possible. The effect will not
- be visible until the figure is redrawn, e.g., with ax.draw_idle().
- Call ax.relim() to update the axes limits if desired.
+ Remove the artist from the figure if possible. The effect
+ will not be visible until the figure is redrawn, e.g., with
+ :meth:`matplotlib.axes.Axes.draw_idle`. Call
+ :meth:`matplotlib.axes.Axes.relim` to update the axes limits
+ if desired.
 
- Note: relim() will not see collections even if the collection
- was added to axes with autolim=True.
+ Note: :meth:`~matplotlib.axes.Axes.relim` will not see
+ collections even if the collection was added to axes with
+ *autolim* = True.
 
 Note: there is no support for removing the artist's legend entry.
 """
@@ -134,16 +138,18 @@
 
 def set_transform(self, t):
 """
- set the Transformation instance used by this artist
-
- ACCEPTS: a matplotlib.transform transformation instance
+ Set the :class:`~matplotlib.transforms.Transform` instance
+ used by this artist.
 """
 self._transform = t
 self._transformSet = True
 self.pchanged()
 
 def get_transform(self):
- 'return the Transformation instance used by this artist'
+ """
+ Return the :class:`~matplotlib.transforms.Transform`
+ instance used by this artist.
+ """
 if self._transform is None:
 self._transform = IdentityTransform()
 return self._transform
@@ -228,26 +234,26 @@
 None - picking is disabled for this artist (default)
 
 boolean - if True then picking will be enabled and the
- artist will fire a pick event if the mouse event is over
- the artist
+ artist will fire a pick event if the mouse event is over
+ the artist
 
 float - if picker is a number it is interpreted as an
- epsilon tolerance in points and the the artist will fire
- off an event if it's data is within epsilon of the mouse
- event. For some artists like lines and patch collections,
- the artist may provide additional data to the pick event
- that is generated, eg the indices of the data within
- epsilon of the pick event
+ epsilon tolerance in points and the the artist will fire
+ off an event if it's data is within epsilon of the mouse
+ event. For some artists like lines and patch collections,
+ the artist may provide additional data to the pick event
+ that is generated, eg the indices of the data within
+ epsilon of the pick event
 
 function - if picker is callable, it is a user supplied
- function which determines whether the artist is hit by the
- mouse event.
+ function which determines whether the artist is hit by the
+ mouse event::
 
 hit, props = picker(artist, mouseevent)
 
- to determine the hit test. if the mouse event is over the
- artist, return hit=True and props is a dictionary of
- properties you want added to the PickEvent attributes
+ to determine the hit test. if the mouse event is over the
+ artist, return hit=True and props is a dictionary of
+ properties you want added to the PickEvent attributes.
 
 ACCEPTS: [None|float|boolean|callable]
 """
@@ -288,17 +294,18 @@
 """
 Set the artist's clip path, which may be:
 
- a) a Patch (or subclass) instance
+ a) a :class:`~matplotlib.patches.Patch` (or subclass) instance
 
- b) a Path instance, in which cas aoptional transform may
- be provided, which will be applied to the path before using it
- for clipping.
+ b) a :class:`~matplotlib.path.Path` instance, in which case
+ an optional :class:`~matplotlib.transforms.Transform`
+ instance may be provided, which will be applied to the
+ path before using it for clipping.
 
- c) None, to remove the clipping path
+ c) *None*, to remove the clipping path
 
 For efficiency, if the path happens to be an axis-aligned
 rectangle, this method will set the clipping box to the
- corresponding rectangle and set the clipping path to None.
+ corresponding rectangle and set the clipping path to *None*.
 
 ACCEPTS: a Path instance and a Transform instance, a Patch
 instance, or None
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月19日 19:25:13
Revision: 5599
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5599&view=rev
Author: jdh2358
Date: 2008年06月19日 12:24:45 -0700 (2008年6月19日)
Log Message:
-----------
added a releae guide to devel docs
Modified Paths:
--------------
 trunk/matplotlib/doc/devel/index.rst
 trunk/matplotlib/doc/faq/environment_variables_faq.rst
 trunk/matplotlib/doc/faq/howto_faq.rst
 trunk/matplotlib/doc/faq/installing_faq.rst
 trunk/matplotlib/doc/faq/troubleshooting_faq.rst
Added Paths:
-----------
 trunk/matplotlib/doc/devel/release_guide.rst
Modified: trunk/matplotlib/doc/devel/index.rst
===================================================================
--- trunk/matplotlib/doc/devel/index.rst	2008年06月19日 19:13:15 UTC (rev 5598)
+++ trunk/matplotlib/doc/devel/index.rst	2008年06月19日 19:24:45 UTC (rev 5599)
@@ -14,6 +14,7 @@
 
 coding_guide.rst
 documenting_mpl.rst
+ release_guide.rst
 transformations.rst
 add_new_projection.rst
 outline.rst
Added: trunk/matplotlib/doc/devel/release_guide.rst
===================================================================
--- trunk/matplotlib/doc/devel/release_guide.rst	 (rev 0)
+++ trunk/matplotlib/doc/devel/release_guide.rst	2008年06月19日 19:24:45 UTC (rev 5599)
@@ -0,0 +1,86 @@
+.. _release-guide:
+
+*************************
+Doing a matplolib release
+*************************
+
+A guide for developers who are doing a matplotlib release
+
+* Edit :file:`__init__.py` and bump the version number
+
+
+.. _release-testing:
+
+Testing
+=======
+
+* Make sure :file:`examples/tests/backend_driver.py` runs without errors
+ and check the output of the PNG, PDF, PS and SVG backends
+
+* Run :file:`unit/memleak_hawaii3.py` and make sure there are no
+ memory leaks
+
+* try some GUI examples, eg :file:`simple_plot.py` with GTKAgg, TkAgg, etc...
+
+* remove font cache and tex cache from :file:`.matplotlib` and test
+ with and without cache on some example script
+
+.. _release-packaging:
+
+Packaging
+=========
+
+* Make sure the :file:`MANIFEST.in` us up to date and remove
+ :file:`MANIFEST` so it will be rebuilt by MANIFEST.in
+
+* run `svn-clean
+ <http://svn.collab.net/repos/svn/trunk/contrib/client-side/svn-clean>`_
+ from in the mpl svn directory before building the sdist
+
+* unpack the sdist and make sure you can build from that directory
+
+* Use :file:`setup.cfg` to set the default backends. For windows and
+ OSX, the default backend should be TkAgg.
+
+* on windows, unix2dos the rc file
+
+.. _release-uploading:
+
+Uploading
+=========
+
+* Post the win32 and OS-X binaries for testing and make a request on
+ matplotlib-devel for testing. Pester us if we don't respond
+
+
+* ftp the source and binaries to the anonymous FTP site::
+
+ local> cd dist
+ local> ncftp upload.sourceforge.net
+ ncftp> cd incoming
+ ncftp> put tar.gz, zip exe
+
+* go https://sourceforge.net/project/admin/?group_id=80706 and do a
+ file release. Click on the "Admin" tab to log in as an admin, and
+ then the "File Releases" tab. Go to the bottom and click "add
+ release" and enter the package name but not the version number in
+ the "Package Name" box. You will then be prompted for the "New
+ release name" at which point you can add the version number, eg
+ somepackage-0.1 and click "Create this release".
+
+ You will then be taken to a fairly self explanatory page where you
+ can enter the Change notes, the release notes, and select which
+ packages from the incoming ftp archive you want to include in this
+ release. For each binary, you will need to select the platform and
+ file type, and when you are done you click on the "notify users who
+ are monitoring this package link"
+
+
+.. _release-announcing:
+
+Announcing
+==========
+
+Announce the release on matplotlib-announce, matplotlib-users and
+matplotlib-devel. Include a summary of highlights from the CHANGELOG
+and/or post the whole CHANGELOG since the last release.
\ No newline at end of file
Modified: trunk/matplotlib/doc/faq/environment_variables_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/environment_variables_faq.rst	2008年06月19日 19:13:15 UTC (rev 5598)
+++ trunk/matplotlib/doc/faq/environment_variables_faq.rst	2008年06月19日 19:24:45 UTC (rev 5599)
@@ -4,6 +4,8 @@
 Environment Variables
 *********************
 
+.. contents::
+
 .. envvar:: HOME
 
 The user's home directory. On linux, :envvar:`~ <HOME>` is shorthand for :envvar:`HOME`.
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst	2008年06月19日 19:13:15 UTC (rev 5598)
+++ trunk/matplotlib/doc/faq/howto_faq.rst	2008年06月19日 19:24:45 UTC (rev 5599)
@@ -4,6 +4,9 @@
 Howto
 *****
 
+.. contents::
+
+
 .. _howto-subplots-adjust:
 
 How do I move the edge of my axes area over to make room for my tick labels?
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst	2008年06月19日 19:13:15 UTC (rev 5598)
+++ trunk/matplotlib/doc/faq/installing_faq.rst	2008年06月19日 19:24:45 UTC (rev 5599)
@@ -4,6 +4,7 @@
 Installation
 *************
 
+.. contents::
 
 
 How do I report a compilation problem?
Modified: trunk/matplotlib/doc/faq/troubleshooting_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/troubleshooting_faq.rst	2008年06月19日 19:13:15 UTC (rev 5598)
+++ trunk/matplotlib/doc/faq/troubleshooting_faq.rst	2008年06月19日 19:24:45 UTC (rev 5599)
@@ -4,6 +4,8 @@
 Troubleshooting
 ***************
 
+.. contents::
+
 .. _matplotlib-version:
 
 What is my matplotlib version?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月19日 19:13:23
Revision: 5598
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5598&view=rev
Author: jdh2358
Date: 2008年06月19日 12:13:15 -0700 (2008年6月19日)
Log Message:
-----------
replaced gtk timeout example
Added Paths:
-----------
 trunk/matplotlib/examples/animation/gtk_timeout.py
Removed Paths:
-------------
 trunk/matplotlib/examples/animation/dynamic_demo.py
Deleted: trunk/matplotlib/examples/animation/dynamic_demo.py
===================================================================
--- trunk/matplotlib/examples/animation/dynamic_demo.py	2008年06月19日 17:23:34 UTC (rev 5597)
+++ trunk/matplotlib/examples/animation/dynamic_demo.py	2008年06月19日 19:13:15 UTC (rev 5598)
@@ -1,27 +0,0 @@
-#!/usr/bin/env python
-
-import gobject
-import gtk
-
-from pylab import *
-
-
-fig = figure(1)
-ind = arange(30)
-X = rand(len(ind),10)
-lines = plot(X[:,0], 'o')
-
-manager = get_current_fig_manager()
-def updatefig(*args):
- lines[0].set_data(ind, X[:,updatefig.count])
- manager.canvas.draw()
- updatefig.count += 1
- if updatefig.count<10:
- return True
- else:
- return False
-
-updatefig.count = 0
-
-gobject.timeout_add(300, updatefig)
-show()
Added: trunk/matplotlib/examples/animation/gtk_timeout.py
===================================================================
--- trunk/matplotlib/examples/animation/gtk_timeout.py	 (rev 0)
+++ trunk/matplotlib/examples/animation/gtk_timeout.py	2008年06月19日 19:13:15 UTC (rev 5598)
@@ -0,0 +1,19 @@
+import gobject
+import numpy as np
+import matplotlib
+matplotlib.use('GTKAgg')
+
+import matplotlib.pyplot as plt
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+line, = ax.plot(np.random.rand(10))
+ax.set_ylim(0, 1)
+
+def update():
+ line.set_ydata(np.random.rand(10))
+ fig.canvas.draw_idle()
+ return True # return False to terminate the updates
+
+gobject.timeout_add(100, update) # you can also use idle_add to update when gtk is idle
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月19日 17:24:25
Revision: 5597
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5597&view=rev
Author: jdh2358
Date: 2008年06月19日 10:23:34 -0700 (2008年6月19日)
Log Message:
-----------
added support for custom positioning of axis labels
Modified Paths:
--------------
 trunk/matplotlib/doc/faq/howto_faq.rst
 trunk/matplotlib/lib/matplotlib/axis.py
Added Paths:
-----------
 trunk/matplotlib/doc/pyplots/align_ylabels.py
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst	2008年06月19日 16:54:54 UTC (rev 5596)
+++ trunk/matplotlib/doc/faq/howto_faq.rst	2008年06月19日 17:23:34 UTC (rev 5597)
@@ -113,6 +113,24 @@
 ``markersize``. For more information on configuring ticks, see
 :ref:`axis-container` and :ref:`tick-container`.
 
+
+.. _howto-align-label:
+
+How do I align my ylabels across multiple subplots?
+===================================================
+
+If you have multiple subplots over one another, and the y data have
+different scales, you can often get ylabels that do not align
+vertically across the multiple subplots, which can be unattractive.
+By default, matplotlib positions the x location of the ylabel so that
+it does not overlap any of the y ticks. You can override this default
+behavior by specifying the coordinates of the label. The example
+below shows the default behavior in the left subplots, and the manual
+setting in the right subplots.
+
+.. plot:: align_ylabels.py
+ :include-source:
+
 .. _howto-webapp:
 
 How do I use matplotlib in a web application server?
Added: trunk/matplotlib/doc/pyplots/align_ylabels.py
===================================================================
--- trunk/matplotlib/doc/pyplots/align_ylabels.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/align_ylabels.py	2008年06月19日 17:23:34 UTC (rev 5597)
@@ -0,0 +1,35 @@
+import numpy as np
+import matplotlib.pyplot as plt
+
+box = dict(facecolor='yellow', pad=5, alpha=0.2)
+
+fig = plt.figure()
+fig.subplots_adjust(left=0.2, wspace=0.6)
+
+
+ax1 = fig.add_subplot(221)
+ax1.plot(2000*np.random.rand(10))
+ax1.set_title('ylabels not aligned')
+ax1.set_ylabel('misaligned 1', bbox=box)
+ax1.set_ylim(0, 2000)
+ax3 = fig.add_subplot(223)
+ax3.set_ylabel('misaligned 2',bbox=box)
+ax3.plot(np.random.rand(10))
+
+
+labelx = -0.3 # axes coords
+
+ax2 = fig.add_subplot(222)
+ax2.set_title('ylabels aligned')
+ax2.plot(2000*np.random.rand(10))
+ax2.set_ylabel('aligned 1', bbox=box)
+ax2.yaxis.set_label_coords(labelx, 0.5)
+ax2.set_ylim(0, 2000)
+
+ax4 = fig.add_subplot(224)
+ax4.plot(np.random.rand(10))
+ax4.set_ylabel('aligned 2', bbox=box)
+ax4.yaxis.set_label_coords(labelx, 0.5)
+
+
+plt.show()
Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py	2008年06月19日 16:54:54 UTC (rev 5596)
+++ trunk/matplotlib/lib/matplotlib/axis.py	2008年06月19日 17:23:34 UTC (rev 5597)
@@ -503,9 +503,9 @@
 
 """
 Public attributes
- transData - transform data coords to display coords
- transAxis - transform axis coords to display coords
 
+ * transData - transform data coords to display coords
+ * transAxis - transform axis coords to display coords
 
 """
 LABELPAD = 5
@@ -533,6 +533,7 @@
 #self.major = dummy()
 #self.minor = dummy()
 
+ self._autolabelpos = True
 self.label = self._get_label()
 self.offsetText = self._get_offset_text()
 self.majorTicks = []
@@ -542,6 +543,29 @@
 self.cla()
 self.set_scale('linear')
 
+
+ def set_label_coords(self, x, y, transform=None):
+ """
+ Set the coordinates of the label. By default, the x
+ coordinate of the y label is determined by the tick label
+ bounding boxes, but this can lead to poor alignment of
+ multiple ylabels if there are multiple axes. Ditto for the y
+ coodinate of the x label.
+
+ You can also specify the coordinate system of the label with
+ the transform. If None, the default coordinate system will be
+ the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5)
+ is middle, etc
+
+ """
+
+ self._autolabelpos = False
+ if transform is None:
+ transform = self.axes.transAxes
+
+ self.label.set_transform(transform)
+ self.label.set_position((x, y))
+
 def get_transform(self):
 return self._scale.get_transform()
 
@@ -703,7 +727,9 @@
 # just the tick labels that actually overlap note we need a
 # *copy* of the axis label box because we don't wan't to scale
 # the actual bbox
+
 self._update_label_position(ticklabelBoxes, ticklabelBoxes2)
+
 self.label.draw(renderer)
 
 self._update_offset_text_position(ticklabelBoxes, ticklabelBoxes2)
@@ -1139,8 +1165,9 @@
 verticalalignment='top',
 horizontalalignment='center',
 )
+
 label.set_transform( mtransforms.blended_transform_factory(
- self.axes.transAxes, mtransforms.IdentityTransform() ))
+ self.axes.transAxes, mtransforms.IdentityTransform() ))
 
 self._set_artist_props(label)
 self.label_position='bottom'
@@ -1184,7 +1211,7 @@
 Update the label position based on the sequence of bounding
 boxes of all the ticklabels
 """
-
+ if not self._autolabelpos: return
 x,y = self.label.get_position()
 if self.label_position == 'bottom':
 if not len(bboxes):
@@ -1374,7 +1401,7 @@
 rotation='vertical',
 )
 label.set_transform( mtransforms.blended_transform_factory(
- mtransforms.IdentityTransform(), self.axes.transAxes) )
+ mtransforms.IdentityTransform(), self.axes.transAxes) )
 
 self._set_artist_props(label)
 self.label_position='left'
@@ -1418,7 +1445,7 @@
 Update the label position based on the sequence of bounding
 boxes of all the ticklabels
 """
-
+ if not self._autolabelpos: return
 x,y = self.label.get_position()
 if self.label_position == 'left':
 if not len(bboxes):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月19日 16:55:24
Revision: 5596
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5596&view=rev
Author: jdh2358
Date: 2008年06月19日 09:54:54 -0700 (2008年6月19日)
Log Message:
-----------
added auto subplots adj faq
Modified Paths:
--------------
 trunk/matplotlib/Makefile
 trunk/matplotlib/doc/faq/howto_faq.rst
 trunk/matplotlib/doc/glossary/index.rst
 trunk/matplotlib/doc/make.py
 trunk/matplotlib/doc/users/installing.rst
Added Paths:
-----------
 trunk/matplotlib/doc/pyplots/auto_subplots_adjust.py
Modified: trunk/matplotlib/Makefile
===================================================================
--- trunk/matplotlib/Makefile	2008年06月19日 13:59:08 UTC (rev 5595)
+++ trunk/matplotlib/Makefile	2008年06月19日 16:54:54 UTC (rev 5596)
@@ -39,7 +39,7 @@
 	rm -rf build;\
 	python make.py clean;\
 	svn up;\
-	python make.py html latex sf;
+	python make.py html latex sf sfpdf;
 
 
 
Modified: trunk/matplotlib/doc/faq/howto_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/howto_faq.rst	2008年06月19日 13:59:08 UTC (rev 5595)
+++ trunk/matplotlib/doc/faq/howto_faq.rst	2008年06月19日 16:54:54 UTC (rev 5596)
@@ -54,6 +54,40 @@
 `axes_demo.py <http://matplotlib.sf.net/examples/axes_demo.py>`_ for
 an example of placing axes manually.
 
+.. _howto-auto-adjust:
+
+How do I automatically make room for my tick labels?
+====================================================
+
+In most use cases, it is enought to simpy change the subplots adjust
+parameters as described in :ref:`howto-subplots-adjust`. But in some
+cases, you don't know ahead of time what your tick labels will be, or
+how large they will be (data and labels outside your control may be
+being fed into your graphing application), and you may need to
+automatically adjust your subplot parameters based on the size of the
+tick labels. Any :class:`matplotlib.text.Text` instance can report
+its extent in window coordinates (a negative x coordinate is outside
+the window), but there is a rub.
+
+The :class:`matplotlib.backend_bases.RendererBase` instance, which is
+used to calculate the text size, is not known until the figure is
+drawn (:meth:`matplotlib.figure.Figure.draw`). After the window is
+drawn and the text instance knows its renderer, you can call
+:meth:`matplotlib.text.Text.get_window_extent``. One way to solve
+this chicken and egg problem is to wait until the figure is draw by
+connecting
+(:meth:`matplotlib.backend_bases.FigureCanvasBase.mpl_connect`) to the
+"on_draw" signal (:class:`~matplotlib.backend_bases.DrawEvent`) and
+get the window extent there, and then do something with it, eg move
+the left of the canvas over; see :ref:`event-handling-tutorial`.
+
+Here is a recursive, iterative solution that will gradually move the
+left of the subplot over until the label fits w/o going outside the
+figure border (requires matplotlib 0.98)
+
+.. plot:: auto_subplots_adjust.py
+ :include-source:
+
 .. _howto-ticks:
 
 How do I configure the tick linewidths?
Modified: trunk/matplotlib/doc/glossary/index.rst
===================================================================
--- trunk/matplotlib/doc/glossary/index.rst	2008年06月19日 13:59:08 UTC (rev 5595)
+++ trunk/matplotlib/doc/glossary/index.rst	2008年06月19日 16:54:54 UTC (rev 5596)
@@ -8,73 +8,138 @@
 .. glossary::
 
 AGG
- The Anti-Grain Geometry rendering engine, capable of rendering
- high-quality images.
+ The Anti-Grain Geometry (`Agg <http://antigrain.com>`_) rendering engine, capable of rendering
+ high-quality images
 
 Cairo
- The Cairo graphics engine
+ The `Cairo graphics <http://cairographics.org>`_ engine
 
 EPS
- Encapsulated Postscript
+ Encapsulated Postscript (`EPS <http://en.wikipedia.org/wiki/Encapsulated_PostScript>`_)
 
 FLTK
- FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for
+ `FLTK <http://www.fltk.org/>`_ (pronounced "fulltick") is a cross-platform C++ GUI toolkit for
 UNIX/Linux (X11), Microsoft Windows, and MacOS X
 
+ freetype
+ `freetype <http://www.freetype.org/>`_ is a font rasterization
+ library used by matplotlib which supports TrueType, Type 1, and
+ OpenType fonts.
+
+
 GDK
 The Gimp Drawing Kit for GTK+
 
 GTK
- The GTK graphical user interface library
+ The GIMP Toolkit (`GTK <http://www.gtk.org/>`_) graphical user interface library
 
 JPG
- A compression method and file format for photographic images
+ The Joint Photographic Experts Group (`JPEG
+ <http://en.wikipedia.org/wiki/Jpeg>`_) compression method and
+ file format for photographic images
 
+ numpy
+ `numpy <http://numpy.scipy.org>`_ is the standard numerical
+ array library for python, the successor to Numeric and numarray.
+ numpy provides fast operations for homogeneous data sets and
+ common mathematical operations like correlations, standard
+ deviation, fourier transforms, and convolutions.
+
 PDF
- Adobe's Portable Document Format
+ Adobe's Portable Document Format (`PDF <http://en.wikipedia.org/wiki/Portable_Document_Format>`_)
 
 PNG
- PNG stands for Portable Network Graphics, a raster graphics format that
- employs lossless data compression which is more suitable for line art
- than the lossy jpg format. Unlike the gif format, png is not encumbered
- by requirements for a patent license.
+ Portable Network Graphics (`PNG
+ <http://en.wikipedia.org/wiki/Portable_Network_Graphics>`_), a raster graphics format
+ that employs lossless data compression which is more suitable
+ for line art than the lossy jpg format. Unlike the gif format,
+ png is not encumbered by requirements for a patent license.
 
 PS
- Postscript
+ Postscript (`PS <http://en.wikipedia.org/wiki/PostScript>`_) is a
+ vector graphics ASCII text language widely used in printers and
+ publishing. Postscript was developerd by adobe systems and is
+ starting to show its age: for example is does not have an alpha
+ channel. PDF was designed in part as a next-generation document
+ format to replace postscript
 
+ pyfltk
+ `pyfltk <http://pyfltk.sourceforge.net/>`_ provides python
+ wrappers for the :term:`FLTK` widgets library for use with
+ FLTKAgg
+
+ pygtk
+ `pygtk <http://www.pygtk.org/>`_ provides python wrappers for
+ the :term:`GTK` widgets library for use with the GTK or GTKAgg
+ backend. Widely used on linux, and is often packages as
+ 'python-gtk2'
+
+ pyqt
+ `pyqt <http://wiki.python.org/moin/PyQt>`_ provides python
+ wrappers for the :term:`Qt` widgets library and is requied by
+ the matplotlib QtAgg and Qt4Agg backends. Widely used on linux
+ and windows; many linux distributions package this as
+ 'python-qt3' or 'python-qt4'.
+
+ python
+ `python <http://python.org>`_ is an object oriented interpreted
+ language widely used for scripting, application development, web
+ application servers, scientific computing and more.
+
 Qt
- Qt is a cross-platform application framework for desktop and embedded
- development.
+ `Qt <http://trolltech.com/products/qt/>`__ is a cross-platform
+ application framework for desktop and embedded development.
 
 Qt4
- Qt4 is the most recent version of Qt cross-platform application framework
- for desktop and embedded development.
+ `Qt4 <http://trolltech.com/products/qt/>`__ is the most recent
+ version of Qt cross-platform application framework for desktop
+ and embedded development.
 
 raster graphics
- Raster graphics, or bitmaps, represent an image as an array of pixels
- which is resolution dependent. Raster graphics are generally most
- practical for photo-realistic images, but do not scale easily without
- loss of quality. See `raster graphics <http://en.wikipedia.org/wiki/Raster_graphics>`_
+ `Raster graphics
+ <http://en.wikipedia.org/wiki/Raster_graphics>`_, or bitmaps,
+ represent an image as an array of pixels which is resolution
+ dependent. Raster graphics are generally most practical for
+ photo-realistic images, but do not scale easily without loss of
+ quality.
 
 SVG
- The Scalable Vector Graphics format.
+ The Scalable Vector Graphics format (`SVG
+ <http://en.wikipedia.org/wiki/Svg>`_). An XML based vector
+ graphics format supported by many web browsers.
 
 TIFF
- Tagged Image File Format
+ Tagged Image File Format (`TIFF
+ <http://en.wikipedia.org/wiki/Tagged_Image_File_Format>`_) is a
+ file format for storing images, including photographs and line
+ art.
 
 Tk
- Tk is a graphical user interface for Tcl and many other dynamic
- languages. It can produce rich, native applications that run unchanged
- across Windows, Mac OS X, Linux and more.
+ `Tk <http://www.tcl.tk/>`_ is a graphical user interface for Tcl
+ and many other dynamic languages. It can produce rich, native
+ applications that run unchanged across Windows, Mac OS X, Linux
+ and more.
 
+ vector graphics
+ `vector graphics
+ <http://en.wikipedia.org/wiki/Vector_graphics>`_ use geometrical
+ primitives based upon mathematical equations to represent images
+ in computer graphics. Primitives can include points, lines,
+ curves, and shapes or polygons. Vector graphics are scalable,
+ which means that they can be resized without suffering from
+ issues related to inherent resolution like are seen in raster
+ graphics. Vector graphics are generally most practical for
+ typesetting and graphic design applications.
+
+ wxpython
+ `wxpython <http://www.wxpython.org/>`_ provides python wrappers
+ for the :term:`wxWidgets` library for use with the WX and WXAgg
+ backends. Widely used on linux, OS-X and windows, it is often
+ packaged by linux distributions as 'python-wxgtk'
+
 wxWidgets
- A cross-platform GUI and tools library for GTK, MS Windows, and MacOS.
+ `WX <http://www.wxwidgets.org/>`_ is cross-platform GUI and
+ tools library for GTK, MS Windows, and MacOS. It uses native
+ widgets for each operating system, so applications will have the
+ look-and-feel that users on that operating system expect.
 
- vector graphics
- The use of geometrical primitives based upon mathematical equations to
- represent images in computer graphics. Primitives can include points,
- lines, curves, and shapes or polygons. Vector graphics are scalable,
- which means that they can be resized without suffering from issues
- related to inherent resolution like are seen in raster graphics. Vector
- graphics are generally most practical for typesetting and graphic design
- applications. See `vector graphics <http://en.wikipedia.org/wiki/Vector_graphics>`_
Modified: trunk/matplotlib/doc/make.py
===================================================================
--- trunk/matplotlib/doc/make.py	2008年06月19日 13:59:08 UTC (rev 5595)
+++ trunk/matplotlib/doc/make.py	2008年06月19日 16:54:54 UTC (rev 5596)
@@ -17,8 +17,12 @@
 def sf():
 'push a copy to the sf site'
 os.system('cd build; rsync -avz html jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/ -essh')
- os.system('cd build/latex; scp Matplotlib.pdf jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/')
 
+def sfpdf():
+ 'push a copy to the sf site'
+
+ #os.system('cd build/latex; scp Matplotlib.pdf jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/')
+
 def figs():
 os.system('cd users/figures/ && python make.py')
 
@@ -73,6 +77,7 @@
 'latex':latex,
 'clean':clean,
 'sf':sf,
+ 'sfpdf':sfpdf,
 'all':all,
 }
 
Added: trunk/matplotlib/doc/pyplots/auto_subplots_adjust.py
===================================================================
--- trunk/matplotlib/doc/pyplots/auto_subplots_adjust.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/auto_subplots_adjust.py	2008年06月19日 16:54:54 UTC (rev 5596)
@@ -0,0 +1,19 @@
+import matplotlib.pyplot as plt
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(range(10))
+ax.set_yticks((2,5,7))
+labels = ax.set_yticklabels(('really, really, really', 'long', 'labels'))
+
+def on_draw(event):
+ for label in labels:
+ bbox = label.get_window_extent()
+ if bbox.xmin<0:
+ fig.subplots_adjust(left=1.1*fig.subplotpars.left)
+ fig.canvas.draw()
+ break
+
+fig.canvas.mpl_connect('draw_event', on_draw)
+
+plt.show()
Modified: trunk/matplotlib/doc/users/installing.rst
===================================================================
--- trunk/matplotlib/doc/users/installing.rst	2008年06月19日 13:59:08 UTC (rev 5595)
+++ trunk/matplotlib/doc/users/installing.rst	2008年06月19日 16:54:54 UTC (rev 5596)
@@ -14,18 +14,18 @@
 and numpy) since the others are built into the matplotlib windows
 installers available for download at the sourceforge site.
 
-python 2.4 (or later but not python3)
- matplotlib requires python 2.4 or later
+:term:`python` 2.4 (or later but not python3)
+ matplotlib requires python 2.4 or later (`download <http://www.python.org/download/>`__)
 
-numpy 1.1 (or later)
- array support for python
+:term:`numpy` 1.1 (or later)
+ array support for python (`download <http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103>`__)
 
 libpng 1.1 (or later)
- library for loading and saving PNG files. libpng requires zlib. If
+ library for loading and saving :term:`PNG` files (`download <http://www.libpng.org/pub/png/libpng.html>`__). libpng requires zlib. If
 you are a windows user, you can ignore this since we build support
- into the matplotlib single click installer.
+ into the matplotlib single click installer
 
-freetype 1.4 (or later)
+:term:`freetype` 1.4 (or later)
 library for reading true type font files. If you are a windows
 user, you can ignore this since we build support into the
 matplotlib single click installer.
@@ -37,25 +37,25 @@
 :ref:`what-is-a-backend` for more details on the optional matplotlib
 backends and the capabilities they provide
 
-tk 8.3 or later
+:term:`tk` 8.3 or later
 The TCL/Tk widgets library used by the TkAgg backend
 
-pyqt 3.1 or later
+:term:`pyqt` 3.1 or later
 The Qt3 widgets library python wrappers for the QtAgg backend
 
-pyqt 4.0 or later
+:term:`pyqt` 4.0 or later
 The Qt4 widgets library python wrappersfor the Qt4Agg backend
 
-pygtk 2.2 or later
+:term:`pygtk` 2.2 or later
 The python wrappers for the GTK widgets library for use with the GTK or GTKAgg backend
 
-wxpython 2.6 or later
+:term:`wxpython` 2.6 or later
 The python wrappers for the wx widgets library for use with the WXAgg backend
 
-wxpython 2.8 or later
+:term:`wxpython` 2.8 or later
 The python wrappers for the wx widgets library for use with the WX backend
 
-pyfltk 1.0 or later
+:term:`pyfltk` 1.0 or later
 The python wrappers of the FLTK widgets library for use with FLTKAgg
 
 **Required libraries that ship with matplotlib**
@@ -65,7 +65,7 @@
 developers and packagers who may want to disable the matplotlib
 version and ship a packaged version.
 
-agg2.4
+:term:`agg` 2.4
 The antigrain C++ rendering engine
 
 pytz 2007g or later
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月19日 13:59:12
Revision: 5595
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5595&view=rev
Author: jdh2358
Date: 2008年06月19日 06:59:08 -0700 (2008年6月19日)
Log Message:
-----------
added the installing doc
Modified Paths:
--------------
 trunk/matplotlib/doc/faq/installing_faq.rst
Added Paths:
-----------
 trunk/matplotlib/doc/users/installing.rst
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst	2008年06月19日 13:23:04 UTC (rev 5594)
+++ trunk/matplotlib/doc/faq/installing_faq.rst	2008年06月19日 13:59:08 UTC (rev 5595)
@@ -55,10 +55,12 @@
 
 easy_install -m PackageName
 
+
 3. Delete any .egg files or directories from your :ref:`installation
 directory <locating-matplotlib-install>`.
 
 
+
 Windows installer
 -----------------
 
Added: trunk/matplotlib/doc/users/installing.rst
===================================================================
--- trunk/matplotlib/doc/users/installing.rst	 (rev 0)
+++ trunk/matplotlib/doc/users/installing.rst	2008年06月19日 13:59:08 UTC (rev 5595)
@@ -0,0 +1,91 @@
+.. _installing:
+
+**********
+Installing
+**********
+
+Dependencies
+============
+
+**Requirements**
+
+These are external packages which you will need to install before
+installing matplotlib. Windows users only need the first two (python
+and numpy) since the others are built into the matplotlib windows
+installers available for download at the sourceforge site.
+
+python 2.4 (or later but not python3)
+ matplotlib requires python 2.4 or later
+
+numpy 1.1 (or later)
+ array support for python
+
+libpng 1.1 (or later)
+ library for loading and saving PNG files. libpng requires zlib. If
+ you are a windows user, you can ignore this since we build support
+ into the matplotlib single click installer.
+
+freetype 1.4 (or later)
+ library for reading true type font files. If you are a windows
+ user, you can ignore this since we build support into the
+ matplotlib single click installer.
+
+**Optional**
+
+These are optional packages which you may want to install to use
+matplotlib with a user interface toolkit. See
+:ref:`what-is-a-backend` for more details on the optional matplotlib
+backends and the capabilities they provide
+
+tk 8.3 or later
+ The TCL/Tk widgets library used by the TkAgg backend
+
+pyqt 3.1 or later
+ The Qt3 widgets library python wrappers for the QtAgg backend
+
+pyqt 4.0 or later
+ The Qt4 widgets library python wrappersfor the Qt4Agg backend
+
+pygtk 2.2 or later
+ The python wrappers for the GTK widgets library for use with the GTK or GTKAgg backend
+
+wxpython 2.6 or later
+ The python wrappers for the wx widgets library for use with the WXAgg backend
+
+wxpython 2.8 or later
+ The python wrappers for the wx widgets library for use with the WX backend
+
+pyfltk 1.0 or later
+ The python wrappers of the FLTK widgets library for use with FLTKAgg
+
+**Required libraries that ship with matplotlib**
+
+If you are downloading matplotlib or installing from source or
+subversion, you can ignore this section. This is useful for matplotlib
+developers and packagers who may want to disable the matplotlib
+version and ship a packaged version.
+
+agg2.4
+ The antigrain C++ rendering engine
+
+pytz 2007g or later
+ timezone handling for python datetime objects
+
+dateutil 1.1 or later
+ extensions to python datetime handling
+
+**Optional libraries that ship with matplotlib**
+
+As above, if you are downloading matplotlib or installing from source
+or subversion, you can ignore this section. This is useful for
+matplotlib developers and packagers who may want to disable the
+matplotlib version and ship a packaged version.
+
+enthought traits 2.6
+ The traits component of the Enthought Tool Suite used in the
+ experimental matplotlib traits rc system. matplotlib has decided
+ to stop installing this library so packagers should not distribute
+ the version included with matplotlib. packagers do not need to
+ list this as a requirement because the traits support is
+ experimental and disabled by default.
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年06月19日 13:23:43
Revision: 5594
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5594&view=rev
Author: mdboom
Date: 2008年06月19日 06:23:04 -0700 (2008年6月19日)
Log Message:
-----------
Fix rgrids and thetagrids.
Modified Paths:
--------------
 trunk/matplotlib/lib/matplotlib/projections/polar.py
 trunk/matplotlib/lib/matplotlib/pyplot.py
Modified: trunk/matplotlib/lib/matplotlib/projections/polar.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/projections/polar.py	2008年06月19日 13:16:16 UTC (rev 5593)
+++ trunk/matplotlib/lib/matplotlib/projections/polar.py	2008年06月19日 13:23:04 UTC (rev 5594)
@@ -316,6 +316,7 @@
 self._theta_label2_position.clear().translate(0.0, 1.0 / frac)
 for t in self.xaxis.get_ticklabels():
 t.update(kwargs)
+ return self.xaxis.get_ticklines(), self.xaxis.get_ticklabels()
 set_thetagrids.__doc__ = cbook.dedent(set_thetagrids.__doc__) % kwdocd
 
 def set_rgrids(self, radii, labels=None, angle=None, rpad=None, **kwargs):
@@ -358,6 +359,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()
 
 set_rgrids.__doc__ = cbook.dedent(set_rgrids.__doc__) % kwdocd
 
Modified: trunk/matplotlib/lib/matplotlib/pyplot.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/pyplot.py	2008年06月19日 13:16:16 UTC (rev 5593)
+++ trunk/matplotlib/lib/matplotlib/pyplot.py	2008年06月19日 13:23:04 UTC (rev 5594)
@@ -951,8 +951,8 @@
 if not isinstance(ax, PolarAxes):
 raise RuntimeError('rgrids only defined for polar axes')
 if len(args)==0:
- lines = ax.rgridlines()
- labels = ax.rgridlabels()
+ lines = ax.yaxis.get_ticklines()
+ labels = ax.yaxis.get_ticklabels()
 else:
 lines, labels = ax.set_rgrids(*args, **kwargs)
 
@@ -1011,8 +1011,8 @@
 if not isinstance(ax, PolarAxes):
 raise RuntimeError('rgrids only defined for polar axes')
 if len(args)==0:
- lines = ax.thetagridlines()
- labels = ax.thetagridlabels()
+ lines = ax.xaxis.get_ticklines()
+ labels = ax.xaxis.get_ticklabels()
 else:
 lines, labels = ax.set_thetagrids(*args, **kwargs)
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <md...@us...> - 2008年06月19日 13:16:39
Revision: 5593
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5593&view=rev
Author: mdboom
Date: 2008年06月19日 06:16:16 -0700 (2008年6月19日)
Log Message:
-----------
Lots of docstring formatting fixes.
Modified Paths:
--------------
 trunk/matplotlib/doc/faq/installing_faq.rst
 trunk/matplotlib/lib/matplotlib/__init__.py
 trunk/matplotlib/lib/matplotlib/artist.py
 trunk/matplotlib/lib/matplotlib/axes.py
 trunk/matplotlib/lib/matplotlib/backend_bases.py
 trunk/matplotlib/lib/matplotlib/contour.py
 trunk/matplotlib/lib/matplotlib/figure.py
 trunk/matplotlib/lib/matplotlib/image.py
 trunk/matplotlib/lib/matplotlib/lines.py
 trunk/matplotlib/lib/matplotlib/pyplot.py
 trunk/matplotlib/lib/matplotlib/quiver.py
 trunk/matplotlib/lib/matplotlib/text.py
Modified: trunk/matplotlib/doc/faq/installing_faq.rst
===================================================================
--- trunk/matplotlib/doc/faq/installing_faq.rst	2008年06月19日 12:16:50 UTC (rev 5592)
+++ trunk/matplotlib/doc/faq/installing_faq.rst	2008年06月19日 13:16:16 UTC (rev 5593)
@@ -55,8 +55,8 @@
 
 easy_install -m PackageName
 
-3. Delete any .egg files or directories from your `installation directory
- <locating-matplotlib-install>`.
+3. Delete any .egg files or directories from your :ref:`installation
+ directory <locating-matplotlib-install>`.
 
 
 Windows installer
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py	2008年06月19日 12:16:50 UTC (rev 5592)
+++ trunk/matplotlib/lib/matplotlib/__init__.py	2008年06月19日 13:16:16 UTC (rev 5593)
@@ -684,11 +684,11 @@
 
 def rc(group, **kwargs):
 """
- Set the current rc params. Group is the grouping for the rc, eg
- for lines.linewidth the group is 'lines', for axes.facecolor, the
- group is 'axes', and so on. Group may also be a list or tuple
- of group names, eg ('xtick','ytick'). kwargs is a list of
- attribute name/value pairs, eg::
+ Set the current rc params. Group is the grouping for the rc, eg.
+ for ``lines.linewidth`` the group is ``lines``, for
+ ``axes.facecolor``, the group is ``axes``, and so on. Group may
+ also be a list or tuple of group names, eg. (*xtick*, *ytick*).
+ *kwargs* is a dictionary attribute name/value pairs, eg::
 
 rc('lines', linewidth=2, color='r')
 
@@ -728,7 +728,8 @@
 rc('font', **font) # pass in the font dict as kwargs
 
 This enables you to easily switch between several configurations.
- Use rcdefaults to restore the default rc params after changes.
+ Use :func:`~matplotlib.pyplot.rcdefaults` to restore the default
+ rc params after changes.
 """
 
 aliases = {
@@ -756,7 +757,7 @@
 def rcdefaults():
 """
 Restore the default rc params - the ones that were created at
- matplotlib load time
+ matplotlib load time.
 """
 rcParams.update(rcParamsDefault)
 
Modified: trunk/matplotlib/lib/matplotlib/artist.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/artist.py	2008年06月19日 12:16:50 UTC (rev 5592)
+++ trunk/matplotlib/lib/matplotlib/artist.py	2008年06月19日 13:16:16 UTC (rev 5593)
@@ -707,31 +707,32 @@
 
 def setp(h, *args, **kwargs):
 """
- matplotlib supports the use of setp ("set property") and getp to set
- and get object properties, as well as to do introspection on the
- object For example, to set the linestyle of a line to be dashed, you
- can do
+ matplotlib supports the use of :func:`setp` ("set property") and
+ :func:`getp` to set and get object properties, as well as to do
+ introspection on the object. For example, to set the linestyle of a
+ line to be dashed, you can do::
 
 >>> line, = plot([1,2,3])
 >>> setp(line, linestyle='--')
 
 If you want to know the valid types of arguments, you can provide the
- name of the property you want to set without a value
+ name of the property you want to set without a value::
 
 >>> setp(line, 'linestyle')
 linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
 
 If you want to see all the properties that can be set, and their
- possible values, you can do
+ possible values, you can do::
 
 >>> setp(line)
 ... long output listing omitted
 
- setp operates on a single instance or a list of instances. If you
- are in query mode introspecting the possible values, only the first
- instance in the sequence is used. When actually setting values,
- all the instances will be set. Eg, suppose you have a list of two
- lines, the following will make both lines thicker and red
+ :func:`setp` operates on a single instance or a list of instances.
+ If you are in query mode introspecting the possible values, only
+ the first instance in the sequence is used. When actually setting
+ values, all the instances will be set. Eg., suppose you have a
+ list of two lines, the following will make both lines thicker and
+ red::
 
 >>> x = arange(0,1.0,0.01)
 >>> y1 = sin(2*pi*x)
@@ -739,8 +740,8 @@
 >>> lines = plot(x, y1, x, y2)
 >>> setp(lines, linewidth=2, color='r')
 
- setp works with the matlab(TM) style string/value pairs or with
- python kwargs. For example, the following are equivalent
+ :func:`setp` works with the matlab(TM) style string/value pairs or
+ with python kwargs. For example, the following are equivalent
 
 >>> setp(lines, 'linewidth', 2, 'color', r') # matlab style
 >>> setp(lines, linewidth=2, color='r') # python style
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py	2008年06月19日 12:16:50 UTC (rev 5592)
+++ trunk/matplotlib/lib/matplotlib/axes.py	2008年06月19日 13:16:16 UTC (rev 5593)
@@ -1546,17 +1546,18 @@
 
 grid(self, b=None, **kwargs)
 
- Set the axes grids on or off; b is a boolean
+ Set the axes grids on or off; *b* is a boolean
 
- if b is None and len(kwargs)==0, toggle the grid state. if
- kwargs are supplied, it is assumed that you want a grid and b
- is thus set to True
+ If *b* is *None* and len(kwargs)==0, toggle the grid state. If
+ kwargs are supplied, it is assumed that you want a grid and *b*
+ is thus set to *True*
 
 kawrgs are used to set the grid line properties, eg::
 
 ax.grid(color='r', linestyle='-', linewidth=2)
 
- Valid Line2D kwargs are
+ Valid :class:`~matplotlib.lines.Line2D` kwargs are
+
 %(Line2D)s
 """
 if len(kwargs): b = True
@@ -2457,40 +2458,44 @@
 
 text(x, y, s, fontdict=None, **kwargs)
 
- Add text in string s to axis at location x,y (data coords)
+ Add text in string *s* to axis at location *x*, *y*, data
+ coordinates.
 
 Keyword arguments:
 
- fontdict:
- a dictionary to override the default text properties.
- If fontdict is None, the defaults are determined by your rc
+ *fontdict*:
+ A dictionary to override the default text properties.
+ If *fontdict* is *None*, the defaults are determined by your rc
 parameters.
- withdash: [ False | True ]
- creates a TextWithDash instance instead of a Text instance.
 
+ *withdash*: [ False | True ]
+ Creates a :class:`~matplotlib.text.TextWithDash` instance
+ instead of a :class:`~matplotlib.text.Text` instance.
+
 Individual keyword arguments can be used to override any given
 parameter::
 
 text(x, y, s, fontsize=12)
 
 The default transform specifies that text is in data coords,
- alternatively, you can specify text in axis coords (0,0 lower left and
- 1,1 upper right). The example below places text in the center of the
- axes::
+ alternatively, you can specify text in axis coords (0,0 is
+ lower-left and 1,1 is upper-right). The example below places
+ text in the center of the axes::
 
 text(0.5, 0.5,'matplotlib',
 horizontalalignment='center',
 verticalalignment='center',
 transform = ax.transAxes)
 
- You can put a rectangular box around the text instance (eg to
- set a background color) by using the keyword bbox. bbox is a
- dictionary of patches.Rectangle properties (see help
- for Rectangle for a list of these). For example::
+ You can put a rectangular box around the text instance (eg. to
+ set a background color) by using the keyword *bbox*. *bbox* is
+ a dictionary of :class:`matplotlib.patches.Rectangle`
+ properties. For example::
 
 text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))
 
- Valid kwargs are Text properties
+ Valid kwargs are :class:`matplotlib.text.Text` properties:
+
 %(Text)s
 """
 default = {
@@ -2536,6 +2541,7 @@
 textcoords='data', arrowprops=None, **kwargs)
 
 Keyword arguments:
+
 %(Annotation)s
 """
 a = mtext.Annotation(*args, **kwargs)
@@ -2556,30 +2562,33 @@
 
 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 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.
+ 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 Line2D instance. kwargs are the same as kwargs to
- plot, and can be used to control the line properties. Eg
+ 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
+ * 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
+ * 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
+ * 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 Line2D properties
+ Valid kwargs are :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 """
 
@@ -2603,30 +2612,33 @@
 
 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 xlim settings, even if you change them,
- eg with the xlim 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.
+ 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
+ xlim settings, even if you change them, eg. with the
+ :meth:`set_xlim` 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 Line2D instance. kwargs are the same as
- kwargs to plot, and can be used to control the line properties. Eg
+ 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
+ * 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
+ * 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
+ * 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 Line2D properties
+ Valid kwargs are :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 """
 
@@ -2648,26 +2660,31 @@
 
 axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
 
- Axis Horizontal Span. ycoords are in data units and x
- coords are in axes (relative 0-1) units
+ Axis Horizontal Span.
 
- Draw a horizontal span (regtangle) from ymin to ymax. With the
- default values of xmin=0 and xmax=1, this always span the xrange,
- regardless of the xlim settings, even if you change them, eg with the
- 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
+ *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 span 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 the patches.Polygon instance.
+ 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
+ * 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 Polygon properties
+ Valid kwargs are :class:`~matplotlib.patches.Polygon` properties:
+
 %(Polygon)s
 """
 # convert y axis units
@@ -2686,17 +2703,21 @@
 
 axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
 
- Axis Vertical Span. xcoords are in data units and y coords
- are in axes (relative 0-1) units
+ Axis Vertical Span.
 
- Draw a vertical span (regtangle) from xmin to xmax. With the default
- values of ymin=0 and ymax=1, this always span the yrange, regardless
- of the ylim settings, even if you change them, eg with the 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.
+ *x* coords are in data units and *y* coords are in axes (relative
+ 0-1) units.
 
- return value is the patches.Polygon instance.
+ Draw a vertical span (rectangle) from *xmin* to *xmax*. With
+ the default values of *ymin* = 0 and *ymax* = 1, this always
+ span 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
@@ -2704,7 +2725,9 @@
 
 >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
 
- Valid kwargs are Polygon properties:
+ Valid kwargs are :class:`~matplotlib.patches.Polygon`
+ properties:
+
 %(Polygon)s
 """
 # convert x axis units
@@ -2725,27 +2748,28 @@
 
 hlines(y, xmin, xmax, colors='k', linestyle='solid', **kwargs)
 
- plot horizontal lines at each y from xmin to xmax.
+ Plot horizontal lines at each *y* from *xmin* to *xmax*.
 
- Returns the LineCollection that was added
+ Returns the :class:`~matplotlib.collections.LineCollection`
+ that was added.
 
 Required arguments:
 
- y:
+ *y*:
 a 1-D numpy array or iterable.
 
- xmin and xmax:
- can be scalars or len(x) numpy arrays. If they are scalars, then
- the respective values are constant, else the widths of the lines
- are determined by xmin and xmax
+ *xmin* and *xmax*:
+ can be scalars or ``len(x)`` numpy arrays. If they are
+ scalars, then the respective values are constant, else the
+ widths of the lines are determined by *xmin* and *xmax*.
 
 Optional keyword arguments:
 
- colors:
+ *colors*:
 a line collections color argument, either a single color
- or a len(y) list of colors
+ or a ``len(y)`` list of colors
 
- linestyle:
+ *linestyle*:
 [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
 
 """
@@ -2800,20 +2824,21 @@
 
 vlines(x, ymin, ymax, color='k')
 
- Plot vertical lines at each x from ymin to ymax. ymin or ymax can be
- scalars or len(x) numpy arrays. If they are scalars, then the
- respective values are constant, else the heights of the lines are
- determined by ymin and ymax
+ Plot vertical lines at each *x* from *ymin* to *ymax*. *ymin*
+ or *ymax* can be scalars or len(*x*) numpy arrays. If they are
+ scalars, then the respective values are constant, else the
+ heights of the lines are determined by *ymin* and *ymax*.
 
+ *colors* is a line collections color args, either a single color
+ or a len(*x*) list of colors
 
- colors is a line collections color args, either a single color
- or a len(x) list of colors
+ *linestyle* is one of [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
 
- linestyle is one of [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
+ Returns the :class:`matplotlib.collections.LineCollection`
+ that was added.
 
- Returns the collections.LineCollection that was added
+ kwargs are :class:`~matplotlib.collections.LineCollection` properties:
 
- kwargs are collections.LineCollection properties:
 %(LineCollection)s
 """
 
@@ -2870,19 +2895,22 @@
 #### Basic plotting
 def plot(self, *args, **kwargs):
 """
- Plot lines and/or markers to the Axes. ``*args`` is a variable length
- argument, allowing for multiple *x*, *y* pairs with an optional format
- string. For example, each of the following is legal::
+ Plot lines and/or markers to the
+ :class:`~matplotlib.axes.Axes`. *args* is a variable length
+ argument, allowing for multiple *x*, *y* pairs with an
+ optional format string. For example, each of the following is
+ legal::
 
 plot(x, y) # plot x and y using the default line style and color
 plot(x, y, 'bo') # plot x and y using blue circle markers
 plot(y) # plot y using x as index array 0..N-1
 plot(y, 'r+') # ditto, but with red plusses
 
- If ``x`` and/or ``y`` is 2-dimensional, then the corresponding columns
+ If *x* and/or *y* is 2-dimensional, then the corresponding columns
 will be plotted.
 
- An arbitrary number of ``x``, ``y``, ``fmt`` groups can be specified, as in::
+ An arbitrary number of *x*, *y*, *fmt* groups can be
+ specified, as in::
 
 a.plot(x1, y1, 'g^', x2, y2, 'g-')
 
@@ -2929,16 +2957,16 @@
 w # white
 
 In addition, you can specify colors in many weird and
- wonderful ways, including full names (``'green'``), hex strings
- (``'#008000'``), RGB or RGBA tuples (``(0,1,0,1)``) or grayscale
- intensities as a string (``'0.8'``). Of these, the string
- specifications can be used in place of a ``fmt`` group, but the
- tuple forms can be used only as ``kwargs``.
+ wonderful ways, including full names (``'green'``), hex
+ strings (``'#008000'``), RGB or RGBA tuples (``(0,1,0,1)``) or
+ grayscale intensities as a string (``'0.8'``). Of these, the
+ string specifications can be used in place of a ``fmt`` group,
+ but the tuple forms can be used only as ``kwargs``.
 
 Line styles and colors are combined in a single format string, as in
 ``'bo'`` for blue circles.
 
- The ``**kwargs`` can be used to set line properties (any property that has
+ The *kwargs* can be used to set line properties (any property that has
 a ``set_*`` method). You can use this to set a line label (for auto
 legends), linewidth, anitialising, marker face color, etc. Here is an
 example::
@@ -2948,19 +2976,21 @@
 axis([0, 4, 0, 10])
 legend()
 
- If you make multiple lines with one plot command, the ``kwargs`` apply
- to all those lines, e.g.::
+ If you make multiple lines with one plot command, the kwargs
+ apply to all those lines, e.g.::
 
 plot(x1, y1, x2, y2, antialised=False)
 
 Neither line will be antialiased.
 
- The kwargs are Line2D properties:
+ The kwargs are :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 
- kwargs ``scalex`` and ``scaley``, if defined, are passed on to
- :meth:`autoscale_view` to determine whether the *x* and *y* axes
- are autoscaled; the default is ``True``.
+ kwargs *scalex* and *scaley*, if defined, are passed on to
+ :meth:`~matplotlib.axes.Axes.autoscale_view` to determine
+ whether the *x* and *y* axes are autoscaled; the default is
+ *True*.
 """
 scalex = kwargs.pop( 'scalex', True)
 scaley = kwargs.pop( 'scaley', True)
@@ -2985,36 +3015,48 @@
 
 plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, **kwargs)
 
- Similar to the plot() command, except the x or y (or both) data
- is considered to be dates, and the axis is labeled accordingly.
+ Similar to the :func:`~matplotlib.pyplot.plot` command, except
+ the *x* or *y* (or both) data is considered to be dates, and the
+ axis is labeled accordingly.
 
- x and/or y can be a sequence of dates represented as float days since
+ *x* and/or *y* can be a sequence of dates represented as float days since
 0001年01月01日 UTC.
 
- See dates for helper functions date2num, num2date
- and drange for help on creating the required floating point dates
+ See :mod:`~matplotlib.dates` for helper functions
+ :func:`~matplotlib.dates.date2num`,
+ :func:`~matplotlib.dates.num2date` and
+ :func:`~matplotlib.dates.drange` for help on creating the
+ required floating point dates.
 
 Keyword arguments:
 
- fmt: string
+ *fmt*: string
 The plot format string.
- tz: [ None | timezone string ]
- The time zone to use in labeling dates. If None, defaults to rc
+
+ *tz*: [ None | timezone string ]
+ The time zone to use in labeling dates. If *None*, defaults to rc
 value.
- xdate: [ True | False ]
- If True, the x-axis will be labeled with dates.
- ydate: [ False | True ]
- If True, the y-axis will be labeled with dates.
 
+ *xdate*: [ True | False ]
+ If *True*, the *x*-axis will be labeled with dates.
+
+ *ydate*: [ False | True ]
+ If *True*, the *y*-axis will be labeled with dates.
+
 Note if you are using custom date tickers and formatters, it
 may be necessary to set the formatters/locators after the call
- to plot_date since plot_date will set the default tick locator
- to ticker.AutoDateLocator (if the tick locator is not already set to
- a ticker.DateLocator instance) and the default tick formatter to
- AutoDateFormatter (if the tick formatter is not already set to
- a DateFormatter instance).
+ to :meth:`plot_date` since :meth:`plot_date` will set the
+ default tick locator to
+ :class:`matplotlib.ticker.AutoDateLocator` (if the tick
+ locator is not already set to a
+ :class:`matplotlib.ticker.DateLocator` instance) and the
+ default tick formatter to
+ :class:`matplotlib.ticker.AutoDateFormatter` (if the tick
+ formatter is not already set to a
+ :class:`matplotlib.ticker.DateFormatter` instance).
 
- Valid kwargs are Line2D properties:
+ Valid kwargs are :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 
 """
@@ -3040,22 +3082,27 @@
 
 loglog(*args, **kwargs)
 
- Make a plot with log scaling on the x and y axis. The args to loglog
- are the same as the args to plot. See plot for more info.
+ Make a plot with log scaling on the *x* and *y* axis.
 
- loglog supports all the keyword arguments of plot and
- Axes.set_xscale/Axes.set_yscale.
+ :func:`~matplotlib.pyplot.loglog` supports all the keyword
+ arguments of :func:`~matplotlib.pyplot.plot` and
+ :meth:`matplotlib.axes.Axes.set_xscale`/:meth:`matplotlib.axes.Axes.set_yscale`.
 
 Notable keyword arguments:
 
- basex/basey: scalar > 1
- base of the x/y logarithm
- subsx/subsy: [ None | sequence ]
- the location of the minor x/yticks; None defaults to
- autosubs, which depend on the number of decades in the
- plot; see set_xscale/set_yscale for details
+ *basex*/*basey*: scalar > 1
+ base of the *x*/*y* logarithm
 
- The remaining valid kwargs are Line2D properties:
+ *subsx*/*subsy*: [ None | sequence ]
+ the location of the minor *x*/*y* ticks; *None* defaults
+ to autosubs, which depend on the number of decades in the
+ plot; see
+ :meth:`matplotlib.axes.Axes.set_xscale`/:meth:`matplotlib.axes.Axes.set_yscale`
+ for details
+
+ The remaining valid kwargs are
+ :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 """
 if not self._hold: self.cla()
@@ -3084,23 +3131,26 @@
 
 semilogx(*args, **kwargs)
 
- Make a plot with log scaling on the x axis. The args to
- semilogx are the same as the args to plot. See plot for
- more info.
+ Make a plot with log scaling on the *x* axis.
 
- semilogx supports all the keyword arguments of plot and
- Axes.set_xscale.
+ :func:`semilogx` supports all the keyword arguments of
+ :func:`~matplotlib.pyplot.plot` and
+ :meth:`matplotlib.axes.Axes.set_xscale`.
 
 Notable keyword arguments:
 
- basex: scalar > 1
- base of the x logarithm
- subsx: [ None | sequence ]
- the location of the minor xticks; None defaults to
+ *basex*: scalar > 1
+ base of the *x* logarithm
+
+ *subsx*: [ None | sequence ]
+ The location of the minor xticks; *None* defaults to
 autosubs, which depend on the number of decades in the
- plot; see set_xscale for details
+ plot; see :meth:`~matplotlib.axes.Axes.set_xscale` for
+ details.
 
- The remaining valid kwargs are Line2D properties:
+ The remaining valid kwargs are
+ :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 """
 if not self._hold: self.cla()
@@ -3122,23 +3172,26 @@
 
 semilogy(*args, **kwargs)
 
- Make a plot with log scaling on the y axis. The args to
- semilogy are the same as the args to plot. See plot for
- more info.
+ Make a plot with log scaling on the *y* axis.
 
- semilogy supports all the keyword arguments of plot and
- Axes.set_yscale.
+ :func:`semilogy` supports all the keyword arguments of
+ :func:`~matplotlib.pylab.plot` and
+ :meth:`matplotlib.axes.Axes.set_yscale`.
 
 Notable keyword arguments:
 
- basey: scalar > 1
- base of the y logarithm
- subsy: [ None | sequence ]
- the location of the minor yticks; None defaults to
+ *basey*: scalar > 1
+ Base of the *y* logarithm
+
+ *subsy*: [ None | sequence ]
+ The location of the minor yticks; *None* defaults to
 autosubs, which depend on the number of decades in the
- plot; see set_yscale for details
+ plot; see :meth:`~matplotlib.axes.Axes.set_yscale` for
+ details.
 
- The remaining valid kwargs are Line2D properties:
+ The remaining valid kwargs are
+ :class:`~matplotlib.lines.Line2D` properties:
+
 %(Line2D)s
 """
 if not self._hold: self.cla()
@@ -3161,33 +3214,47 @@
 acorr(x, normed=False, detrend=mlab.detrend_none, usevlines=False,
 maxlags=None, **kwargs)
 
- Plot the autocorrelation of x. If normed=True, normalize the
- data but the autocorrelation at 0-th lag. x is detrended by
- the detrend callable (default no normalization.
+ Plot the autocorrelation of *x*. If *normed* = *True*,
+ normalize the data but the autocorrelation at 0-th lag. *x* is
+ detrended by the *detrend* callable (default no normalization).
 
- data are plotted as ``plot(lags, c, **kwargs)``
+ Data are plotted as ``plot(lags, c, **kwargs)``
 
- return value is lags, c, line where lags are a length
- 2*maxlags+1 lag vector, c is the 2*maxlags+1 auto correlation
- vector, and line is a Line2D instance returned by 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 numpy correlate with
- mode=2.
+ Return value is a tuple (*lags*, *c*, *line*) where:
 
- If usevlines is True, Axes.vlines rather than Axes.plot is used
- to draw vertical lines from the origin to the acorr.
- Otherwise the plotstyle is determined by the kwargs, which are
- Line2D properties. If usevlines, the return value is lags, c,
- linecol, b where linecol is the collections.LineCollection and b is the x-axis
+ - *lags* are a length 2*maxlags+1 lag vector
 
- if usevlines=True, kwargs are passed onto Axes.vlines
- if usevlines=False, kwargs are passed onto Axes.plot
+ - *c* is the 2*maxlags+1 auto correlation vector
 
- maxlags is a positive integer detailing the number of lags to show.
- The default value of None will return all (2*len(x)-1) lags.
+ - *line* is a :class:`~matplotlib.lines.Line2D` instance
+ returned by :meth:`plot`
 
- See the respective function for documentation on valid kwargs
+ 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. The return
+ value is a tuple (*lags*, *c*, *linecol*, *b*) where
+
+ - *linecol* is the
+ :class:`~matplotlib.collections.LineCollection`
+
+ - *b* is the *x*-axis.
+
+ *maxlags* is a positive integer detailing the number of lags
+ to show. The default value of *None* will return all
+ ``(2*len(x)-1)`` lags.
+
+ See the respective :meth:`~matplotlib.axes.Axes.plot` or
+ :meth:`~matplotlib.axes.Axes.vlines` functions for
+ documentation on valid kwargs.
 """
 return self.xcorr(x, x, **kwargs)
 acorr.__doc__ = cbook.dedent(acorr.__doc__) % martist.kwdocd
@@ -3200,35 +3267,42 @@
 xcorr(x, y, normed=False, detrend=mlab.detrend_none,
 usevlines=False, **kwargs):
 
- Plot the cross correlation between x and y. If normed=True,
- normalize the data but the cross correlation at 0-th lag. x
- and y are detrended by the detrend callable (default no
- normalization. x and y must be equal length
+ Plot the cross correlation between *x* and *y*. If *normed* =
+ *True*, normalize the data but the cross correlation at 0-th
+ lag. *x* and y are detrended by the *detrend* callable
+ (default no normalization). *x* and *y* must be equal length.
 
- data are plotted as ``plot(lags, c, **kwargs)``
+ Data are plotted as ``plot(lags, c, **kwargs)``
 
- return value is lags, c, line where lags are a length
- ``2*maxlags+1`` lag vector, c is the ``2*maxlags+1`` auto correlation
- vector, and line is a Line2D instance returned by 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 numpy correlate with
- mode=2.
+ Return value is a tuple (*lags*, *c*, *line*) where:
 
- If usevlines is True, Axes.vlines rather than Axes.plot is used
- to draw vertical lines from the origin to the acorr.
- Otherwise the plotstyle is determined by the kwargs, which are
- Line2D properties. If usevlines, the return value is lags, c,
- linecol, b where linecol is the collections.LineCollection and b is the
- x-axis
+ - *lags* are a length ``2*maxlags+1`` lag vector
 
- if ``usevlines=True``, kwargs are passed onto Axes.vlines
- if ``usevlines=False``, kwargs are passed onto Axes.plot
+ - *c* is the ``2*maxlags+1`` auto correlation vector
 
- maxlags is a positive integer detailing the number of lags to show.
- The default value of None will return all ``(2*len(x)-1)`` lags.
+ - *line* is a :class:`~matplotlib.lines.Line2D` instance
+ returned by :func:`~matplotlib.pyplot.plot`.
 
- See the respective function for documentation on valid kwargs
+ 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*:
+
+ :func:`~matplotlib.pyplot.vlines`
+ rather than :func:`~matplotlib.pyplot.plot` is used to draw
+ vertical lines from the origin to the xcorr. Otherwise the
+ plotstyle is determined by the kwargs, which are
+ :class:`~matplotlib.lines.Line2D` properties.
+
+ The return value is a tuple (*lags*, *c*, *linecol*, *b*)
+ where *linecol* is the
+ :class:`matplotlib.collections.LineCollection` instance and
+ *b* is the *x*-axis.
+
+ *maxlags* is a positive integer detailing the number of lags to show.
+ The default value of *None* will return all ``(2*len(x)-1)`` lags.
 """
 
 Nx = len(x)
@@ -3269,20 +3343,27 @@
 
 legend(*args, **kwargs)
 
- Place a legend on the current axes at location loc. Labels are a
- sequence of strings and loc can be a string or an integer specifying
- the legend location
+ Place a legend on the current axes at location *loc*. Labels are a
+ sequence of strings and *loc* can be a string or an integer specifying
+ the legend location.
 
 To make a legend with existing lines::
 
 legend()
 
- legend by itself will try and build a legend using the label
+ :meth:`legend` by itself will try and build a legend using the label
 property of the lines/patches/collections. You can set the label of
- a line by doing plot(x, y, label='my data') or line.set_label('my
- data'). If label is set to '_nolegend_', the item will not be shown
- in legend.
+ a line by doing::
 
+ plot(x, y, label='my data')
+
+ or::
+
+ line.set_label('my data').
+
+ If label is set to '_nolegend_', the item will not be shown in
+ legend.
+
 To automatically generate the legend from labels::
 
 legend( ('label1', 'label2', 'label3') )
@@ -3325,32 +3406,41 @@
 
 Keyword arguments:
 
- isaxes: [ True | False ]
+ *isaxes*: [ True | False ]
 Indicates that this is an axes legend
- numpoints: integer
+
+ *numpoints*: integer
 The number of points in the legend line, default is 4
- prop: [ None | FontProperties ]
- A FontProperties instance, or None to use rc settings.
- see :class:`~matplotlib.font_manager.FontProperties`
- pad: [ None | scalar ]
+
+ *prop*: [ None | FontProperties ]
+ A :class:`matplotlib.font_manager.FontProperties`
+ instance, or *None* to use rc settings.
+
+ *pad*: [ None | scalar ]
 The fractional whitespace inside the legend border, between 0 and 1.
- If None, use rc settings
- markerscale: [ None | scalar ]
- The relative size of legend markers vs. original. If None, use rc
- settings
- shadow: [ None | False | True ]
- If True, draw a shadow behind legend. If None, use rc settings.
- labelsep: [ None | scalar ]
- The vertical space between the legend entries. If None, use rc
- settings
- handlelen: [ None | scalar ]
- The length of the legend lines. If None, use rc settings.
- handletextsep: [ None | scalar ]
- The space between the legend line and legend text. If None, use rc
+ If *None*, use rc settings.
+
+ *markerscale*: [ None | scalar ]
+ The relative size of legend markers vs. original. If *None*, use rc
 settings.
- axespad: [ None | scalar ]
- The border between the axes and legend edge. If None, use rc
+
+ *shadow*: [ None | False | True ]
+ If *True*, draw a shadow behind legend. If *None*, use rc settings.
+
+ *labelsep*: [ None | scalar ]
+ The vertical space between the legend entries. If *None*, use rc
 settings.
+
+ *handlelen*: [ None | scalar ]
+ The length of the legend lines. If *None*, use rc settings.
+
+ *handletextsep*: [ None | scalar ]
+ The space between the legend line and legend text. If *None*, use rc
+ settings.
+
+ *axespad*: [ None | scalar ]
+ The border between the axes and legend edge. If *None*, use rc
+ settings.
 """
 
 def get_handles():
@@ -3409,21 +3499,21 @@
 
 step(x, y, *args, **kwargs)
 
- x and y must be 1-D sequences, and it is assumed, but not checked,
- that x is uniformly increasing.
+ Make a step plot. Additional keyword args to :func:`step` are the same
+ as those for :func:`~matplotlib.pyplot.plot`.
 
+ *x* and *y* must be 1-D sequences, and it is assumed, but not checked,
+ that *x* is uniformly increasing.
+
 Keyword arguments:
 
- where: [ 'pre' | 'post' | 'mid' ]
- if 'pre', the interval from x[i] to x[i+1] has level y[i]
+ *where*: [ 'pre' | 'post' | 'mid' ]
+ If 'pre', the interval from x[i] to x[i+1] has level y[i]
 
- if 'post', that interval has level y[i+1]
+ If 'post', that interval has level y[i+1]
 
- if 'mid', the jumps in y occur half-way between the x-values.
-
- Make a step plot. Additional keyword args to step are the same
- as those for plot. See plot for more info.
-
+ If 'mid', the jumps in *y* occur half-way between the
+ *x*-values.
 '''
 
 where = kwargs.pop('where', 'pre')
@@ -3450,12 +3540,14 @@
 
 Make a bar plot with rectangles bounded by:
 
- left, left+width, bottom, bottom+height
+ *left*, *left* + *width*, *bottom*, *bottom* + *height*
 (left, right, bottom and top edges)
 
- left, height, width, and bottom can be either scalars or sequences
+ *left*, *height*, *width*, and *bottom* can be either scalars
+ or sequences
 
- Return value is a list of Rectangle patch instances
+ Return value is a list of
+ :class:`matplotlib.patches.Rectangle` instances.
 
 Required arguments:
 
@@ -3488,18 +3580,20 @@
 axis as-is; True sets it to log scale
 ============= ===================================================
 
- For vertical bars, align='edge' aligns bars by their left edges in
- left, while 'center' interprets these values as the x coordinates of
- the bar centers. For horizontal bars, 'edge' aligns bars by their
- bottom edges in bottom, while 'center' interprets these values as the
- y coordinates of the bar centers.
+ 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.
+ 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:
+
 %(Rectangle)s
 """
 if not self._hold: self.cla()
@@ -3698,12 +3792,14 @@
 
 Make a horizontal bar plot with rectangles bounded by:
 
- left, left+width, bottom, bottom+height
+ *left*, *left* + *width*, *bottom*, *bottom* + *height*
 (left, right, bottom and top edges)
 
- bottom, width, height, and left can be either scalars or sequences
+ *bottom*, *width*, *height*, and *left* can be either scalars
+ or sequences
 
- Return value is a list of Rectangle patch instances
+ Return value is a list of
+ :class:`matplotlib.patches.Rectangle` instances.
 
 Required arguments:
 
@@ -3735,16 +3831,18 @@
 axis as-is; True sets it to log scale
 ============= ===================================================
 
- Setting align='edge' aligns bars by their bottom edges in bottom,
- while 'center' interprets these values as the y coordinates of the bar
- centers.
+ 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.
+ 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:
+
 %(Rectangle)s
 """
 
@@ -3760,8 +3858,8 @@
 
 broken_barh(self, xranges, yrange, **kwargs)
 
- A collection of horizontal bars spanning yrange with a sequence of
- xranges
+ A collection of horizontal bars spanning *yrange* with a sequence of
+ *xranges*.
 
 Required arguments:
 
@@ -3772,7 +3870,10 @@
 yrange sequence of (ymin, ywidth)
 ======== ==========================
 
- kwargs are collections.BrokenBarHCollection properties:
+ kwargs are
+ :class:`matplotlib.collections.BrokenBarHCollection`
+ properties:
+
 %(BrokenBarHCollection)s
 
 these can either be a single argument, ie::
@@ -3781,8 +3882,7 @@
 
 or a sequence of arguments for the various bars, ie::
 
- facecolors = 'black', 'red', 'green'
-
+ facecolors = ('black', 'red', 'green')
 """
 col = mcoll.BrokenBarHCollection(xranges, yrange, **kwargs)
 self.add_collection(col, autolim=True)
@@ -3798,15 +3898,17 @@
 
 stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
 
- A stem plot plots vertical lines (using linefmt) at each x location
- from the baseline to y, and places a marker there using markerfmt. A
- horizontal line at 0 is is plotted using basefmt
+ A stem plot plots vertical lines (using *linefmt*) at each *x*
+ location from the baseline to *y*, and places a marker there
+ using *markerfmt*. A horizontal line at 0 is is plotted using
+ *basefmt*.
 
- Return value is (markerline, stemlines, baseline) .
+ Return value is a tuple (*markerline*, *stemlines*,
+ *baseline*).
 
- See
- http://www.mathworks.com/access/helpdesk/help/techdoc/ref/stem.html
- for details and examples/stem_plot.py for a demo.
+ See `this document
+ <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/stem.html>`_
+ for details and :file:`examples/pylab_examples/stem_plot.py` for a demo.
 """
 remember_hold=self._hold
 if not self._hold: self.cla()
@@ -3829,56 +3931,68 @@
 def pie(self, x, explode=None, labels=None, colors=None,
 autopct=None, pctdistance=0.6, shadow=False,
 labeldistance=1.1):
- """
+ r"""
 call signature::
 
 pie(x, explode=None, labels=None,
 colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
 autopct=None, pctdistance=0.6, labeldistance=1.1, shadow=False)
 
- Make a pie chart of array x. The fractional area of each wedge is
- given by x/sum(x). If sum(x)<=1, then the values of x give the
- fractional area directly and the array will not be normalized.
+ Make a pie chart of array *x*. The fractional area of each
+ wedge is given by x/sum(x). If sum(x) <= 1, then the values
+ of x give the fractional area directly and the array will not
+ be normalized.
 
 Keyword arguments:
 
- explode: [ None | len(x) sequence ]
- If not None, is a len(x) array which specifies the
+ *explode*: [ None | len(x) sequence ]
+ If not *None*, is a len(*x*) array which specifies the
 fraction of the radius with which to offset each wedge.
- colors: [ None | color sequence ]
+
+ *colors*: [ None | color sequence ]
 A sequence of matplotlib color args through which the pie chart
 will cycle.
- labels: [ None | len(x) sequence of strings ]
+
+ *labels*: [ None | len(x) sequence of strings ]
 A sequence of strings providing the labels for each wedge
- autopct: [ None | format string | format function ]
- If not None, is a string or function used to label the
+
+ *autopct*: [ None | format string | format function ]
+ If not *None*, is a string or function used to label the
 wedges with their numeric value. The label will be placed inside
- the wedge. If it is a format string, the label will be fmt%pct.
- If it is a function, it will be called
- pctdistance: scalar
- The ratio between the center of each pie slice and the start of the
- text generated by autopct. Ignored if autopct is None; default is
- 0.6.
- labeldistance: scalar
+ the wedge. If it is a format string, the label will be ``fmt%pct``.
+ If it is a function, it will be called.
+
+ *pctdistance*: scalar
+ The ratio between the center of each pie slice and the
+ start of the text generated by *autopct*. Ignored if
+ *autopct* is *None*; default is 0.6.
+
+ *labeldistance*: scalar
 The radial distance at which the pie labels are drawn
- shadow: [ False | True ]
+
+ *shadow*: [ False | True ]
 Draw a shadow beneath the pie.
 
 The pie chart will probably look best if the figure and axes are
- square. Eg::
+ square. Eg.::
 
 figure(figsize=(8,8))
 ax = axes([0.1, 0.1, 0.8, 0.8])
 
 Return value:
- If autopct is None, return a list of (patches, texts), where patches
- is a sequence of mpatches.Wedge instances and texts is a
- list of the label Text instnaces
+ If *autopct* is None, return the tuple (*patches*, *texts*):
 
- If autopct is not None, return (patches, texts, autotexts), where
- patches and texts are as above, and autotexts is a list of text
- instances for the numeric labels
+ - *patches* is a sequence of
+ :class:`matplotlib.patches.Wedge` instances
 
+ - *texts* is a list of the label
+ :class:`matplotlib.text.Text` instances.
+
+ If *autopct* is not *None*, return the tuple (*patches*,
+ *texts*, *autotexts*), where *patches* and *texts* are as
+ above, and *autotexts* is a list of
+ :class:`~matplotlib.text.Text` instances for the numeric
+ labels.
 """
 self.set_frame_on(False)
 
@@ -3975,40 +4089,47 @@
 barsabove=False, lolims=False, uplims=False,
 xlolims=False, xuplims=False)
 
- Plot x versus y with error deltas in yerr and xerr.
- Vertical errorbars are plotted if yerr is not None.
- Horizontal errorbars are plotted if xerr is not None.
+ Plot *x* versus *y* with error deltas in *yerr* and *xerr*.
+ Vertical errorbars are plotted if *yerr* is not *None*.
+ Horizontal errorbars are plotted if *xerr* is not *None*.
 
- x, y, xerr, and yerr can all be scalars, which plots a single error bar
- at x, y.
+ *x*, *y*, *xerr*, and *yerr* can all be scalars, which plots a
+ single error bar at *x*, *y*.
 
 Optional keyword arguments:
 
- xerr/yerr: [ scalar | N, Nx1, Nx2 array-like ]
+ *xerr*/*yerr*: [ scalar | N, Nx1, Nx2 array-like ]
 If a scalar number, len(N) array-like object, or an Nx1 array-like
 object, errorbars are drawn +/- value.
 
 If a rank-1, Nx2 Numpy array, errorbars are drawn at -column1 and
 +column2
- fmt: '-'
- The plot format symbol for y. If fmt is None, just plot the
+
+ *fmt*: '-'
+ The plot format symbol for *y*. If *fmt* is *None*, just plot the
 errorbars with no line symbols. This can be useful for creating a
 bar plot with errorbars.
- ecolor: [ None | mpl color ]
+
+ *ecolor*: [ None | mpl color ]
 a matplotlib color arg which gives the color the errorbar lines; if
- None, use the marker color.
- elinewidth: scalar
- the linewidth of the errorbar lines. If None, use the linewidth.
- capsize: scalar
+ *None*, use the marker color.
+
+ *elinewidth*: scalar
+ the linewidth of the errorbar lines. If *None*, use the linewidth.
+
+ *capsize*: scalar
 the size of the error bar caps in points
- barsabove: [ True | False ]
- if True, will plot the errorbars above the plot symbols. Default is
- below.
- lolims/uplims/xlolims/xuplims: [ False | True ]
- These arguments can be used to indicate that a value gives only
- upper/lower limits. In that case a caret symbol is used to indicate
- this. lims-arguments may be of the same type as xerr and yerr.
 
+ *barsabove*: [ True | False ]
+ if *True*, will plot the errorbars above the plot
+ symbols. Default is below.
+
+ *lolims*/*uplims*/*xlolims*/*xuplims*: [ False | True ]
+ These arguments can be used to indicate that a value gives
+ only upper/lower limits. In that case a caret symbol is
+ used to indicate this. lims-arguments may be of the same
+ type as *xerr* and *yerr*.
+
 All other keyword arguments are passed on to the plot command for the
 markers, so you can add additional key=value pairs to control the
 errorbar markers. For example, this code makes big red squares with
@@ -4018,16 +4139,20 @@
 errorbar(x, y, yerr, marker='s',
 mfc='red', mec='green', ms=20, mew=4)
 
- where mfc, mec, ms and mew are aliases for the longer property names,
- markerfacecolor, markeredgecolor, markersize and markeredgewith.
+ where *mfc*, *mec*, *ms* and *mew* are aliases for the longer
+ property names, *markerfacecolor*, *markeredgecolor*, *markersize*
+ and *markeredgewith*.
 
 valid kwargs for the marker properties are
+
 %(Line2D)s
 
 Return value is a length 3 tuple. The first element is the
- Line2D instance for the y symbol lines. The second element is
- a list of error bar cap lines, the third element is a list of
- line collections for the horizontal and vertical error ranges
+ :class:`~matplotlib.lines.Line2D` instance for the *y* symbol
+ lines. The second element is a list of error bar cap lines,
+ the third element is a list of
+ :class:`~matplotlib.collections.LineCollection` instances for
+ the horizontal and vertical error ranges.
 """
 
 self._process_unit_info(xdata=x, ydata=y, kwargs=kwargs)
@@ -4196,38 +4321,38 @@
 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.
+ 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
+ - *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.
+ *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.
+ - *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
+ *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
+ *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
+ *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.
+ *x* is an array or a sequence of vectors.
 
- Returns a list of the lines added.
+ Returns a list of the :class:`matplotlib.lines.Line2D`
+ instances added.
 
 """
 if not self._hold: self.cla()
@@ -4382,24 +4507,26 @@
 vmin=None, vmax=None, alpha=1.0, linewidths=None,
 verts=None, **kwargs)
 
- Make a scatter plot of x versus y, where x, y are 1-D sequences
- of the same length, N.
+ Make a scatter plot of *x* versus *y*, where *x*, *y* are 1-D
+ sequences of the same length, *N*.
 
 Keyword arguments:
 
- s:
+ *s*:
 size in points^2. It is a scalar or an array of the same
- length as x and y.
- c:
- a color. c can be a single color format string, or a
- sequence of color specifications of length N, or a sequence
- of N numbers to be mapped to colors using the cmap and norm
- specified via kwargs (see below). Note that c should not be
- a single numeric RGB or RGBA sequence because that is
- indistinguishable from an array of values to be colormapped.
- c can be a 2-D array in which the rows are RGB or RGBA,
- however.
- marker:
+ length as *x* and *y*.
+
+ *c*:
+ a color. *c* can be a single color format string, or a
+ sequence of color specifications of length *N*, or a
+ sequence of *N* numbers to be mapped to colors using the
+ *cmap* and *norm* specified via kwargs (see below). Note
+ that *c* should not be a single numeric RGB or RGBA
+ sequence because that is indistinguishable from an array
+ of values to be colormapped. *c* can be a 2-D array in
+ which the rows are RGB or RGBA, however.
+
+ *marker*:
 can be on...
 
[truncated message content]
From: <jd...@us...> - 2008年06月19日 12:16:51
Revision: 5592
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5592&view=rev
Author: jdh2358
Date: 2008年06月19日 05:16:50 -0700 (2008年6月19日)
Log Message:
-----------
reverted typo I accidentally introduced into mathtext.rst
Modified Paths:
--------------
 trunk/matplotlib/doc/users/mathtext.rst
Modified: trunk/matplotlib/doc/users/mathtext.rst
===================================================================
--- trunk/matplotlib/doc/users/mathtext.rst	2008年06月19日 12:15:20 UTC (rev 5591)
+++ trunk/matplotlib/doc/users/mathtext.rst	2008年06月19日 12:16:50 UTC (rev 5592)
@@ -4,7 +4,7 @@
 ================================
 
 You can use TeX markup in any matplotlib text string. Note that you
-do not need to have TeX installed, since matplotlib ships its own` TeX
+do not need to have TeX installed, since matplotlib ships its own TeX
 expression parser, layout engine and fonts. The layout engine is a
 fairly direct adaptation of the layout algorithms in Donald Knuth's
 TeX, so the quality is quite good (matplotlib also provides a
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月19日 12:15:34
Revision: 5591
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5591&view=rev
Author: jdh2358
Date: 2008年06月19日 05:15:20 -0700 (2008年6月19日)
Log Message:
-----------
added installing section to users guide
Modified Paths:
--------------
 trunk/matplotlib/doc/users/index.rst
 trunk/matplotlib/doc/users/mathtext.rst
 trunk/matplotlib/lib/matplotlib/lines.py
Modified: trunk/matplotlib/doc/users/index.rst
===================================================================
--- trunk/matplotlib/doc/users/index.rst	2008年06月18日 22:06:03 UTC (rev 5590)
+++ trunk/matplotlib/doc/users/index.rst	2008年06月19日 12:15:20 UTC (rev 5591)
@@ -13,6 +13,7 @@
 :maxdepth: 2
 
 intro.rst
+ installing.rst
 pyplot_tutorial.rst
 navigation_toolbar.rst
 customizing.rst
Modified: trunk/matplotlib/doc/users/mathtext.rst
===================================================================
--- trunk/matplotlib/doc/users/mathtext.rst	2008年06月18日 22:06:03 UTC (rev 5590)
+++ trunk/matplotlib/doc/users/mathtext.rst	2008年06月19日 12:15:20 UTC (rev 5591)
@@ -4,7 +4,7 @@
 ================================
 
 You can use TeX markup in any matplotlib text string. Note that you
-do not need to have TeX installed, since matplotlib ships its own TeX
+do not need to have TeX installed, since matplotlib ships its own` TeX
 expression parser, layout engine and fonts. The layout engine is a
 fairly direct adaptation of the layout algorithms in Donald Knuth's
 TeX, so the quality is quite good (matplotlib also provides a
Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py	2008年06月18日 22:06:03 UTC (rev 5590)
+++ trunk/matplotlib/lib/matplotlib/lines.py	2008年06月19日 12:15:20 UTC (rev 5591)
@@ -837,7 +837,7 @@
 def _draw_thin_diamond(self, renderer, gc, path, path_trans):
 offset = renderer.points_to_pixels(self._markersize)
 transform = Affine2D().translate(-0.5, -0.5) \
- .rotate_deg(45).scale(offset * 0.6, offset)
+ .rot<ate_deg(45).scale(offset * 0.6, offset)
 rgbFace = self._get_rgb_face()
 renderer.draw_markers(gc, Path.unit_rectangle(), transform,
 path, path_trans, rgbFace)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 11 results of 11

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /