Revision: 6024 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6024&view=rev Author: mdboom Date: 2008年08月12日 17:57:14 +0000 (2008年8月12日) Log Message: ----------- Rename mathpng to mathmpl Modified Paths: -------------- trunk/matplotlib/doc/conf.py Added Paths: ----------- trunk/matplotlib/doc/sphinxext/mathmpl.py Removed Paths: ------------- trunk/matplotlib/doc/sphinxext/mathpng.py Modified: trunk/matplotlib/doc/conf.py =================================================================== --- trunk/matplotlib/doc/conf.py 2008年08月12日 17:54:48 UTC (rev 6023) +++ trunk/matplotlib/doc/conf.py 2008年08月12日 17:57:14 UTC (rev 6024) @@ -27,8 +27,8 @@ # 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', 'inheritance_diagram'] +extensions = ['mathmpl', 'math_symbol_table', 'sphinx.ext.autodoc', + 'only_directives', 'plot_directive', 'inheritance_diagram', 'toy'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] Copied: trunk/matplotlib/doc/sphinxext/mathmpl.py (from rev 6021, trunk/matplotlib/doc/sphinxext/mathpng.py) =================================================================== --- trunk/matplotlib/doc/sphinxext/mathmpl.py (rev 0) +++ trunk/matplotlib/doc/sphinxext/mathmpl.py 2008年08月12日 17:57:14 UTC (rev 6024) @@ -0,0 +1,156 @@ +import os +try: + from hashlib import md5 +except ImportError: + from md5 import md5 + +from docutils import nodes +from docutils.parsers.rst import directives +from docutils.writers.html4css1 import HTMLTranslator +from sphinx.latexwriter import LaTeXTranslator +import warnings + +# Define LaTeX math node: +class latex_math(nodes.General, nodes.Element): + pass + +def fontset_choice(arg): + return directives.choice(arg, ['cm', 'stix', 'stixsans']) + +options_spec = {'fontset': fontset_choice} + +def math_role(role, rawtext, text, lineno, inliner, + options={}, content=[]): + i = rawtext.find('`') + latex = rawtext[i+1:-1] + node = latex_math(rawtext) + node['latex'] = latex + node['fontset'] = options.get('fontset', 'cm') + return [node], [] +math_role.options = options_spec + +def math_directive_run(content, block_text, options): + latex = ''.join(content) + node = latex_math(block_text) + node['latex'] = latex + node['fontset'] = options.get('fontset', 'cm') + return [node] + +try: + from docutils.parsers.rst import Directive +except ImportError: + # Register directive the old way: + from docutils.parsers.rst.directives import _directives + def math_directive(name, arguments, options, content, lineno, + content_offset, block_text, state, state_machine): + return math_directive_run(content, block_text, options) + math_directive.arguments = None + math_directive.options = options_spec + math_directive.content = 1 + _directives['math'] = math_directive +else: + class math_directive(Directive): + has_content = True + option_spec = options_spec + + def run(self): + return math_directive_run(self.content, self.block_text, + self.options) + from docutils.parsers.rst import directives + directives.register_directive('math', math_directive) + +def setup(app): + app.add_node(latex_math) + app.add_role('math', math_role) + + # Add visit/depart methods to HTML-Translator: + def visit_latex_math_html(self, node): + source = self.document.attributes['source'] + self.body.append(latex2html(node, source)) + def depart_latex_math_html(self, node): + pass + HTMLTranslator.visit_latex_math = visit_latex_math_html + HTMLTranslator.depart_latex_math = depart_latex_math_html + + # Add visit/depart methods to LaTeX-Translator: + def visit_latex_math_latex(self, node): + inline = isinstance(node.parent, nodes.TextElement) + if inline: + self.body.append('$%s$' % node['latex']) + else: + self.body.extend(['\\begin{equation}', + node['latex'], + '\\end{equation}']) + def depart_latex_math_latex(self, node): + pass + LaTeXTranslator.visit_latex_math = visit_latex_math_latex + LaTeXTranslator.depart_latex_math = depart_latex_math_latex + +from os.path import isfile + +# This calls out to LaTeX to render the expression +def latex2png(latex, name): + f = open('math.tex', 'w') + f.write(r"""\documentclass[12pt]{article} + \pagestyle{empty} + \begin{document}""") + if inline: + f.write('$%s$' % latex) + else: + f.write(r'\[ %s \]' % latex) + f.write('\end{document}') + f.close() + os.system('latex --interaction=nonstopmode math.tex > /dev/null') + os.system('dvipng -bgTransparent -Ttight --noghostscript -l10 ' + + '-o %s math.dvi > /dev/null' % name) + + +from matplotlib import rcParams +from matplotlib.mathtext import MathTextParser +rcParams['mathtext.fontset'] = 'cm' +mathtext_parser = MathTextParser("Bitmap") + + +# This uses mathtext to render the expression +def latex2png(latex, filename, fontset='cm'): + latex = "$%s$" % latex + orig_fontset = rcParams['mathtext.fontset'] + rcParams['mathtext.fontset'] = fontset + if os.path.exists(filename): + depth = mathtext_parser.get_depth(latex, dpi=100) + else: + print latex.encode("ascii", "backslashreplace") + try: + depth = mathtext_parser.to_png(filename, latex, dpi=100) + except: + warnings.warn("Could not render math expression %s" % latex, + Warning) + depth = 0 + rcParams['mathtext.fontset'] = orig_fontset + return depth + +# LaTeX to HTML translation stuff: +def latex2html(node, source): + inline = isinstance(node.parent, nodes.TextElement) + latex = node['latex'] + name = 'math-%s' % md5(latex).hexdigest()[-10:] + dest = '_static/%s.png' % name + depth = latex2png(latex, dest, node['fontset']) + + path = '_static' + 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 + if inline: + cls = '' + else: + cls = 'class="center" ' + if inline and depth != 0: + style = 'style="position: relative; bottom: -%dpx"' % (depth + 1) + else: + style = '' + + return '<img src="%s/%s.png" %s%s/>' % (path, name, cls, style) + Deleted: trunk/matplotlib/doc/sphinxext/mathpng.py =================================================================== --- trunk/matplotlib/doc/sphinxext/mathpng.py 2008年08月12日 17:54:48 UTC (rev 6023) +++ trunk/matplotlib/doc/sphinxext/mathpng.py 2008年08月12日 17:57:14 UTC (rev 6024) @@ -1,156 +0,0 @@ -import os -try: - from hashlib import md5 -except ImportError: - from md5 import md5 - -from docutils import nodes -from docutils.parsers.rst import directives -from docutils.writers.html4css1 import HTMLTranslator -from sphinx.latexwriter import LaTeXTranslator -import warnings - -# Define LaTeX math node: -class latex_math(nodes.General, nodes.Element): - pass - -def fontset_choice(arg): - return directives.choice(arg, ['cm', 'stix', 'stixsans']) - -options_spec = {'fontset': fontset_choice} - -def math_role(role, rawtext, text, lineno, inliner, - options={}, content=[]): - i = rawtext.find('`') - latex = rawtext[i+1:-1] - node = latex_math(rawtext) - node['latex'] = latex - node['fontset'] = options.get('fontset', 'cm') - return [node], [] -math_role.options = options_spec - -def math_directive_run(content, block_text, options): - latex = ''.join(content) - node = latex_math(block_text) - node['latex'] = latex - node['fontset'] = options.get('fontset', 'cm') - return [node] - -try: - from docutils.parsers.rst import Directive -except ImportError: - # Register directive the old way: - from docutils.parsers.rst.directives import _directives - def math_directive(name, arguments, options, content, lineno, - content_offset, block_text, state, state_machine): - return math_directive_run(content, block_text, options) - math_directive.arguments = None - math_directive.options = options_spec - math_directive.content = 1 - _directives['math'] = math_directive -else: - class math_directive(Directive): - has_content = True - option_spec = options_spec - - def run(self): - return math_directive_run(self.content, self.block_text, - self.options) - from docutils.parsers.rst import directives - directives.register_directive('math', math_directive) - -def setup(app): - app.add_node(latex_math) - app.add_role('math', math_role) - - # Add visit/depart methods to HTML-Translator: - def visit_latex_math_html(self, node): - source = self.document.attributes['source'] - self.body.append(latex2html(node, source)) - def depart_latex_math_html(self, node): - pass - HTMLTranslator.visit_latex_math = visit_latex_math_html - HTMLTranslator.depart_latex_math = depart_latex_math_html - - # Add visit/depart methods to LaTeX-Translator: - def visit_latex_math_latex(self, node): - inline = isinstance(node.parent, nodes.TextElement) - if inline: - self.body.append('$%s$' % node['latex']) - else: - self.body.extend(['\\begin{equation}', - node['latex'], - '\\end{equation}']) - def depart_latex_math_latex(self, node): - pass - LaTeXTranslator.visit_latex_math = visit_latex_math_latex - LaTeXTranslator.depart_latex_math = depart_latex_math_latex - -from os.path import isfile - -# This calls out to LaTeX to render the expression -def latex2png(latex, name): - f = open('math.tex', 'w') - f.write(r"""\documentclass[12pt]{article} - \pagestyle{empty} - \begin{document}""") - if inline: - f.write('$%s$' % latex) - else: - f.write(r'\[ %s \]' % latex) - f.write('\end{document}') - f.close() - os.system('latex --interaction=nonstopmode math.tex > /dev/null') - os.system('dvipng -bgTransparent -Ttight --noghostscript -l10 ' + - '-o %s math.dvi > /dev/null' % name) - - -from matplotlib import rcParams -from matplotlib.mathtext import MathTextParser -rcParams['mathtext.fontset'] = 'cm' -mathtext_parser = MathTextParser("Bitmap") - - -# This uses mathtext to render the expression -def latex2png(latex, filename, fontset='cm'): - latex = "$%s$" % latex - orig_fontset = rcParams['mathtext.fontset'] - rcParams['mathtext.fontset'] = fontset - if os.path.exists(filename): - depth = mathtext_parser.get_depth(latex, dpi=100) - else: - print latex.encode("ascii", "backslashreplace") - try: - depth = mathtext_parser.to_png(filename, latex, dpi=100) - except: - warnings.warn("Could not render math expression %s" % latex, - Warning) - depth = 0 - rcParams['mathtext.fontset'] = orig_fontset - return depth - -# LaTeX to HTML translation stuff: -def latex2html(node, source): - inline = isinstance(node.parent, nodes.TextElement) - latex = node['latex'] - name = 'math-%s' % md5(latex).hexdigest()[-10:] - dest = '_static/%s.png' % name - depth = latex2png(latex, dest, node['fontset']) - - path = '_static' - 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 - if inline: - cls = '' - else: - cls = 'class="center" ' - if inline and depth != 0: - style = 'style="position: relative; bottom: -%dpx"' % (depth + 1) - else: - style = '' - - return '<img src="%s/%s.png" %s%s/>' % (path, name, cls, style) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6187 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6187&view=rev Author: jdh2358 Date: 2008年10月14日 21:16:51 +0000 (2008年10月14日) Log Message: ----------- preparing to move entire web site to sphinx; things may be whacked for a day or so Modified Paths: -------------- trunk/matplotlib/doc/api/index.rst trunk/matplotlib/doc/conf.py trunk/matplotlib/doc/devel/transformations.rst trunk/matplotlib/doc/matplotlibrc trunk/matplotlib/doc/pyplots/matplotlibrc trunk/matplotlib/doc/pyplots/tex_demo.hires.png trunk/matplotlib/doc/pyplots/tex_demo.pdf trunk/matplotlib/doc/pyplots/tex_demo.png trunk/matplotlib/doc/pyplots/tex_unicode_demo.hires.png trunk/matplotlib/doc/pyplots/tex_unicode_demo.pdf trunk/matplotlib/doc/pyplots/tex_unicode_demo.png trunk/matplotlib/doc/sphinxext/plot_directive.py trunk/matplotlib/doc/users/index.rst Added Paths: ----------- trunk/matplotlib/doc/_static/logo2.png trunk/matplotlib/doc/_templates/index.html trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/_templates/layout.html trunk/matplotlib/doc/api/path_api.rst trunk/matplotlib/doc/pyplots/colours.py trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py trunk/matplotlib/doc/pyplots/screenshots_date_demo.py trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py trunk/matplotlib/doc/pyplots/screenshots_table_demo.py trunk/matplotlib/doc/users/screenshots.rst Added: trunk/matplotlib/doc/_static/logo2.png =================================================================== (Binary files differ) Property changes on: trunk/matplotlib/doc/_static/logo2.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/matplotlib/doc/_templates/index.html =================================================================== --- trunk/matplotlib/doc/_templates/index.html (rev 0) +++ trunk/matplotlib/doc/_templates/index.html 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,1141 @@ +{% extends "layout.html" %} +{% set title = 'Overview' %} +{% block body %} + <h1>Welcome</h1> + + matplotlib is a python 2D plotting library which produces + publication quality figures in a variety of hardcopy formats and + interactive environments across platforms. matplotlib can be used + in python scripts, the python and <a + href=http://ipython.scipy.org>ipython</a> shell (ala matlab or + mathematica), web application servers, and six graphical user + interface toolkits. <p> + + matplotlib tries to make easy things easy and hard things possible. + You can generate plots, histograms, power spectra, bar charts, + errorcharts, scatterplots, etc, with just a few lines of code. For + example, to make a histogram of data in x, you simply need to type + + <pre> + >>> hist(x, 100) # use 100 bins + </pre> + + For the power user, you have full control of line styles, font + properties, axes properties, etc, via an object oriented interface + or via a handle graphics interface familiar to matlab users. A + summary of the goals of matplotlib and the progress so far can be + found <a href=goals.html>here</a>.<p> + + The plotting functions in the <a href=api/pyplot_api.html>pyplot + interface</a> have a high degree of Matlab® compatibility.<p> + + <br> + <table border=1 cellpadding=3 cellspacing=2> + <caption><h3>Plotting commands</h3></caption> + <tr><th>Function</th><th>Description</th></tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.acorr>acorr</a> + + </th> + + <td align="left"> + plot the autocorrelation function + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.annotate>annotate</a> + + </th> + + <td align="left"> + annotate something in the figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.arrow>arrow</a> + + </th> + + <td align="left"> + add an arrow to the axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.axes>axes</a> + + </th> + + <td align="left"> + Create a new axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.axhline>axhline</a> + + </th> + + <td align="left"> + draw a horizontal line across axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.axvline>axvline</a> + + </th> + + <td align="left"> + draw a vertical line across axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.axhspan>axhspan</a> + + </th> + + <td align="left"> + draw a horizontal bar across axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.axvspan>axvspan</a> + + </th> + + <td align="left"> + draw a vertical bar across axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.axis>axis</a> + + </th> + + <td align="left"> + Set or return the current axis limits + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.bar>bar</a> + + </th> + + <td align="left"> + make a bar chart + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.barh>barh</a> + + </th> + + <td align="left"> + a horizontal bar chart + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.broken_barh>broken_barh</a> + + </th> + + <td align="left"> + a set of horizontal bars with gaps + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.box>box</a> + + </th> + + <td align="left"> + set the axes frame on/off state + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.boxplot>boxplot</a> + + </th> + + <td align="left"> + make a box and whisker plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.cla>cla</a> + + </th> + + <td align="left"> + clear current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.clabel>clabel</a> + + </th> + + <td align="left"> + label a contour plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.clf>clf</a> + + </th> + + <td align="left"> + clear a figure window + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.clim>clim</a> + + </th> + + <td align="left"> + adjust the color limits of the current image + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.close>close</a> + + </th> + + <td align="left"> + close a figure window + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.colorbar>colorbar</a> + + </th> + + <td align="left"> + add a colorbar to the current figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.cohere>cohere</a> + + </th> + + <td align="left"> + make a plot of coherence + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.contour>contour</a> + + </th> + + <td align="left"> + make a contour plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.contourf>contourf</a> + + </th> + + <td align="left"> + make a filled contour plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.csd>csd</a> + + </th> + + <td align="left"> + make a plot of cross spectral density + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.delaxes>delaxes</a> + + </th> + + <td align="left"> + delete an axes from the current figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.draw>draw</a> + + </th> + + <td align="left"> + Force a redraw of the current figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.errorbar>errorbar</a> + + </th> + + <td align="left"> + make an errorbar graph + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.figlegend>figlegend</a> + + </th> + + <td align="left"> + make legend on the figure rather than the axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.figimage>figimage</a> + + </th> + + <td align="left"> + make a figure image + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.figtext>figtext</a> + + </th> + + <td align="left"> + add text in figure coords + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.figure>figure</a> + + </th> + + <td align="left"> + create or change active figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.fill>fill</a> + + </th> + + <td align="left"> + make filled polygons + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.findobj>findobj</a> + + </th> + + <td align="left"> + recursively find all objects matching some criteria + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.gca>gca</a> + + </th> + + <td align="left"> + return the current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.gcf>gcf</a> + + </th> + + <td align="left"> + return the current figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.gci>gci</a> + + </th> + + <td align="left"> + get the current image, or None + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.getp>getp</a> + + </th> + + <td align="left"> + get a handle graphics property + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.grid>grid</a> + + </th> + + <td align="left"> + set whether gridding is on + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.hist>hist</a> + + </th> + + <td align="left"> + make a histogram + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.hold>hold</a> + + </th> + + <td align="left"> + set the axes hold state + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.ioff>ioff</a> + + </th> + + <td align="left"> + turn interaction mode off + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.ion>ion</a> + + </th> + + <td align="left"> + turn interaction mode on + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.isinteractive>isinteractive</a> + + </th> + + <td align="left"> + return True if interaction mode is on + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.imread>imread</a> + + </th> + + <td align="left"> + load image file into array + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.imshow>imshow</a> + + </th> + + <td align="left"> + plot image data + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.ishold>ishold</a> + + </th> + + <td align="left"> + return the hold state of the current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.legend>legend</a> + + </th> + + <td align="left"> + make an axes legend + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.loglog>loglog</a> + + </th> + + <td align="left"> + a log log plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.matshow>matshow</a> + + </th> + + <td align="left"> + display a matrix in a new figure preserving aspect + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.pcolor>pcolor</a> + + </th> + + <td align="left"> + make a pseudocolor plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.pcolormesh>pcolormesh</a> + + </th> + + <td align="left"> + make a pseudocolor plot using a quadrilateral mesh + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.pie>pie</a> + + </th> + + <td align="left"> + make a pie chart + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.plot>plot</a> + + </th> + + <td align="left"> + make a line plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.plot_date>plot_date</a> + + </th> + + <td align="left"> + plot dates + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.plotfile>plotfile</a> + + </th> + + <td align="left"> + plot column data from an ASCII tab/space/comma delimited file + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.pie>pie</a> + + </th> + + <td align="left"> + pie charts + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.polar>polar</a> + + </th> + + <td align="left"> + make a polar plot on a PolarAxes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.psd>psd</a> + + </th> + + <td align="left"> + make a plot of power spectral density + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.quiver>quiver</a> + + </th> + + <td align="left"> + make a direction field (arrows) plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.rc>rc</a> + + </th> + + <td align="left"> + control the default params + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.rgrids>rgrids</a> + + </th> + + <td align="left"> + customize the radial grids and labels for polar + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.savefig>savefig</a> + + </th> + + <td align="left"> + save the current figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.scatter>scatter</a> + + </th> + + <td align="left"> + make a scatter plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.setp>setp</a> + + </th> + + <td align="left"> + set a handle graphics property + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.semilogx>semilogx</a> + + </th> + + <td align="left"> + log x axis + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.semilogy>semilogy</a> + + </th> + + <td align="left"> + log y axis + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.show>show</a> + + </th> + + <td align="left"> + show the figures + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.specgram>specgram</a> + + </th> + + <td align="left"> + a spectrogram plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.spy>spy</a> + + </th> + + <td align="left"> + plot sparsity pattern using markers or image + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.stem>stem</a> + + </th> + + <td align="left"> + make a stem plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.subplot>subplot</a> + + </th> + + <td align="left"> + make a subplot (numrows, numcols, axesnum) + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.subplots_adjust>subplots_adjust</a> + + </th> + + <td align="left"> + change the params controlling the subplot positions of current figure + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.subplot_tool>subplot_tool</a> + + </th> + + <td align="left"> + launch the subplot configuration tool + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.suptitle>suptitle</a> + + </th> + + <td align="left"> + add a figure title + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.table>table</a> + + </th> + + <td align="left"> + add a table to the plot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.text>text</a> + + </th> + + <td align="left"> + add some text at location x,y to the current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.thetagrids>thetagrids</a> + + </th> + + <td align="left"> + customize the radial theta grids and labels for polar + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.title>title</a> + + </th> + + <td align="left"> + add a title to the current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.xcorr>xcorr</a> + + </th> + + <td align="left"> + plot the autocorrelation function of x and y + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.xlim>xlim</a> + + </th> + + <td align="left"> + set/get the xlimits + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.ylim>ylim</a> + + </th> + + <td align="left"> + set/get the ylimits + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.xticks>xticks</a> + + </th> + + <td align="left"> + set/get the xticks + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.yticks>yticks</a> + + </th> + + <td align="left"> + set/get the yticks + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.xlabel>xlabel</a> + + </th> + + <td align="left"> + add an xlabel to the current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.ylabel>ylabel</a> + + </th> + + <td align="left"> + add a ylabel to the current axes + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.autumn>autumn</a> + + </th> + + <td align="left"> + set the default colormap to autumn + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.bone>bone</a> + + </th> + + <td align="left"> + set the default colormap to bone + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.cool>cool</a> + + </th> + + <td align="left"> + set the default colormap to cool + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.copper>copper</a> + + </th> + + <td align="left"> + set the default colormap to copper + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.flag>flag</a> + + </th> + + <td align="left"> + set the default colormap to flag + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.gray>gray</a> + + </th> + + <td align="left"> + set the default colormap to gray + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.hot>hot</a> + + </th> + + <td align="left"> + set the default colormap to hot + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.hsv>hsv</a> + + </th> + + <td align="left"> + set the default colormap to hsv + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.jet>jet</a> + + </th> + + <td align="left"> + set the default colormap to jet + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.pink>pink</a> + + </th> + + <td align="left"> + set the default colormap to pink + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.prism>prism</a> + + </th> + + <td align="left"> + set the default colormap to prism + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.spring>spring</a> + + </th> + + <td align="left"> + set the default colormap to spring + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.summer>summer</a> + + </th> + + <td align="left"> + set the default colormap to summer + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.winter>winter</a> + + </th> + + <td align="left"> + set the default colormap to winter + </td> + + </tr> + <tr> + <th align="left"> + <a href=api/pyplot_api.html#matplotlib.pyplot.spectral>spectral</a> + + </th> + + <td align="left"> + set the default colormap to spectral + </td> + + </tr> + </table> + </td> + </tr> + +</table> +{% endblock %} Added: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html (rev 0) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,21 @@ +<h3>Download</h3> +<p>Current version: <b>{{ version }}</b></p> +<p>Get matplotlib from the sourceforge <a +href="http://sourceforge.net/projects/matplotlib">download</a> page + +<h3>Need help?</h3> +<p>Join the matplotlib <a +href="http://sourceforge.net/mail/?group_id=80706">mailing lists</a> + +<p>You can file bugs and patches on the sourceforge <a href="http://sourceforge.net/tracker/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> + +<h3>Screenshots</h3> + +<a href="{{ pathto('users/screenshots') }}"><img align=center src="{{ +pathto("_static/logo_sidebar.png", 1) }}"></a> + +<a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a> + + + + Added: trunk/matplotlib/doc/_templates/layout.html =================================================================== --- trunk/matplotlib/doc/_templates/layout.html (rev 0) +++ trunk/matplotlib/doc/_templates/layout.html 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,19 @@ +{% extends "!layout.html" %} + +{% block rootrellink %} + <li><a href="{{ pathto('index') }}">matplotlib home </a> | </li> + <li><a href="{{ pathto('contents') }}">documentation </a> »</li> +{% endblock %} + +{% block relbar1 %} +<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> +<img src="{{ pathto("_static/logo2.png", 1) }}"> +</div> +{{ super() }} +{% endblock %} + +{# put the sidebar before the body #} +{% block sidebar1 %}{{ sidebar() }}{% endblock %} +{% block sidebar2 %}{% endblock %} + + Modified: trunk/matplotlib/doc/api/index.rst =================================================================== --- trunk/matplotlib/doc/api/index.rst 2008年10月14日 15:59:49 UTC (rev 6186) +++ trunk/matplotlib/doc/api/index.rst 2008年10月14日 21:16:51 UTC (rev 6187) @@ -22,5 +22,6 @@ collections_api.rst colorbar_api.rst colors_api.rst + path_api.rst pyplot_api.rst index_backend_api.rst Added: trunk/matplotlib/doc/api/path_api.rst =================================================================== --- trunk/matplotlib/doc/api/path_api.rst (rev 0) +++ trunk/matplotlib/doc/api/path_api.rst 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,12 @@ +*************** +matplotlib path +*************** + + +:mod:`matplotlib.path` +======================= + +.. automodule:: matplotlib.path + :members: + :undoc-members: + :show-inheritance: Modified: trunk/matplotlib/doc/conf.py =================================================================== --- trunk/matplotlib/doc/conf.py 2008年10月14日 15:59:49 UTC (rev 6186) +++ trunk/matplotlib/doc/conf.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -37,7 +37,7 @@ source_suffix = '.rst' # The master toctree document. -master_doc = 'index' +master_doc = 'contents' # General substitutions. project = 'Matplotlib' @@ -47,9 +47,10 @@ # other places throughout the built documents. # # The short X.Y version. -version = '0.98' +import matplotlib +version = matplotlib.__version__ # The full version, including alpha/beta/rc tags. -release = '0.98' +release = version # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -81,7 +82,8 @@ # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. -html_style = 'matplotlib.css' +#html_style = 'matplotlib.css' +html_style = 'mpl.css' # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". @@ -108,12 +110,20 @@ # typographically correct entities. #html_use_smartypants = True +# Content template for the index page. +html_index = 'index.html' + # Custom sidebar templates, maps document names to template names. #html_sidebars = {} +# Custom sidebar templates, maps page names to templates. +html_sidebars = {'index': 'indexsidebar.html', + } + + # Additional templates that should be rendered to pages, maps page names to # template names. -#html_additional_pages = {} +html_additional_pages = {'index': 'index.html'} # If false, no module index is generated. #html_use_modindex = True Modified: trunk/matplotlib/doc/devel/transformations.rst =================================================================== --- trunk/matplotlib/doc/devel/transformations.rst 2008年10月14日 15:59:49 UTC (rev 6186) +++ trunk/matplotlib/doc/devel/transformations.rst 2008年10月14日 21:16:51 UTC (rev 6187) @@ -18,9 +18,3 @@ interval_contains, interval_contains_open :show-inheritance: -:mod:`matplotlib.path` -============================= - -.. automodule:: matplotlib.path - :members: Path, get_path_collection_extents - :show-inheritance: Modified: trunk/matplotlib/doc/matplotlibrc =================================================================== --- trunk/matplotlib/doc/matplotlibrc 2008年10月14日 15:59:49 UTC (rev 6186) +++ trunk/matplotlib/doc/matplotlibrc 2008年10月14日 21:16:51 UTC (rev 6187) @@ -240,9 +240,9 @@ # The figure subplot parameters. All dimensions are fraction of the # figure width or height -#figure.subplot.left : 0.125 # the left side of the subplots of the figure +figure.subplot.left : 0.2 # the left side of the subplots of the figure #figure.subplot.right : 0.9 # the right side of the subplots of the figure -#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure +figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure #figure.subplot.top : 0.9 # the top of the subplots of the figure #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots @@ -264,7 +264,7 @@ # the default savefig params can be different for the GUI backends. # Eg, you may want a higher resolution, or to make the figure # background white -#savefig.dpi : 100 # figure dots per inch +savefig.dpi : 80 # figure dots per inch #savefig.facecolor : white # figure facecolor when saving #savefig.edgecolor : white # figure edgecolor when saving Modified: trunk/matplotlib/doc/pyplots/matplotlibrc =================================================================== --- trunk/matplotlib/doc/pyplots/matplotlibrc 2008年10月14日 15:59:49 UTC (rev 6186) +++ trunk/matplotlib/doc/pyplots/matplotlibrc 2008年10月14日 21:16:51 UTC (rev 6187) @@ -240,9 +240,9 @@ # The figure subplot parameters. All dimensions are fraction of the # figure width or height -#figure.subplot.left : 0.125 # the left side of the subplots of the figure +#figure.subplot.left : 0.15 # the left side of the subplots of the figure #figure.subplot.right : 0.9 # the right side of the subplots of the figure -#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure +#figure.subplot.bottom : 0.15 # the bottom of the subplots of the figure #figure.subplot.top : 0.9 # the top of the subplots of the figure #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots Added: trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,24 @@ +# a bar plot with errorbars +# a bar plot with errorbars +from pylab import * + +N = 5 +menMeans = (20, 35, 30, 35, 27) +menStd = ( 2, 3, 4, 1, 2) + +ind = arange(N) # the x locations for the groups +width = 0.35 # the width of the bars +p1 = bar(ind, menMeans, width, color='r', yerr=menStd) + +womenMeans = (25, 32, 34, 20, 25) +womenStd = ( 3, 5, 2, 3, 3) +p2 = bar(ind+width, womenMeans, width, color='y', yerr=womenStd) + +ylabel('Scores') +title('Scores by group and gender') +xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') ) +xlim(-width,len(ind)) +yticks(arange(0,41,10)) + +legend( (p1[0], p2[0]), ('Men', 'Women'), shadow=True) +show() Added: trunk/matplotlib/doc/pyplots/screenshots_date_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_date_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_date_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,42 @@ +#!/usr/bin/env python +""" +Show how to make date plots in matplotlib using date tick locators and +formatters. See major_minor_demo1.py for more information on +controlling major and minor ticks + +All matplotlib date plotting is done by converting date instances into +days since the 0001年01月01日 UTC. The conversion, tick locating and +formatting is done behind the scenes so this is most transparent to +you. The dates module provides several converter functions date2num +and num2date + +""" + +import datetime +import matplotlib.pyplot as plt +import matplotlib.dates as mdates +import matplotlib.mlab as mlab + +years = mdates.YearLocator() # every year +months = mdates.MonthLocator() # every month +yearsFmt = mdates.DateFormatter('%Y') + +intc = mlab.csv2rec('mpl_examples/data/intc.csv') + +fig = plt.figure() +ax = fig.add_subplot(111) +ax.plot(intc.date, intc.adj_close) + +# format the ticks +ax.xaxis.set_major_locator(years) +ax.xaxis.set_major_formatter(yearsFmt) +ax.xaxis.set_minor_locator(months) +ax.autoscale_view() + +# format the coords message box +def price(x): return '$%1.2f'%x +ax.format_xdata = mdates.DateFormatter('%Y-%m-%d') +ax.format_ydata = price + +ax.grid(True) +plt.show() Added: trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,149 @@ + +# This example can be boiled down to a more simplistic example +# to show the problem, but bu including the upper and lower +# bound ellipses, it demonstrates how significant this error +# is to our plots. + +import math +from pylab import * +from matplotlib.patches import Ellipse, Arc + +# given a point x, y +x = 2692.440 +y = 6720.850 + +# get is the radius of a circle through this point +r = math.sqrt( x*x+y*y ) + +# show some comparative circles +delta = 6 + + +################################################## +def custom_ellipse( ax, x, y, major, minor, theta, numpoints = 750, **kwargs ): + xs = [] + ys = [] + incr = 2.0*math.pi / numpoints + incrTheta = 0.0 + while incrTheta <= (2.0*math.pi): + a = major * math.cos( incrTheta ) + b = minor * math.sin( incrTheta ) + l = math.sqrt( ( a**2 ) + ( b**2 ) ) + phi = math.atan2( b, a ) + incrTheta += incr + + xs.append( x + ( l * math.cos( theta + phi ) ) ) + ys.append( y + ( l * math.sin( theta + phi ) ) ) + # end while + + incrTheta = 2.0*math.pi + a = major * math.cos( incrTheta ) + b = minor * math.sin( incrTheta ) + l = sqrt( ( a**2 ) + ( b**2 ) ) + phi = math.atan2( b, a ) + xs.append( x + ( l * math.cos( theta + phi ) ) ) + ys.append( y + ( l * math.sin( theta + phi ) ) ) + + ellipseLine = ax.plot( xs, ys, **kwargs ) + + + + +################################################## +# make the axes +ax1 = subplot( 311, aspect='equal' ) +ax1.set_aspect( 'equal', 'datalim' ) + +# make the lower-bound ellipse +diam = (r - delta) * 2.0 +lower_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" ) +ax1.add_patch( lower_ellipse ) + +# make the target ellipse +diam = r * 2.0 +target_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" ) +ax1.add_patch( target_ellipse ) + +# make the upper-bound ellipse +diam = (r + delta) * 2.0 +upper_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" ) +ax1.add_patch( upper_ellipse ) + +# make the target +diam = delta * 2.0 +target = Ellipse( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" ) +ax1.add_patch( target ) + +# give it a big marker +ax1.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) + +################################################## +# make the axes +ax = subplot( 312, aspect='equal' , sharex=ax1, sharey=ax1) +ax.set_aspect( 'equal', 'datalim' ) + +# make the lower-bound arc +diam = (r - delta) * 2.0 +lower_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" ) +ax.add_patch( lower_arc ) + +# make the target arc +diam = r * 2.0 +target_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" ) +ax.add_patch( target_arc ) + +# make the upper-bound arc +diam = (r + delta) * 2.0 +upper_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" ) +ax.add_patch( upper_arc ) + +# make the target +diam = delta * 2.0 +target = Arc( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" ) +ax.add_patch( target ) + +# give it a big marker +ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) + + + + + +################################################## +# now lets do the same thing again using a custom ellipse function + + + +# make the axes +ax = subplot( 313, aspect='equal', sharex=ax1, sharey=ax1 ) +ax.set_aspect( 'equal', 'datalim' ) + +# make the lower-bound ellipse +custom_ellipse( ax, 0.0, 0.0, r-delta, r-delta, 0.0, color="darkgreen" ) + +# make the target ellipse +custom_ellipse( ax, 0.0, 0.0, r, r, 0.0, color="darkred" ) + +# make the upper-bound ellipse +custom_ellipse( ax, 0.0, 0.0, r+delta, r+delta, 0.0, color="darkblue" ) + +# make the target +custom_ellipse( ax, x, y, delta, delta, 0.0, color="#BB1208" ) + +# give it a big marker +ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) + + +# give it a big marker +ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) + +################################################## +# lets zoom in to see the area of interest + +ax1.set_xlim(2650, 2735) +ax1.set_ylim(6705, 6735) + +savefig("ellipse") +show() + + Added: trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,7 @@ +from pylab import * +t = arange(0.0, 1.01, 0.01) +s = sin(2*2*pi*t) + +fill(t, s*exp(-5*t), 'r') +grid(True) +show() Added: trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,20 @@ +from matplotlib import rcParams +from pylab import * + + +mu, sigma = 100, 15 +x = mu + sigma*randn(10000) + +# the histogram of the data +n, bins, patches = hist(x, 100, normed=1) + +# add a 'best fit' line +y = normpdf( bins, mu, sigma) +l = plot(bins, y, 'r--', linewidth=2) +xlim(40, 160) + +xlabel('Smarts') +ylabel('P') +title(r'$\rm{IQ:}\/ \mu=100,\/ \sigma=15$') + +show() Added: trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,36 @@ +import numpy as np +import matplotlib.path as mpath +import matplotlib.patches as mpatches +import matplotlib.pyplot as plt + +Path = mpath.Path + +fig = plt.figure() +ax = fig.add_subplot(111) + +pathdata = [ + (Path.MOVETO, (1.58, -2.57)), + (Path.CURVE4, (0.35, -1.1)), + (Path.CURVE4, (-1.75, 2.0)), + (Path.CURVE4, (0.375, 2.0)), + (Path.LINETO, (0.85, 1.15)), + (Path.CURVE4, (2.2, 3.2)), + (Path.CURVE4, (3, 0.05)), + (Path.CURVE4, (2.0, -0.5)), + (Path.CLOSEPOLY, (1.58, -2.57)), + ] + +codes, verts = zip(*pathdata) +path = mpath.Path(verts, codes) +patch = mpatches.PathPatch(path, facecolor='red', edgecolor='yellow', alpha=0.5) +ax.add_patch(patch) + +x, y = zip(*path.vertices) +line, = ax.plot(x, y, 'go-') +ax.grid() +ax.set_xlim(-3,4) +ax.set_ylim(-3,4) +ax.set_title('spline paths') +plt.show() + + Added: trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,26 @@ +""" +Make a pie chart - see +http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring. + +This example shows a basic pie chart with labels optional features, +like autolabeling the percentage, offsetting a slice with "explode" +and adding a shadow. + +Requires matplotlib0-0.70 or later + +""" +from pylab import * + +# make a square figure and axes +figure(1, figsize=(6,6)) +ax = axes([0.1, 0.1, 0.8, 0.8]) + +labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' +fracs = [15,30,45, 10] + +explode=(0, 0.05, 0, 0) +pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True) +title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5}) + +show() + Added: trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,28 @@ +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.mlab as mlab + +intc = mlab.csv2rec('mpl_examples/data/intc.csv') + +delta1 = np.diff(intc.adj_close)/intc.adj_close[:-1] + +# size in points ^2 +volume = (15*intc.volume[:-2]/intc.volume[0])**2 +close = 0.003*intc.close[:-2]/0.003*intc.open[:-2] + +fig = plt.figure() +ax = fig.add_subplot(111) +ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.75) + +#ticks = arange(-0.06, 0.061, 0.02) +#xticks(ticks) +#yticks(ticks) + +ax.set_xlabel(r'$\Delta_i$', fontsize=20) +ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20) +ax.set_title('Volume and percent change') +ax.grid(True) + +plt.show() + + Added: trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,11 @@ +from pylab import * + +t = arange(0.0, 2.0, 0.01) +s = sin(2*pi*t) +plot(t, s, linewidth=1.0) + +xlabel('time (s)') +ylabel('voltage (mV)') +title('About as simple as it gets, folks') +grid(True) +show() Added: trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,43 @@ +from pylab import * +from matplotlib.widgets import Slider, Button, RadioButtons + +ax = subplot(111) +subplots_adjust(left=0.25, bottom=0.25) +t = arange(0.0, 1.0, 0.001) +a0 = 5 +f0 = 3 +s = a0*sin(2*pi*f0*t) +l, = plot(t,s, lw=2, color='red') +axis([0, 1, -10, 10]) + +axcolor = 'lightgoldenrodyellow' +axfreq = axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) +axamp = axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor) + +sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) +samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) + +def update(val): + amp = samp.val + freq = sfreq.val + l.set_ydata(amp*sin(2*pi*freq*t)) + draw() +sfreq.on_changed(update) +samp.on_changed(update) + +resetax = axes([0.8, 0.025, 0.1, 0.04]) +button = Button(resetax, 'Reset', color=axcolor, hovercolor=0.975) +def reset(event): + sfreq.reset() + samp.reset() +button.on_clicked(reset) + +rax = axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor) +radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) +def colorfunc(label): + l.set_color(label) + draw() +radio.on_clicked(colorfunc) + +show() + Added: trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,25 @@ +#!/usr/bin/env python +from pylab import * + +def f(t): + s1 = cos(2*pi*t) + e1 = exp(-t) + return multiply(s1,e1) + +t1 = arange(0.0, 5.0, 0.1) +t2 = arange(0.0, 5.0, 0.02) +t3 = arange(0.0, 2.0, 0.01) + +subplot(211) +plot(t1, f(t1), 'bo', t2, f(t2), 'k--', markerfacecolor='green') +grid(True) +title('A tale of 2 subplots') +ylabel('Damped oscillation') + +subplot(212) +plot(t3, cos(2*pi*t3), 'r.') +grid(True) +xlabel('time (s)') +ylabel('Undamped') +show() + Added: trunk/matplotlib/doc/pyplots/screenshots_table_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_table_demo.py (rev 0) +++ trunk/matplotlib/doc/pyplots/screenshots_table_demo.py 2008年10月14日 21:16:51 UTC (rev 6187) @@ -0,0 +1,94 @@ +#!/usr/bin/env python +import matplotlib + +from pylab import * +from matplotlib.colors import colorConverter + + +#Some simple functions to generate colours. +def pastel(colour, weight=2.4): + """ Convert colour into a nice pastel shade""" + rgb = asarray(colorConverter.to_rgb(colour)) + # scale colour + maxc = max(rgb) + if maxc < 1.0 and maxc > 0: + # scale colour + scale = 1.0 / maxc + rgb = rgb * scale + # now decrease saturation + total = sum(rgb) + slack = 0 + for x in rgb: + slack += 1.0 - x + + # want to increase weight from total to weight + # pick x s.t. slack * x == weight - total + # x = (weight - total) / slack + x = (weight - total) / slack + + rgb = [c + (x * (1.0-c)) for c in rgb] + + return rgb + +def get_colours(n): + """ Return n pastel colours. """ + base = asarray([[1,0,0], [0,1,0], [0,0,1]]) + + if n <= 3: + return base[0:n] + + # how many new colours to we need to insert between + # red and green and between green and blue? + needed = (((n - 3) + 1) / 2, (n - 3) / 2) + + colours = [] + for start in (0, 1): + for x in linspace(0, 1, needed[start]+2): + colours.append((base[start] * (1.0 - x)) + + (base[start+1] * x)) + + return [pastel(c) for c in colours[0:n]] + + + +axes([0.2, 0.2, 0.7, 0.6]) # leave room below the axes for the table + +data = [[ 66386, 174296, 75131, 577908, 32015], + [ 58230, 381139, 78045, 99308, 160454], + [ 89135, 80552, 152558, 497981, 603535], + [ 78415, 81858, 150656, 193263, 69638], + [ 139361, 331509, 343164, 781380, 52269]] + +colLabels = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail') +rowLabels = ['%d year' % x for x in (100, 50, 20, 10, 5)] + +# Get some pastel shades for the colours +colours = get_colours(len(colLabels)) +colours.reverse() +rows = len(data) + +ind = arange(len(colLabels)) + 0.3 # the x locations for the groups +cellText = [] +width = 0.4 # the width of the bars +yoff = array([0.0] * len(colLabels)) # the bottom values for stacked bar chart +for row in xrange(rows): + bar(ind, data[row], width, bottom=yoff, color=colours[row]) + yoff = yoff + data[row] + cellText.append(['%1.1f' % (x/1000.0) for x in yoff]) + +# Add a table at the bottom of the axes +colours.reverse() +cellText.reverse() +the_table = table(cellText=cellText, + rowLabels=rowLabels, rowColours=colours, + colLabels=colLabels, + loc='bottom') +ylabel("Loss 1000ドル's") +vals = arange(0, 2500, 500) +yticks(vals*1000, ['%d' % val for val in vals]) +xticks([]) +title('Loss by Disaster') +#savefig('table_demo_small', dpi=75) +#savefig('table_demo_large', dpi=300) + +show() Modified: trunk/matplotlib/doc/pyplots/tex_demo.hires.png =================================================================== (Binary files differ) Modified: trunk/matplotlib/doc/pyplots/tex_demo.pdf =================================================================== --- trunk/matplotlib/doc/pyplots/tex_demo.pdf 2008年10月14日 15:59:49 UTC (rev 6186) +++ trunk/matplotlib/doc/pyplots/tex_demo.pdf 2008年10月14日 21:16:51 UTC (rev 6187) @@ -4,9 +4,9 @@ << /Type /Catalog /Pages 3 0 R >> endobj 2 0 obj -<< /CreationDate (D:20080731010125-07'00') +<< /CreationDate (D:20081014161405-05'00') /Producer (matplotlib pdf backend) -/Creator (matplotlib 0.98.3rc2, http://matplotlib.sf.net) >> +/Creator (matplotlib 0.98.3, http://matplotlib.sf.net) >> endobj 3 0 obj << /Count 1 /Kids [ 4 0 R ] /Type /Pages >> @@ -44,214 +44,637 @@ 1864 endobj 36 0 obj -<< /BaseFont /CMSY10 /Type /Font /Subtype /Type1 /FontDescriptor 35 0 R +<< /BaseFont /CMMI12 /Type /Font /Subtype /Type1 /FontDescriptor 35 0 R /Widths 34 0 R /LastChar 125 /FirstChar 0 >> endobj 34 0 obj -[ 777 277 777 500 777 500 777 777 777 777 777 777 777 1000 500 500 777 777 -777 777 777 777 777 777 777 777 777 777 1000 1000 777 777 1000 1000 500 500 -1000 1000 1000 777 1000 1000 611 611 1000 1000 1000 777 274 1000 666 666 -888 888 0 0 555 555 666 500 722 722 777 777 611 798 656 526 771 527 718 594 -844 544 677 761 689 1200 820 796 695 816 847 605 544 625 612 987 713 668 -724 666 666 666 666 666 611 611 444 444 444 444 500 500 388 388 277 500 500 -611 500 277 833 750 833 416 666 666 777 777 444 444 444 611 777 777 ] +[ 606 815 748 679 728 811 765 571 652 598 757 622 552 507 433 395 427 483 +456 346 563 571 589 483 427 555 505 556 425 527 579 613 636 609 458 577 808 +505 354 641 979 979 979 979 271 271 489 489 489 489 489 489 489 489 489 489 +489 489 271 271 761 489 761 489 516 734 743 700 812 724 633 772 811 431 541 +833 666 947 784 748 631 775 745 602 573 665 570 924 812 568 670 380 380 380 +979 979 410 513 416 421 508 453 482 468 563 334 405 509 291 856 584 470 491 +434 441 461 353 557 473 699 556 477 454 312 377 623 ] endobj 35 0 obj -<< /FontFile 37 0 R /FontName /CMSY10 /Descent -960 -/FontBBox [ -29 -960 1116 775 ] /CapHeight 1000 /Ascent 775 +<< /FontFile 37 0 R /FontName /CMMI12 /Descent -250 +/FontBBox [ -30 -250 1026 750 ] /CapHeight 1000 /Ascent 750 /FontFamily (Computer Modern) /StemV 50 /Flags 68 /XHeight 500 /ItalicAngle -14 /Type /FontDescriptor >> endobj 37 0 obj -<< /Length3 0 /Length2 21763 /Length1 4313 /Length 23626 +<< /Length3 0 /Length2 27245 /Length1 3667 /Length 28908 /Filter /FlateDecode >> stream -x\x9C\x94\xBAuX\x95[\xD7=LKKKʦA\xBA\xBBC\xBAK\xBA6\xB0a\xD3\xDD]"\xD2\xDD(\x8DHw*ݍH\x97tI\xF7o{\xDE\xF3<x\xE2\xF9\xAE\xEB\xBB\xF8\x879\xE6Z\xF7=\xC6Zk\xCC5o\x85\x8ALY\x8DQ\xD4\xCC\xCE(eg\xEB\xCC\xC8\xCA\xC4\xCAWP{\xC3\xCA`ebA\xA3\xA2w;\x83\xECl%\x8C\x9D\x81|
Revision: 6190 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6190&view=rev Author: jdh2358 Date: 2008年10月14日 21:20:16 +0000 (2008年10月14日) Log Message: ----------- replaced index with contents for main page Added Paths: ----------- trunk/matplotlib/doc/contents.rst Removed Paths: ------------- trunk/matplotlib/doc/index.rst Added: trunk/matplotlib/doc/contents.rst =================================================================== --- trunk/matplotlib/doc/contents.rst (rev 0) +++ trunk/matplotlib/doc/contents.rst 2008年10月14日 21:20:16 UTC (rev 6190) @@ -0,0 +1,26 @@ + + +Overview +======== + +.. htmlonly:: + + :Release: |version| + :Date: |today| + + Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_ + +.. toctree:: + :maxdepth: 2 + + users/index.rst + faq/index.rst + devel/index.rst + api/index.rst + glossary/index.rst + +.. htmlonly:: + + * :ref:`genindex` + * :ref:`modindex` + * :ref:`search` Deleted: trunk/matplotlib/doc/index.rst =================================================================== --- trunk/matplotlib/doc/index.rst 2008年10月14日 21:17:52 UTC (rev 6189) +++ trunk/matplotlib/doc/index.rst 2008年10月14日 21:20:16 UTC (rev 6190) @@ -1,26 +0,0 @@ - - -Welcome to matplotlib's documentation! -====================================== - -.. htmlonly:: - - :Release: |version| - :Date: |today| - - Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_ - -.. toctree:: - :maxdepth: 2 - - users/index.rst - faq/index.rst - devel/index.rst - api/index.rst - glossary/index.rst - -.. htmlonly:: - - * :ref:`genindex` - * :ref:`modindex` - * :ref:`search` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6194 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6194&view=rev Author: jdh2358 Date: 2008年10月15日 02:33:38 +0000 (2008年10月15日) Log Message: ----------- using exiting examples rather than new pyplot ones for screenshots Modified Paths: -------------- trunk/matplotlib/doc/users/intro.rst trunk/matplotlib/doc/users/screenshots.rst Removed Paths: ------------- trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py trunk/matplotlib/doc/pyplots/screenshots_date_demo.py trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py trunk/matplotlib/doc/pyplots/screenshots_table_demo.py Deleted: trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,24 +0,0 @@ -# a bar plot with errorbars -# a bar plot with errorbars -from pylab import * - -N = 5 -menMeans = (20, 35, 30, 35, 27) -menStd = ( 2, 3, 4, 1, 2) - -ind = arange(N) # the x locations for the groups -width = 0.35 # the width of the bars -p1 = bar(ind, menMeans, width, color='r', yerr=menStd) - -womenMeans = (25, 32, 34, 20, 25) -womenStd = ( 3, 5, 2, 3, 3) -p2 = bar(ind+width, womenMeans, width, color='y', yerr=womenStd) - -ylabel('Scores') -title('Scores by group and gender') -xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') ) -xlim(-width,len(ind)) -yticks(arange(0,41,10)) - -legend( (p1[0], p2[0]), ('Men', 'Women'), shadow=True) -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_date_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_date_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_date_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,42 +0,0 @@ -#!/usr/bin/env python -""" -Show how to make date plots in matplotlib using date tick locators and -formatters. See major_minor_demo1.py for more information on -controlling major and minor ticks - -All matplotlib date plotting is done by converting date instances into -days since the 0001年01月01日 UTC. The conversion, tick locating and -formatting is done behind the scenes so this is most transparent to -you. The dates module provides several converter functions date2num -and num2date - -""" - -import datetime -import matplotlib.pyplot as plt -import matplotlib.dates as mdates -import matplotlib.mlab as mlab - -years = mdates.YearLocator() # every year -months = mdates.MonthLocator() # every month -yearsFmt = mdates.DateFormatter('%Y') - -intc = mlab.csv2rec('mpl_examples/data/intc.csv') - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(intc.date, intc.adj_close) - -# format the ticks -ax.xaxis.set_major_locator(years) -ax.xaxis.set_major_formatter(yearsFmt) -ax.xaxis.set_minor_locator(months) -ax.autoscale_view() - -# format the coords message box -def price(x): return '$%1.2f'%x -ax.format_xdata = mdates.DateFormatter('%Y-%m-%d') -ax.format_ydata = price - -ax.grid(True) -plt.show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,149 +0,0 @@ - -# This example can be boiled down to a more simplistic example -# to show the problem, but bu including the upper and lower -# bound ellipses, it demonstrates how significant this error -# is to our plots. - -import math -from pylab import * -from matplotlib.patches import Ellipse, Arc - -# given a point x, y -x = 2692.440 -y = 6720.850 - -# get is the radius of a circle through this point -r = math.sqrt( x*x+y*y ) - -# show some comparative circles -delta = 6 - - -################################################## -def custom_ellipse( ax, x, y, major, minor, theta, numpoints = 750, **kwargs ): - xs = [] - ys = [] - incr = 2.0*math.pi / numpoints - incrTheta = 0.0 - while incrTheta <= (2.0*math.pi): - a = major * math.cos( incrTheta ) - b = minor * math.sin( incrTheta ) - l = math.sqrt( ( a**2 ) + ( b**2 ) ) - phi = math.atan2( b, a ) - incrTheta += incr - - xs.append( x + ( l * math.cos( theta + phi ) ) ) - ys.append( y + ( l * math.sin( theta + phi ) ) ) - # end while - - incrTheta = 2.0*math.pi - a = major * math.cos( incrTheta ) - b = minor * math.sin( incrTheta ) - l = sqrt( ( a**2 ) + ( b**2 ) ) - phi = math.atan2( b, a ) - xs.append( x + ( l * math.cos( theta + phi ) ) ) - ys.append( y + ( l * math.sin( theta + phi ) ) ) - - ellipseLine = ax.plot( xs, ys, **kwargs ) - - - - -################################################## -# make the axes -ax1 = subplot( 311, aspect='equal' ) -ax1.set_aspect( 'equal', 'datalim' ) - -# make the lower-bound ellipse -diam = (r - delta) * 2.0 -lower_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" ) -ax1.add_patch( lower_ellipse ) - -# make the target ellipse -diam = r * 2.0 -target_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" ) -ax1.add_patch( target_ellipse ) - -# make the upper-bound ellipse -diam = (r + delta) * 2.0 -upper_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" ) -ax1.add_patch( upper_ellipse ) - -# make the target -diam = delta * 2.0 -target = Ellipse( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" ) -ax1.add_patch( target ) - -# give it a big marker -ax1.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - -################################################## -# make the axes -ax = subplot( 312, aspect='equal' , sharex=ax1, sharey=ax1) -ax.set_aspect( 'equal', 'datalim' ) - -# make the lower-bound arc -diam = (r - delta) * 2.0 -lower_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" ) -ax.add_patch( lower_arc ) - -# make the target arc -diam = r * 2.0 -target_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" ) -ax.add_patch( target_arc ) - -# make the upper-bound arc -diam = (r + delta) * 2.0 -upper_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" ) -ax.add_patch( upper_arc ) - -# make the target -diam = delta * 2.0 -target = Arc( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" ) -ax.add_patch( target ) - -# give it a big marker -ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - - - - - -################################################## -# now lets do the same thing again using a custom ellipse function - - - -# make the axes -ax = subplot( 313, aspect='equal', sharex=ax1, sharey=ax1 ) -ax.set_aspect( 'equal', 'datalim' ) - -# make the lower-bound ellipse -custom_ellipse( ax, 0.0, 0.0, r-delta, r-delta, 0.0, color="darkgreen" ) - -# make the target ellipse -custom_ellipse( ax, 0.0, 0.0, r, r, 0.0, color="darkred" ) - -# make the upper-bound ellipse -custom_ellipse( ax, 0.0, 0.0, r+delta, r+delta, 0.0, color="darkblue" ) - -# make the target -custom_ellipse( ax, x, y, delta, delta, 0.0, color="#BB1208" ) - -# give it a big marker -ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - - -# give it a big marker -ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 ) - -################################################## -# lets zoom in to see the area of interest - -ax1.set_xlim(2650, 2735) -ax1.set_ylim(6705, 6735) - -savefig("ellipse") -show() - - Deleted: trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,7 +0,0 @@ -from pylab import * -t = arange(0.0, 1.01, 0.01) -s = sin(2*2*pi*t) - -fill(t, s*exp(-5*t), 'r') -grid(True) -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,20 +0,0 @@ -from matplotlib import rcParams -from pylab import * - - -mu, sigma = 100, 15 -x = mu + sigma*randn(10000) - -# the histogram of the data -n, bins, patches = hist(x, 100, normed=1) - -# add a 'best fit' line -y = normpdf( bins, mu, sigma) -l = plot(bins, y, 'r--', linewidth=2) -xlim(40, 160) - -xlabel('Smarts') -ylabel('P') -title(r'$\rm{IQ:}\/ \mu=100,\/ \sigma=15$') - -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,36 +0,0 @@ -import numpy as np -import matplotlib.path as mpath -import matplotlib.patches as mpatches -import matplotlib.pyplot as plt - -Path = mpath.Path - -fig = plt.figure() -ax = fig.add_subplot(111) - -pathdata = [ - (Path.MOVETO, (1.58, -2.57)), - (Path.CURVE4, (0.35, -1.1)), - (Path.CURVE4, (-1.75, 2.0)), - (Path.CURVE4, (0.375, 2.0)), - (Path.LINETO, (0.85, 1.15)), - (Path.CURVE4, (2.2, 3.2)), - (Path.CURVE4, (3, 0.05)), - (Path.CURVE4, (2.0, -0.5)), - (Path.CLOSEPOLY, (1.58, -2.57)), - ] - -codes, verts = zip(*pathdata) -path = mpath.Path(verts, codes) -patch = mpatches.PathPatch(path, facecolor='red', edgecolor='yellow', alpha=0.5) -ax.add_patch(patch) - -x, y = zip(*path.vertices) -line, = ax.plot(x, y, 'go-') -ax.grid() -ax.set_xlim(-3,4) -ax.set_ylim(-3,4) -ax.set_title('spline paths') -plt.show() - - Deleted: trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,26 +0,0 @@ -""" -Make a pie chart - see -http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring. - -This example shows a basic pie chart with labels optional features, -like autolabeling the percentage, offsetting a slice with "explode" -and adding a shadow. - -Requires matplotlib0-0.70 or later - -""" -from pylab import * - -# make a square figure and axes -figure(1, figsize=(6,6)) -ax = axes([0.1, 0.1, 0.8, 0.8]) - -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' -fracs = [15,30,45, 10] - -explode=(0, 0.05, 0, 0) -pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True) -title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5}) - -show() - Deleted: trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,28 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab - -intc = mlab.csv2rec('mpl_examples/data/intc.csv') - -delta1 = np.diff(intc.adj_close)/intc.adj_close[:-1] - -# size in points ^2 -volume = (15*intc.volume[:-2]/intc.volume[0])**2 -close = 0.003*intc.close[:-2]/0.003*intc.open[:-2] - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.75) - -#ticks = arange(-0.06, 0.061, 0.02) -#xticks(ticks) -#yticks(ticks) - -ax.set_xlabel(r'$\Delta_i$', fontsize=20) -ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20) -ax.set_title('Volume and percent change') -ax.grid(True) - -plt.show() - - Deleted: trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,11 +0,0 @@ -from pylab import * - -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) -plot(t, s, linewidth=1.0) - -xlabel('time (s)') -ylabel('voltage (mV)') -title('About as simple as it gets, folks') -grid(True) -show() Deleted: trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,43 +0,0 @@ -from pylab import * -from matplotlib.widgets import Slider, Button, RadioButtons - -ax = subplot(111) -subplots_adjust(left=0.25, bottom=0.25) -t = arange(0.0, 1.0, 0.001) -a0 = 5 -f0 = 3 -s = a0*sin(2*pi*f0*t) -l, = plot(t,s, lw=2, color='red') -axis([0, 1, -10, 10]) - -axcolor = 'lightgoldenrodyellow' -axfreq = axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) -axamp = axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor) - -sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) -samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) - -def update(val): - amp = samp.val - freq = sfreq.val - l.set_ydata(amp*sin(2*pi*freq*t)) - draw() -sfreq.on_changed(update) -samp.on_changed(update) - -resetax = axes([0.8, 0.025, 0.1, 0.04]) -button = Button(resetax, 'Reset', color=axcolor, hovercolor=0.975) -def reset(event): - sfreq.reset() - samp.reset() -button.on_clicked(reset) - -rax = axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor) -radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) -def colorfunc(label): - l.set_color(label) - draw() -radio.on_clicked(colorfunc) - -show() - Deleted: trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,25 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - -t1 = arange(0.0, 5.0, 0.1) -t2 = arange(0.0, 5.0, 0.02) -t3 = arange(0.0, 2.0, 0.01) - -subplot(211) -plot(t1, f(t1), 'bo', t2, f(t2), 'k--', markerfacecolor='green') -grid(True) -title('A tale of 2 subplots') -ylabel('Damped oscillation') - -subplot(212) -plot(t3, cos(2*pi*t3), 'r.') -grid(True) -xlabel('time (s)') -ylabel('Undamped') -show() - Deleted: trunk/matplotlib/doc/pyplots/screenshots_table_demo.py =================================================================== --- trunk/matplotlib/doc/pyplots/screenshots_table_demo.py 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/pyplots/screenshots_table_demo.py 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,94 +0,0 @@ -#!/usr/bin/env python -import matplotlib - -from pylab import * -from matplotlib.colors import colorConverter - - -#Some simple functions to generate colours. -def pastel(colour, weight=2.4): - """ Convert colour into a nice pastel shade""" - rgb = asarray(colorConverter.to_rgb(colour)) - # scale colour - maxc = max(rgb) - if maxc < 1.0 and maxc > 0: - # scale colour - scale = 1.0 / maxc - rgb = rgb * scale - # now decrease saturation - total = sum(rgb) - slack = 0 - for x in rgb: - slack += 1.0 - x - - # want to increase weight from total to weight - # pick x s.t. slack * x == weight - total - # x = (weight - total) / slack - x = (weight - total) / slack - - rgb = [c + (x * (1.0-c)) for c in rgb] - - return rgb - -def get_colours(n): - """ Return n pastel colours. """ - base = asarray([[1,0,0], [0,1,0], [0,0,1]]) - - if n <= 3: - return base[0:n] - - # how many new colours to we need to insert between - # red and green and between green and blue? - needed = (((n - 3) + 1) / 2, (n - 3) / 2) - - colours = [] - for start in (0, 1): - for x in linspace(0, 1, needed[start]+2): - colours.append((base[start] * (1.0 - x)) + - (base[start+1] * x)) - - return [pastel(c) for c in colours[0:n]] - - - -axes([0.2, 0.2, 0.7, 0.6]) # leave room below the axes for the table - -data = [[ 66386, 174296, 75131, 577908, 32015], - [ 58230, 381139, 78045, 99308, 160454], - [ 89135, 80552, 152558, 497981, 603535], - [ 78415, 81858, 150656, 193263, 69638], - [ 139361, 331509, 343164, 781380, 52269]] - -colLabels = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail') -rowLabels = ['%d year' % x for x in (100, 50, 20, 10, 5)] - -# Get some pastel shades for the colours -colours = get_colours(len(colLabels)) -colours.reverse() -rows = len(data) - -ind = arange(len(colLabels)) + 0.3 # the x locations for the groups -cellText = [] -width = 0.4 # the width of the bars -yoff = array([0.0] * len(colLabels)) # the bottom values for stacked bar chart -for row in xrange(rows): - bar(ind, data[row], width, bottom=yoff, color=colours[row]) - yoff = yoff + data[row] - cellText.append(['%1.1f' % (x/1000.0) for x in yoff]) - -# Add a table at the bottom of the axes -colours.reverse() -cellText.reverse() -the_table = table(cellText=cellText, - rowLabels=rowLabels, rowColours=colours, - colLabels=colLabels, - loc='bottom') -ylabel("Loss 1000ドル's") -vals = arange(0, 2500, 500) -yticks(vals*1000, ['%d' % val for val in vals]) -xticks([]) -title('Loss by Disaster') -#savefig('table_demo_small', dpi=75) -#savefig('table_demo_large', dpi=300) - -show() Modified: trunk/matplotlib/doc/users/intro.rst =================================================================== --- trunk/matplotlib/doc/users/intro.rst 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/users/intro.rst 2008年10月15日 02:33:38 UTC (rev 6194) @@ -2,11 +2,11 @@ ============ matplotlib is a library for making 2D plots of arrays in `Python -<http://www.python.org>`_. Although it has its origins in emulating -the `MATLABTM <http://www.mathworks.com>`_ graphics commands, it does -not require MATLAB, and can be used in a Pythonic, object oriented +<http://www.python.org>`. Although it has its origins in emulating +the `MATLABTM <http://www.mathworks.com>` graphics commands, it is +independent of MATLAB, and can be used in a Pythonic, object oriented way. Although matplotlib is written primarily in pure Python, it -makes heavy use of `NumPy <http://www.numpy.org>`_ and other extension +makes heavy use of `NumPy <http://www.numpy.org>` and other extension code to provide good performance even for large arrays. matplotlib is designed with the philosophy that you should be able to @@ -25,7 +25,8 @@ programming language, and decided to start over in Python. Python more than makes up for all of MATLAB's deficiencies as a programming language, but I was having difficulty finding a 2D plotting package -(for 3D `VTK <http://www.vtk.org/>`_) more than exceeds all of my needs). +(for 3D `VTK <http://www.vtk.org/>` more than exceeds all of my +needs). When I went searching for a Python plotting package, I had several requirements: @@ -57,26 +58,28 @@ The matplotlib code is conceptually divided into three parts: the *pylab interface* is the set of functions provided by :mod:`matplotlib.pylab` which allow the user to create plots with code -quite similar to MATLAB figure generating code. The *matplotlib -frontend* or *matplotlib API* is the set of classes that do the heavy -lifting, creating and managing figures, text, lines, plots and so on. -This is an abstract interface that knows nothing about output. The -*backends* are device dependent drawing devices, aka renderers, that -transform the frontend representation to hardcopy or a display device. -Example backends: PS creates `PostScript® -<http://http://www.adobe.com/products/postscript/>`_ hardcopy, SVG -creates `Scalable Vector Graphics <http://www.w3.org/Graphics/SVG/>`_ +quite similar to MATLAB figure generating code +(:ref:`pyplot-tutorial`). The *matplotlib frontend* or *matplotlib +API* is the set of classes that do the heavy lifting, creating and +managing figures, text, lines, plots and so on +(:ref:`artist-tutorial`). This is an abstract interface that knows +nothing about output. The *backends* are device dependent drawing +devices, aka renderers, that transform the frontend representation to +hardcopy or a display device (:ref:`what-is-a-backend`). Example +backends: PS creates `PostScript® +<http://http://www.adobe.com/products/postscript/>` hardcopy, SVG +creates `Scalable Vector Graphics <http://www.w3.org/Graphics/SVG/>` hardcopy, Agg creates PNG output using the high quality `Anti-Grain -Geometry <http://www.antigrain.com>`_ library that ships with -matplotlib, GTK embeds matplotlib in a `Gtk+ <http://www.gtk.org/>`_ +Geometry <http://www.antigrain.com>` library that ships with +matplotlib, GTK embeds matplotlib in a `Gtk+ <http://www.gtk.org/>` application, GTKAgg uses the Anti-Grain renderer to create a figure and embed it a Gtk+ application, and so on for `PDF -<http://www.adobe.com/products/acrobat/adobepdf.html>`_, `WxWidgets -<http://www.wxpython.org/>`_, `Tkinter -<http://docs.python.org/lib/module-Tkinter.html>`_ etc. +<http://www.adobe.com/products/acrobat/adobepdf.html>`, `WxWidgets +<http://www.wxpython.org/>`, `Tkinter +<http://docs.python.org/lib/module-Tkinter.html>` etc. matplotlib is used by many people in many different contexts. Some -people want to automatically generate PostScript® files to send +people want to automatically generate PostScript files to send to a printer or publishers. Others deploy matplotlib on a web application server to generate PNG output for inclusion in dynamically-generated web pages. Some use matplotlib interactively Modified: trunk/matplotlib/doc/users/screenshots.rst =================================================================== --- trunk/matplotlib/doc/users/screenshots.rst 2008年10月15日 02:14:48 UTC (rev 6193) +++ trunk/matplotlib/doc/users/screenshots.rst 2008年10月15日 02:33:38 UTC (rev 6194) @@ -1,16 +1,13 @@ Here you will find a host of example figures with the code that generated them -.. _screenshots_simple_plot: - Simple Plot =========== The most basic :func:`~matplotlib.pyplot.plot`, with text labels -.. plot:: screenshots_simple_plots.py +.. plot:: ../mpl_examples/pylab_examples/simple_plot.py - .. _screenshots_subplot_demo: Subplot demo @@ -19,9 +16,8 @@ Multiple regular axes (numrows by numcolumns) are created with the :func:`~matplotlib.pyplot.subplot` command. -.. plot:: screenshots_subplot_demo.py +.. plot:: ../mpl_examples/pylab_examples/subplot_demo.py - .. _screenshots_histogram_demo: Histograms @@ -30,8 +26,9 @@ The :func:`~matplotlib.pyplot.hist` command automatically generates histograms and will return the bin counts or probabilities -.. plot:: screenshots_histogram_demo.py +.. plot:: ../mpl_examples/pylab_examples/histogram_demo.py + .. _screenshots_path_demo: Path demo @@ -40,9 +37,8 @@ You can add aribitrary paths in matplotlib as of release 0.98. See the :mod:`matplotlib.path`. -.. plot:: screenshots_path_patch_demo.py +.. plot:: ../mpl_examples/api/path_patch_demo.py - .. _screenshots_ellipse_demo: Ellipses @@ -57,9 +53,8 @@ provides a scale free, accurate graph of the arc regardless of zoom level -.. plot:: screenshots_ellipse_demo.py +.. plot:: ../mpl_examples/pylab_examples/ellipse_demo.py - .. _screenshots_barchart_demo: Bar charts @@ -68,11 +63,11 @@ The :func:`~matplotlib.pyplot.bar` command takes error bars as an optional argument. You can also use up and down bars, stacked bars, candlestic' bars, etc, ... See -`bar_stacked.py <examples/pylab_examples/bar_stacked.py>`_ for another example. +`bar_stacked.py <examples/pylab_examples/bar_stacked.py>`_ for another example. You can make horizontal bar charts with the :func:`~matplotlib.pyplot.barh` command. -.. plot:: screenshots_barchart_demo.py +.. plot:: ../mpl_examples/pylab_examples/barchart_demo.py .. _screenshots_pie_demo: @@ -87,7 +82,7 @@ Take a close look at the attached code that produced this figure; nine lines of code. -.. plot:: screenshots_pie_demo.py +.. plot:: ../mpl_examples/pylab_examples/pie_demo.py .. _screenshots_table_demo: @@ -97,7 +92,7 @@ The :func:`~matplotlib.pyplot.table` command will place a text table on the axes -.. plot:: screenshots_table_demo.py +.. plot:: ../mpl_examples/pylab_examples/table_demo.py .. _screenshots_scatter_demo: @@ -112,7 +107,7 @@ alpha attribute is used to make semitransparent circle markers with the Agg backend (see :ref:`what-is-a-backend`) -.. plot:: screenshots_scatter_demo.py +.. plot:: ../mpl_examples/pylab_examples/scatter_demo2.py .. _screenshots_slider_demo: @@ -123,9 +118,9 @@ Matplotlib has basic GUI widgets that are independent of the graphical user interface you are using, allowing you to write cross GUI figures and widgets. See matplotlib.widgets and the widget `examples -<examples/widgets>`_ +<examples/widgets>` -.. plot:: screenshots_slider_demo.py +[.. plot:: ../mpl_examples/widgets/slider_demo.py .. _screenshots_fill_demo: @@ -137,7 +132,7 @@ plot filled polygons. Thanks to Andrew Straw for providing this function -.. plot:: screenshots_fill_demo.py +.. plot:: ../mpl_examples/pylab_examples/fill_demo.py .. _screenshots_date_demo: @@ -147,9 +142,9 @@ You can plot date data with major and minor ticks and custom tick formatters for both the major and minor ticks; see matplotlib.ticker -and matplotlib.dates for details and usage. +and matplotlib.dates for details and usage. -.. plot:: screenshots_date_demo.py +.. plot:: ../mpl_examples/api/date_demo.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6195 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6195&view=rev Author: jdh2358 Date: 2008年10月15日 02:52:29 +0000 (2008年10月15日) Log Message: ----------- doc updates Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/users/screenshots.rst Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月15日 02:33:38 UTC (rev 6194) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月15日 02:52:29 UTC (rev 6195) @@ -5,7 +5,7 @@ <h3>Need help?</h3> <p>Join the matplotlib <a -href="http://sourceforge.net/mail/?group_id=80706">mailing lists</a> +href="http://sourceforge.net/project/showfiles.php?group_id=80706">mailing lists</a> <p>You can file bugs and patches on the sourceforge <a href="http://sourceforge.net/tracker/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> Modified: trunk/matplotlib/doc/users/screenshots.rst =================================================================== --- trunk/matplotlib/doc/users/screenshots.rst 2008年10月15日 02:33:38 UTC (rev 6194) +++ trunk/matplotlib/doc/users/screenshots.rst 2008年10月15日 02:52:29 UTC (rev 6195) @@ -1,3 +1,9 @@ +.. _matplotlibscreenshots: + +********************** +matplotlib screenshots +********************** + Here you will find a host of example figures with the code that generated them This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6198 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6198&view=rev Author: jdh2358 Date: 2008年10月15日 11:27:38 +0000 (2008年10月15日) Log Message: ----------- more updates to docs Modified Paths: -------------- trunk/matplotlib/doc/conf.py trunk/matplotlib/doc/pyplots/README trunk/matplotlib/doc/pyplots/make.py trunk/matplotlib/doc/users/index.rst trunk/matplotlib/doc/users/screenshots.rst Added Paths: ----------- trunk/matplotlib/doc/pyplots/plotmap.hires.png trunk/matplotlib/doc/pyplots/plotmap.pdf trunk/matplotlib/doc/pyplots/plotmap.png trunk/matplotlib/doc/pyplots/plotmap.py trunk/matplotlib/doc/users/toolkits.rst Modified: trunk/matplotlib/doc/conf.py =================================================================== --- trunk/matplotlib/doc/conf.py 2008年10月15日 03:04:37 UTC (rev 6197) +++ trunk/matplotlib/doc/conf.py 2008年10月15日 11:27:38 UTC (rev 6198) @@ -152,7 +152,7 @@ # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ - ('index', 'Matplotlib.tex', 'Matplotlib', 'Darren Dale, Michael Droettboom, Eric Firing, John Hunter', 'manual'), + ('contents', 'Matplotlib.tex', 'Matplotlib', 'Darren Dale, Michael Droettboom, Eric Firing, John Hunter', 'manual'), ] Modified: trunk/matplotlib/doc/pyplots/README =================================================================== --- trunk/matplotlib/doc/pyplots/README 2008年10月15日 03:04:37 UTC (rev 6197) +++ trunk/matplotlib/doc/pyplots/README 2008年10月15日 11:27:38 UTC (rev 6198) @@ -4,3 +4,12 @@ tex_demo.py and tex_unicode_demo.py: latex dvipng + + +plotmap.py: + basemap toolkit + + some data files - do a svn co + https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/htdocs/screenshots/data/ + to get the data and then set the datadir variable in the + plotmap.py file to point to this data direcotry Modified: trunk/matplotlib/doc/pyplots/make.py =================================================================== --- trunk/matplotlib/doc/pyplots/make.py 2008年10月15日 03:04:37 UTC (rev 6197) +++ trunk/matplotlib/doc/pyplots/make.py 2008年10月15日 11:27:38 UTC (rev 6198) @@ -32,6 +32,10 @@ plt.close('all') # we need to clear between runs mplshell.magic_run(basename) for imagefile, dpi in imagefiles.iteritems(): + # todo: this will get called even if the run script + # fails and exits, thus creating a stub pdf and png + # iles preventing them from getting built successfully + # later plt.savefig(imagefile, dpi=dpi) print 'all figures made' Added: trunk/matplotlib/doc/pyplots/plotmap.hires.png =================================================================== (Binary files differ) Property changes on: trunk/matplotlib/doc/pyplots/plotmap.hires.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/matplotlib/doc/pyplots/plotmap.pdf =================================================================== --- trunk/matplotlib/doc/pyplots/plotmap.pdf (rev 0) +++ trunk/matplotlib/doc/pyplots/plotmap.pdf 2008年10月15日 11:27:38 UTC (rev 6198) @@ -0,0 +1,14134 @@ +%PDF-1.4 +%\xAC\xDC \xAB\xBA +1 0 obj +<< /Type /Catalog /Pages 3 0 R >> +endobj +2 0 obj +<< /CreationDate (D:20081015040257-07'00') +/Producer (matplotlib pdf backend) +/Creator (matplotlib 0.98.3, http://matplotlib.sf.net) >> +endobj +3 0 obj +<< /Count 1 /Kids [ 4 0 R ] /Type /Pages >> +endobj +4 0 obj +<< /Contents 5 0 R /Type /Page /Resources 10 0 R /Parent 3 0 R +/MediaBox [ 0 0 576 576 ] >> +endobj +10 0 obj +<< /Pattern 8 0 R /XObject 9 0 R /Font 6 0 R /ExtGState 7 0 R +/ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] >> +endobj +5 0 obj +<< /Filter /FlateDecode /Length 11 0 R >> +stream +x\x9C\x9C\xBDK\xD2m\xD9r\x95Y߭\xF8[\xF03ߏ*\x865\x8C +\xC02\xB3"\x81A\x85\xEE3\xBE\xE1>\xF7\xB9R8~|\xAF\xB5\xE6\xC3\xDF>\xBC\xFD\xFCǟ\xFA\xF3\xFF\xE9\xBF\xFF\xFES~\xCA\xCF?\xFF̽\xF4\xFF\xC9\xFF\x97\xFF\xFE\x93\xFE\xED\xFD_\xFD\xF9\xE7\xDF\xEA\xEF\xFD/\xFD\xFF\xFE3\xF7\xEF\xFA\xB9\xF7w\xAD\xB9FY\xA5\xB1\x8FU~Ͽ\xFA\xD3\xCA?\xF5\xFC\xEE>\xFA\xBC\xFD\xDE\xE5g\xFC\xAE\xCF\xDF\xFE\xE9\xBF\xFE\x85\xCF\xFF\xFB\xF9G\xA5\xFF\xB6\x9F^\xEFoYg׳\xEF\xED?\xFF\xF3\xFF\xF9\xF9/?\xFFM\xEFȷ\xFD/1\xFDM7}\xCB\xF9\xA9\xA5\xFC\xFC\xD7\xFE\xF97\xFF\xA1\xFE\xFC\xBB\xFF\xFE\xF3\x9F>\xFF\xE9\xE7\xFF\xEFo{\xEA\xD4\xDF+}\xB7\xB3\xF5\x9F\xF8\xCAVw\xDF뜥%\xA9\xB3\xFD\xDE=V;\xFA\xC7\xE4\xDAZ[\x87_\xC1^\xCF-\xABk\xAA\xE8\xFB\xB7\xEF1\xCF8\xB3\xB1vu\xD6\xDFQ\xEF\xD0#\xCEf\xF4\xBB\x{126DDA}\xBF\xFD\xAE2z\xD7\xFB\xFA\xF7\xD7\xEF>k\xEAO\xDA +\xFE\xFE[f\xDDsU\xFD\x8A\xE9\xE3\x9C~\xE7\xACc$\xEF\xFAL\xFD\x95\xBEM\xAF\xB3\xCCsg\xF6\xF1[k\xE7\x91{\xF0\xF8\xF9\xAB\xF7X瞦\x85}\xFC\x9E2ʞg\xF1\xF4\xFE;ǘ\xAD\xB6ڗ\xD9\xF5\xF7W\x99S\xEFW\xA7\xE9\xE5\xB6vƮ\xA3&\xFB]Z\xBDy\xD7\xE9\xA27=m +\xADe\xE95\xF9W\xD3ה\xF4\xF2\xCBJԪw\xEC柿g\x94\xD2[_Mo_\xB4\xF8W\x8F.\xE3\xF4f\xFE\xFD\xAB\x93UwاٴO\xD3\xF52K\xAFP\xFA5\xFF\xFE\x89_<C\xBF_\xD6\xEF=s5}\xED=\xF9\xFCS\xB5wz\xAB+\xBAV\xB9\xE8\x81\xE2\xC8\xE7\xDFq\xDBlm\xD6\xC3I\xFB\xDD\xF5\x9ER\xB4\xB9z\xB7k\xBD\xDBЧ\xF9H\x9D£K\xDD7\xD9\xF52{\xFD*GNG\xA5V}\x8F^p\xE4㧎\xC6ik\x9Fi\xFA\\xB3^\xB4\xBB\x93k\x9F\xCBXw]ӏnQ/\xFA\x80\xF8\xFC\xF5\xDBZ?}\x9Dv\xBB\xE9\xEB\x8Cq\xFB\xE4\xE7r\xF9\xEEe\xC5{>\xBF/\xBD\xFFs>\xF61t0X\xCF`_Kk\xB9\x97\xBEv-WmZ\xF1;9\xFA\xA2\x8F58Z\x8E\}\xADU9\xFA\xD7||mǻ\x99gO\xFC\xAB\xF5\xDAʝ-\xF8\xDB҉/\xBAA\xE6?z`\xAB\x92[\xC7\xC9˷t\x83*\xF7\xC9\xFCG\xECzA=\xBEy\xF5u)f_W\x95\xFCWgW\xE8s\x99\xAE\xF7\xBFu\x9Cu\xE3\xFD\xAF\xB6S\xBF\xB6Σ靗\xABM\xE7~\xC9-mg9\xE2\xEE\xBC\xFF\xFC-z}\xDD\xEEǯ\xAA߫m\xAC\xC9\xFB\x8ERo\xD1>s\xC0\xBC{\xA26[\x87\xB0<\x92\x82\xDA]\x84\xBB{\xF27\xBDnё\x9F=\xE8wkOj?\xC9>\x9B\xF6\xEE\xF6s\xAEɺds\xFD\xFBMv\x9D\xA6vu[\xEE\xF6\xE3\x8B~\xB8\x8E\x9F\xF9ۯ~\xFA\\x9D\x98\xFC\xDA\xEA}{\xD9e&\xFF\xD6rhkˊ\xD7㢜;\xE2\xE6\x8B]\xB5\xEB\xF8\xCF|\xBBz$\xB6\xB6\xCEo\xB0k\xB7\xCA:\xAF]wQ\xD2\xFBW\x8C\x85\xD5\xE8\xDE\xFC%\xC1vu+Ĥ\xD7\xEB\xF7\xFC\xEA\x8Eܡ՞;\xF9\x8F\xEE\xAE>\xB0\x99\xAAEԧH\xD0\xD6|\xBA\x83Vz\xEB\xA2A\x96\x90ں\xF4\xAB\xDD\xFCq\xBD{\xD3\xE6\xEDS?\xFDnI\xB5+\xF6"\xB1\x98\xF4\xA9e\x9AW\xAFįs\xDEtϺ\xB64~^bm\xB3\xF1\x88:\xF1K.IN\xC6y\xF4>X\xABv\xA7\xF8\xB5\xA3I4ܹy\x96\x86\x8C\xF3yq0Ξ\xE3}\xFB\x99\;\xBD\xBE\xB99\xA3\xFA\xEB{<\xEER\xCB\xD2\xFF\x9A\xC1]\xAC0$\xC4\xB7\xDET\xFFrZge%\xF48\x84\xFA\xEFُ\xAD\xBA;\x8D\x97]\x8B\xAC\x9Fh\x8FZ\xF6-e\xEAj +\xA4$`\xA6.\xCA{u\xAE\xE4\xF7Π\xEBp\xA2\xF5\x93\x9F`\xD7)ns\x9Ddѵ1:\xF0\xBA \x92\xF9\xF3\xBA\x83\xFA9km둀\xD5_\x90\x94\xD1jy[\xF5\xE9C7@\xF2vo\xF3\xF7~ur\xF4}5\xF9%1\xA4=t\xE5\x9B\xF9\xB74\xA3\xDE\xC7\xDF\xFC\xE8\x9B%A\xA0c\xBD\xE8etۗ_ +FGMb~\xED\xEC֦mI\xA9\xFB\xF8o\xE3`J\x8D\x99.Uڥ\xA3\xB8y2Xw\xBD\xD5Z\xA6\xB7&\x81\xB2Ϊ;\xF9\xF5m:Ke\x99.\xFD\xD66"cͷ9: \xD2I:\x9A\xF1\xFBz\xF16tҾ\xEF_XKm\xF00\xBB\xC43\xCAr\xCE\xF3\xD8u,\xB8r3\xE9}\xEA\xED\xA5\xDF\xE3u0\x8F\xCC IVѵ\x92\xCDR潞\xBCR\x8E\xFA\xF6\xAA%\xBA\xEF\xEAo\xAF\xF5^\xBF\xEAN\xCC\x9F\xDF\xE02^\xB4\xDD\xDF\xD7\xD7 +]\xD2\xD3\xF1\xFB\xFA\xFF$\xF5\xB43\xF9\xD18:N\x8D{y\xAA^\xA7k\xF3\xF6\x9D\xEB=\xBFaKl鐟\xBE/Bi \xA2\xBDS\xA8\\xA9iY\x83\xED]\xDF.\xA47\xD9)R/?\xA0+)\x99\xD97 +YK!\xA5p\xE3\xFD%\xE5\x96v\xB7n\x9D\xD3;\xA7K\xFA\xF0\xAE\xE4G*\xE9=u[E\xDF2\xAE$\xB1\xCB\xD9aP\xC0/&A2r\xD3/K;h˭\xAET\xB6\xCF}\xC9^Aݵ\xB9N\xB2/,\xB9\x82\xCA4]\xEF&\xC3Hr\xE9=^\xA7\xA9\x95\xA9\xAC\xA6K-\xC0P("cNT\x87\xC5\xDBMD\xAEԗl\xB3\xF3\xCFf\xC9\xEDj\xBA\x8EE[\xA8\xCF'\x92\x8B$\x9C\xCE:\xCB\xC9\xCF\xCB\xEC\x90\xF2*ߵC\xD3i\x81g|\x9CD\xB1\xEC \xAD\xD5WI\xC0ol\xC3xyifta\xE9O!\xE8\xCE\xE9m\xE79f\x97)\x836\xBFO\x9E\xEBKw\xE8\xAF7\xAF\xBC\xC9\xD0/\xF4\xB6\xF2\xE4t\xC90\xDD#\x9D&\xB3뫵6Z\xFDx\xBAn\x8A\x94\xBF\xE4\xDC\xE5bo\x99B\x92\xF4W\xA6I(c\xD1%tt7\xEA\xBA>K'\xC7\xF7\xD2\xEC\xDA\xAD\xAC\xD6NTT}\xB3\xAE\xECO`\xEB\xB0\xB4Q\xE82\xC2\xF4k[\x879ٻ\x84\x92.=\xA6\x82Į\xF4\x95X\x90L\xEDO\xE6J\xEBe\xEA\xE0\xE9hv}.\xA6JK~\x9D\x93\xC9\xD58\xDDt\xD9<\xB2\xDAnOjv>\xBDxi\x97\xA4\xAAT\xD1\xF2)I\xA1'˭UI\xEC\xF8um\x866\xA6q\x88c\xED\x8AT_\xC78\xBC\xA6co]\xE39r\xEDWY2\x9E\xF4\xEB\xD3t\xA4\x93\xDEm\xA4\xBE\x91\xAA\x97 "\xD3T\xAF\x9F\x8F\xFAm\xD9:5w~H\xC8\xC9T\xD2ُ\xAF\x93!"\xF9\x84\xA6L \x99*\xFA\xB6\xEB[\xAB\xBF.A\xE1\xCEwku\xA8\xF7A\xF3\xEB\x9C \xF1zjc\x8E\xBD>PT\xA4\x8E\x9E\xAF\xF3\xAD\xE3\xA1c\xFDνLd}\xD2\xC4\xCE\xF4\xF7Ih\xEB\xCEI\x93乗!K\xB5Y\xAA\xE9\xF9=\xD4[==\xF9\xA5%G'\xC6\xFC\xF2xz\x91F\x9D\xF5\xF1\xA3b\xC7\xFC#vc\xFB\xBC{\xB7dZ@\xD6W +W.\x91\x87\x9E\x9A\xFCCΥ1\xA0#\xE2ӣ-\xD1\xEBtX\x82Z +\xED\xCF\xF0\xF2H\xDBK\x80\xEA;6vb+\x92\xE8\xE0X\xBE\x8E\x88\xAD\xFC\xF5`\x91\x921_\x87\xFA\xD1\xDFX'\xCDPm\x97\xA49円+VW\x8A\/#[\xE9\xA4\x8BƓE\xC1{\xF5%\xBC%\xD6i\x86K\xC8\xE8v,\xCCX\xAFΔH\x97~lόk\xFB\xEF\xC8\xFAX\xD2\xE1ɿ1\xCD\xF4\x93\xA5\xC6隨\xAD\xC0zN\xCC\xE5ާL\xC6ސ\xFC։;\xFD\xB9\xDAh\xDDLI\x9A8ݺ\xB5r1k\xBE\xBFt\xB0NZY^N\xD3u\xBCu~S\xE7\xC0/\xFDpe^\xE5\xE9\xD2\xCEV|\xD2\xFE\xDE_I\xCB'\xD9q|\xBA\xBAn\x9E\xBEW_\xF9\xBE_\xBB_\x86^_\xBF\xBF\xE4\xE8\xD3\xEFn\xED91KF\x94TV\x9Fq7+*CV\xFB\x99χ\xDB:L +\xA3\xEA\xDD]\xA9\xAE\xD3\xE3\xD7osz\xE2\xE9\xDAw\xC9_XkR\xE3\xE7\xB7
Revision: 6213 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6213&view=rev Author: jdh2358 Date: 2008年10月15日 18:48:00 +0000 (2008年10月15日) Log Message: ----------- updates to installing and interactive shell docs Modified Paths: -------------- trunk/matplotlib/doc/_templates/index.html trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/faq/installing_faq.rst trunk/matplotlib/doc/users/index.rst trunk/matplotlib/doc/users/installing.rst Added Paths: ----------- trunk/matplotlib/doc/users/shell.rst Modified: trunk/matplotlib/doc/_templates/index.html =================================================================== --- trunk/matplotlib/doc/_templates/index.html 2008年10月15日 18:35:57 UTC (rev 6212) +++ trunk/matplotlib/doc/_templates/index.html 2008年10月15日 18:48:00 UTC (rev 6213) @@ -22,10 +22,13 @@ matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code. For - example, to make a histogram of data in x, you simply need to type + example, to generate 10,000 gaussian random numbers and make a + histogram plot binning the data into 100 bins, you simply need to type <pre> - >>> hist(x, 100) # use 100 bins + >>> from pylab import randn, hist + >>> x = randn(10000) + >>> hist(x, 100) </pre> For the power user, you have full control of line styles, font Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月15日 18:35:57 UTC (rev 6212) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月15日 18:48:00 UTC (rev 6213) @@ -1,12 +1,16 @@ <h3>Download</h3> <p>Current version: <b>{{ version }}</b></p> -<p>Download matplotlib from the sourceforge <a -href="http://sourceforge.net/projects/matplotlib">project</a> page. +<p>Download matplotlib from the sourceforge <a +href="http://sourceforge.net/projects/matplotlib">project</a> page +(but first take a look at the <a +href="{{ pathto('users/installing') }}">installing</a> page). -There are also optional <a href="{{ pathto('users/toolkits') }}">toolkits</a> for matplotlib. +<p> +There are also optional <a href="{{ pathto('users/toolkits') }}">toolkits</a> for matplotlib. +</p> <h3>Need help?</h3> -<p>Check the <a href="{{ pathto('contents') }}">docs</a>, the <a +<p>Check the <a href="{{ pathto('contents') }}"}>docs</a>, the <a href="{{ pathto('faq/index') }}">faq</a>, and join the matplotlib mailing <a href="http://sourceforge.net/project/showfiles.php?group_id=80706">lists</a> @@ -20,5 +24,5 @@ <a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a> + - Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2008年10月15日 18:35:57 UTC (rev 6212) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2008年10月15日 18:48:00 UTC (rev 6213) @@ -90,10 +90,10 @@ <locating-matplotlib-install>` -.. _install_svn: +.. _install-svn: -How to install from svn -======================= +How to install from svn? +======================== Checking out the main source:: @@ -249,6 +249,21 @@ OS-X questions ============== +.. _which-python-for-osx: + +Which python for OS X? +---------------------- + +Apple ships with its own python, many users have had trouble +with it so there are alternatives. If it is feasible for you, we +recommend the enthought python distribution `EPD +<http://www.enthought.com/products/epd.php>`_ for OS X (which comes +with matplotlib and much more) or the +`MacPython <http://wiki.python.org/moin/MacPython/Leopard>`_ or the +official OS X version from `python.org +<http://www.python.org/download/>`_. + + .. _easy-install-osx-egg: How can I easy_install my egg? Modified: trunk/matplotlib/doc/users/index.rst =================================================================== --- trunk/matplotlib/doc/users/index.rst 2008年10月15日 18:35:57 UTC (rev 6212) +++ trunk/matplotlib/doc/users/index.rst 2008年10月15日 18:48:00 UTC (rev 6213) @@ -17,6 +17,7 @@ pyplot_tutorial.rst navigation_toolbar.rst customizing.rst + shell.rst index_text.rst artists.rst event_handling.rst Modified: trunk/matplotlib/doc/users/installing.rst =================================================================== --- trunk/matplotlib/doc/users/installing.rst 2008年10月15日 18:35:57 UTC (rev 6212) +++ trunk/matplotlib/doc/users/installing.rst 2008年10月15日 18:48:00 UTC (rev 6213) @@ -4,11 +4,113 @@ Installing ********** -Dependencies -============ +There are lots of different ways to install matplotlib, and the best +way depends on what operating system you are using, what you already +have installed, and how you want to use it. To avoid wading through +all the details (and potential complications) on this page, the +easiest thing for you to do is use one of the pre-packaged python +distributions that already provide matplotlib built in. The Enthought +Python Distribution `(EPD) +<http://www.enthought.com/products/epd.php>`_ for Windows, OS X or +Redhat is an excellent choice that "just works" out of the box. +Another excellent alternative for Windows users is `Python (x, y) +<http://www.pythonxy.com/foreword.php>`_ which tends to be updated a +bit more frequently. Both of these packages include matplotlib and +pylab, and *lots* of other useful tools. matplotlib is also packaged +for pretty much every major linux distribution, so if you are on linux +your package manager will probably provide matplotlib prebuilt. -**Requirements** +One single click installer and you are done. +Ok, so you want to do it the hard way? +====================================== + +For some people, the prepackaged pythons discussed above are not an +option. That's OK, it's usually pretty easy to get a custom install +working. You will first need to find out if you have python installed +on your machine, and if not, install it. The official python builds +are available for download `here <http://www.python.org/download>`_, +but OS X users please read :ref:`which-python-for-osx`. + +Once you have python up and running, you will need to install `numpy +<http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103>`_. +numpy provides high performance array data structures and mathematical +functions, and is a requirement for matplotlib. You can test your +progress:: + + >>> import numpy + >>> print numpy.__versions__ + +matplotlib requires numpy version 1.1 or later. Although it is not a +requirement to use matplotlib, we strongly encourage you to install +`ipython <http://ipython.scipy.org/dist>`_, which is an interactive +shell for python that is matplotlib aware. Once you have ipython, +numpy and matplotlib installed, ipython's "pylab" mode you have a +matlab-like environment that automatically handles most of the +configuration details for you, so you can get up and running quickly:: + + johnh@flag:~> ipython -pylab + Python 2.4.5 (#4, Apr 12 2008, 09:09:16) + IPython 0.9.0 -- An enhanced Interactive Python. + + Welcome to pylab, a matplotlib-based Python environment. + For more information, type 'help(pylab)'. + + In [1]: x = randn(10000) + + In [2]: hist(x, 100) + +And a *voila*, a figure pops up. But we are putting the cart ahead of +the horse -- first we need to get matplotlib installed. We provide +prebuilt binaries for OS X and Windows on the matplotlib `download +<http://sourceforge.net/project/showfiles.php?group_id=80706>`_ page. +Click on the latest release of the "matplotlib" package, choose your +python version (2.4 or 2.5) and your platform (macosx or win32) and +you should be good to go. If you have any problems, please check the +:ref:`installing-faq`, google around a little bit, and post a question +the `mailing list +<http://sourceforge.net/project/showfiles.php?group_id=80706>`_. + +Note that when testing matplotlib installations from the interactive +python console, there are some issues relating to user interface +toolkits and interactive settings that are discussed in +:ref:`mpl-shell`. + +.. _install_from_source: + +Installing from source +====================== + +If you are interested perhaps in contributing to matplotlib +development, or just like to build everything yourself, it is not +difficult to build matplotlib from source. Grab the lattest *tar.gz* +release file from `sourceforge +<http://sourceforge.net/project/showfiles.php?group_id=80706>`_, or if +you want to develop matplotlib or just need the latest bugfixed +version, grab the latest svn version :ref:`install-svn`. + +Once you have satisfied the requirements detailed below (mainly +python, numpy, libpng and freetype), you build matplotlib in the usual +way:: + + cd matplotlib + python setup.py build + python setup.py install + +We provide a `setup.cfg +<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/setup.cfg.template?view=markup>` +file that lives along :file:`setup.py` which you can use to customize +the build process, for example, which default backend to use, whether +some of the optional libraries that matplotlib ships with are +installed, and so on. This file will be particularly useful to those +packaging matplotlib. + + +.. _install_requrements: + +Build 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 @@ -18,12 +120,14 @@ matplotlib requires python 2.4 or later (`download <http://www.python.org/download/>`__) :term:`numpy` 1.1 (or later) - array support for python (`download <http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103>`__) + 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 :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 + 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 :term:`freetype` 1.4 (or later) library for reading true type font files. If you are a windows @@ -60,32 +164,22 @@ **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. - :term:`agg` 2.4 - The antigrain C++ rendering engine + The antigrain C++ rendering engine. matplotlib links against the + agg template source statically, so it will not affect anything on + your system outside of matplotlib. pytz 2007g or later - timezone handling for python datetime objects + timezone handling for python datetime objects. By default, + matplotlib will install pytz if it isn't already installed on your + system. To override the default, use setup.cfg to force or + prevent installation of pytz. dateutil 1.1 or later - extensions to python datetime handling + extensions to python datetime handling. By + default, matplotlib will install dateutil if it isn't already + installed on your system. To override the default, use setup.cfg + to force or prevent installation of dateutil. -**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. - Added: trunk/matplotlib/doc/users/shell.rst =================================================================== --- trunk/matplotlib/doc/users/shell.rst (rev 0) +++ trunk/matplotlib/doc/users/shell.rst 2008年10月15日 18:48:00 UTC (rev 6213) @@ -0,0 +1,142 @@ +.. _mpl-shell: + +********************************** +Using matplotlib in a python shell +********************************** + +By default, matplotlib defers drawing until the end of the script +because drawing can be an expensive opertation, and you may not want +to update the plot every time a single property is changed, only once +after all the properties have changed. + +But when working from the python shell, you usually do want to update +the plot with every command, eg, after changing the +:func:`~matplotlib.pyplot.xlabel`, or the marker style of a line. +While this is simple in concept, in practice it can be tricky, because +matplotlib is a graphical user interface application under the hood, +and there are some tricks to make the applications work right in a +python shell. + + +.. _ipython-pylab: + +Ipython to the rescue +===================== + +Fortunately, `ipython <http://ipython.scipy.org/dist>`_, an enhanced +interactive python shell, has figured out all of these tricks, and is +matplotlib aware, so when you start ipython in the *pylab* mode:: + + + johnh@flag:~> ipython -pylab + Python 2.4.5 (#4, Apr 12 2008, 09:09:16) + IPython 0.9.0 -- An enhanced Interactive Python. + + Welcome to pylab, a matplotlib-based Python environment. + For more information, type 'help(pylab)'. + + In [1]: x = randn(10000) + + In [2]: hist(x, 100) + +it sets everything up for you so interactive plotting works as you +would expect it to. Call :func:`~matplotlib.pyplot.figure` and a +figure window pops up, call :func:`~matplotlib.pyplot.plot` and your +data appears in the figure window. + +Note in the example above that we did not import any matplotlib names +because in pylab mode, ipython will import them automatically. +ipython also turns on *interactive* mode for you, which causes every +pyplot command to trigger a figure update, and also provides a +matplotlib aware ``run`` command to run matplotlib scripts +efficiently. ipython will turn off interactive mode during a ``run`` +command, and then restore the interactive state at the end of the +run so you can continue tweaking the figure manually. + +There has been a lot of recent work to embed ipython, with pylab +support, into various GUI applications, so check on the ipython +mailing `list +<http://projects.scipy.org/mailman/listinfo/ipython-user>`_ for the +latest status. + +.. _other-shells: + +Other python interpreters +========================= + +If you can't use ipython, and still want to use matplotlib/pylab from +an interactive python shell, eg the plain-ol standard python +interactive interpreter, or the interpreter in your favorite IDE, you +are going to need to understand what a matplotlib backend is +:ref:`what-is-a-backend`. + + + +With the TkAgg backend, that uses the Tkinter user interface toolkit, +you can use matplotlib from an arbitrary python shell. Just set your +``backend : TkAgg`` and ``interactive : True`` in your +:file:matplotlibrc file (see :ref:`customizing-matplotlib`) and fire +up python. Then:: + + >>> from pylab import * + >>> plot([1,2,3]) + >>> xlabel('hi mom') + +should work out of the box. Note, in batch mode, ie when making +figures from scripts, interactive mode can be slow since it redraws +the figure with each command. So you may want to think carefully +before making this the default behavior. + +For other user interface toolkits and their corresponding matplotlib +backends, the situation is complicated by the GUI mainloop which takes +over the entire process. The solution is to run the GUI in a separate +thread, and this is the tricky part that ipython solves for all the +major toolkits that matplotlib supports. There are reports that +upcoming versions of pygtk will place nicely with the standard python +shell, so stay tuned. + +.. _controlling-interactive: + +Controlling interactive updating +================================ + +The *interactive* property of the pyplot interface controls whether a +figure canvas is drawn on every pyplot command. If *interactive* is +*False*, then the figure state is updated on every plot commands, but +will only be drawn on explicit calls to +:func:`~matplotlib.pyplot.draw`. When *interactive* is +*True*, then every pyplot command triggers a draw. + + +The pyplot interface provides 4 commands that are useful for +interactive control. + +:func:`~matplotlib.pyplot.isinteractive` + returns the interactive setting *True|False* + +:func:`~matplotlib.pyplot.ion` + turns interactive mode on + +:func:`~matplotlib.pyplot.ioff` + turns interactive mode off + +:func:`~matplotlib.pyplot.draw` + forces a figure redraw + +When working with a big figure in which drawing is expensive, you may +want to turn matplotlib's interactive setting off temporarily to avoid +the performance hit:: + + + >>> #create big-expensive-figure + >>> ioff() # turn updates off + >>> title('now how much would you pay?') + >>> xticklabels(fontsize=20, color='green') + >>> draw() # force a draw + >>> savefig('alldone', dpi=300) + >>> close() + >>> ion() # turn updating back on + >>> plot(rand(20), mfc='g', mec='r', ms=40, mew=4, ls='--', lw=3) + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6216 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6216&view=rev Author: jdh2358 Date: 2008年10月15日 20:53:09 +0000 (2008年10月15日) Log Message: ----------- new site is live! Modified Paths: -------------- trunk/matplotlib/doc/make.py trunk/matplotlib/doc/users/toolkits.rst Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年10月15日 19:47:43 UTC (rev 6215) +++ trunk/matplotlib/doc/make.py 2008年10月15日 20:53:09 UTC (rev 6216) @@ -16,11 +16,11 @@ def sf(): 'push a copy to the sf site' - os.system('cd build; rsync -avz html jd...@we...:/home/groups/m/ma/matplotlib/htdocs/doc/ -essh') + os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh') def sfpdf(): 'push a copy to the sf site' - os.system('cd build/latex; scp Matplotlib.pdf jd...@we...:/home/groups/m/ma/matplotlib/htdocs/doc/') + os.system('cd build/latex; scp Matplotlib.pdf jd...@we...:/home/groups/m/ma/matplotlib/htdocs/') def figs(): os.system('cd users/figures/ && python make.py') Modified: trunk/matplotlib/doc/users/toolkits.rst =================================================================== --- trunk/matplotlib/doc/users/toolkits.rst 2008年10月15日 19:47:43 UTC (rev 6215) +++ trunk/matplotlib/doc/users/toolkits.rst 2008年10月15日 20:53:09 UTC (rev 6216) @@ -12,7 +12,8 @@ ======= Plots data on map projections, with continental and political -boundaries, `see <http://matplotlib.sf.net/basemap/doc/html>`_ +boundaries, see `basemap <http://matplotlib.sf.net/basemap/doc/html>`_ +docs. .. _toolkit_gtk: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6219 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6219&view=rev Author: jdh2358 Date: 2008年10月16日 14:15:50 +0000 (2008年10月16日) Log Message: ----------- small tweaks to logo -- make it clickable to take you home Modified Paths: -------------- trunk/matplotlib/doc/_static/logo2.png trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/_templates/layout.html Modified: trunk/matplotlib/doc/_static/logo2.png =================================================================== (Binary files differ) Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 11:43:33 UTC (rev 6218) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 14:15:50 UTC (rev 6219) @@ -19,7 +19,7 @@ <h3>Screenshots</h3> <a href="{{ pathto('users/screenshots') }}"><img align=center src="{{ -pathto('_static/logo_sidebar.png', 1) }}"></a> +pathto('_static/logo_sidebar.png', 1) }} "border="0"></a> <a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a> Modified: trunk/matplotlib/doc/_templates/layout.html =================================================================== --- trunk/matplotlib/doc/_templates/layout.html 2008年10月16日 11:43:33 UTC (rev 6218) +++ trunk/matplotlib/doc/_templates/layout.html 2008年10月16日 14:15:50 UTC (rev 6219) @@ -8,7 +8,8 @@ {% block relbar1 %} <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> -<img src="{{ pathto("_static/logo2.png", 1) }}"> +<a href="{{ pathto('index') }}"><img src="{{ +pathto("_static/logo2.png", 1) }}" border="0"></a> </div> {{ super() }} {% endblock %} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6220 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6220&view=rev Author: jdh2358 Date: 2008年10月16日 16:18:39 +0000 (2008年10月16日) Log Message: ----------- added license and credits Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/devel/coding_guide.rst trunk/matplotlib/doc/users/index.rst Added Paths: ----------- trunk/matplotlib/doc/users/credits.rst trunk/matplotlib/doc/users/license.rst Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 14:15:50 UTC (rev 6219) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 16:18:39 UTC (rev 6220) @@ -23,6 +23,11 @@ <a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a> +<h3>Other stuff</h3> - +<p>The matplotlib <a href="{{ pathto('users/license') }}">license</a> is based on the Python Software Foundation +<a href=http://www.python.org/psf/license>(PSF)</a> license.</p> +<p>There is an active developer community and a long list of people +who have made significant <a href="{{ pathto('users/credits') }}">contributions</a>.</p> + Modified: trunk/matplotlib/doc/devel/coding_guide.rst =================================================================== --- trunk/matplotlib/doc/devel/coding_guide.rst 2008年10月16日 14:15:50 UTC (rev 6219) +++ trunk/matplotlib/doc/devel/coding_guide.rst 2008年10月16日 16:18:39 UTC (rev 6220) @@ -353,7 +353,7 @@ ``artist.kwdocd['Patch']`` setting in :mod:`matplotlib.patches`. -.. _licenses: +.. _license-discussion: Licenses ======== Added: trunk/matplotlib/doc/users/credits.rst =================================================================== --- trunk/matplotlib/doc/users/credits.rst (rev 0) +++ trunk/matplotlib/doc/users/credits.rst 2008年10月16日 16:18:39 UTC (rev 6220) @@ -0,0 +1,169 @@ +.. _credits: + +******* +Credits +******* + + +matplotlib was written by John Hunter and is now developed and +maintained by a number of +`active <http://www.ohloh.net/projects/matplotlib/contributors>`_ +developers. + +Special thanks to those who have made valuable contributions +(roughly in order of first contribution by date) + +Jeremy O'Donoghue + wrote the wx backend + +Andrew Straw + provided much of the log scaling architecture, the fill command, PIL + support for imshow, and provided many examples + +Charles Twardy + provided the impetus code for the legend class and has made + countless bug reports and suggestions for improvement. + +Gary Ruben + made many enhancements to errorbar to support x and y + errorbar plots, and added a number of new marker types to plot. + + +John Gill + wrote the table class and examples, helped with support for + auto-legend placement, and added support for legending scatter + plots. + +David Moore + wrote the paint backend (no longer used) + +Todd Miller + supported by `STSCI <http://www.stsci.edu>`_ contributed the TkAgg + backend and the numerix module, which allows matplotlib to work with + either numeric or numarray. He also ported image support to the + postscript backend, with much pain and suffering. + +Paul Barrett + supported by `STSCI <http://www.stsci.edu>`_ overhauled font + management to provide an improved, free-standing, platform + independent font manager with a WC3 compliant font finder and cache + mechanism and ported truetype and mathtext to PS. + +Perry Greenfield + supported by `STSCI <http://www.stsci.edu>`_ overhauled and + modernized the goals and priorities page, implemented an improved + colormap framework, and has provided many suggestions and a lot of + insight to the overall design and organization of matplotlib. + +Jared Wahlstrand + wrote the initial SVG backend. + +Steve Chaplin + served as the GTK maintainer and wrote the Cairo and + GTKCairo backends. + +Jim Benson + provided the patch to handle vertical mathttext. + +Gregory Lielens + provided the FltkAgg backend and several patches for the frontend, + including contributions to toolbar2, and support for log ticking + with alternate bases and major and minor log ticking. + +Darren Dale + + did the work to do mathtext exponential labeling for log plots, + added improved support for scalar formatting, and did the lions + share of the `psfrag + <" rel="nofollow">http://www.ctan.org/tex-archive/help/Catalogue/entries/psfrag.html?action=/tex-archive/macros/latex/contrib/supported/psfrag>`_ + LaTeX support for postscript. He has made substantial contributions + to extending and maintaining the PS and Qt backends, and wrote the + site.cfg and matplotlib.conf build and runtime configuration + support. He setup the infrastructure for the sphinx documentation + that powers the mpl docs. + +Paul Mcguire + provided the pyparsing module on which mathtext relies, and made a + number of optimizations to the matplotlib mathtext grammar. + + +Fernando Perez + has provided numerous bug reports and patches for cleaning up + backend imports and expanding pylab functionality, and provided + matplotlib support in the pylab mode for `ipython + <http://ipython.scipy.org>`_. He also provided the + :func:`~matplotlib.pyplot.matshow` command, and wrote TConfig, which + is the basis for the experimental traited mpl configuration. + +Andrew Dalke + of `Dalke Scientific Software <http://www.dalkescientific.com/>`_ contributed the + strftime formatting code to handle years earlier than 1900. + +Jochen Voss + served as PS backend maintainer and has contributed several + bugfixes. + +Nadia Dencheva + + supported by `STSCI <http://www.stsci.edu>`_ provided the contouring and + contour labeling code. + +Baptiste Carvello + provided the key ideas in a patch for proper + shared axes support that underlies ganged plots and multiscale + plots. + +Jeffrey Whitaker + at `NOAA <http://www.boulder.noaa.gov>`_ wrote the + :ref:`toolkit_basemap` tookit + +Sigve Tjoraand, Ted Drain + and colleagues at the `JPL <http://www.jpl.nasa.gov>`_ collaborated + on the QtAgg backend and sponsored development of a number of + features including custom unit types, datetime support, scale free + ellipses, broken bar plots and more. + +James Amundson + did the initial work porting the qt backend to qt4 + +Eric Firing + has contributed significantly to contouring, masked + array, pcolor, image and quiver support, in addition to ongoing + support and enhancements in performance, design and code quality in + most aspects of matplotlib. + +Daishi Harada + added support for "Dashed Text". See ` dashpointlabel.py + <examples/pylab_examples/dashpointlabel.py>`_ and + :class:`~matplotlib.text.TextWithDash`. + +Nicolas Young + added support for byte images to imshow, which are + more efficient in CPU and memory, and added support for irregularly + sampled images. + +The `brainvisa <http://brainvisa.info>`_ Orsay team and Fernando Perez + added Qt support to `ipython <http://ipython.scipy.org>`_ in pylab mode. + + +Charlie Moad + contributed work to matplotlib's Cocoa support and does the binary + builds and releases. + +Jouni K. Seppaenen + wrote the PDF backend. + +Paul Kienzle + improved the picking infrastruture for interactive plots, and with + Alex Mont contributed fast rendering code for quadrilateral meshes. + +Michael Droettboom + supported by `STSCI <http://www.stsci.edu>`_ wrote the enhanced + mathtext support, implementing Knuth's box layout algorithms, saving + to file-like objects across backends, and is responsible for + numerous bug-fixes, much better font and unicode support, and + feature and performance enhancements across the matplotlib code + base. He also rewrote the transformation infrastructure to support + custom projections and scales. + + Modified: trunk/matplotlib/doc/users/index.rst =================================================================== --- trunk/matplotlib/doc/users/index.rst 2008年10月16日 14:15:50 UTC (rev 6219) +++ trunk/matplotlib/doc/users/index.rst 2008年10月16日 16:18:39 UTC (rev 6220) @@ -23,6 +23,7 @@ event_handling.rst toolkits.rst screenshots.rst + license.rst + credits.rst - Added: trunk/matplotlib/doc/users/license.rst =================================================================== --- trunk/matplotlib/doc/users/license.rst (rev 0) +++ trunk/matplotlib/doc/users/license.rst 2008年10月16日 16:18:39 UTC (rev 6220) @@ -0,0 +1,70 @@ +.. _license: + +*********************************************** +License +*********************************************** + + +Matplotlib only uses BSD compatible code, and its license is based on +the `PSF <http://www.python.org/psf/license>`_ license. See the Open +Source Initiative `licenses page +<http://www.opensource.org/licenses>`_ for details on individual +licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in +matplotlib :ref:`toolkits`. For a discussion of the motivations +behind the licencing choice, see :ref:`license-discussion`. + + +License agreement for matplotlib 0.98 +たす=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ=わ +たす +たす1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the +Individual or Organization ("Licensee") accessing and otherwise using +matplotlib software in source or binary form and its associated +documentation. + +2. Subject to the terms and conditions of this License Agreement, JDH +hereby grants Licensee a nonexclusive, royalty-free, world-wide license +to reproduce, analyze, test, perform and/or display publicly, prepare +derivative works, distribute, and otherwise use matplotlib 0.98 +alone or in any derivative version, provided, however, that JDH's +License Agreement and JDH's notice of copyright, i.e., "Copyright (c) +2002-2008 John D. Hunter; All Rights Reserved" are retained in +matplotlib 0.98 alone or in any derivative version prepared by +Licensee. + +3. In the event Licensee prepares a derivative work that is based on or +incorporates matplotlib 0.98 or any part thereof, and wants to +make the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to matplotlib 0.98. + +4. JDH is making matplotlib 0.98 available to Licensee on an "AS +IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.98 +WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + +5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB +0.98 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR +LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING +MATPLOTLIB 0.98, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF +THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between JDH and +Licensee. This License Agreement does not grant permission to use JDH +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using matplotlib 0.98, +Licensee agrees to be bound by the terms and conditions of this License +Agreement. + + + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6221 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6221&view=rev Author: jdh2358 Date: 2008年10月16日 17:08:13 +0000 (2008年10月16日) Log Message: ----------- more nav links Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/contents.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst trunk/matplotlib/doc/users/screenshots.rst trunk/matplotlib/doc/users/toolkits.rst Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 16:18:39 UTC (rev 6220) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 17:08:13 UTC (rev 6221) @@ -10,9 +10,10 @@ </p> <h3>Need help?</h3> -<p>Check the <a href="{{ pathto('contents') }}"}>docs</a>, the <a -href="{{ pathto('faq/index') }}">faq</a>, and join the matplotlib mailing <a -href="http://sourceforge.net/project/showfiles.php?group_id=80706">lists</a> +<p>Check the <a href="{{ pathto('users/index') }}"}>user</a> guide, the <a +href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ +pathto('api/index') }}"}>api</a> docs, <a href=http://www.nabble.com/matplotlib---users-f2906.html>archives</a>, and join the matplotlib mailing <a +href="http://sourceforge.net/mail/?group_id=80706">lists</a> <p>You can file bugs, patches and feature requests on the sourceforge <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> Modified: trunk/matplotlib/doc/contents.rst =================================================================== --- trunk/matplotlib/doc/contents.rst 2008年10月16日 16:18:39 UTC (rev 6220) +++ trunk/matplotlib/doc/contents.rst 2008年10月16日 17:08:13 UTC (rev 6221) @@ -10,6 +10,7 @@ Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_ + .. toctree:: :maxdepth: 2 Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年10月16日 16:18:39 UTC (rev 6220) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年10月16日 17:08:13 UTC (rev 6221) @@ -1,7 +1,7 @@ .. _pyplot-tutorial: *************** -pyplot tutorial +Pyplot tutorial *************** :mod:`matplotlib.pyplot` is a collection of command style functions Modified: trunk/matplotlib/doc/users/screenshots.rst =================================================================== --- trunk/matplotlib/doc/users/screenshots.rst 2008年10月16日 16:18:39 UTC (rev 6220) +++ trunk/matplotlib/doc/users/screenshots.rst 2008年10月16日 17:08:13 UTC (rev 6221) @@ -1,7 +1,7 @@ .. _matplotlibscreenshots: ********************** -matplotlib screenshots +Screenshots ********************** Here you will find a host of example figures with the code that Modified: trunk/matplotlib/doc/users/toolkits.rst =================================================================== --- trunk/matplotlib/doc/users/toolkits.rst 2008年10月16日 16:18:39 UTC (rev 6220) +++ trunk/matplotlib/doc/users/toolkits.rst 2008年10月16日 17:08:13 UTC (rev 6221) @@ -1,7 +1,7 @@ .. _toolkits: ******************* -matplotlib toolkits +Toolkits ******************* Toolkits are collections of application-specific functions that extend matplotlib. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6222 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6222&view=rev Author: jdh2358 Date: 2008年10月16日 17:23:18 +0000 (2008年10月16日) Log Message: ----------- updated licensing template Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/users/license.rst Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 17:08:13 UTC (rev 6221) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 17:23:18 UTC (rev 6222) @@ -6,11 +6,13 @@ href="{{ pathto('users/installing') }}">installing</a> page). <p> -There are also optional <a href="{{ pathto('users/toolkits') }}">toolkits</a> for matplotlib. +There are several matplotlib addon <a href="{{ +pathto('users/toolkits') }}">toolkits</a>, including the +projection and mapping toolkit <a href=http://matplotlib.sf.net/basemap/doc/html>basemap</a>. </p> <h3>Need help?</h3> -<p>Check the <a href="{{ pathto('users/index') }}"}>user</a> guide, the <a +<p>Check the <a href="{{ pathto('users/index') }}">user</a> guide, the <a href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ pathto('api/index') }}"}>api</a> docs, <a href=http://www.nabble.com/matplotlib---users-f2906.html>archives</a>, and join the matplotlib mailing <a href="http://sourceforge.net/mail/?group_id=80706">lists</a> Modified: trunk/matplotlib/doc/users/license.rst =================================================================== --- trunk/matplotlib/doc/users/license.rst 2008年10月16日 17:08:13 UTC (rev 6221) +++ trunk/matplotlib/doc/users/license.rst 2008年10月16日 17:23:18 UTC (rev 6222) @@ -14,8 +14,8 @@ behind the licencing choice, see :ref:`license-discussion`. -License agreement for matplotlib 0.98 -===================================== +License agreement for matplotlib |version| +============================================== 1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the Individual or Organization ("Licensee") accessing and otherwise using @@ -25,30 +25,30 @@ 2. Subject to the terms and conditions of this License Agreement, JDH hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use matplotlib 0.98 +derivative works, distribute, and otherwise use matplotlib |version| alone or in any derivative version, provided, however, that JDH's License Agreement and JDH's notice of copyright, i.e., "Copyright (c) 2002-2008 John D. Hunter; All Rights Reserved" are retained in -matplotlib 0.98 alone or in any derivative version prepared by +matplotlib |version| alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or -incorporates matplotlib 0.98 or any part thereof, and wants to +incorporates matplotlib |version| or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of -the changes made to matplotlib 0.98. +the changes made to matplotlib |version|. -4. JDH is making matplotlib 0.98 available to Licensee on an "AS +4. JDH is making matplotlib |version| available to Licensee on an "AS IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 0.98 +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB |version| WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB -0.98 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR +|version| FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING -MATPLOTLIB 0.98, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF +MATPLOTLIB |version|, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material @@ -60,7 +60,7 @@ trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. -8. By copying, installing or otherwise using matplotlib 0.98, +8. By copying, installing or otherwise using matplotlib |version|, Licensee agrees to be bound by the terms and conditions of this License Agreement. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6225 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6225&view=rev Author: jdh2358 Date: 2008年10月16日 18:51:51 +0000 (2008年10月16日) Log Message: ----------- added script to autogenerate example files Modified Paths: -------------- trunk/matplotlib/doc/_templates/index.html trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/faq/installing_faq.rst trunk/matplotlib/doc/make.py trunk/matplotlib/doc/users/installing.rst trunk/matplotlib/doc/users/toolkits.rst Added Paths: ----------- trunk/matplotlib/doc/examples/ trunk/matplotlib/doc/examples/gen_rst.py Modified: trunk/matplotlib/doc/_templates/index.html =================================================================== --- trunk/matplotlib/doc/_templates/index.html 2008年10月16日 18:32:13 UTC (rev 6224) +++ trunk/matplotlib/doc/_templates/index.html 2008年10月16日 18:51:51 UTC (rev 6225) @@ -5,15 +5,15 @@ {% block body %} <h1>Welcome</h1> - matplotlib is a python 2D plotting library which produces + <p>matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python and <a href=http://ipython.scipy.org>ipython</a> shell (ala matlab or mathematica), web application servers, and six graphical user - interface toolkits. <p> + interface toolkits.</p> - matplotlib tries to make easy things easy and hard things possible. + <p>matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, with just a few lines of code. For example, to generate 10,000 gaussian random numbers and make a @@ -22,19 +22,20 @@ <pre> >>> from pylab import randn, hist >>> x = randn(10000) - >>> hist(x, 100) - </pre> + >>> hist(x, 100)</pre> For the power user, you have full control of line styles, font properties, axes properties, etc, via an object oriented interface - or via a handle graphics interface familiar to Matlab® users. + or via a handle graphics interface familiar to Matlab® users.</p> - The plotting functions in the <a href=api/pyplot_api.html>pyplot</a> - interface have a high degree of Matlab® compatibility.<p> + <p>The plotting functions in the <a href=api/pyplot_api.html>pyplot</a> + interface have a high degree of Matlab® compatibility.</p> - <br> + <h3>Plotting commands</h3> + <br> + <table border=1 cellpadding=3 cellspacing=2> - <caption><h3>Plotting commands</h3></caption> + <tr><th>Function</th><th>Description</th></tr> <tr> <th align="left"> Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 18:32:13 UTC (rev 6224) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 18:51:51 UTC (rev 6225) @@ -12,10 +12,22 @@ </p> <h3>Need help?</h3> +<<<<<<< .mine +<<<<<<< .mine +<p>Check the <a href="{{ pathto('contents') }}"}>docs</a>, +the <a href="{{ pathto('faq/index') }}">faq</a>, and join the +matplotlib +mailing <a href="http://sourceforge.net/project/showfiles.php?group_id=80706">lists</a>. +There is a also community wiki <a href=http://www.scipy.org/Cookbook/Matplotlib>cookbook</a></p> +======= +<p>Check the <a href="{{ pathto('users/index') }}"}>user</a> guide, the <a +======= <p>Check the <a href="{{ pathto('users/index') }}">user</a> guide, the <a +>>>>>>> .r6222 href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ pathto('api/index') }}"}>api</a> docs, <a href=http://www.nabble.com/matplotlib---users-f2906.html>archives</a>, and join the matplotlib mailing <a href="http://sourceforge.net/mail/?group_id=80706">lists</a> +>>>>>>> .r6221 <p>You can file bugs, patches and feature requests on the sourceforge <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> Added: trunk/matplotlib/doc/examples/gen_rst.py =================================================================== --- trunk/matplotlib/doc/examples/gen_rst.py (rev 0) +++ trunk/matplotlib/doc/examples/gen_rst.py 2008年10月16日 18:51:51 UTC (rev 6225) @@ -0,0 +1,78 @@ +""" +generate the rst files for the examples by iterating over the pylab examples +""" +import os, glob + +import matplotlib.cbook as cbook + + +import os +import sys +fileList = [] +rootdir = '../mpl_examples' + +datad = {} +for root, subFolders, files in os.walk(rootdir): + for fname in files: + if ( fname.startswith('.') or fname.startswith('#') or + fname.find('.svn')>=0 or not fname.endswith('.py') ): + continue + + fullpath = os.path.join(root,fname) + contents = file(fullpath).read() + # indent + contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')]) + relpath = os.path.split(root)[-1] + datad.setdefault(relpath, []).append((fname, contents)) + +subdirs = datad.keys() +subdirs.sort() + +fhindex = file('index.rst') +fh.index.write("""\ +.. _examples-index: + +#################### +Matplotlib Examples +################### + +.. htmlonly:: + + :Release: |version| + :Date: |today| + +.. toctree:: + :maxdepth: 2 + +""") + +for subdir in subdirs: + print subdir + outfile = '%s.rst'%subdir + fh = file(outfile, 'w') + + fhindex.write(' %s\n'%outfile) + + fh.write('.. _%s-examples:\n\n'%subdir) + title = '%s examples'%subdir + + fh.write('*'*len(title) + '\n') + fh.write(title + '\n') + fh.write('*'*len(title) + '\n\n') + + for fname, contents in datad[subdir]: + print ' ', fname + basename, ext = os.path.splitext(fname) + fh.write('.. _%s-example:\n\n'%basename) + title = '%s example'%basename + + fh.write(title + '\n') + fh.write('='*len(title) + '\n\n') + fh.write(fname + '::\n\n') + fh.write(contents) + fh.write('\n\n') + fh.close() + + + +fhindex.close() Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2008年10月16日 18:32:13 UTC (rev 6224) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2008年10月16日 18:51:51 UTC (rev 6225) @@ -1,9 +1,10 @@ .. _installing-faq: -************* - Installation -************* +***************** + Installation FAQ +***************** + .. contents:: Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年10月16日 18:32:13 UTC (rev 6224) +++ trunk/matplotlib/doc/make.py 2008年10月16日 18:51:51 UTC (rev 6225) @@ -17,10 +17,11 @@ def sf(): 'push a copy to the sf site' os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh') + os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude --delete') def sfpdf(): 'push a copy to the sf site' - os.system('cd build/latex; scp Matplotlib.pdf jd...@we...:/home/groups/m/ma/matplotlib/htdocs/') + os.system('cd build/latex; scp Matplotlib.pdf jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/') def figs(): os.system('cd users/figures/ && python make.py') Modified: trunk/matplotlib/doc/users/installing.rst =================================================================== --- trunk/matplotlib/doc/users/installing.rst 2008年10月16日 18:32:13 UTC (rev 6224) +++ trunk/matplotlib/doc/users/installing.rst 2008年10月16日 18:51:51 UTC (rev 6225) @@ -45,7 +45,7 @@ requirement to use matplotlib, we strongly encourage you to install `ipython <http://ipython.scipy.org/dist>`_, which is an interactive shell for python that is matplotlib aware. Once you have ipython, -numpy and matplotlib installed, ipython's "pylab" mode you have a +numpy and matplotlib installed, in ipython's "pylab" mode you have a matlab-like environment that automatically handles most of the configuration details for you, so you can get up and running quickly:: @@ -83,7 +83,7 @@ If you are interested perhaps in contributing to matplotlib development, or just like to build everything yourself, it is not -difficult to build matplotlib from source. Grab the lattest *tar.gz* +difficult to build matplotlib from source. Grab the latest *tar.gz* release file from `sourceforge <http://sourceforge.net/project/showfiles.php?group_id=80706>`_, or if you want to develop matplotlib or just need the latest bugfixed Modified: trunk/matplotlib/doc/users/toolkits.rst =================================================================== --- trunk/matplotlib/doc/users/toolkits.rst 2008年10月16日 18:32:13 UTC (rev 6224) +++ trunk/matplotlib/doc/users/toolkits.rst 2008年10月16日 18:51:51 UTC (rev 6225) @@ -35,12 +35,12 @@ .. _toolkit_natgrid: -Natrgrid +Natgrid ======== - + mpl_toolkits.natgrid is an interface to natgrid C library for gridding irregularly spaced data. This requires a separate installation of the natgrid toolkit from the sourceforge `download <http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792>`_ page. - + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6226 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6226&view=rev Author: jdh2358 Date: 2008年10月16日 19:00:21 +0000 (2008年10月16日) Log Message: ----------- fixed gen_rst header Modified Paths: -------------- trunk/matplotlib/doc/contents.rst trunk/matplotlib/doc/examples/gen_rst.py Modified: trunk/matplotlib/doc/contents.rst =================================================================== --- trunk/matplotlib/doc/contents.rst 2008年10月16日 18:51:51 UTC (rev 6225) +++ trunk/matplotlib/doc/contents.rst 2008年10月16日 19:00:21 UTC (rev 6226) @@ -21,6 +21,7 @@ glossary/index.rst .. htmlonly:: + examples/index.rst * :ref:`genindex` * :ref:`modindex` Modified: trunk/matplotlib/doc/examples/gen_rst.py =================================================================== --- trunk/matplotlib/doc/examples/gen_rst.py 2008年10月16日 18:51:51 UTC (rev 6225) +++ trunk/matplotlib/doc/examples/gen_rst.py 2008年10月16日 19:00:21 UTC (rev 6226) @@ -14,10 +14,10 @@ datad = {} for root, subFolders, files in os.walk(rootdir): for fname in files: - if ( fname.startswith('.') or fname.startswith('#') or - fname.find('.svn')>=0 or not fname.endswith('.py') ): + if ( fname.startswith('.') or fname.startswith('#') or + fname.find('.svn')>=0 or not fname.endswith('.py') ): continue - + fullpath = os.path.join(root,fname) contents = file(fullpath).read() # indent @@ -28,13 +28,13 @@ subdirs = datad.keys() subdirs.sort() -fhindex = file('index.rst') -fh.index.write("""\ +fhindex = file('index.rst', 'w') +fhindex.write("""\ .. _examples-index: #################### Matplotlib Examples -################### +#################### .. htmlonly:: @@ -59,7 +59,7 @@ fh.write('*'*len(title) + '\n') fh.write(title + '\n') fh.write('*'*len(title) + '\n\n') - + for fname, contents in datad[subdir]: print ' ', fname basename, ext = os.path.splitext(fname) @@ -73,6 +73,6 @@ fh.write('\n\n') fh.close() - + fhindex.close() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6230 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6230&view=rev Author: jdh2358 Date: 2008年10月16日 20:52:08 +0000 (2008年10月16日) Log Message: ----------- finished the first cut at the examples for search support Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/_templates/layout.html trunk/matplotlib/doc/examples/gen_rst.py trunk/matplotlib/doc/make.py Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 19:50:05 UTC (rev 6229) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月16日 20:52:08 UTC (rev 6230) @@ -12,10 +12,16 @@ </p> <h3>Need help?</h3> -<p>Check the <a href="{{ pathto('users/index') }}">user</a> guide, the <a -href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ -pathto('api/index') }}"}>api</a> docs, <a href=http://www.nabble.com/matplotlib---users-f2906.html>archives</a>, and join the matplotlib mailing <a -href="http://sourceforge.net/mail/?group_id=80706">lists</a> +<p>Check the <a href="{{ pathto('users/index') }}">user</a> guide, +the <a href="{{ pathto('faq/index') }}">faq</a>, the <a href="{{ +pathto('api/index') }}"}>api</a> docs, +<a href=http://www.nabble.com/matplotlib---users-f2906.html>archives</a>, +and join the matplotlib +mailing <a href="http://sourceforge.net/mail/?group_id=80706">lists</a>. +The <a href="{{ pathto('search') }}">search</a>| </li> tool +searches all of the documentation, including full text search of +almost 300 complete examples which exercise almost every corner of +matplotlib. <p>You can file bugs, patches and feature requests on the sourceforge <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> @@ -24,7 +30,7 @@ <a href="{{ pathto('users/screenshots') }}"><img align=center src="{{ pathto('_static/logo_sidebar.png', 1) }} "border="0"></a> -<a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a> +<a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples/index.html>examples</a> <h3>Other stuff</h3> Modified: trunk/matplotlib/doc/_templates/layout.html =================================================================== --- trunk/matplotlib/doc/_templates/layout.html 2008年10月16日 19:50:05 UTC (rev 6229) +++ trunk/matplotlib/doc/_templates/layout.html 2008年10月16日 20:52:08 UTC (rev 6230) @@ -1,7 +1,8 @@ {% extends "!layout.html" %} {% block rootrellink %} - <li><a href="{{ pathto('index') }}">matplotlib home </a> | </li> + <li><a href="{{ pathto('index') }}">matplotlib home</a>| </li> + <li><a href="{{ pathto('search') }}">search</a>| </li> <li><a href="{{ pathto('contents') }}">documentation </a> »</li> {% endblock %} Modified: trunk/matplotlib/doc/examples/gen_rst.py =================================================================== --- trunk/matplotlib/doc/examples/gen_rst.py 2008年10月16日 19:50:05 UTC (rev 6229) +++ trunk/matplotlib/doc/examples/gen_rst.py 2008年10月16日 20:52:08 UTC (rev 6230) @@ -14,14 +14,13 @@ datad = {} for root, subFolders, files in os.walk(rootdir): for fname in files: - if ( fname.startswith('.') or fname.startswith('#') or + if ( fname.startswith('.') or fname.startswith('#') or fname.startswith('_') or fname.find('.svn')>=0 or not fname.endswith('.py') ): continue fullpath = os.path.join(root,fname) contents = file(fullpath).read() # indent - contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')]) relpath = os.path.split(root)[-1] datad.setdefault(relpath, []).append((fname, contents)) @@ -47,32 +46,77 @@ """) for subdir in subdirs: + if not os.path.exists(subdir): + os.makedirs(subdir) + + static_dir = os.path.join('..', '_static', 'examples') + if not os.path.exists(static_dir): + os.makedirs(static_dir) + + static_dir = os.path.join(static_dir, subdir) + if not os.path.exists(static_dir): + os.makedirs(static_dir) + + + subdirIndexFile = os.path.join(subdir, 'index.rst') + fhsubdirIndex = file(subdirIndexFile, 'w') + fhindex.write(' %s\n'%subdirIndexFile) + + + fhsubdirIndex.write("""\ +.. _%s-examples-index: + + +############################################## +%s Examples +############################################## + +.. htmlonly:: + + :Release: |version| + :Date: |today| + +.. toctree:: + :maxdepth: 1 + +"""%(subdir, subdir)) + print subdir - outfile = '%s.rst'%subdir - fh = file(outfile, 'w') - fhindex.write(' %s\n'%outfile) + + data = datad[subdir] + data.sort() + for fname, contents in data: - fh.write('.. _%s-examples:\n\n'%subdir) - title = '%s examples'%subdir + static_file = os.path.join(static_dir, fname) + fhstatic = file(static_file, 'w') + fhstatic.write(contents) + fhstatic.close() - fh.write('*'*len(title) + '\n') - fh.write(title + '\n') - fh.write('*'*len(title) + '\n\n') - - for fname, contents in datad[subdir]: - print ' ', fname basename, ext = os.path.splitext(fname) - fh.write('.. _%s-example:\n\n'%basename) - title = '%s example'%basename + rstfile = '%s.rst'%basename + outfile = os.path.join(subdir, rstfile) + fhsubdirIndex.write(' %s\n'%rstfile) + fh = file(outfile, 'w') + fh.write('.. _%s-%s:\n\n'%(subdir, basename)) + title = '%s example code: %s'%(subdir, fname) fh.write(title + '\n') fh.write('='*len(title) + '\n\n') - fh.write(fname + '::\n\n') + + + print ' %s'%fname + + linkname = os.path.join('..', '..', '_static', 'examples', subdir, fname) + fh.write('%s (`link to source <%s>`_)::\n\n'%(fname, linkname)) + + # indent the contents + contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')]) + fh.write(contents) fh.write('\n\n') - fh.close() + fh.close() + fhsubdirIndex.close() - fhindex.close() Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年10月16日 19:50:05 UTC (rev 6229) +++ trunk/matplotlib/doc/make.py 2008年10月16日 20:52:08 UTC (rev 6230) @@ -17,7 +17,8 @@ def sf(): 'push a copy to the sf site' os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh') - os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude --delete') + # we are now doing this in the doc/examples build + #os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude --delete') def sfpdf(): 'push a copy to the sf site' @@ -28,6 +29,11 @@ def html(): check_build() + # build the literal include examples for searchable examples + os.system('cd examples; python gen_rst.py') + + + #figs() if os.system('sphinx-build -b html -d build/doctrees . build/html'): raise SystemExit("Building HTML failed.") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6236 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6236&view=rev Author: jdh2358 Date: 2008年10月17日 13:46:39 +0000 (2008年10月17日) Log Message: ----------- added nxutils api doc Modified Paths: -------------- trunk/matplotlib/doc/api/index.rst trunk/matplotlib/doc/faq/howto_faq.rst Added Paths: ----------- trunk/matplotlib/doc/api/nxutils.api Modified: trunk/matplotlib/doc/api/index.rst =================================================================== --- trunk/matplotlib/doc/api/index.rst 2008年10月17日 13:08:33 UTC (rev 6235) +++ trunk/matplotlib/doc/api/index.rst 2008年10月17日 13:46:39 UTC (rev 6236) @@ -22,6 +22,7 @@ collections_api.rst colorbar_api.rst colors_api.rst + nxutils_api.rst path_api.rst pyplot_api.rst index_backend_api.rst Added: trunk/matplotlib/doc/api/nxutils.api =================================================================== --- trunk/matplotlib/doc/api/nxutils.api (rev 0) +++ trunk/matplotlib/doc/api/nxutils.api 2008年10月17日 13:46:39 UTC (rev 6236) @@ -0,0 +1,15 @@ +******************* +matplotlib nxutils +******************* + +The nxutils are numerical utilities written in C, mainly to support +computational gemoetry that is not in `numpy <http://numpy.scipy.org>`_. + + +:mod:`matplotlib.nxutils` +=========================== + +.. automodule:: matplotlib.nxutils + :members: + :undoc-members: + :show-inheritance: Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 13:08:33 UTC (rev 6235) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 13:46:39 UTC (rev 6236) @@ -289,3 +289,50 @@ fig.autofmt_xdate() plt.show() + +.. _point-in-poly: + +How do I test whether a point is inside a polygon? +================================================== + +The :mod:`matplotlib.nxutils` provides two high performance methods: +for a single point use :func:`~matplotlib.nxutils.pnpoly` and for an +array of points use :func:`~matplotlib.nxutils.points_inside_poly`. +For a discussion of the implementation see `pnpoly +<http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_. + +.. sourcecode:: ipython + + In [25]: import numpy as np + + In [26]: import matplotlib.nxutils as nx + + In [27]: verts = np.array([ [0,0], [0, 1], [1, 1], [1,0]], float) + + In [28]: nx.pnpoly( 0.5, 0.5, verts) + Out[28]: 1 + + In [29]: nx.pnpoly( 0.5, 1.5, verts) + Out[29]: 0 + + In [30]: points = np.random.rand(10,2)*2 + + In [31]: points + Out[31]: + array([[ 1.03597426, 0.61029911], + [ 1.94061056, 0.65233947], + [ 1.08593748, 1.16010789], + [ 0.9255139 , 1.79098751], + [ 1.54564936, 1.15604046], + [ 1.71514397, 1.26147554], + [ 1.19133536, 0.56787764], + [ 0.40939549, 0.35190339], + [ 1.8944715 , 0.61785408], + [ 0.03128518, 0.48144145]]) + + In [32]: nx.points_inside_poly(points, verts) + Out[32]: array([False, False, False, False, False, False, False, True, False, True], dtype=bool) + +.. htmlonly:: + + For a complete example, see :ref:`_event_handling-lasso_demo`. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6238 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6238&view=rev Author: jdh2358 Date: 2008年10月17日 14:27:26 +0000 (2008年10月17日) Log Message: ----------- added nxutils and pnpoly faq Modified Paths: -------------- trunk/matplotlib/doc/api/nxutils_api.rst trunk/matplotlib/doc/contents.rst trunk/matplotlib/doc/faq/howto_faq.rst Modified: trunk/matplotlib/doc/api/nxutils_api.rst =================================================================== --- trunk/matplotlib/doc/api/nxutils_api.rst 2008年10月17日 13:47:09 UTC (rev 6237) +++ trunk/matplotlib/doc/api/nxutils_api.rst 2008年10月17日 14:27:26 UTC (rev 6238) @@ -1,3 +1,4 @@ + ******************* matplotlib nxutils ******************* @@ -2,12 +3,5 @@ -The nxutils are numerical utilities written in C, mainly to support -computational gemoetry that is not in `numpy <http://numpy.scipy.org>`_. - - :mod:`matplotlib.nxutils` =========================== .. automodule:: matplotlib.nxutils - :members: - :undoc-members: - :show-inheritance: Modified: trunk/matplotlib/doc/contents.rst =================================================================== --- trunk/matplotlib/doc/contents.rst 2008年10月17日 13:47:09 UTC (rev 6237) +++ trunk/matplotlib/doc/contents.rst 2008年10月17日 14:27:26 UTC (rev 6238) @@ -20,6 +20,7 @@ api/index.rst glossary/index.rst + .. htmlonly:: examples/index.rst Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 13:47:09 UTC (rev 6237) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 14:27:26 UTC (rev 6238) @@ -335,4 +335,4 @@ .. htmlonly:: - For a complete example, see :ref:`_event_handling-lasso_demo`. + For a complete example, see :ref:`event_handling-lasso_demo`. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6244 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6244&view=rev Author: jdh2358 Date: 2008年10月17日 17:21:56 +0000 (2008年10月17日) Log Message: ----------- more faqs and codex example search keyword Modified Paths: -------------- trunk/matplotlib/doc/examples/gen_rst.py trunk/matplotlib/doc/faq/howto_faq.rst trunk/matplotlib/doc/faq/installing_faq.rst trunk/matplotlib/doc/faq/troubleshooting_faq.rst Modified: trunk/matplotlib/doc/examples/gen_rst.py =================================================================== --- trunk/matplotlib/doc/examples/gen_rst.py 2008年10月17日 16:03:23 UTC (rev 6243) +++ trunk/matplotlib/doc/examples/gen_rst.py 2008年10月17日 17:21:56 UTC (rev 6244) @@ -114,7 +114,7 @@ contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')]) fh.write(contents) - fh.write('\n\n') + fh.write('\n\nKeyword: codex (see :ref:`how-to-search-examples`)') fh.close() fhsubdirIndex.close() Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 16:03:23 UTC (rev 6243) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 17:21:56 UTC (rev 6244) @@ -9,7 +9,7 @@ .. _howto-findobj: -How do I find all the objects in my figure of a certain type? +Find all objects in figure of a certain type ============================================================= Every matplotlib artist (see :ref:`artist-tutorial`) has a method @@ -35,7 +35,7 @@ .. _howto-transparent: -How do I save transparent figures? +Save transparent figures ================================== The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument @@ -64,7 +64,7 @@ .. _howto-subplots-adjust: -How do I move the edge of my axes area over to make room for my tick labels? +Move the edge of an axes to make room for tick labels ============================================================================ For subplots, you can control the default spacing on the left, right, @@ -114,7 +114,7 @@ .. _howto-auto-adjust: -How do I automatically make room for my tick labels? +Automatically make room for tick labels ==================================================== In most use cases, it is enough to simpy change the subplots adjust @@ -148,7 +148,7 @@ .. _howto-ticks: -How do I configure the tick linewidths? +Configure the tick linewidths ======================================= In matplotlib, the ticks are *markers*. All @@ -174,7 +174,7 @@ .. _howto-align-label: -How do I align my ylabels across multiple subplots? +Align my ylabels across multiple subplots =================================================== If you have multiple subplots over one another, and the y data have @@ -191,7 +191,7 @@ .. _howto-webapp: -How do I use matplotlib in a web application server? +Matplotlib in a web application server ==================================================== Many users report initial problems trying to use maptlotlib in web @@ -237,17 +237,17 @@ fig.savefig(sys.stdout) -How do I use matplotlib with apache? +matplotlib with apache ------------------------------------ TODO -How do I use matplotlib with django? +matplotlib with django ------------------------------------ TODO -How do I use matplotlib with zope? +matplotlib with zope ---------------------------------- TODO @@ -255,7 +255,7 @@ .. _date-index-plots: -How do I skip dates where there is no data? +Skip dates where there is no data =========================================== When plotting time series, eg financial time series, one often wants @@ -292,7 +292,7 @@ .. _point-in-poly: -How do I test whether a point is inside a polygon? +Test whether a point is inside a polygon ================================================== The :mod:`matplotlib.nxutils` provides two high performance methods: @@ -340,7 +340,7 @@ .. _how-to-submit-patch: -How do I submit a patch? +Submit a patch ======================== First obtain a copy of matplotlib svn (see :ref:`install-svn`) and @@ -370,6 +370,72 @@ :ref:`developers-guide-index`. +.. _how-to-contribute-docs: + +Contribute to matplotlib documentation +========================================= + +matplotlib is a big library, which is used in many ways, and the +documentation we have only scratches the surface of everything it can +do. So far, the place most people have learned all these features are +through studying the examples (:ref:`how-to-search-examples`), which is a +recommended and great way to learn, but it would be nice to have more +official narrative documentation guiding people through all the dark +corners. This is where you come in. + +There is a good chance you know more about matplotlib usage in some +areas, the stuff you do every day, than any of the developers. *Just +pulled your hair out compiling matplotlib for windows?* Write a FAQ or +a section for the :ref:`installing` page. *Are you a digital signal +processing wizard?* Write a tutorial on the signal analysis plotting +functions like :func:`~matplotlib.pyplot.xcorr`, +:func:`~matplotlib.pyplot.psd` and +:func:`~matplotlib.pyplot.specgram`. *Do you use matplotlib with +`django <ttp://www.djangoproject.com/>`_ or other popular web +application servers?* Write a FAQ or tutorial and we'll find a place +for it in the :ref:`users-guide-index`. *Bundle matplotlib in a `py2exe +<http://www.py2exe.org/>`_ app?* ... I think you get the idea. + +matplotlib is documented using the `sphinx +<http://sphinx.pocoo.org/index.html>`_ extensions to restructured text +`ReST <http://docutils.sourceforge.net/rst.html>`_. sphinx is a +extensible python framework for documentation projects which generates +HTML and PDF, and is pretty easy to write; you can see the source for this +document or any page on this site by clicking on *Show Source* link +at the end of the page in the sidebar (or `here +<../_sources/faq/howto_faq.txt>`_ for this document). + +The sphinx website is a good resource for learning sphinx, but we have +put together a cheat-sheet at :ref:`documenting-matplotlib` which +shows you how to get started, and outlines the matplotlib conventions +and extensions, eg for including plots directly from external code in +your documents. + +Once your documentation contributions are working (and hopefully +tested by actually *building* the docs) you can submit them as a patch +against svn. See :ref:`install-svn` and :ref:`how-to-submit-patch`. +Looking for something to do? Search for ``TODO`` at :`search`. + + +.. _how-to-search-examples: + +Search examples +========================================= + +The nearly 300 code :ref:`examples-index` included with the matplotlib +source distribution are full-text searchable from the :ref:`search` +page, but sometimes when you search, you get a lot of results from the +:ref:`api-index` or other documentation that you may not be interested in if +you just want to find a complete, free-standing, working piece of +example code. To facilitate example searches, we have tagged every +page with the keyword ``codex`` for *code example* which shouldn't +appear anywhere else on this site except in the FAQ and in every +example. So if you want to search for an example that uses an ellipse, +:ref:`search` for ``codex ellipse``. + + + + .. _howto-click-maps: Clickable images for HTML @@ -385,7 +451,7 @@ .. _howto-set-zorder: -How do I control the depth of plot elements? +Control the depth of plot elements ============================================= Within an axes, the order that the various lines, markers, text, @@ -409,7 +475,7 @@ .. _howto-axis-equal: -How to I make the aspect ratio for plots equal? +Make the aspect ratio for plots equal =============================================== The Axes property :meth:`matplotlib.axes.Axes.set_aspect` controls the @@ -427,13 +493,13 @@ .. _howto-movie: -How do I make a movie? +Make a movie ====================== If you want to take an animated plot and turn it into a movie, the best approach is to save a series of image files (eg PNG) and use an -external tool to convert them to a movie. You can use ` mencoder +external tool to convert them to a movie. You can use `mencoder <http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html>`_, which is part of the `mplayer <http://www.mplayerhq.hu>`_ suite for this:: @@ -475,7 +541,7 @@ .. _howto-twoscale: -Can I have multiple y-axis scales? +Multiple y-axis scales ================================== A frequent request is to have two scales for the left and right @@ -514,10 +580,10 @@ See :ref:`api-two_scales` for a complete example -.. _howto-batchmode: +.. _howto-batch: -Can I just generate images without having a window popup? -===================================================== +Generate images without having a window popup +=========================================================== The easiest way to do this is use an image backend (see :ref:`what-is-a-backend`) such as Agg (for PNGs), PDF, SVG or PS. In @@ -535,21 +601,17 @@ .. seealso:: :ref:`howto-webapp` - ('SHOW', - "What's up with 'show'? Do I have to use it?", - """ - .. _howto-show -How should I use :func:`~matplotlib.pyplot.show`? -================================================= +Use :func:`~matplotlib.pyplot.show` +===================================================== The user interface backends need to start the GUI mainloop, and this is what :func:`~matplotlib.pyplot.show` does. It tells matplotlib to raise all of the figure windows and start the mainloop. Because the mainloop is blocking, you should only call this once per script, at the end. If you are using matplotlib to generate images only and do -not want a user interface window, you can skip it (see +not want a user interface window, you do not need to call ``show`` (see :ref:`howto-batch` and :ref:`what-is-a-backend`). @@ -565,8 +627,8 @@ It is *possible* to force matplotlib to draw after every command, which is what you usually want when working interactively at the -python console, but in a script you want to defer all drawing until -the script has executed (see :ref:`mpl-shell`). This is especially +python console (see :ref:`mpl-shell`), but in a script you want to +defer all drawing until the script has executed. This is especially important for complex figures that take some time to draw. :func:`~matplotlib.pyplot.show` is designed to tell matplotlib that you're all done issuing commands and you want to draw the figure now. Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2008年10月17日 16:03:23 UTC (rev 6243) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2008年10月17日 17:21:56 UTC (rev 6244) @@ -8,12 +8,12 @@ .. contents:: -How do I report a compilation problem? +Report a compilation problem ====================================== See :ref:`reporting-problems`. -matplotlib compiled fine, but I can't get anything to plot +matplotlib compiled fine, but nothing shows up with plot ========================================================== The first thing to try is a :ref:`clean install <clean-install>` and see if @@ -42,7 +42,7 @@ .. _clean-install: -How do I cleanly rebuild and reinstall everything? +Cleanly rebuild and reinstall everything ================================================== The steps depend on your platform and installation method. @@ -93,7 +93,7 @@ .. _install-svn: -How to install from svn? +Install from svn ======================== Checking out the main source:: @@ -236,7 +236,7 @@ .. _pygtk-2.4: -How do I compile matplotlib with PyGTK-2.4? +Compile matplotlib with PyGTK-2.4 ------------------------------------------- There is a `bug in PyGTK-2.4`_. You need to edit @@ -269,11 +269,11 @@ .. _easy-install-osx-egg: -How can I easy_install my egg? +easy_install from egg? ------------------------------ -I downloaded the egg for 0.98 from the matplotlib webpages, -and I am trying to ``easy_install`` it, but I am getting an error:: +Some users have reported problems with the egg for 0.98 from the +matplotlib download site, with ``easy_install``, getting an error:: > easy_install ./matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg Processing matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg @@ -296,7 +296,7 @@ .. _windows-installers: -Where can I get binary installers for windows? +Binary installers for windows ---------------------------------------------- If you have already installed python, you can use one of the Modified: trunk/matplotlib/doc/faq/troubleshooting_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/troubleshooting_faq.rst 2008年10月17日 16:03:23 UTC (rev 6243) +++ trunk/matplotlib/doc/faq/troubleshooting_faq.rst 2008年10月17日 17:21:56 UTC (rev 6244) @@ -8,7 +8,7 @@ .. _matplotlib-version: -What is my matplotlib version? +Obtaining matplotlib version ============================== To find out your matplotlib version number, import it and print the @@ -21,8 +21,8 @@ .. _locating-matplotlib-install: -Where is matplotlib installed? -============================== +:file:`matplotlib` install location +==================================== You can find what directory matplotlib is installed in by importing it and printing the ``__file__`` attribute:: @@ -33,8 +33,8 @@ .. _locating-matplotlib-config-dir: -Where is my .matplotlib directory? -================================== +:file:`.matplotlib` directory location +======================================== Each user has a :file:`.matplotlib/` directory which may contain a :ref:`matplotlibrc <customizing-with-matplotlibrc-files>` file and various @@ -61,11 +61,11 @@ .. _reporting-problems: -How do I report a problem? +Report a problem ========================== If you are having a problem with matplotlib, search the mailing -lists first: There's a good chance someone else has already run into +lists first: there's a good chance someone else has already run into your problem. If not, please provide the following information in your e-mail to the @@ -128,7 +128,7 @@ .. _svn-trouble: -I am having trouble with a recent svn update, what should I do? +Problems with recent svn versions =============================================================== First make sure you have a clean build and install (see This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6248 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6248&view=rev Author: jdh2358 Date: 2008年10月17日 18:14:01 +0000 (2008年10月17日) Log Message: ----------- moved the screenshots link to the center Modified Paths: -------------- trunk/matplotlib/doc/_templates/index.html trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/api/axes_api.rst trunk/matplotlib/doc/make.py Modified: trunk/matplotlib/doc/_templates/index.html =================================================================== --- trunk/matplotlib/doc/_templates/index.html 2008年10月17日 18:01:18 UTC (rev 6247) +++ trunk/matplotlib/doc/_templates/index.html 2008年10月17日 18:14:01 UTC (rev 6248) @@ -15,10 +15,19 @@ <p>matplotlib tries to make easy things easy and hard things possible. You can generate plots, histograms, power spectra, bar charts, - errorcharts, scatterplots, etc, with just a few lines of code. For - example, to generate 10,000 gaussian random numbers and make a - histogram plot binning the data into 100 bins, you simply need to type</p> + errorcharts, scatterplots, etc, with just a few lines of code. + For a sampling, see the <a href="{{ pathto('users/screenshots') }}">screenshots</a> and +<a href="examples/index.html">examples</a></p> + <p align="center"><a href="{{ pathto('users/screenshots') }}"><img align="middle" + src="{{ pathto('_static/logo_sidebar_horiz.png', 1) }}" border="0" + alt="screenshots"/></a></p> + + + For example, to generate 10,000 gaussian random numbers and make a + histogram plot binning the data into 100 bins, you simply need to + type</p> + <pre> >>> from pylab import randn, hist >>> x = randn(10000) @@ -26,9 +35,8 @@ <p>For the power user, you have full control of line styles, font properties, axes properties, etc, via an object oriented interface - or via a handle graphics interface familiar to Matlab® users.</p> - - <p>The plotting functions in the <a href="api/pyplot_api.html">pyplot</a> + or via a handle graphics interface familiar to Matlab® users. + The plotting functions in the <a href="api/pyplot_api.html">pyplot</a> interface have a high degree of Matlab® compatibility.</p> <h3>Plotting commands</h3> Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月17日 18:01:18 UTC (rev 6247) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月17日 18:14:01 UTC (rev 6248) @@ -28,15 +28,7 @@ <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> -<h3>Screenshots</h3> -<p><a href="{{ pathto('users/screenshots') }}"><img align="middle" -src="{{ pathto('_static/logo_sidebar.png', 1) }}" border="0" -alt="screenshots"/></a></p> - -<p><a href="{{ pathto('users/screenshots') }}">screenshots</a> and -<a href="examples/index.html">examples</a></p> - <h3>Other stuff</h3> <p>The matplotlib <a href="{{ pathto('users/license') }}">license</a> Modified: trunk/matplotlib/doc/api/axes_api.rst =================================================================== --- trunk/matplotlib/doc/api/axes_api.rst 2008年10月17日 18:01:18 UTC (rev 6247) +++ trunk/matplotlib/doc/api/axes_api.rst 2008年10月17日 18:14:01 UTC (rev 6248) @@ -10,3 +10,4 @@ :members: :undoc-members: :show-inheritance: + Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年10月17日 18:01:18 UTC (rev 6247) +++ trunk/matplotlib/doc/make.py 2008年10月17日 18:14:01 UTC (rev 6248) @@ -16,7 +16,7 @@ def sf(): 'push a copy to the sf site' - os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh') + os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude') # we are now doing this in the doc/examples build #os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude --delete') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6250 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6250&view=rev Author: jdh2358 Date: 2008年10月17日 18:51:10 +0000 (2008年10月17日) Log Message: ----------- reorg how to faq Modified Paths: -------------- trunk/matplotlib/doc/faq/howto_faq.rst trunk/matplotlib/doc/make.py Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 18:20:09 UTC (rev 6249) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月17日 18:51:10 UTC (rev 6250) @@ -7,10 +7,15 @@ .. contents:: +.. _howto-plotting: + +Plotting: howto +================= + .. _howto-findobj: Find all objects in figure of a certain type -============================================================= +------------------------------------------------------------- Every matplotlib artist (see :ref:`artist-tutorial`) has a method called :meth:`~matplotlib.artist.Artist.findobj` that can be used to @@ -36,7 +41,7 @@ .. _howto-transparent: Save transparent figures -================================== +---------------------------------- The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument *transparent* which, if True, will make the figure and axes @@ -65,7 +70,7 @@ .. _howto-subplots-adjust: Move the edge of an axes to make room for tick labels -============================================================================ +---------------------------------------------------------------------------- For subplots, you can control the default spacing on the left, right, bottom, and top as well as the horizontal and vertical spacing between @@ -115,7 +120,7 @@ .. _howto-auto-adjust: Automatically make room for tick labels -==================================================== +---------------------------------------------------- In most use cases, it is enough to simpy change the subplots adjust parameters as described in :ref:`howto-subplots-adjust`. But in some @@ -149,7 +154,7 @@ .. _howto-ticks: Configure the tick linewidths -======================================= +--------------------------------------- In matplotlib, the ticks are *markers*. All :class:`~matplotlib.lines.Line2D` objects support a line (solid, @@ -175,7 +180,7 @@ .. _howto-align-label: 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 @@ -189,74 +194,10 @@ .. plot:: align_ylabels.py :include-source: -.. _howto-webapp: - -Matplotlib in a web application server -==================================================== - -Many users report initial problems trying to use maptlotlib in web -application servers, because by default matplotlib ships configured to -work with a graphical user interface which may require an X11 -connection. Since many barebones application servers do not have X11 -enabled, you may get errors if you don't configure matplotlib for use -in these environments. Most importantly, you need to decide what -kinds of images you want to generate (PNG, PDF, SVG) and configure the -appropriate default backend. For 99% of users, this will be the Agg -backend, which uses the C++ `antigrain <http://antigrain.com>`_ -rendering engine to make nice PNGs. The Agg backend is also -configured to recognize requests to generate other output formats -(PDF, PS, EPS, SVG). The easiest way to configure matplotlib to use -Agg is to call:: - - # do this before importing pylab or pyplot - import matplotlib - matplotlib.use('Agg') - import matplotlib.pyplot as plt - -For more on configuring your backend, see -:ref:`what-is-a-backend`. - -Alternatively, you can avoid pylab/pyplot altogeher, which will give -you a little more control, by calling the API directly as shown in -`agg_oo.py <http://matplotlib.sf.net/examples/api/agg_oo.py>`_ . - -You can either generate hardcopy on the filesystem by calling savefig:: - - # do this before importing pylab or pyplot - import matplotlib - matplotlib.use('Agg') - import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot([1,2,3]) - fig.savefig('test.png') - -or by saving to a file handle:: - - import sys - fig.savefig(sys.stdout) - - -matplotlib with apache ------------------------------------- - -TODO - -matplotlib with django ------------------------------------- - -TODO - -matplotlib with zope ----------------------------------- - -TODO - - .. _date-index-plots: Skip dates where there is no data -=========================================== +------------------------------------- When plotting time series, eg financial time series, one often wants to leave out days on which there is no data, eg weekends. By passing @@ -293,7 +234,7 @@ .. _point-in-poly: Test whether a point is inside a polygon -================================================== +------------------------------------------- The :mod:`matplotlib.nxutils` provides two high performance methods: for a single point use :func:`~matplotlib.nxutils.pnpoly` and for an @@ -337,123 +278,12 @@ For a complete example, see :ref:`event_handling-lasso_demo`. - -.. _how-to-submit-patch: - -Submit a patch -======================== - -First obtain a copy of matplotlib svn (see :ref:`install-svn`) and -make your changes to the matplotlib source code or documentation and -apply a `svn diff`. If it is feasible, do your diff from the top -level directory, the one that contains :file:`setup.py`. Eg,:: - - > cd /path/to/matplotlib/source - > svn diff > mypatch.diff - -and then post your patch to the `matplotlib-devel -<http://sourceforge.net/mail/?group_id=80706>`_ mailing list. If you -do not get a response within 24 hours, post your patch to the -sourceforge patch `tracker -<http://sourceforge.net/tracker2/?atid=560722&group_id=80706&func=browse>`_, -and follow up on the mailing list with a link to the sourceforge patch -submissions. If you still do not hear anything within a week (this -shouldn't happen!), send us a kind and gentle reminder on the mailing -list. - -If you have made lots of local changes and do not want to a diff -against the entire tree, but rather against a single directory or -file, that is fine, but we do prefer svn diffs against HEAD. - -You should check out the guide to developing matplotlib to make sure -your patch abides by our coding conventions -:ref:`developers-guide-index`. - - -.. _how-to-contribute-docs: - -Contribute to matplotlib documentation -========================================= - -matplotlib is a big library, which is used in many ways, and the -documentation we have only scratches the surface of everything it can -do. So far, the place most people have learned all these features are -through studying the examples (:ref:`how-to-search-examples`), which is a -recommended and great way to learn, but it would be nice to have more -official narrative documentation guiding people through all the dark -corners. This is where you come in. - -There is a good chance you know more about matplotlib usage in some -areas, the stuff you do every day, than any of the developers. *Just -pulled your hair out compiling matplotlib for windows?* Write a FAQ or -a section for the :ref:`installing` page. *Are you a digital signal -processing wizard?* Write a tutorial on the signal analysis plotting -functions like :func:`~matplotlib.pyplot.xcorr`, -:func:`~matplotlib.pyplot.psd` and -:func:`~matplotlib.pyplot.specgram`. *Do you use matplotlib with -`django <ttp://www.djangoproject.com/>`_ or other popular web -application servers?* Write a FAQ or tutorial and we'll find a place -for it in the :ref:`users-guide-index`. *Bundle matplotlib in a `py2exe -<http://www.py2exe.org/>`_ app?* ... I think you get the idea. - -matplotlib is documented using the `sphinx -<http://sphinx.pocoo.org/index.html>`_ extensions to restructured text -`ReST <http://docutils.sourceforge.net/rst.html>`_. sphinx is a -extensible python framework for documentation projects which generates -HTML and PDF, and is pretty easy to write; you can see the source for this -document or any page on this site by clicking on *Show Source* link -at the end of the page in the sidebar (or `here -<../_sources/faq/howto_faq.txt>`_ for this document). - -The sphinx website is a good resource for learning sphinx, but we have -put together a cheat-sheet at :ref:`documenting-matplotlib` which -shows you how to get started, and outlines the matplotlib conventions -and extensions, eg for including plots directly from external code in -your documents. - -Once your documentation contributions are working (and hopefully -tested by actually *building* the docs) you can submit them as a patch -against svn. See :ref:`install-svn` and :ref:`how-to-submit-patch`. -Looking for something to do? Search for ``TODO`` at :`search`. - - -.. _how-to-search-examples: - -Search examples -========================================= - -The nearly 300 code :ref:`examples-index` included with the matplotlib -source distribution are full-text searchable from the :ref:`search` -page, but sometimes when you search, you get a lot of results from the -:ref:`api-index` or other documentation that you may not be interested in if -you just want to find a complete, free-standing, working piece of -example code. To facilitate example searches, we have tagged every -page with the keyword ``codex`` for *code example* which shouldn't -appear anywhere else on this site except in the FAQ and in every -example. So if you want to search for an example that uses an ellipse, -:ref:`search` for ``codex ellipse``. - - - - -.. _howto-click-maps: - -Clickable images for HTML -========================= - -Andrew Dalke of `Dalke Scientific <http://www.dalkescientific.com>`_ -has written a nice `article -<http://www.dalkescientific.com/writings/diary/archive/2005/04/24/interactive_html.html>`_ -on how to make html click maps with matplotlib agg PNGs. We would -also like to add this functionality to SVG and add a SWF backend to -support these kind of images. If you are interested in contributing -to these efforts that would be great. - .. _howto-set-zorder: Control the depth of plot elements -============================================= +--------------------------------------- + Within an axes, the order that the various lines, markers, text, collections, etc appear is determined by the :meth:`matplotlib.artist.Artist.set_zorder` property. The default @@ -463,8 +293,6 @@ line, = ax.plot(x, y, zorder=10) - - .. htmlonly:: See :ref:`pylab_examples-zorder_demo` for a complete example. @@ -476,7 +304,7 @@ .. _howto-axis-equal: Make the aspect ratio for plots equal -=============================================== +------------------------------------------- The Axes property :meth:`matplotlib.axes.Axes.set_aspect` controls the aspect ratio of the axes. You can set it to be 'auto', 'equal', or @@ -494,7 +322,7 @@ .. _howto-movie: Make a movie -====================== +----------------------------------------------- If you want to take an animated plot and turn it into a movie, the @@ -542,7 +370,7 @@ .. _howto-twoscale: Multiple y-axis scales -================================== +------------------------------- A frequent request is to have two scales for the left and right y-axis, which is possible using :func:`~matplotlib.pyplot.twinx` (more @@ -583,7 +411,7 @@ .. _howto-batch: Generate images without having a window popup -=========================================================== +-------------------------------------------------- The easiest way to do this is use an image backend (see :ref:`what-is-a-backend`) such as Agg (for PNGs), PDF, SVG or PS. In @@ -604,7 +432,7 @@ .. _howto-show Use :func:`~matplotlib.pyplot.show` -===================================================== +------------------------------------------ The user interface backends need to start the GUI mainloop, and this is what :func:`~matplotlib.pyplot.show` does. It tells matplotlib to @@ -656,3 +484,188 @@ though we have made some pregress towards supporting blocking events. +.. _howto-contribute: + +Contributing: howto +===================== + +.. _how-to-submit-patch: + +Submit a patch +----------------- + +First obtain a copy of matplotlib svn (see :ref:`install-svn`) and +make your changes to the matplotlib source code or documentation and +apply a `svn diff`. If it is feasible, do your diff from the top +level directory, the one that contains :file:`setup.py`. Eg,:: + + > cd /path/to/matplotlib/source + > svn diff > mypatch.diff + +and then post your patch to the `matplotlib-devel +<http://sourceforge.net/mail/?group_id=80706>`_ mailing list. If you +do not get a response within 24 hours, post your patch to the +sourceforge patch `tracker +<http://sourceforge.net/tracker2/?atid=560722&group_id=80706&func=browse>`_, +and follow up on the mailing list with a link to the sourceforge patch +submissions. If you still do not hear anything within a week (this +shouldn't happen!), send us a kind and gentle reminder on the mailing +list. + +If you have made lots of local changes and do not want to a diff +against the entire tree, but rather against a single directory or +file, that is fine, but we do prefer svn diffs against HEAD. + +You should check out the guide to developing matplotlib to make sure +your patch abides by our coding conventions +:ref:`developers-guide-index`. + + +.. _how-to-contribute-docs: + +Contribute to matplotlib documentation +----------------------------------------- + +matplotlib is a big library, which is used in many ways, and the +documentation we have only scratches the surface of everything it can +do. So far, the place most people have learned all these features are +through studying the examples (:ref:`how-to-search-examples`), which is a +recommended and great way to learn, but it would be nice to have more +official narrative documentation guiding people through all the dark +corners. This is where you come in. + +There is a good chance you know more about matplotlib usage in some +areas, the stuff you do every day, than many of the core developers +who write most of the documentation. Just pulled your hair out +compiling matplotlib for windows? Write a FAQ or a section for the +:ref:`installing` page. Are you a digital signal processing wizard? +Write a tutorial on the signal analysis plotting functions like +:func:`~matplotlib.pyplot.xcorr`, :func:`~matplotlib.pyplot.psd` and +:func:`~matplotlib.pyplot.specgram`. Do you use matplotlib with +`django <http://www.djangoproject.com>`_ or other popular web +application servers? Write a FAQ or tutorial and we'll find a place +for it in the :ref:`users-guide-index`. Bundle matplotlib in a +`py2exe <http://www.py2exe.org/>`_ app? ... I think you get the idea. + +matplotlib is documented using the `sphinx +<http://sphinx.pocoo.org/index.html>`_ extensions to restructured text +`ReST <http://docutils.sourceforge.net/rst.html>`_. sphinx is a +extensible python framework for documentation projects which generates +HTML and PDF, and is pretty easy to write; you can see the source for this +document or any page on this site by clicking on *Show Source* link +at the end of the page in the sidebar (or `here +<../_sources/faq/howto_faq.txt>`_ for this document). + +The sphinx website is a good resource for learning sphinx, but we have +put together a cheat-sheet at :ref:`documenting-matplotlib` which +shows you how to get started, and outlines the matplotlib conventions +and extensions, eg for including plots directly from external code in +your documents. + +Once your documentation contributions are working (and hopefully +tested by actually *building* the docs) you can submit them as a patch +against svn. See :ref:`install-svn` and :ref:`how-to-submit-patch`. +Looking for something to do? Search for `TODO <../search.html?q=todo>`_. + + + + +.. _howto-webapp: + +Matplotlib in a web application server +==================================================== + +Many users report initial problems trying to use maptlotlib in web +application servers, because by default matplotlib ships configured to +work with a graphical user interface which may require an X11 +connection. Since many barebones application servers do not have X11 +enabled, you may get errors if you don't configure matplotlib for use +in these environments. Most importantly, you need to decide what +kinds of images you want to generate (PNG, PDF, SVG) and configure the +appropriate default backend. For 99% of users, this will be the Agg +backend, which uses the C++ `antigrain <http://antigrain.com>`_ +rendering engine to make nice PNGs. The Agg backend is also +configured to recognize requests to generate other output formats +(PDF, PS, EPS, SVG). The easiest way to configure matplotlib to use +Agg is to call:: + + # do this before importing pylab or pyplot + import matplotlib + matplotlib.use('Agg') + import matplotlib.pyplot as plt + +For more on configuring your backend, see +:ref:`what-is-a-backend`. + +Alternatively, you can avoid pylab/pyplot altogeher, which will give +you a little more control, by calling the API directly as shown in +`agg_oo.py <http://matplotlib.sf.net/examples/api/agg_oo.py>`_ . + +You can either generate hardcopy on the filesystem by calling savefig:: + + # do this before importing pylab or pyplot + import matplotlib + matplotlib.use('Agg') + import matplotlib.pyplot as plt + fig = plt.figure() + ax = fig.add_subplot(111) + ax.plot([1,2,3]) + fig.savefig('test.png') + +or by saving to a file handle:: + + import sys + fig.savefig(sys.stdout) + + +matplotlib with apache +------------------------------------ + +TODO; see :ref:`how-to-contribute-docs`. + +matplotlib with django +------------------------------------ + +TODO; see :ref:`how-to-contribute-docs`. + +matplotlib with zope +---------------------------------- + +TODO; see :ref:`how-to-contribute-docs`. + +.. _howto-click-maps: + +Clickable images for HTML +------------------------- + +Andrew Dalke of `Dalke Scientific <http://www.dalkescientific.com>`_ +has written a nice `article +<http://www.dalkescientific.com/writings/diary/archive/2005/04/24/interactive_html.html>`_ +on how to make html click maps with matplotlib agg PNGs. We would +also like to add this functionality to SVG and add a SWF backend to +support these kind of images. If you are interested in contributing +to these efforts that would be great. + + +.. _how-to-search-examples: + +Search examples +========================================= + +The nearly 300 code :ref:`examples-index` included with the matplotlib +source distribution are full-text searchable from the :ref:`search` +page, but sometimes when you search, you get a lot of results from the +:ref:`api-index` or other documentation that you may not be interested in if +you just want to find a complete, free-standing, working piece of +example code. To facilitate example searches, we have tagged every +page with the keyword ``codex`` for *code example* which shouldn't +appear anywhere else on this site except in the FAQ and in every +example. So if you want to search for an example that uses an ellipse, +:ref:`search` for ``codex ellipse``. + + + + + + + Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年10月17日 18:20:09 UTC (rev 6249) +++ trunk/matplotlib/doc/make.py 2008年10月17日 18:51:10 UTC (rev 6250) @@ -27,13 +27,14 @@ def figs(): os.system('cd users/figures/ && python make.py') +def examples(): + 'make the rest examples' + os.system('cd examples; svn-clean; python gen_rst.py') + def html(): check_build() - # build the literal include examples for searchable examples - os.system('cd examples; python gen_rst.py') - - - + if not os.path.exists('examples/index.rst'): + examples() #figs() if os.system('sphinx-build -b html -d build/doctrees . build/html'): raise SystemExit("Building HTML failed.") @@ -67,13 +68,11 @@ print 'latex build has not been tested on windows' def clean(): - if os.path.exists('build'): - shutil.rmtree('build') - for fname in glob.glob('pyplots/*.png') + glob.glob('pyplots/*.pdf'): - os.remove(fname) + os.system('svn-clean') def all(): #figs() + examples() html() latex() @@ -84,6 +83,7 @@ 'clean':clean, 'sf':sf, 'sfpdf':sfpdf, + 'examples':examples, 'all':all, } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6279 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6279&view=rev Author: jdh2358 Date: 2008年10月19日 20:35:21 +0000 (2008年10月19日) Log Message: ----------- fixed np clip bug and some other cleanup Modified Paths: -------------- trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/examples/gen_rst.py Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月19日 19:52:38 UTC (rev 6278) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年10月19日 20:35:21 UTC (rev 6279) @@ -11,6 +11,9 @@ and mapping toolkit <a href="http://matplotlib.sf.net/basemap/doc/html">basemap</a>.</p> +<p>Please <a href=https://sourceforge.net/my/donations.php>donate</a> +to support matplotlib development</p> + <h3>Need help?</h3> <p>Check the <a href="{{ pathto('users/index') }}">user</a> guide, Modified: trunk/matplotlib/doc/examples/gen_rst.py =================================================================== --- trunk/matplotlib/doc/examples/gen_rst.py 2008年10月19日 19:52:38 UTC (rev 6278) +++ trunk/matplotlib/doc/examples/gen_rst.py 2008年10月19日 20:35:21 UTC (rev 6279) @@ -15,6 +15,11 @@ """ Returns True if derivative is out-of-date wrt original, both of which are full file paths. + + TODO: this check isn't adequate in some cases. Eg, if we discover + a bug when building the examples, the original and erivederived + will be unchanged but we still want to fource a rebuild. We can + manually remove from _static, but we may need another solution """ return (not os.path.exists(derived) or os.stat(derived).st_mtime < os.stat(original).st_mtime) @@ -135,7 +140,7 @@ contents = '\n'.join([' %s'%row.rstrip() for row in contents.split('\n')]) fh.write(contents) - fh.write('\n\nKeyword: codex (see :ref:`how-to-search-examples`)') + fh.write('\n\nKeywords: codex (see :ref:`how-to-search-examples`), python, matplotlib, pylab') fh.close() fhsubdirIndex.close() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6309 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6309&view=rev Author: jdh2358 Date: 2008年10月23日 16:10:59 +0000 (2008年10月23日) Log Message: ----------- fixed pyplot tutorial error Modified Paths: -------------- trunk/matplotlib/doc/_templates/gallery.html trunk/matplotlib/doc/devel/documenting_mpl.rst trunk/matplotlib/doc/faq/howto_faq.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst Modified: trunk/matplotlib/doc/_templates/gallery.html =================================================================== --- trunk/matplotlib/doc/_templates/gallery.html 2008年10月23日 15:46:27 UTC (rev 6308) +++ trunk/matplotlib/doc/_templates/gallery.html 2008年10月23日 16:10:59 UTC (rev 6309) @@ -5,7 +5,7 @@ {% block body %} <h3>Click on any image to see full size image and source code</h3> -<br> +<br/> <a href="examples/api/barchart_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/barchart_demo.png" border="0" alt="barchart_demo"/></a> Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst =================================================================== --- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年10月23日 15:46:27 UTC (rev 6308) +++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年10月23日 16:10:59 UTC (rev 6309) @@ -8,9 +8,8 @@ =============== The documentation for matplotlib is generated from ReStructured Text -using the Sphinx_ documentation generation tool. Sphinx-0.4 or later -is required. Currently this means we need to install from the svn -repository by doing:: +using the Sphinx_ documentation generation tool. Sphinx-0.5 or later +is required. Most developers work from the sphinx subversion repository because it is a rapidly evolving project:: svn co http://svn.python.org/projects/doctools/trunk sphinx cd sphinx Modified: trunk/matplotlib/doc/faq/howto_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月23日 15:46:27 UTC (rev 6308) +++ trunk/matplotlib/doc/faq/howto_faq.rst 2008年10月23日 16:10:59 UTC (rev 6309) @@ -332,14 +332,13 @@ which is part of the `mplayer <http://www.mplayerhq.hu>`_ suite for this:: - #fps (frames per second) controls the play speed mencoder 'mf://*.png' -mf type=png:fps=10 -ovc \\ lavc -lavcopts vcodec=wmv2 -oac copy -o animation.avi The swiss army knife of image tools, ImageMagick's `convert <http://www.imagemagick.org/script/convert.php>`_ works for this as -well.<p> +well. Here is a simple example script that saves some PNGs, makes them into a movie, and then cleans up:: @@ -617,7 +616,15 @@ import sys fig.savefig(sys.stdout) +Here is an example using the Python Imaging Library PIL. First the figure is saved to a StringIO objectm which is then fed to PIL for further processing:: + import StringIO, Image + imgdata = StringIO.StringIO() + fig.savefig(imgdata, format='png') + imgdata.seek(0) # rewind the data + im = Image.open(imgdata) + + matplotlib with apache ------------------------------------ Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年10月23日 15:46:27 UTC (rev 6308) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年10月23日 16:10:59 UTC (rev 6309) @@ -15,13 +15,13 @@ .. plot:: pyplots/pyplot_simple.py :include-source: -You may be wondering why the x-axis ranges from 0-3 and the y-axis -from 1-4. If you provide a single list or array to the +You may be wondering why the x-axis ranges from 0-2 and the y-axis +from 1-3. If you provide a single list or array to the :func:`~matplotlib.pyplot.plot` command, matplotlib assumes it a sequence of y values, and automatically generates the x values for you. Since python ranges start with 0, the default x vector has the same length as y but starts with 0. Hence the x data are -``[0,1,2,3]``. +``[0,1,2]``. :func:`~matplotlib.pyplot.plot` is a versatile command, and will take an arbitrary number of arguments. For example, to plot x versus y, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6337 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6337&view=rev Author: jdh2358 Date: 2008年10月27日 18:04:58 +0000 (2008年10月27日) Log Message: ----------- fixed navigation table Modified Paths: -------------- trunk/matplotlib/doc/_templates/gallery.html trunk/matplotlib/doc/api/pyplot_api.rst trunk/matplotlib/doc/users/navigation_toolbar.rst Modified: trunk/matplotlib/doc/_templates/gallery.html =================================================================== --- trunk/matplotlib/doc/_templates/gallery.html 2008年10月26日 14:33:36 UTC (rev 6336) +++ trunk/matplotlib/doc/_templates/gallery.html 2008年10月27日 18:04:58 UTC (rev 6337) @@ -267,6 +267,8 @@ <a href="examples/pylab_examples/hline_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png" border="0" alt="hline_demo"/></a> +<a href="examples/pylab_examples/image_clip_path.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_clip_path.png" border="0" alt="image_clip_path"/></a> + <a href="examples/pylab_examples/image_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo.png" border="0" alt="image_demo"/></a> <a href="examples/pylab_examples/image_demo2.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo2.png" border="0" alt="image_demo2"/></a> Modified: trunk/matplotlib/doc/api/pyplot_api.rst =================================================================== --- trunk/matplotlib/doc/api/pyplot_api.rst 2008年10月26日 14:33:36 UTC (rev 6336) +++ trunk/matplotlib/doc/api/pyplot_api.rst 2008年10月27日 18:04:58 UTC (rev 6337) @@ -1,8 +1,8 @@ ***************** matplotlib pyplot ***************** + - :mod:`matplotlib.pyplot` ======================== Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst =================================================================== --- trunk/matplotlib/doc/users/navigation_toolbar.rst 2008年10月26日 14:33:36 UTC (rev 6336) +++ trunk/matplotlib/doc/users/navigation_toolbar.rst 2008年10月27日 18:04:58 UTC (rev 6337) @@ -79,9 +79,9 @@ Navigation Keyboard Shortcuts ----------------------------- -================================== ===================== +================================== ============================================== Command Keyboard Shortcut(s) -================================== ===================== +================================== ============================================== Home/Reset **h** or **r** or **home** Back **c** or **left arrow** or **backspace** Forward **v** or **right arrow** @@ -89,16 +89,12 @@ Zoom-to-rect **o** Save **s** Toggle fullscreen **f** ----------------------------------- --------------------- -**Pan/Zoom mode only** -- constrain pan/zoom to x axis hold **x** -- constrain pan/zoom to y axis hold **y** -- preserve aspect ratio hold **CONTROL** ----------------------------------- --------------------- -**In axes only** -- Toggle grid **g** -- Toggle y axis scale (log/linear) **l** -================================== ===================== +Constrain pan/zoom to x axis hold **x** +Constrain pan/zoom to y axis hold **y** +Preserve aspect ratio hold **CONTROL** +Toggle grid **g** +Toggle y axis scale (log/linear) **l** +================================== ============================================== If you are using :mod:`matplotlib.pyplot` the toolbar will be created automatically for every figure. If you are writing your own user This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6416 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6416&view=rev Author: jdh2358 Date: 2008年11月19日 14:51:30 +0000 (2008年11月19日) Log Message: ----------- added new links to sidebar Modified Paths: -------------- trunk/matplotlib/doc/_templates/gallery.html trunk/matplotlib/doc/_templates/indexsidebar.html trunk/matplotlib/doc/make.py trunk/matplotlib/doc/users/index.rst Modified: trunk/matplotlib/doc/_templates/gallery.html =================================================================== --- trunk/matplotlib/doc/_templates/gallery.html 2008年11月19日 14:45:44 UTC (rev 6415) +++ trunk/matplotlib/doc/_templates/gallery.html 2008年11月19日 14:51:30 UTC (rev 6416) @@ -125,6 +125,10 @@ <a href="examples/pylab_examples/color_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png" border="0" alt="color_demo"/></a> +<a href="examples/pylab_examples/colorbar_tick_labelling_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_00.png" border="0" alt="colorbar_tick_labelling_demo"/></a> + +<a href="examples/pylab_examples/colorbar_tick_labelling_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_01.png" border="0" alt="colorbar_tick_labelling_demo"/></a> + <a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_00.png" border="0" alt="contour_demo"/></a> <a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png" border="0" alt="contour_demo"/></a> @@ -159,6 +163,8 @@ <a href="examples/pylab_examples/customize_rc.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/customize_rc.png" border="0" alt="customize_rc"/></a> +<a href="examples/pylab_examples/dannys_example.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png" border="0" alt="dannys_example"/></a> + <a href="examples/pylab_examples/dash_control.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png" border="0" alt="dash_control"/></a> <a href="examples/pylab_examples/dashpointlabel.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/dashpointlabel.png" border="0" alt="dashpointlabel"/></a> @@ -239,6 +245,8 @@ <a href="examples/pylab_examples/ganged_plots.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/ganged_plots.png" border="0" alt="ganged_plots"/></a> +<a href="examples/pylab_examples/geo_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/geo_demo.png" border="0" alt="geo_demo"/></a> + <a href="examples/pylab_examples/gradient_bar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/gradient_bar.png" border="0" alt="gradient_bar"/></a> <a href="examples/pylab_examples/griddata_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo.png" border="0" alt="griddata_demo"/></a> @@ -453,6 +461,8 @@ <a href="examples/pylab_examples/step_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/step_demo.png" border="0" alt="step_demo"/></a> +<a href="examples/pylab_examples/stix_fonts_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png" border="0" alt="stix_fonts_demo"/></a> + <a href="examples/pylab_examples/subplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_demo.png" border="0" alt="subplot_demo"/></a> <a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_00.png" border="0" alt="subplot_toolbar"/></a> @@ -461,12 +471,18 @@ <a href="examples/pylab_examples/subplots_adjust.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_adjust.png" border="0" alt="subplots_adjust"/></a> +<a href="examples/pylab_examples/symlog_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/symlog_demo.png" border="0" alt="symlog_demo"/></a> + <a href="examples/pylab_examples/table_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/table_demo.png" border="0" alt="table_demo"/></a> +<a href="examples/pylab_examples/tex_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_demo.png" border="0" alt="tex_demo"/></a> + <a href="examples/pylab_examples/text_handles.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/text_handles.png" border="0" alt="text_handles"/></a> <a href="examples/pylab_examples/text_rotation.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation.png" border="0" alt="text_rotation"/></a> +<a href="examples/pylab_examples/text_rotation_relative_to_line.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation_relative_to_line.png" border="0" alt="text_rotation_relative_to_line"/></a> + <a href="examples/pylab_examples/text_themes.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png" border="0" alt="text_themes"/></a> <a href="examples/pylab_examples/to_numeric.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png" border="0" alt="to_numeric"/></a> @@ -477,6 +493,8 @@ <a href="examples/pylab_examples/unicode_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png" border="0" alt="unicode_demo"/></a> +<a href="examples/pylab_examples/usetex_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_demo.png" border="0" alt="usetex_demo"/></a> + <a href="examples/pylab_examples/vertical_ticklabels.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png" border="0" alt="vertical_ticklabels"/></a> <a href="examples/pylab_examples/vline_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png" border="0" alt="vline_demo"/></a> Modified: trunk/matplotlib/doc/_templates/indexsidebar.html =================================================================== --- trunk/matplotlib/doc/_templates/indexsidebar.html 2008年11月19日 14:45:44 UTC (rev 6415) +++ trunk/matplotlib/doc/_templates/indexsidebar.html 2008年11月19日 14:51:30 UTC (rev 6416) @@ -31,6 +31,12 @@ <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p> +<p>For details on what's new, see the detailed <a href="{{ +pathto('_static/CHANGELOG', 1) }}">changelog</a>. Anything that could +required changes to your existing codes is logged in the <a href="{{ +pathto('_static/API_CHANGES', 1) }}">api changes</a> file. And if you +are migrating from 0.91 to 0.98, also see the <a href="{{ +pathto('_static/MIGRATION.txt', 1) }}">migration</a> file.</p> <h3>Other stuff</h3> Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年11月19日 14:45:44 UTC (rev 6415) +++ trunk/matplotlib/doc/make.py 2008年11月19日 14:51:30 UTC (rev 6416) @@ -16,6 +16,10 @@ def sf(): 'push a copy to the sf site' + shutil.copy('../CHANGELOG', 'build/html/_static/CHANGELOG') + shutil.copy('../API_CHANGES', 'build/html/_static/API_CHANGES') + shutil.copy('../MIGRATION.txt', 'build/html/_static/MIGRATION.txt') + os.system('cd build/html; rsync -avz . jdh2358,mat...@we...:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude') def sfpdf(): Modified: trunk/matplotlib/doc/users/index.rst =================================================================== --- trunk/matplotlib/doc/users/index.rst 2008年11月19日 14:45:44 UTC (rev 6415) +++ trunk/matplotlib/doc/users/index.rst 2008年11月19日 14:51:30 UTC (rev 6416) @@ -28,3 +28,4 @@ credits.rst + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6533 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6533&view=rev Author: jdh2358 Date: 2008年12月09日 04:39:50 +0000 (2008年12月09日) Log Message: ----------- fixed links in artist tut Modified Paths: -------------- trunk/matplotlib/doc/api/artist_api.rst trunk/matplotlib/doc/users/artists.rst trunk/matplotlib/doc/users/installing.rst Modified: trunk/matplotlib/doc/api/artist_api.rst =================================================================== --- trunk/matplotlib/doc/api/artist_api.rst 2008年12月09日 04:12:34 UTC (rev 6532) +++ trunk/matplotlib/doc/api/artist_api.rst 2008年12月09日 04:39:50 UTC (rev 6533) @@ -1,3 +1,5 @@ +.. _artist-api: + ******************* matplotlib artists ******************* Modified: trunk/matplotlib/doc/users/artists.rst =================================================================== --- trunk/matplotlib/doc/users/artists.rst 2008年12月09日 04:12:34 UTC (rev 6532) +++ trunk/matplotlib/doc/users/artists.rst 2008年12月09日 04:39:50 UTC (rev 6533) @@ -230,10 +230,8 @@ .. TODO: Update these URLs The docstrings for all of the classes also contain the ``Artist`` -properties, so you can consult the interactive "help", the online html -docs at http://matplotlib.sourceforge.net/classdocs.html or PDF documentation -at http://matplotlib.sourceforge.net/api.pdf for a listing of -properties for a give object. +properties, so you can consult the interactive "help" or the +:ref:`artist-api` for a listing of properties for a given object. .. _object-containers: Modified: trunk/matplotlib/doc/users/installing.rst =================================================================== --- trunk/matplotlib/doc/users/installing.rst 2008年12月09日 04:12:34 UTC (rev 6532) +++ trunk/matplotlib/doc/users/installing.rst 2008年12月09日 04:39:50 UTC (rev 6533) @@ -98,7 +98,7 @@ python setup.py install We provide a `setup.cfg -<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/setup.cfg.template?view=markup>` +<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/setup.cfg.template?view=markup>`_ file that lives along :file:`setup.py` which you can use to customize the build process, for example, which default backend to use, whether some of the optional libraries that matplotlib ships with are This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.