Revision: 6225 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6225&view=rev Author: jdh2358 Date: 2008-10-16 18:51:51 +0000 (Thu, 16 Oct 2008)
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,[EMAIL PROTECTED]:/home/groups/m/ma/matplotlib/htdocs/ -essh') + os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,[EMAIL PROTECTED]:/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 [EMAIL PROTECTED]:/home/groups/m/ma/matplotlib/htdocs/') + os.system('cd build/latex; scp Matplotlib.pdf jdh2358,[EMAIL PROTECTED]:/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. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins