You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
(6) |
2
(17) |
3
(11) |
4
(12) |
5
(16) |
6
(6) |
7
(5) |
8
(8) |
9
(24) |
10
(15) |
11
(12) |
12
(22) |
13
(30) |
14
(16) |
15
(6) |
16
(15) |
17
(20) |
18
(4) |
19
(11) |
20
(16) |
21
(2) |
22
(17) |
23
(16) |
24
(18) |
25
(4) |
26
(9) |
27
(12) |
28
(2) |
29
|
30
(4) |
|
|
|
|
|
Revision: 5529 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5529&view=rev Author: dsdale Date: 2008年06月13日 15:32:59 -0700 (2008年6月13日) Log Message: ----------- updated environment_variables_faq Modified Paths: -------------- trunk/matplotlib/doc/faq/environment_variables_faq.rst Modified: trunk/matplotlib/doc/faq/environment_variables_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008年06月13日 22:06:45 UTC (rev 5528) +++ trunk/matplotlib/doc/faq/environment_variables_faq.rst 2008年06月13日 22:32:59 UTC (rev 5529) @@ -33,8 +33,9 @@ echo $PYTHONPATH The procedure for setting environment variables in depends on what your default -shell is. BASH seems to be the most common, but CSH is also common. You -should be able to determine which by running at the command prompt:: +shell is. :program:`BASH` seems to be the most common, but :program:`CSH` is +also common. You should be able to determine which by running at the command +prompt:: echo $SHELL @@ -84,6 +85,7 @@ Setting environment variables in windows ======================================== -Go to the Windows start menu, select `Control Panel`, then select the `System` -icon, click the `Advanced` tab, and select the `Environment Variables` -button. You can edit or add to the `user variables`. +Open the :program:`Control Panel` (:menuselection:`Start --> Control Panel`), +start the :program:`System` program. Click the :guilabel:`Advanced` tab +and select the :guilabel:`Environment Variables` button. You can edit or add to +the :guilabel:`User Variables`. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5528 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5528&view=rev Author: jswhit Date: 2008年06月13日 15:06:45 -0700 (2008年6月13日) Log Message: ----------- improved docs Modified Paths: -------------- trunk/toolkits/basemap/Changelog Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2008年06月13日 22:05:27 UTC (rev 5527) +++ trunk/toolkits/basemap/Changelog 2008年06月13日 22:06:45 UTC (rev 5528) @@ -1,3 +1,4 @@ + * improved documentation using Sphinx/docutils. * change default behaviour of num2date and date2num to be the same as matplotlib counterparts. version 0.99 (svn revision 5344) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5527 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5527&view=rev Author: dsdale Date: 2008年06月13日 15:05:27 -0700 (2008年6月13日) Log Message: ----------- use htmlonly directive to cleanup a few items in the pdf document: link to pdf download release, date and comment at beginning of each part which was poorly formatted and somewhat redundant in the pdf document Modified Paths: -------------- trunk/matplotlib/doc/api/index.rst trunk/matplotlib/doc/conf.py trunk/matplotlib/doc/devel/index.rst trunk/matplotlib/doc/faq/index.rst trunk/matplotlib/doc/index.rst trunk/matplotlib/doc/users/index.rst Modified: trunk/matplotlib/doc/api/index.rst =================================================================== --- trunk/matplotlib/doc/api/index.rst 2008年06月13日 21:34:10 UTC (rev 5526) +++ trunk/matplotlib/doc/api/index.rst 2008年06月13日 22:05:27 UTC (rev 5527) @@ -4,9 +4,11 @@ The Matplotlib API #################### -:Release: |version| -:Date: |today| +.. htmlonly:: + :Release: |version| + :Date: |today| + .. toctree:: matplotlib_configuration_api.rst Modified: trunk/matplotlib/doc/conf.py =================================================================== --- trunk/matplotlib/doc/conf.py 2008年06月13日 21:34:10 UTC (rev 5526) +++ trunk/matplotlib/doc/conf.py 2008年06月13日 22:05:27 UTC (rev 5527) @@ -49,7 +49,7 @@ # The short X.Y version. version = '0.98' # The full version, including alpha/beta/rc tags. -release = '0.98pre' +release = '0.98' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: Modified: trunk/matplotlib/doc/devel/index.rst =================================================================== --- trunk/matplotlib/doc/devel/index.rst 2008年06月13日 21:34:10 UTC (rev 5526) +++ trunk/matplotlib/doc/devel/index.rst 2008年06月13日 22:05:27 UTC (rev 5527) @@ -4,9 +4,11 @@ The Matplotlib Developers's Guide ################################### -:Release: |version| -:Date: |today| +.. htmlonly:: + :Release: |version| + :Date: |today| + .. toctree:: :maxdepth: 2 Modified: trunk/matplotlib/doc/faq/index.rst =================================================================== --- trunk/matplotlib/doc/faq/index.rst 2008年06月13日 21:34:10 UTC (rev 5526) +++ trunk/matplotlib/doc/faq/index.rst 2008年06月13日 22:05:27 UTC (rev 5527) @@ -4,11 +4,13 @@ The Matplotlib FAQ #################### -:Release: |version| -:Date: |today| +.. htmlonly:: -Frequently asked questions about matplotlib + :Release: |version| + :Date: |today| + Frequently asked questions about matplotlib + .. toctree:: :maxdepth: 2 Modified: trunk/matplotlib/doc/index.rst =================================================================== --- trunk/matplotlib/doc/index.rst 2008年06月13日 21:34:10 UTC (rev 5526) +++ trunk/matplotlib/doc/index.rst 2008年06月13日 22:05:27 UTC (rev 5527) @@ -5,10 +5,13 @@ Welcome to matplotlib's documentation! ====================================== -Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_ +.. htmlonly:: -Contents: + :Release: |version| + :Date: |today| + Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_ + .. toctree:: :maxdepth: 2 Modified: trunk/matplotlib/doc/users/index.rst =================================================================== --- trunk/matplotlib/doc/users/index.rst 2008年06月13日 21:34:10 UTC (rev 5526) +++ trunk/matplotlib/doc/users/index.rst 2008年06月13日 22:05:27 UTC (rev 5527) @@ -4,9 +4,11 @@ The Matplotlib User's Guide ############################# -:Release: |version| -:Date: |today| +.. htmlonly:: + :Release: |version| + :Date: |today| + .. toctree:: :maxdepth: 2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5526 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5526&view=rev Author: dsdale Date: 2008年06月13日 14:34:10 -0700 (2008年6月13日) Log Message: ----------- updated doc outline.rst Modified Paths: -------------- trunk/matplotlib/doc/devel/outline.rst Modified: trunk/matplotlib/doc/devel/outline.rst =================================================================== --- trunk/matplotlib/doc/devel/outline.rst 2008年06月13日 21:27:56 UTC (rev 5525) +++ trunk/matplotlib/doc/devel/outline.rst 2008年06月13日 21:34:10 UTC (rev 5526) @@ -61,7 +61,7 @@ the canvas John has author ? the artist John has author ? transforms Michael submitted John -documenting mpl Darren submitted ? +documenting mpl Darren submitted John, Eric, Mike? coding guide John in review Eric and_much_more ? ? ? =============================== ==================== =========== =================== @@ -238,67 +238,3 @@ explanation of your BSD choice. Peripheral question: is there any problem with basemap's inclusion of sub-packages with the gamut of licenses, GPL to MIT? - - -usetex user's guide-- reviewed by JDH -------------------------------------- - -Review of :ref:`usetex-tutorial`: - -#. DONE - In the section on the ps distiller, you might mention that it is the - rasterization which some users find objectionable, and the distiller pram - (eg 6000) is a dpi setting for the rasterizer. Not everyone will - immediately grasp the controversy surrounding dumping high res bitmaps into - a ps file. - -#. DONE - ``= Possible Hangups =`` - this is moin, not rest. I have - fixed this already, just wanted to point it out. Also, for everything but - top level chapters, I refer ``Upper lower`` for section titles, eg - ``Possible hangups``. - -#. DONE - in the troubleshooting section, could you add a FAQ showing how to - find their .matplotlib dir (matplotlib.get_data_path) and link to - it. - - I think you mean mpl.get_configdir. I added this to the faq/HOWTO, and - linked to it from usetex.rst and customizing.rst. I also added the - MPLCONFIGDIR environment variable to environment_variables_faq.rst. - - DONE - Also link to the PATH var and properly format - ``text.latex.preample``. - - DONE - For the dirs, do we want `tex.cache` or - ``tex.cache``? I've been using the latter. We could use rest - specific markup for files and dirs, but I've been resisting goin - whle hog onthe markup... But we may eventually decide that is the - better choice. - - I think we should use the directive provided by sphinx:: - - :file:`tex.cache` - - I don't think that looks too ugly in ascii, its clear what it means. If you - don't like it, I think we should use:: - - ``tex.cache`` - - which is formatted most - similarly to the :file: directive in html. Let me know if you don't want to - use the file directive. - - - JDH: let's go with the file directive. - -#. DONE - try and use internal reference links for every section and be - generous with the sections. Eg, I added a section headers and - internal linka for the postscript and unicode sections (we will - want to be able to refer people to these easily from FAQs and mail - list posts, etc):: - - .. _usetex-postscript: - - Postscript options - ================== - -Looks good! - -Thanks! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5525 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5525&view=rev Author: dsdale Date: 2008年06月13日 14:27:56 -0700 (2008年6月13日) Log Message: ----------- minor formatting changes in documentation Modified Paths: -------------- trunk/matplotlib/doc/api/matplotlib_configuration_api.rst trunk/matplotlib/doc/api/pyplot_api.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst Modified: trunk/matplotlib/doc/api/matplotlib_configuration_api.rst =================================================================== --- trunk/matplotlib/doc/api/matplotlib_configuration_api.rst 2008年06月13日 20:54:18 UTC (rev 5524) +++ trunk/matplotlib/doc/api/matplotlib_configuration_api.rst 2008年06月13日 21:27:56 UTC (rev 5525) @@ -17,7 +17,7 @@ :mod:`matplotlib.rcsetup` -============================= +========================= .. automodule:: matplotlib.rcsetup :members: Modified: trunk/matplotlib/doc/api/pyplot_api.rst =================================================================== --- trunk/matplotlib/doc/api/pyplot_api.rst 2008年06月13日 20:54:18 UTC (rev 5524) +++ trunk/matplotlib/doc/api/pyplot_api.rst 2008年06月13日 21:27:56 UTC (rev 5525) @@ -4,7 +4,7 @@ :mod:`matplotlib.pyplot` -============================= +======================== .. automodule:: matplotlib.pyplot :members: Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 20:54:18 UTC (rev 5524) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 21:27:56 UTC (rev 5525) @@ -213,7 +213,7 @@ The :func:`~matplotlib.pyplot.text` command can be used to add text in an arbitrary location, and the :func:`~matplotlib.pyplot.xlabel`, :func:`~matplotlib.pyplot.ylabel` and :func:`~matplotlib.pyplot.title` -are used tox add text in the indicated locations (see :ref:`text-intro` +are used to add text in the indicated locations (see :ref:`text-intro` for a more detailed example) .. plot:: pyplot_text.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5524 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5524&view=rev Author: jdh2358 Date: 2008年06月13日 13:54:18 -0700 (2008年6月13日) Log Message: ----------- tried some svg and ps extensions but bailing for now because of usetex issues Modified Paths: -------------- trunk/matplotlib/Makefile trunk/matplotlib/doc/sphinxext/plot_directive.py trunk/matplotlib/doc/users/customizing.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst Modified: trunk/matplotlib/Makefile =================================================================== --- trunk/matplotlib/Makefile 2008年06月13日 20:40:36 UTC (rev 5523) +++ trunk/matplotlib/Makefile 2008年06月13日 20:54:18 UTC (rev 5524) @@ -37,7 +37,9 @@ python setup.py install --prefix=~/dev;\ cd doc;\ rm -rf build;\ - python make.py clean html latex sf; + python make.py clean;\ + svn up;\ + python make.py html latex sf; Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 20:40:36 UTC (rev 5523) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 20:54:18 UTC (rev 5524) @@ -45,7 +45,7 @@ [ `<../%(srcdir)s/%(reference)s>`__, `png <../%(srcdir)s/%(basename)s.hires.png>`__, - `pdf <../%(srcdir)s/%(basename)s.pdf>`__ ] + `pdf <../%(srcdir)s/%(basename)s.pdf>`__] .. image:: ../%(srcdir)s/%(basename)s.png %(options)s @@ -64,7 +64,7 @@ [ `py <../%(srcdir)s/%(reference)s>`__, `png <../%(srcdir)s/%(basename)s.hires.png>`__, - `pdf <../%(srcdir)s/%(basename)s.pdf>`__ ] + `pdf <../%(srcdir)s/%(basename)s.pdf>`__] .. image:: ../%(srcdir)s/%(basename)s.png %(options)s @@ -83,7 +83,8 @@ fullpath = str(fullpath) # todo, why is unicode breaking this formats = [('png', 100), ('hires.png', 200), - ('pdf', 72)] + ('pdf', 72), + ] basedir, fname = os.path.split(fullpath) basename, ext = os.path.splitext(fname) @@ -105,8 +106,10 @@ mplshell.magic_run(fullpath) for format, dpi in formats: outname = os.path.join(outdir, '%s.%s' % (basename, format)) + if os.path.exists(outname): continue plt.savefig(outname, dpi=dpi) + def run(arguments, options, state_machine, lineno): reference = directives.uri(arguments[0]) basename, ext = os.path.splitext(reference) Modified: trunk/matplotlib/doc/users/customizing.rst =================================================================== --- trunk/matplotlib/doc/users/customizing.rst 2008年06月13日 20:40:36 UTC (rev 5523) +++ trunk/matplotlib/doc/users/customizing.rst 2008年06月13日 20:54:18 UTC (rev 5524) @@ -6,8 +6,8 @@ .. _customizing-with-matplotlibrc-files: -The matplotlibrc File -===================== +The :file:`matplotlibrc` file +============================= matplotlib uses :file:`matplotlibrc` configuration files to customize all kinds of properties, which we call `rc settings` or `rc parameters`. You can control Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 20:40:36 UTC (rev 5523) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 20:54:18 UTC (rev 5524) @@ -5,7 +5,7 @@ *************** :mod:`matplotlib.pyplot` is a collection of command style functions -that make matplotlib work like matlab. Each ``pyplot`` function makes +that make matplotlib work like matlab. Each ``pyplot`` function makes some change to a figure: eg, create a figure, create a plotting area in a figure, plot some lines in a plotting area, decorate the plot with labels, etc.... :mod:`matplotlib.pyplot` is stateful, in that it This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5523 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5523&view=rev Author: dsdale Date: 2008年06月13日 13:40:36 -0700 (2008年6月13日) Log Message: ----------- removed static_figs directory from docs Removed Paths: ------------- trunk/matplotlib/doc/static_figs/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5522 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5522&view=rev Author: jswhit Date: 2008年06月13日 13:29:00 -0700 (2008年6月13日) Log Message: ----------- regenerated with Cython 0.9.8 Modified Paths: -------------- trunk/toolkits/basemap/src/_geod.c trunk/toolkits/basemap/src/_geoslib.c trunk/toolkits/basemap/src/_proj.c Modified: trunk/toolkits/basemap/src/_geod.c =================================================================== --- trunk/toolkits/basemap/src/_geod.c 2008年06月13日 20:15:42 UTC (rev 5521) +++ trunk/toolkits/basemap/src/_geod.c 2008年06月13日 20:29:00 UTC (rev 5522) @@ -1,4 +1,4 @@ -/* Generated by Cython 0.9.6.14 on Fri May 30 16:08:08 2008 */ +/* Generated by Cython 0.9.8 on Fri Jun 13 14:28:31 2008 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -6,6 +6,12 @@ #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#if PY_VERSION_HEX < 0x02040000 + #define METH_COEXIST 0 +#endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -15,9 +21,69 @@ #define PyNumber_Index(o) PyNumber_Int(o) #define PyIndex_Check(o) PyNumber_Check(o) #endif -#if PY_VERSION_HEX < 0x02040000 - #define METH_COEXIST 0 +#if PY_VERSION_HEX < 0x02060000 + #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) + #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) + #define Py_SIZE(ob) ((PyVarObject*)(ob))->ob_size) + #define PyVarObject_HEAD_INIT(type, size) \ + PyObject_HEAD_INIT(type) size, + + typedef struct { + void *buf; + Py_ssize_t len; + int readonly; + const char *format; + int ndim; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + Py_ssize_t itemsize; + void *internal; + } Py_buffer; + + #define PyBUF_SIMPLE 0 + #define PyBUF_WRITABLE 0x0001 + #define PyBUF_LOCK 0x0002 + #define PyBUF_FORMAT 0x0004 + #define PyBUF_ND 0x0008 + #define PyBUF_STRIDES (0x0010 | PyBUF_ND) + #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES) + #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES) + #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES) + #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES) #endif +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#endif +#if PY_MAJOR_VERSION >= 3 + #define Py_TPFLAGS_CHECKTYPES 0 + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyString_Type PyBytes_Type + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) +#else + #define PyBytes_Type PyString_Type +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) +#endif #ifndef __stdcall #define __stdcall #endif @@ -30,6 +96,7 @@ #define __PYX_EXTERN_C extern #endif #include <math.h> +#define __PYX_HAVE_API___geod #include "stdlib.h" #include "math.h" #include "geodesic.h" @@ -44,8 +111,7 @@ #define INLINE #endif -typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ -typedef struct {PyObject **p; char *s; long n; int is_unicode;} __Pyx_StringTabEntry; /*proto*/ +typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ @@ -54,6 +120,14 @@ /* Type Conversion Predeclarations */ +#if PY_MAJOR_VERSION < 3 +#define __Pyx_PyBytes_FromString PyString_FromString +#define __Pyx_PyBytes_AsString PyString_AsString +#else +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_AsString PyBytes_AsString +#endif + #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static INLINE int __Pyx_PyObject_IsTrue(PyObject* x); static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x); @@ -93,9 +167,9 @@ static PyObject *__pyx_empty_tuple; static int __pyx_lineno; static int __pyx_clineno = 0; -static char * __pyx_cfilenm= __FILE__; -static char *__pyx_filename; -static char **__pyx_f; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; +static const char **__pyx_f; static INLINE void __Pyx_RaiseArgtupleTooLong(Py_ssize_t num_expected, Py_ssize_t num_found); /*proto*/ @@ -105,18 +179,16 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ -static void __Pyx_AddTraceback(char *funcname); /*proto*/ +static void __Pyx_AddTraceback(const char *funcname); /*proto*/ -/* Declarations */ +/* Type declarations */ -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":5 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":5 * include "_pyproj.pxi" * - * cdef class Geod: # <<<<<<<<<<<<<< + * cdef class Geod: # <<<<<<<<<<<<<< * cdef GEODESIC_T geodesic_t * cdef public object geodstring */ @@ -128,39 +200,55 @@ PyObject *proj_version; char *geodinitstring; }; +/* Module declarations from _geod */ static PyTypeObject *__pyx_ptype_5_geod_Geod = 0; /* Implementation of _geod */ -static char __pyx_k_2[] = "1.8.5"; +static char __pyx_k_3[] = "1.8.6"; -static PyObject *__pyx_n___cinit__; -static PyObject *__pyx_n___reduce__; -static PyObject *__pyx_n__fwd; -static PyObject *__pyx_n__inv; -static PyObject *__pyx_n__npts; -static PyObject *__pyx_n_math; -static PyObject *__pyx_n_radians; -static PyObject *__pyx_n__dg2rad; -static PyObject *__pyx_n_degrees; -static PyObject *__pyx_n__rad2dg; -static PyObject *__pyx_n__doublesize; -static PyObject *__pyx_n___version__; +static char __pyx_k___cinit__[] = "__cinit__"; +static char __pyx_k___reduce__[] = "__reduce__"; +static char __pyx_k__fwd[] = "_fwd"; +static char __pyx_k__inv[] = "_inv"; +static char __pyx_k__npts[] = "_npts"; +static char __pyx_k_math[] = "math"; +static char __pyx_k_radians[] = "radians"; +static char __pyx_k_1[] = "_dg2rad"; +static char __pyx_k_degrees[] = "degrees"; +static char __pyx_k_2[] = "_rad2dg"; +static char __pyx_k__doublesize[] = "_doublesize"; +static char __pyx_k___version__[] = "__version__"; -static PyObject *__pyx_k_2p; +static PyObject *__pyx_kp___cinit__; +static PyObject *__pyx_kp___reduce__; +static PyObject *__pyx_kp__fwd; +static PyObject *__pyx_kp__inv; +static PyObject *__pyx_kp__npts; +static PyObject *__pyx_kp_math; +static PyObject *__pyx_kp_radians; +static PyObject *__pyx_kp_1; +static PyObject *__pyx_kp_degrees; +static PyObject *__pyx_kp_2; +static PyObject *__pyx_kp__doublesize; +static PyObject *__pyx_kp___version__; -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":11 +static PyObject *__pyx_kp_3; + +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":11 * cdef char *geodinitstring * - * def __new__(self, geodstring): # <<<<<<<<<<<<<< + * def __new__(self, geodstring): # <<<<<<<<<<<<<< * cdef GEODESIC_T GEOD_T * # setup geod initialization string. */ -static PyObject *__pyx_n_RuntimeError; +static char __pyx_k_RuntimeError[] = "RuntimeError"; +static PyObject *__pyx_kp_RuntimeError; + static PyObject *__pyx_builtin_RuntimeError; static int __pyx_pf_5_geod_4Geod___new__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ @@ -184,10 +272,10 @@ return -1; __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":14 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":14 * cdef GEODESIC_T GEOD_T * # setup geod initialization string. - * self.geodstring = geodstring # <<<<<<<<<<<<<< + * self.geodstring = geodstring # <<<<<<<<<<<<<< * self.geodinitstring = PyString_AsString(self.geodstring) * # initialize projection */ @@ -195,42 +283,42 @@ Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring = __pyx_v_geodstring; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":15 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":15 * # setup geod initialization string. * self.geodstring = geodstring - * self.geodinitstring = PyString_AsString(self.geodstring) # <<<<<<<<<<<<<< + * self.geodinitstring = PyString_AsString(self.geodstring) # <<<<<<<<<<<<<< * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring = PyString_AsString(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":17 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":17 * self.geodinitstring = PyString_AsString(self.geodstring) * # initialize projection - * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< + * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t = (GEOD_init_plus(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodinitstring, (&__pyx_v_GEOD_T))[0]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":18 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":18 * # initialize projection * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] - * if pj_errno != 0: # <<<<<<<<<<<<<< + * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * self.proj_version = PJ_VERSION/100. */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":19 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":19 * self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0] * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * self.proj_version = PJ_VERSION/100. * */ - __pyx_2 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_2 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); __pyx_2 = 0; @@ -243,10 +331,10 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":20 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":20 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< + * self.proj_version = PJ_VERSION/100. # <<<<<<<<<<<<<< * * def __reduce__(self): */ @@ -266,16 +354,18 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":22 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":22 * self.proj_version = PJ_VERSION/100. * - * def __reduce__(self): # <<<<<<<<<<<<<< + * def __reduce__(self): # <<<<<<<<<<<<<< * """special method that allows pyproj.Geod instance to be pickled""" * return (self.__class__,(self.geodstring,)) */ -static PyObject *__pyx_n___class__; +static char __pyx_k___class__[] = "__class__"; +static PyObject *__pyx_kp___class__; + static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/ static char __pyx_doc_5_geod_4Geod___reduce__[] = "special method that allows pyproj.Geod instance to be pickled"; static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) { @@ -284,14 +374,14 @@ PyObject *__pyx_2 = 0; PyObject *__pyx_3 = 0; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":24 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":24 * def __reduce__(self): * """special method that allows pyproj.Geod instance to be pickled""" - * return (self.__class__,(self.geodstring,)) # <<<<<<<<<<<<<< + * return (self.__class__,(self.geodstring,)) # <<<<<<<<<<<<<< * * def _fwd(self, object lons, object lats, object az, object dist, radians=False): */ - __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring); @@ -316,23 +406,25 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":26 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":26 * return (self.__class__,(self.geodstring,)) * - * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< + * def _fwd(self, object lons, object lats, object az, object dist, radians=False): # <<<<<<<<<<<<<< * """ - * forward transformation - determine longitude, latitude and back azimuth + * forward transformation - determine longitude, latitude and back azimuth */ -static PyObject *__pyx_n_ValueError; +static char __pyx_k_ValueError[] = "ValueError"; -static PyObject *__pyx_k_3p; -static PyObject *__pyx_k_4p; +static PyObject *__pyx_kp_ValueError; +static PyObject *__pyx_kp_4; +static PyObject *__pyx_kp_5; + static PyObject *__pyx_builtin_ValueError; -static char __pyx_k_3[] = "Buffer lengths not the same"; -static char __pyx_k_4[] = "undefined forward geodesic (may be an equatorial arc)"; +static char __pyx_k_4[] = "Buffer lengths not the same"; +static char __pyx_k_5[] = "undefined forward geodesic (may be an equatorial arc)"; static PyObject *__pyx_pf_5_geod_4Geod__fwd(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__fwd[] = "\n forward transformation - determine longitude, latitude and back azimuth \n of a terminus point given an initial point longitude and latitude, plus\n forward azimuth and distance.\n if radians=True, lons/lats are radians instead of degrees.\n "; @@ -385,20 +477,20 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":37 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":37 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":38 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":38 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError */ @@ -408,20 +500,20 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":39 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":39 * if PyObject_AsWriteBuffer(lons, &londata, &buflenlons) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":40 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":40 * raise RuntimeError * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError */ @@ -431,20 +523,20 @@ } __pyx_L5:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":41 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":41 * if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":42 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":42 * raise RuntimeError * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: * raise RuntimeError */ @@ -454,20 +546,20 @@ } __pyx_L6:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":43 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":43 * if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * # process data in buffer */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":44 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":44 * raise RuntimeError * if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: */ @@ -477,10 +569,10 @@ } __pyx_L7:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":46 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":46 * raise RuntimeError * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ @@ -494,16 +586,16 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":47 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":47 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: - * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< + * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< * ndim = buflenlons/_doublesize * lonsdata = <double *>londata */ __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_3p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_3p); + Py_INCREF(__pyx_kp_4); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_4); __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); @@ -513,15 +605,15 @@ } __pyx_L8:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":48 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":48 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") - * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< + * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< * lonsdata = <double *>londata * latsdata = <double *>latdata */ __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -529,92 +621,92 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":49 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":49 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize - * lonsdata = <double *>londata # <<<<<<<<<<<<<< + * lonsdata = <double *>londata # <<<<<<<<<<<<<< * latsdata = <double *>latdata * azdata = <double *>azdat */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":50 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":50 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata - * latsdata = <double *>latdata # <<<<<<<<<<<<<< + * latsdata = <double *>latdata # <<<<<<<<<<<<<< * azdata = <double *>azdat * distdata = <double *>distdat */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":51 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":51 * lonsdata = <double *>londata * latsdata = <double *>latdata - * azdata = <double *>azdat # <<<<<<<<<<<<<< + * azdata = <double *>azdat # <<<<<<<<<<<<<< * distdata = <double *>distdat * for i from 0 <= i < ndim: */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":52 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":52 * latsdata = <double *>latdata * azdata = <double *>azdat - * distdata = <double *>distdat # <<<<<<<<<<<<<< + * distdata = <double *>distdat # <<<<<<<<<<<<<< * for i from 0 <= i < ndim: * if radians: */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":53 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":53 * azdata = <double *>azdat * distdata = <double *>distdat - * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< + * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< * if radians: * self.geodesic_t.p1.v = lonsdata[i] */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":54 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":54 * distdata = <double *>distdat * for i from 0 <= i < ndim: - * if radians: # <<<<<<<<<<<<<< + * if radians: # <<<<<<<<<<<<<< * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] */ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":55 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":55 * for i from 0 <= i < ndim: * if radians: - * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":56 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":56 * if radians: * self.geodesic_t.p1.v = lonsdata[i] - * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.ALPHA12 = azdata[i] * self.geodesic_t.DIST = distdata[i] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = (__pyx_v_latsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":57 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":57 * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] - * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.ALPHA12 = azdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.DIST = distdata[i] * else: */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = (__pyx_v_azdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":58 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":58 * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.ALPHA12 = azdata[i] - * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] */ @@ -623,14 +715,14 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":60 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":60 * self.geodesic_t.DIST = distdata[i] * else: - * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -639,14 +731,14 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":61 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":61 * else: * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] - * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.u = _dg2rad*latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -655,14 +747,14 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":62 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":62 * self.geodesic_t.p1.v = _dg2rad*lonsdata[i] * self.geodesic_t.p1.u = _dg2rad*latsdata[i] - * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) */ - __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_n__dg2rad); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; @@ -671,10 +763,10 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":63 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":63 * self.geodesic_t.p1.u = _dg2rad*latsdata[i] * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] - * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.DIST = distdata[i] # <<<<<<<<<<<<<< * geod_pre(&self.geodesic_t) * if pj_errno != 0: */ @@ -682,33 +774,33 @@ } __pyx_L11:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":64 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":64 * self.geodesic_t.ALPHA12 = _dg2rad*azdata[i] * self.geodesic_t.DIST = distdata[i] - * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< + * geod_pre(&self.geodesic_t) # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) */ geod_pre((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":65 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":65 * self.geodesic_t.DIST = distdata[i] * geod_pre(&self.geodesic_t) - * if pj_errno != 0: # <<<<<<<<<<<<<< + * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) */ __pyx_2 = (pj_errno != 0); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":66 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":66 * geod_pre(&self.geodesic_t) * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * geod_for(&self.geodesic_t) * if pj_errno != 0: */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; @@ -721,33 +813,33 @@ } __pyx_L12:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":67 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":67 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< + * geod_for(&self.geodesic_t) # <<<<<<<<<<<<<< * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) */ geod_for((&((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t)); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":68 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":68 * raise RuntimeError(pj_strerrno(pj_errno)) * geod_for(&self.geodesic_t) - * if pj_errno != 0: # <<<<<<<<<<<<<< + * if pj_errno != 0: # <<<<<<<<<<<<<< * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): */ __pyx_1 = (pj_errno != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":69 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":69 * geod_for(&self.geodesic_t) * if pj_errno != 0: - * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< + * raise RuntimeError(pj_strerrno(pj_errno)) # <<<<<<<<<<<<<< * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') */ - __pyx_3 = PyString_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_3 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1;} PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); __pyx_3 = 0; @@ -760,26 +852,26 @@ } __pyx_L13:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":70 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":70 * if pj_errno != 0: * raise RuntimeError(pj_strerrno(pj_errno)) - * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< + * if isnan(self.geodesic_t.ALPHA21): # <<<<<<<<<<<<<< * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: */ __pyx_8 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (__pyx_8) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":71 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":71 * raise RuntimeError(pj_strerrno(pj_errno)) * if isnan(self.geodesic_t.ALPHA21): - * raise ValueError('undefined forward geodesic (may be an equatorial arc)') # <<<<<<<<<<<<<< + * raise ValueError('undefined forward geodesic (may be an equatorial arc)') # <<<<<<<<<<<<<< * if radians: * lonsdata[i] = self.geodesic_t.p2.v */ __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_4p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_4p); + Py_INCREF(__pyx_kp_5); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_5); __pyx_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); @@ -789,38 +881,38 @@ } __pyx_L14:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":72 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":72 * if isnan(self.geodesic_t.ALPHA21): * raise ValueError('undefined forward geodesic (may be an equatorial arc)') - * if radians: # <<<<<<<<<<<<<< + * if radians: # <<<<<<<<<<<<<< * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u */ __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":73 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":73 * raise ValueError('undefined forward geodesic (may be an equatorial arc)') * if radians: - * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< + * lonsdata[i] = self.geodesic_t.p2.v # <<<<<<<<<<<<<< * latsdata[i] = self.geodesic_t.p2.u * azdata[i] = self.geodesic_t.ALPHA21 */ (__pyx_v_lonsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":74 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":74 * if radians: * lonsdata[i] = self.geodesic_t.p2.v - * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< + * latsdata[i] = self.geodesic_t.p2.u # <<<<<<<<<<<<<< * azdata[i] = self.geodesic_t.ALPHA21 * else: */ (__pyx_v_latsdata[__pyx_v_i]) = ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":75 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":75 * lonsdata[i] = self.geodesic_t.p2.v * latsdata[i] = self.geodesic_t.p2.u - * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< + * azdata[i] = self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v */ @@ -829,14 +921,14 @@ } /*else*/ { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":77 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":77 * azdata[i] = self.geodesic_t.ALPHA21 * else: - * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< + * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v # <<<<<<<<<<<<<< * latsdata[i] = _rad2dg*self.geodesic_t.p2.u * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -845,14 +937,14 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":78 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":78 * else: * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v - * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< + * latsdata[i] = _rad2dg*self.geodesic_t.p2.u # <<<<<<<<<<<<<< * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -861,14 +953,14 @@ Py_DECREF(__pyx_4); __pyx_4 = 0; (__pyx_v_latsdata[__pyx_v_i]) = __pyx_7; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":79 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":79 * lonsdata[i] = _rad2dg*self.geodesic_t.p2.v * latsdata[i] = _rad2dg*self.geodesic_t.p2.u - * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< + * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 # <<<<<<<<<<<<<< * * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): */ - __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_n__rad2dg); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_2); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_4 = PyNumber_Multiply(__pyx_5, __pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_5); __pyx_5 = 0; @@ -892,19 +984,19 @@ return __pyx_r; } -/* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":81 +/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":81 * azdata[i] = _rad2dg*self.geodesic_t.ALPHA21 * - * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< + * def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False): # <<<<<<<<<<<<<< * """ * inverse transformation - return forward and back azimuths, plus distance */ -static PyObject *__pyx_k_5p; -static PyObject *__pyx_k_6p; +static PyObject *__pyx_kp_6; +static PyObject *__pyx_kp_7; -static char __pyx_k_5[] = "Buffer lengths not the same"; -static char __pyx_k_6[] = "undefined inverse geodesic (may be an antipodal point)"; +static char __pyx_k_6[] = "Buffer lengths not the same"; +static char __pyx_k_7[] = "undefined inverse geodesic (may be an antipodal point)"; static PyObject *__pyx_pf_5_geod_4Geod__inv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5_geod_4Geod__inv[] = "\n inverse transformation - return forward and back azimuths, plus distance\n between an initial and terminus lat/lon pair.\n if radians=True, lons/lats are radians instead of degrees.\n "; @@ -957,20 +1049,20 @@ return NULL; __pyx_L3:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":91 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":91 * cdef void *londata, *latdata, *azdat, *distdat * # if buffer api is supported, get pointer to data buffers. - * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":92 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":92 * # if buffer api is supported, get pointer to data buffers. * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError */ @@ -980,20 +1072,20 @@ } __pyx_L4:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":93 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":93 * if PyObject_AsWriteBuffer(lons1, &londata, &buflenlons) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":94 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":94 * raise RuntimeError * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError */ @@ -1003,20 +1095,20 @@ } __pyx_L5:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":95 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":95 * if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":96 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":96 * raise RuntimeError * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: * raise RuntimeError */ @@ -1026,20 +1118,20 @@ } __pyx_L6:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":97 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":97 * if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0: * raise RuntimeError - * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< + * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: # <<<<<<<<<<<<<< * raise RuntimeError * # process data in buffer */ __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0); if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":98 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":98 * raise RuntimeError * if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0: - * raise RuntimeError # <<<<<<<<<<<<<< + * raise RuntimeError # <<<<<<<<<<<<<< * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: */ @@ -1049,10 +1141,10 @@ } __pyx_L7:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":100 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":100 * raise RuntimeError * # process data in buffer - * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< + * if not buflenlons == buflenlats == buflenaz == buflend: # <<<<<<<<<<<<<< * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize */ @@ -1066,16 +1158,16 @@ __pyx_2 = (!__pyx_1); if (__pyx_2) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":101 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":101 * # process data in buffer * if not buflenlons == buflenlats == buflenaz == buflend: - * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< + * raise RuntimeError("Buffer lengths not the same") # <<<<<<<<<<<<<< * ndim = buflenlons/_doublesize * lonsdata = <double *>londata */ __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1;} - Py_INCREF(__pyx_k_5p); - PyTuple_SET_ITEM(__pyx_3, 0, __pyx_k_5p); + Py_INCREF(__pyx_kp_6); + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_6); __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; __Pyx_Raise(__pyx_4, 0, 0); @@ -1085,15 +1177,15 @@ } __pyx_L8:; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":102 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":102 * if not buflenlons == buflenlats == buflenaz == buflend: * raise RuntimeError("Buffer lengths not the same") - * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< + * ndim = buflenlons/_doublesize # <<<<<<<<<<<<<< * lonsdata = <double *>londata * latsdata = <double *>latdata */ __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} - __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_n__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} + __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} __pyx_5 = PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1;} Py_DECREF(__pyx_3); __pyx_3 = 0; Py_DECREF(__pyx_4); __pyx_4 = 0; @@ -1101,92 +1193,92 @@ Py_DECREF(__pyx_5); __pyx_5 = 0; __pyx_v_ndim = __pyx_6; - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":103 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":103 * raise RuntimeError("Buffer lengths not the same") * ndim = buflenlons/_doublesize - * lonsdata = <double *>londata # <<<<<<<<<<<<<< + * lonsdata = <double *>londata # <<<<<<<<<<<<<< * latsdata = <double *>latdata * azdata = <double *>azdat */ __pyx_v_lonsdata = ((double *)__pyx_v_londata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":104 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":104 * ndim = buflenlons/_doublesize * lonsdata = <double *>londata - * latsdata = <double *>latdata # <<<<<<<<<<<<<< + * latsdata = <double *>latdata # <<<<<<<<<<<<<< * azdata = <double *>azdat * distdata = <double *>distdat */ __pyx_v_latsdata = ((double *)__pyx_v_latdata); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":105 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":105 * lonsdata = <double *>londata * latsdata = <double *>latdata - * azdata = <double *>azdat # <<<<<<<<<<<<<< + * azdata = <double *>azdat # <<<<<<<<<<<<<< * distdata = <double *>distdat * for i from 0 <= i < ndim: */ __pyx_v_azdata = ((double *)__pyx_v_azdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":106 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":106 * latsdata = <double *>latdata * azdata = <double *>azdat - * distdata = <double *>distdat # <<<<<<<<<<<<<< + * distdata = <double *>distdat # <<<<<<<<<<<<<< * for i from 0 <= i < ndim: * if radians: */ __pyx_v_distdata = ((double *)__pyx_v_distdat); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":107 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":107 * azdata = <double *>azdat * distdata = <double *>distdat - * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< + * for i from 0 <= i < ndim: # <<<<<<<<<<<<<< * if radians: * self.geodesic_t.p1.v = lonsdata[i] */ for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":108 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":108 * distdata = <double *>distdat * for i from 0 <= i < ndim: - * if radians: # <<<<<<<<<<<<<< + * if radians: # <<<<<<<<<<<<<< * self.geodesic_t.p1.v = lonsdata[i] * self.geodesic_t.p1.u = latsdata[i] */ __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1;} if (__pyx_1) { - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":109 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":109 * for i from 0 <= i < ndim: * if radians: - * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.v = lonsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p1.u = latsdata[i] * self.geodesic_t.p2.v = azdata[i] */ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = (__pyx_v_lonsdata[__pyx_v_i]); - /* "/Volumes/User/jwhitaker/python/pyproj/_geod.pyx":110 + /* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":110 * if radians: * self.geodesic_t.p1.v = lonsdata[i] - * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< + * self.geodesic_t.p1.u = latsdata[i] # <<<<<<<<<<<<<< * self.geodesic_t.p2.v = azdata[i] * self.geodesic_t.p2.u = distdata[i] */ ... [truncated message content]
Revision: 5521 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5521&view=rev Author: dsdale Date: 2008年06月13日 13:15:42 -0700 (2008年6月13日) Log Message: ----------- keep static figures with dynamically generated ones, but commit the figures to svn so they will not be auto-generated. This way we can be consistent in the way we include figures using the plot directive Modified Paths: -------------- trunk/matplotlib/doc/devel/documenting_mpl.rst trunk/matplotlib/doc/pyplots/make.py trunk/matplotlib/doc/pyplots/matplotlibrc trunk/matplotlib/doc/users/usetex.rst trunk/matplotlib/lib/matplotlib/__init__.py trunk/matplotlib/lib/matplotlib/rcsetup.py Added Paths: ----------- trunk/matplotlib/doc/pyplots/README 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_demo.py 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/pyplots/tex_unicode_demo.py Removed Paths: ------------- trunk/matplotlib/doc/_static/tex_demo.hires.png trunk/matplotlib/doc/_static/tex_demo.pdf trunk/matplotlib/doc/_static/tex_demo.png trunk/matplotlib/doc/_static/tex_unicode_demo.hires.png trunk/matplotlib/doc/_static/tex_unicode_demo.pdf trunk/matplotlib/doc/_static/tex_unicode_demo.png trunk/matplotlib/doc/static_figs/README trunk/matplotlib/doc/static_figs/make.py Deleted: trunk/matplotlib/doc/_static/tex_demo.hires.png =================================================================== (Binary files differ) Deleted: trunk/matplotlib/doc/_static/tex_demo.pdf =================================================================== --- trunk/matplotlib/doc/_static/tex_demo.pdf 2008年06月13日 19:56:24 UTC (rev 5520) +++ trunk/matplotlib/doc/_static/tex_demo.pdf 2008年06月13日 20:15:42 UTC (rev 5521) @@ -1,2834 +0,0 @@ -%PDF-1.4 -%\xAC\xDC \xAB\xBA -1 0 obj -<< /Type /Catalog /Pages 3 0 R >> -endobj -2 0 obj -<< /CreationDate (D:20080613135832-04'00') -/Producer (matplotlib pdf backend) -/Creator (matplotlib 0.98.0, 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 432 288 ] >> -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\xCDYM\x8F]5\x9D\xB5\xFF\xC1\xEC\xCC.Yĩ\xBB\Fb\x83"Eb$\xA0H\xC0\x82\x8F2J\x830\xFC\xFD9\xF6}/\xFD\x9E}\xE9<u\xA4\xCE,\x92n\xFB\x96\xCB\xF6\xA9\xE3Se\xB7ħ\x91\xE3s\xFC{(R\xBC\x8EY?_\x8E\x9F\xE2\x8E\xDF\xE8\xF5O\xF4\x87a\xF7$dM\xFDsr\x8CP\xEF?G\xE3屡\x94\xF2p\xD2\xCD\xCE\xC3^~;ik.ɢ\xE3\xFFW\xCF\xE2\x97\xF1\x971\xC7ώ3 -X\x9C%+\xB0\x94\x96\x8C -{\x93ׅ3̤&Qe\xCB\xDCWS4\xF3 \xA2I\x85\xB3\xB5Z밯\x89$Gᚚre\xD5\xEC}\x89\x86i\xB0z\xE6\xC4\xD9+\xA9\xF6^\x85\x95!M\xE4DZ-g\xEE\xFD5i\x93\xC8M\x93\xCC\xEBlV\xD1_)9ܰk2f\xCD\xD4T[\xEF\xCFI)\xAE\x92 -{)R\xBC\xF5U֚\xAAE\xC6\xE4\xF5dV\xE7$\x8C\xEE\xECX\x93\x93Za\x92ޟ\x93U \xAC%5i\xE2Yͭ\xF7{b\xC1\xACثT\xAA\L\xB9\xEF\xA9q*\xD83\xDC37\xC3VǬ\xAD,ドル\xA6\xC1;\xBB\xB5\xB1\xF4\xDEl8;\xE7\\xF36'#4\xADH\xAC\xBE\xDCJ#3\xFD%e\xF2`%i\xAE\xE8sk\x87\xC3\xE4\x96c1ĥ5-\xA5#\x80 ![\xA2\x93I\x99K\xAA\xD5BƎ\xCD\xC5 -[\xB5\xD1\xDFN\x89ةW/J"#\xDA,\x82\xE5\x816X\x94a\x9DU\x8B\x8FU -\xA6\xCB9\x80\xA5eG<\xA8n\xF6\xAD\xD3k#(b\x8D\xC9ќ\x8D\xD49wzC\x87\xAF\x8B
Revision: 5520 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5520&view=rev Author: jswhit Date: 2008年06月13日 12:56:24 -0700 (2008年6月13日) Log Message: ----------- fixed up docstring for readshapefile method. Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 19:49:16 UTC (rev 5519) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 19:56:24 UTC (rev 5520) @@ -1475,51 +1475,57 @@ def readshapefile(self,shapefile,name,drawbounds=True,zorder=None, linewidth=0.5,color='k',antialiased=1,ax=None): """ - read in shape file, optionally draw boundaries on map. + Read in shape file, optionally draw boundaries on map. - Restrictions: - - Assumes shapes are 2D - - works for Point, MultiPoint, Polyline and Polygon shapes. - - vertices/points must be in geographic (lat/lon) coordinates. + .. note:: + - Assumes shapes are 2D + - only works for Point, MultiPoint, Polyline and Polygon shapes. + - vertices/points must be in geographic (lat/lon) coordinates. Mandatory Arguments: - shapefile - path to shapefile components. Example: - shapefile='/home/jeff/esri/world_borders' assumes that - world_borders.shp, world_borders.shx and world_borders.dbf - live in /home/jeff/esri. + ============== ==================================================== + Argument Description + ============== ==================================================== + shapefile path to shapefile components. Example: + shapefile='/home/jeff/esri/world_borders' assumes + that world_borders.shp, world_borders.shx and + world_borders.dbf live in /home/jeff/esri. + name name for Basemap attribute to hold the shapefile + vertices or points in native map projection + coordinates. Class attribute name+'_info' is a list + of dictionaries, one for each shape, containing + attributes of each shape from dbf file, For + example, if name='counties', self.counties + will be a list of x,y vertices for each shape in + map projection coordinates and self.counties_info + will be a list of dictionaries with shape + attributes. Rings in individual Polygon + shapes are split out into separate polygons, and + additional keys 'RINGNUM' and 'SHAPENUM' are added + to the shape attribute dictionary. + ============== ==================================================== - name - name for Basemap attribute to hold the shapefile - vertices or points in native map projection coordinates. - Class attribute name+'_info' is a list of dictionaries, one - for each shape, containing attributes of each shape from dbf file. - For example, if name='counties', self.counties will be - a list of x,y vertices for each shape in map projection - coordinates and self.counties_info will be a list of dictionaries - with shape attributes. Rings in individual Polygon shapes are split - out into separate polygons, and. additional keys - 'RINGNUM' and 'SHAPENUM' are added to shape attribute dictionary. + The following optional keyword arguments are only relevant for Polyline + and Polygon shape types, for Point and MultiPoint shapes they are + ignored. - Optional Keyword Arguments (only relevant for Polyline - and Polygon shape types, for Point and MultiPoint shapes they - are ignored): + ============== ==================================================== + Keyword Description + ============== ==================================================== + drawbounds draw boundaries of shapes (default True). + zorder shape boundary zorder (if not specified, + default for mathplotlib.lines.LineCollection + is used). + linewidth shape boundary line width (default 0.5) + color shape boundary line color (default black) + antialiased antialiasing switch for shape boundaries + (default True). + ax axes instance (overrides default axes instance) + ============== ==================================================== - drawbounds - draw boundaries of shapes (default True). Only - relevant for Polyline and Polygon shape types, for Point - and MultiPoint types no drawing is done. - - zorder = shape boundary zorder (if not specified, - default for LineCollection is used). - - linewidth - shape boundary line width (default 0.5) - - color - shape boundary line color (default black) - - antialiased - antialiasing switch for shape boundaries (default True). - - ax - axes instance (overrides default axes instance) - - returns a tuple (num_shapes, type, min, max) containing shape file info. + A tuple (num_shapes, type, min, max) containing shape file info + is returned. num_shapes is the number of shapes, type is the type code (one of the SHPT* constants defined in the shapelib module, see http://shapelib.maptools.org/shp_api.html) and min and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5519 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5519&view=rev Author: jdh2358 Date: 2008年06月13日 12:49:16 -0700 (2008年6月13日) Log Message: ----------- some updates to the autobuild Modified Paths: -------------- trunk/matplotlib/Makefile trunk/matplotlib/doc/faq/installing_faq.rst trunk/matplotlib/doc/index.rst trunk/matplotlib/doc/make.py trunk/matplotlib/doc/pyplots/text_commands.py trunk/matplotlib/doc/pyplots/text_layout.py trunk/matplotlib/doc/sphinxext/plot_directive.py trunk/matplotlib/lib/matplotlib/cbook.py Modified: trunk/matplotlib/Makefile =================================================================== --- trunk/matplotlib/Makefile 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/Makefile 2008年06月13日 19:49:16 UTC (rev 5519) @@ -37,9 +37,9 @@ python setup.py install --prefix=~/dev;\ cd doc;\ rm -rf build;\ - python make.py html;\ - python make.py sf + python make.py clean html latex sf; + Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2008年06月13日 19:49:16 UTC (rev 5519) @@ -40,6 +40,12 @@ import matplotlib print matplotlib.get_configdir() + A typical location for the config directory is :file:`.matplotlib`, and the following + caches may need to be cleared after a major update:: + + rm -rf ~/.matplotlib/tex.cache + rm -rf ~/.matplotlib/fontManager.cache + .. _what-is-a-backend: What is a backend? @@ -175,7 +181,7 @@ `sourceforge download <http://sourceforge.net/project/platformdownload.php?group_id=80706>`_ site. Choose the files that match your version of python (eg -``py2.5`` if you instaslled Python 2.5) and have the ``exe`` +``py2.5`` if you installed Python 2.5) which have the ``exe`` extension. If you haven't already installed python, you can get the official version from the `python web site <http://python.org/download/>`_. There are also two packaged Modified: trunk/matplotlib/doc/index.rst =================================================================== --- trunk/matplotlib/doc/index.rst 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/doc/index.rst 2008年06月13日 19:49:16 UTC (rev 5519) @@ -5,6 +5,8 @@ Welcome to matplotlib's documentation! ====================================== +Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_ + Contents: .. toctree:: @@ -22,3 +24,8 @@ * :ref:`modindex` * :ref:`search` + +.. _ipython: http://ipython.scipy.org +.. _numpy: http://numpy.scipy.org +.. _scipy: http://scipy.org +.. _vtk: http://www.vtk.org Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/doc/make.py 2008年06月13日 19:49:16 UTC (rev 5519) @@ -17,6 +17,7 @@ def sf(): 'push a copy to the sf site' os.system('cd build; rsync -avz html jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/ -essh') + os.system('cd build/latex; scp Matplotlib.pdf jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/') def figs(): os.system('cd users/figures/ && python make.py') @@ -56,7 +57,8 @@ print 'latex build has not been tested on windows' def clean(): - shutil.rmtree('build') + if os.path.exists('build'): + shutil.rmtree('build') for fname in glob.glob('pyplots/*.png') + glob.glob('pyplots/*.pdf'): os.remove(fname) Modified: trunk/matplotlib/doc/pyplots/text_commands.py =================================================================== --- trunk/matplotlib/doc/pyplots/text_commands.py 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/doc/pyplots/text_commands.py 2008年06月13日 19:49:16 UTC (rev 5519) @@ -5,23 +5,23 @@ fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold') ax = fig.add_subplot(111) - +fig.subplots_adjust(top=0.85) ax.set_title('axes title') ax.set_xlabel('xlabel') ax.set_ylabel('ylabel') -ax.text(5, 8, 'boxed italics text in data coords', style='italic', +ax.text(3, 8, 'boxed italics text in data coords', style='italic', bbox={'facecolor':'red', 'alpha':0.5, 'pad':10}) -ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=20) +ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=15) -ax.text(4, 3, unicode('unicode: Institut f374円r Festk366円rperphysik', 'latin-1')) +ax.text(3, 2, unicode('unicode: Institut f374円r Festk366円rperphysik', 'latin-1')) ax.text(0.95, 0.01, 'colored text in axes coords', verticalalignment='bottom', horizontalalignment='right', transform=ax.transAxes, - color='green', fontsize=20) + color='green', fontsize=15) ax.plot([2], [1], 'o') Modified: trunk/matplotlib/doc/pyplots/text_layout.py =================================================================== --- trunk/matplotlib/doc/pyplots/text_layout.py 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/doc/pyplots/text_layout.py 2008年06月13日 19:49:16 UTC (rev 5519) @@ -8,7 +8,7 @@ top = bottom + height fig = plt.figure() -ax = fig.add_subplot(111) +ax = fig.add_axes([0,0,1,1]) # axes coordinates are 0,0 is bottom left and 1,1 is upper right p = patches.Rectangle( Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 19:49:16 UTC (rev 5519) @@ -106,7 +106,6 @@ for format, dpi in formats: outname = os.path.join(outdir, '%s.%s' % (basename, format)) plt.savefig(outname, dpi=dpi) - print ' all figures made' def run(arguments, options, state_machine, lineno): reference = directives.uri(arguments[0]) Modified: trunk/matplotlib/lib/matplotlib/cbook.py =================================================================== --- trunk/matplotlib/lib/matplotlib/cbook.py 2008年06月13日 19:23:21 UTC (rev 5518) +++ trunk/matplotlib/lib/matplotlib/cbook.py 2008年06月13日 19:49:16 UTC (rev 5519) @@ -1031,7 +1031,20 @@ return result +def recursive_remove(path): + if os.path.isdir(path): + for fname in glob.glob(os.path.join(path, '*')) + glob.glob(os.path.join(path, '.*')): + if os.path.isdir(fname): + recursive_remove(fname) + os.removedirs(fname) + else: + os.remove(fname) + #os.removedirs(path) + else: + os.remove(path) + + # a dict to cross-map linestyle arguments _linestyles = [('-', 'solid'), ('--', 'dashed'), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5518 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5518&view=rev Author: jdh2358 Date: 2008年06月13日 12:23:21 -0700 (2008年6月13日) Log Message: ----------- updates to rc and scaling for docs to get nice sizes for html and pdf Modified Paths: -------------- trunk/matplotlib/doc/devel/documenting_mpl.rst trunk/matplotlib/doc/matplotlibrc trunk/matplotlib/doc/sphinxext/plot_directive.py trunk/matplotlib/doc/users/annotations.rst trunk/matplotlib/doc/users/artists.rst trunk/matplotlib/doc/users/mathtext.rst trunk/matplotlib/doc/users/navigation_toolbar.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst trunk/matplotlib/doc/users/text_intro.rst trunk/matplotlib/doc/users/text_props.rst Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst =================================================================== --- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -115,12 +115,13 @@ html or a pdf for latex:: .. plot:: pyplot_simple.py - :scale: 75 :include-source: -The ``:scale:`` directive rescales the image to some percentage of the original -size. ``:include-source:`` will present the contents of the file, marked up as -source code. +The ``:scale:`` directive rescales the image to some percentage of the +original size, though we don't recommend using this in most cases +since it is probably better to choose the correct figure size and dpi +in mpl and let it handle the scaling. ``:include-source:`` will +present the contents of the file, marked up as source code. Static figures -------------- Modified: trunk/matplotlib/doc/matplotlibrc =================================================================== --- trunk/matplotlib/doc/matplotlibrc 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/matplotlibrc 2008年06月13日 19:23:21 UTC (rev 5518) @@ -233,7 +233,7 @@ ### FIGURE # See http://matplotlib.sourceforge.net/matplotlib.figure.html#Figure -#figure.figsize : 8, 6 # figure size in inches +figure.figsize : 6, 4 # figure size in inches #figure.dpi : 80 # figure dots per inch #figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray #figure.edgecolor : white # figure edgecolor Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 19:23:21 UTC (rev 5518) @@ -43,12 +43,13 @@ template_no_source = """ .. htmlonly:: + [ `<../%(srcdir)s/%(reference)s>`__, + `png <../%(srcdir)s/%(basename)s.hires.png>`__, + `pdf <../%(srcdir)s/%(basename)s.pdf>`__ ] + .. image:: ../%(srcdir)s/%(basename)s.png %(options)s - `[%(basename)s source py] <../%(srcdir)s/%(reference)s>`_ - `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ - `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ .. latexonly:: .. image:: ../%(srcdir)s/%(basename)s.pdf @@ -61,13 +62,13 @@ .. htmlonly:: + [ `py <../%(srcdir)s/%(reference)s>`__, + `png <../%(srcdir)s/%(basename)s.hires.png>`__, + `pdf <../%(srcdir)s/%(basename)s.pdf>`__ ] + .. image:: ../%(srcdir)s/%(basename)s.png %(options)s - `[%(basename)s source py] <../%(srcdir)s/%(reference)s>`_ - `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ - `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ - .. latexonly:: .. image:: ../%(srcdir)s/%(basename)s.pdf %(options)s @@ -103,15 +104,11 @@ mplshell.magic_run(fullpath) for format, dpi in formats: - #print 'saving', outdir, basename, format outname = os.path.join(outdir, '%s.%s' % (basename, format)) plt.savefig(outname, dpi=dpi) print ' all figures made' def run(arguments, options, state_machine, lineno): - #print 'arguments', arguments - #print 'options', options - reference = directives.uri(arguments[0]) basename, ext = os.path.splitext(reference) Modified: trunk/matplotlib/doc/users/annotations.rst =================================================================== --- trunk/matplotlib/doc/users/annotations.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/annotations.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -14,8 +14,8 @@ .. plot:: annotation_basic.py :include-source: - :scale: 75 + In this example, both the ``xy`` (arrow tip) and ``xytext`` locations (text location) are in data coordinates. There are a variety of other coordinate systems one can choose -- you can specify the coordinate @@ -73,7 +73,6 @@ ``Text`` instance .. plot:: annotation_polar.py - :scale: 75 :include-source: See the `annotations demo Modified: trunk/matplotlib/doc/users/artists.rst =================================================================== --- trunk/matplotlib/doc/users/artists.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/artists.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -136,7 +136,6 @@ Try creating the figure below. .. plot:: fig_axes_labels_simple.py - :scale: 75 .. _customizing-artists: @@ -327,7 +326,6 @@ In [195]: fig.canvas.draw() .. plot:: fig_x.py - :scale: 75 Here is a summary of the Artists the figure contains @@ -605,7 +603,6 @@ the axes and tick properties .. plot:: fig_axes_customize_simple.py - :scale: 75 :include-source: @@ -643,5 +640,4 @@ dollar signs and colors them green on the right side of the yaxis .. plot:: dollar_ticks.py - :scale: 75 :include-source: Modified: trunk/matplotlib/doc/users/mathtext.rst =================================================================== --- trunk/matplotlib/doc/users/mathtext.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/mathtext.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -272,7 +272,6 @@ Here is an example illustrating many of these features in context. .. plot:: pyplot_mathtext.py - :scale: 75 :include-source: Modified: trunk/matplotlib/doc/users/navigation_toolbar.rst =================================================================== --- trunk/matplotlib/doc/users/navigation_toolbar.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/navigation_toolbar.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -4,20 +4,16 @@ ====================== .. image:: ../_static/toolbar.png - :scale: 100 All figure windows come with a navigation toolbar, which can be used to navigate through the data set. Here is a description of each of the buttons at the bottom of the toolbar .. image:: ../mpl_data/images/home.png - :scale: 100 .. image:: ../mpl_data/images/back.png - :scale: 100 .. image:: ../mpl_data/images/forward.png - :scale: 100 The ``Forward`` and ``Back`` buttons These are akin to the web browser forward and back buttons. They @@ -31,7 +27,6 @@ the pan and zoom to rectangle to define new views. .. image:: ../mpl_data/images/move.png - :scale: 100 The ``Pan/Zoom`` button This button has two modes: pan and zoom. Click the toolbar button @@ -56,7 +51,6 @@ right mouse button. .. image:: ../mpl_data/images/zoom_to_rect.png - :scale: 100 The ``Zoom-to-rectangle`` button Click this toolbar button to activate this mode. Put your mouse @@ -68,7 +62,6 @@ region defined by the zoom out rectangle. .. image:: ../mpl_data/images/subplots.png - :scale: 100 The ``Subplot-configuration`` button Use this tool to configure the parameters of the subplot: the @@ -76,7 +69,6 @@ the columns. .. image:: ../mpl_data/images/filesave.png - :scale: 100 The ``Save`` button Click this button to launch a file save dialog. You can save Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -13,7 +13,6 @@ functions are directed to the current axes .. plot:: pyplot_simple.py - :scale: 75 :include-source: You may be wondering why the x-axis ranges from 0-3 and the y-axis @@ -38,7 +37,6 @@ example, to plot the above with red circles, you would issue .. plot:: pyplot_formatstr.py - :scale: 75 :include-source: See the :func:`~matplotlib.pyplot.plot` documentation for a complete @@ -55,7 +53,6 @@ using arrays. .. plot:: pyplot_three.py - :scale: 75 :include-source: .. _controlling-line-properties: @@ -161,7 +158,6 @@ scenes. Below is an script to create two subplots. .. plot:: pyplot_two_subplots.py - :scale: 75 :include-source: The :func:`~matplotlib.pyplot.figure` command here is optional because @@ -221,9 +217,9 @@ for a more detailed example) .. plot:: pyplot_text.py - :scale: 75 :include-source: + All of the :func:`~matplotlib.pyplot.text` commands return an :class:`matplotlib.text.Text` instance. Just as with with lines above, you can customize the properties by passing keyword arguments @@ -265,9 +261,8 @@ two points to consider: the location being annotated represented by the argument ``xy`` and the location of the text ``xytext``. Both of these arguments are ``(x,y)`` tuples. - + .. plot:: pyplot_annotate.py - :scale: 75 :include-source: In this basic example, both the ``xy`` (arrow tip) and ``xytext`` Modified: trunk/matplotlib/doc/users/text_intro.rst =================================================================== --- trunk/matplotlib/doc/users/text_intro.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/text_intro.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -56,5 +56,4 @@ these commands in action. .. plot:: text_commands.py - :scale: 75 :include-source: Modified: trunk/matplotlib/doc/users/text_props.rst =================================================================== --- trunk/matplotlib/doc/users/text_props.rst 2008年06月13日 19:13:50 UTC (rev 5517) +++ trunk/matplotlib/doc/users/text_props.rst 2008年06月13日 19:23:21 UTC (rev 5518) @@ -58,5 +58,4 @@ upper right. .. plot:: text_layout.py - :scale: 75 :include-source: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5517 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5517&view=rev Author: dsdale Date: 2008年06月13日 12:13:50 -0700 (2008年6月13日) Log Message: ----------- added some static figures Added Paths: ----------- trunk/matplotlib/doc/_static/tex_demo.hires.png trunk/matplotlib/doc/_static/tex_demo.pdf trunk/matplotlib/doc/_static/tex_unicode_demo.hires.png trunk/matplotlib/doc/_static/tex_unicode_demo.pdf Added: trunk/matplotlib/doc/_static/tex_demo.hires.png =================================================================== (Binary files differ) Property changes on: trunk/matplotlib/doc/_static/tex_demo.hires.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/matplotlib/doc/_static/tex_demo.pdf =================================================================== --- trunk/matplotlib/doc/_static/tex_demo.pdf (rev 0) +++ trunk/matplotlib/doc/_static/tex_demo.pdf 2008年06月13日 19:13:50 UTC (rev 5517) @@ -0,0 +1,2834 @@ +%PDF-1.4 +%\xAC\xDC \xAB\xBA +1 0 obj +<< /Type /Catalog /Pages 3 0 R >> +endobj +2 0 obj +<< /CreationDate (D:20080613135832-04'00') +/Producer (matplotlib pdf backend) +/Creator (matplotlib 0.98.0, 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 432 288 ] >> +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\xCDYM\x8F]5\x9D\xB5\xFF\xC1\xEC\xCC.Yĩ\xBB\Fb\x83"Eb$\xA0H\xC0\x82\x8F2J\x830\xFC\xFD9\xF6}/\xFD\x9E}\xE9<u\xA4\xCE,\x92n\xFB\x96\xCB\xF6\xA9\xE3Se\xB7ħ\x91\xE3s\xFC{(R\xBC\x8EY?_\x8E\x9F\xE2\x8E\xDF\xE8\xF5O\xF4\x87a\xF7$dM\xFDsr\x8CP\xEF?G\xE3屡\x94\xF2p\xD2\xCD\xCE\xC3^~;ik.ɢ\xE3\xFFW\xCF\xE2\x97\xF1\x971\xC7ώ3 +X\x9C%+\xB0\x94\x96\x8C +{\x93ׅ3̤&Qe\xCB\xDCWS4\xF3 \xA2I\x85\xB3\xB5Z밯\x89$Gᚚre\xD5\xEC}\x89\x86i\xB0z\xE6\xC4\xD9+\xA9\xF6^\x85\x95!M\xE4DZ-g\xEE\xFD5i\x93\xC8M\x93\xCC\xEBlV\xD1_)9ܰk2f\xCD\xD4T[\xEF\xCFI)\xAE\x92 +{)R\xBC\xF5U֚\xAAE\xC6\xE4\xF5dV\xE7$\x8C\xEE\xECX\x93\x93Za\x92ޟ\x93U \xAC%5i\xE2Yͭ\xF7{b\xC1\xACثT\xAA\L\xB9\xEF\xA9q*\xD83\xDC37\xC3VǬ\xAD,ドル\xA6\xC1;\xBB\xB5\xB1\xF4\xDEl8;\xE7\\xF36'#4\xADH\xAC\xBE\xDCJ#3\xFD%e\xF2`%i\xAE\xE8sk\x87\xC3\xE4\x96c1ĥ5-\xA5#\x80 ![\xA2\x93I\x99K\xAA\xD5BƎ\xCD\xC5 +[\xB5\xD1\xDFN\x89ةW/J"#\xDA,\x82\xE5\x816X\x94a\x9DU\x8B\x8FU +\xA6\xCB9\x80\xA5eG<\xA8n\xF6\xAD\xD3k#(b\x8D\xC9ќ\x8D\xD49wzC\x87\xAF\x8B
Revision: 5516 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5516&view=rev Author: dsdale Date: 2008年06月13日 12:12:40 -0700 (2008年6月13日) Log Message: ----------- remove a stray print statement from plot_directive Modified Paths: -------------- trunk/matplotlib/doc/_static/tex_unicode_demo.png trunk/matplotlib/doc/sphinxext/plot_directive.py Modified: trunk/matplotlib/doc/_static/tex_unicode_demo.png =================================================================== (Binary files differ) Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 19:12:08 UTC (rev 5515) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 19:12:40 UTC (rev 5516) @@ -98,7 +98,7 @@ print ' already have %s'%fullpath return - print ' building %s'%fullpath, type(fullpath) + print ' building %s'%fullpath plt.close('all') # we need to clear between runs mplshell.magic_run(fullpath) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5515 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5515&view=rev Author: dsdale Date: 2008年06月13日 12:12:08 -0700 (2008年6月13日) Log Message: ----------- don't link to example scripts to generate documentation figures Modified Paths: -------------- trunk/matplotlib/doc/devel/documenting_mpl.rst trunk/matplotlib/doc/pyplots/make.py trunk/matplotlib/doc/static_figs/make.py Added Paths: ----------- trunk/matplotlib/doc/static_figs/tex_demo.py trunk/matplotlib/doc/static_figs/tex_unicode_demo.py Removed Paths: ------------- trunk/matplotlib/doc/static_figs/tex_demo.png trunk/matplotlib/doc/static_figs/tex_demo.py trunk/matplotlib/doc/static_figs/tex_unicode_demo.py Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst =================================================================== --- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 17:45:22 UTC (rev 5514) +++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 19:12:08 UTC (rev 5515) @@ -110,7 +110,7 @@ runs and produces the advertised figure. Several figures will be saved with the same basnename as the filename when the documentation is generated (low and high res PNGs, a PDF). Matplotlib includes a -Sphinx extension (file:`sphinxext/plot_directive.py`) for generating +Sphinx extension (:file:`sphinxext/plot_directive.py`) for generating the images from the python script and including either a png copy for html or a pdf for latex:: Modified: trunk/matplotlib/doc/pyplots/make.py =================================================================== --- trunk/matplotlib/doc/pyplots/make.py 2008年06月13日 17:45:22 UTC (rev 5514) +++ trunk/matplotlib/doc/pyplots/make.py 2008年06月13日 19:12:08 UTC (rev 5515) @@ -17,10 +17,11 @@ for fname in glob.glob('*.py'): if fname==__file__: continue basename, ext = os.path.splitext(fname) - outfiles = ['%s.%s' % (basename, format) for format, dpi in formats] + imagefiles = dict([('../_static/%s.%s'%(basename, format), dpi) + for format, dpi in formats]) all_exists = True - for format, dpi in formats: - if not os.path.exists('%s.%s' % (basename, format)): + for imagefile in imagefiles: + if not os.path.exists(imagefile): all_exists = False break @@ -30,8 +31,8 @@ print ' building %s'%fname plt.close('all') # we need to clear between runs mplshell.magic_run(basename) - for format, dpi in formats: - plt.savefig('%s.%s' % (basename, format), dpi=dpi) + for imagefile, dpi in imagefiles.iteritems(): + plt.savefig(imagefile, dpi=dpi) print 'all figures made' Modified: trunk/matplotlib/doc/static_figs/make.py =================================================================== --- trunk/matplotlib/doc/static_figs/make.py 2008年06月13日 17:45:22 UTC (rev 5514) +++ trunk/matplotlib/doc/static_figs/make.py 2008年06月13日 19:12:08 UTC (rev 5515) @@ -2,32 +2,43 @@ import sys, os, glob import matplotlib import IPython.Shell -matplotlib.rcdefaults() +#matplotlib.rcdefaults() matplotlib.use('Agg') mplshell = IPython.Shell.MatplotlibShell('mpl') +formats = [('png', 100), + ('hires.png', 200), + ('pdf', 72)] + def figs(): print 'making figs' import matplotlib.pyplot as plt for fname in glob.glob('*.py'): if fname.split('/')[-1] == __file__.split('/')[-1]: continue basename, ext = os.path.splitext(fname) - outfile = '../_static/%s.png'%basename + imagefiles = dict([('../_static/%s.%s'%(basename, format), dpi) + for format, dpi in formats]) + all_exists = True + for imagefile in imagefiles: + if not os.path.exists(imagefile): + all_exists = False + break - if os.path.exists(outfile): - print ' already have %s'%outfile - continue + if all_exists: + print ' already have %s'%fname else: print ' building %s'%fname - plt.close('all') # we need to clear between runs - mplshell.magic_run(basename) - plt.savefig(outfile) + plt.close('all') # we need to clear between runs + mplshell.magic_run(basename) + for imagefile, dpi in imagefiles.iteritems(): + plt.savefig(imagefile, dpi=dpi) print 'all figures made' def clean(): - patterns = ['#*', '*~', '*.png', '*pyc'] + patterns = (['#*', '*~', '*pyc'] + + ['*.%s' % format for format, dpi in formats]) for pattern in patterns: for fname in glob.glob(pattern): os.remove(fname) Deleted: trunk/matplotlib/doc/static_figs/tex_demo.png =================================================================== (Binary files differ) Deleted: trunk/matplotlib/doc/static_figs/tex_demo.py =================================================================== --- trunk/matplotlib/doc/static_figs/tex_demo.py 2008年06月13日 17:45:22 UTC (rev 5514) +++ trunk/matplotlib/doc/static_figs/tex_demo.py 2008年06月13日 19:12:08 UTC (rev 5515) @@ -1 +0,0 @@ -link ../mpl_examples/pylab_examples/tex_demo.py \ No newline at end of file Added: trunk/matplotlib/doc/static_figs/tex_demo.py =================================================================== --- trunk/matplotlib/doc/static_figs/tex_demo.py (rev 0) +++ trunk/matplotlib/doc/static_figs/tex_demo.py 2008年06月13日 19:12:08 UTC (rev 5515) @@ -0,0 +1,19 @@ +from matplotlib import rc +from numpy import arange, cos, pi +from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \ + grid, savefig, show + + +rc('text', usetex=True) +rc('font', family='serif') +figure(1, figsize=(6,4)) +ax = axes([0.1, 0.1, 0.8, 0.7]) +t = arange(0.0, 1.0+0.01, 0.01) +s = cos(2*2*pi*t)+2 +plot(t, s) + +xlabel(r'\textbf{time (s)}') +ylabel(r'\textit{voltage (mV)}',fontsize=16) +title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", + fontsize=16, color='r') +grid(True) Property changes on: trunk/matplotlib/doc/static_figs/tex_demo.py ___________________________________________________________________ Name: svn:eol-style + native Deleted: trunk/matplotlib/doc/static_figs/tex_unicode_demo.py =================================================================== --- trunk/matplotlib/doc/static_figs/tex_unicode_demo.py 2008年06月13日 17:45:22 UTC (rev 5514) +++ trunk/matplotlib/doc/static_figs/tex_unicode_demo.py 2008年06月13日 19:12:08 UTC (rev 5515) @@ -1 +0,0 @@ -link ../mpl_examples/pylab_examples/tex_unicode_demo.py \ No newline at end of file Added: trunk/matplotlib/doc/static_figs/tex_unicode_demo.py =================================================================== --- trunk/matplotlib/doc/static_figs/tex_unicode_demo.py (rev 0) +++ trunk/matplotlib/doc/static_figs/tex_unicode_demo.py 2008年06月13日 19:12:08 UTC (rev 5515) @@ -0,0 +1,19 @@ +# -*- coding: latin-1 -*- +from matplotlib import rcParams +rcParams['text.usetex']=True +rcParams['text.latex.unicode']=True +from numpy import arange, cos, pi +from matplotlib.pyplot import figure, axes, plot, xlabel, ylabel, title, \ + grid, savefig, show + +figure(1, figsize=(6,4)) +ax = axes([0.1, 0.1, 0.8, 0.7]) +t = arange(0.0, 1.0+0.01, 0.01) +s = cos(2*2*pi*t)+2 +plot(t, s) + +xlabel(r'\textbf{time (s)}') +ylabel(unicode(r'\textit{Velocity (\xB0/sec)}','latin-1'),fontsize=16) +title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", + fontsize=16, color='r') +grid(True) Property changes on: trunk/matplotlib/doc/static_figs/tex_unicode_demo.py ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5514 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5514&view=rev Author: mdboom Date: 2008年06月13日 10:45:22 -0700 (2008年6月13日) Log Message: ----------- Fix formatting typo affecting case where include-source is False. Modified Paths: -------------- trunk/matplotlib/doc/sphinxext/plot_directive.py Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 17:18:41 UTC (rev 5513) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 17:45:22 UTC (rev 5514) @@ -46,7 +46,9 @@ .. image:: ../%(srcdir)s/%(basename)s.png %(options)s - `[%(basename)s source py] `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ + `[%(basename)s source py] <../%(srcdir)s/%(reference)s>`_ + `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ + `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ .. latexonly:: .. image:: ../%(srcdir)s/%(basename)s.pdf @@ -62,7 +64,9 @@ .. image:: ../%(srcdir)s/%(basename)s.png %(options)s - `[%(basename)s source py] <../%(srcdir)s/%(reference)s>`_ `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ + `[%(basename)s source py] <../%(srcdir)s/%(reference)s>`_ + `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ + `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ .. latexonly:: .. image:: ../%(srcdir)s/%(basename)s.pdf This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5513 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5513&view=rev Author: jdh2358 Date: 2008年06月13日 10:18:41 -0700 (2008年6月13日) Log Message: ----------- moved figure autogen into plot directive Modified Paths: -------------- trunk/matplotlib/doc/devel/documenting_mpl.rst trunk/matplotlib/doc/make.py trunk/matplotlib/doc/sphinxext/plot_directive.py trunk/matplotlib/doc/users/annotations.rst trunk/matplotlib/doc/users/artists.rst trunk/matplotlib/doc/users/mathtext.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst trunk/matplotlib/doc/users/text_intro.rst trunk/matplotlib/doc/users/text_props.rst Added Paths: ----------- trunk/matplotlib/doc/matplotlibrc trunk/matplotlib/doc/pyplots/ trunk/matplotlib/doc/pyplots/annotation_basic.py trunk/matplotlib/doc/pyplots/annotation_polar.py trunk/matplotlib/doc/pyplots/dollar_ticks.py trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py trunk/matplotlib/doc/pyplots/fig_x.py trunk/matplotlib/doc/pyplots/make.py trunk/matplotlib/doc/pyplots/matplotlibrc trunk/matplotlib/doc/pyplots/pyplot_annotate.py trunk/matplotlib/doc/pyplots/pyplot_formatstr.py trunk/matplotlib/doc/pyplots/pyplot_mathtext.py trunk/matplotlib/doc/pyplots/pyplot_simple.py trunk/matplotlib/doc/pyplots/pyplot_text.py trunk/matplotlib/doc/pyplots/pyplot_three.py trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py trunk/matplotlib/doc/pyplots/text_commands.py trunk/matplotlib/doc/pyplots/text_layout.py Removed Paths: ------------- trunk/matplotlib/doc/pyplots/annotation_basic.py trunk/matplotlib/doc/pyplots/annotation_polar.py trunk/matplotlib/doc/pyplots/dollar_ticks.py trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py trunk/matplotlib/doc/pyplots/fig_x.py trunk/matplotlib/doc/pyplots/make.py trunk/matplotlib/doc/pyplots/matplotlibrc trunk/matplotlib/doc/pyplots/pyplot_annotate.py trunk/matplotlib/doc/pyplots/pyplot_formatstr.py trunk/matplotlib/doc/pyplots/pyplot_mathtext.py trunk/matplotlib/doc/pyplots/pyplot_simple.py trunk/matplotlib/doc/pyplots/pyplot_text.py trunk/matplotlib/doc/pyplots/pyplot_three.py trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py trunk/matplotlib/doc/pyplots/text_commands.py trunk/matplotlib/doc/pyplots/text_layout.py trunk/matplotlib/doc/users/figures/ Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst =================================================================== --- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 17:18:41 UTC (rev 5513) @@ -102,14 +102,19 @@ Dynamically generated figures ----------------------------- -Each guide will have its own `figures/` directory for scripts to generate images -to be included in the documentation. It is not necessary to explicitly save -the figure in the script, a figure will be saved with the same name as the -filename when the documentation is generated. Matplotlib includes a Sphinx -extension for generating the images from the python script and including either -a png copy for html or a pdf for latex:: +The top level :file:`doc` dir has a folder called :file:`pyplots` in +which you should include any pyplot plotting scripts that you want to +generate figures for the documentation. It is not necessary to +explicitly save the figure in the script, this will be done +automatically at build time to insure that the code that is included +runs and produces the advertised figure. Several figures will be +saved with the same basnename as the filename when the documentation +is generated (low and high res PNGs, a PDF). Matplotlib includes a +Sphinx extension (file:`sphinxext/plot_directive.py`) for generating +the images from the python script and including either a png copy for +html or a pdf for latex:: - .. plot:: figures/pyplot_simple + .. plot:: pyplot_simple.py :scale: 75 :include-source: Modified: trunk/matplotlib/doc/make.py =================================================================== --- trunk/matplotlib/doc/make.py 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/make.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -23,18 +23,18 @@ def html(): check_build() - figs() + #figs() if os.system('sphinx-build -b html -d build/doctrees . build/html'): raise SystemExit("Building HTML failed.") - figures_dest_path = 'build/html/users/figures' + figures_dest_path = 'build/html/pyplots' if os.path.exists(figures_dest_path): shutil.rmtree(figures_dest_path) - shutil.copytree('users/figures', figures_dest_path) + shutil.copytree('pyplots', figures_dest_path) def latex(): check_build() - figs() + #figs() if sys.platform != 'win32': # LaTeX format. if os.system('sphinx-build -b latex -d build/doctrees . build/latex'): @@ -57,9 +57,11 @@ def clean(): shutil.rmtree('build') + for fname in glob.glob('pyplots/*.png') + glob.glob('pyplots/*.pdf'): + os.remove(fname) def all(): - figs() + #figs() html() latex() Added: trunk/matplotlib/doc/matplotlibrc =================================================================== --- trunk/matplotlib/doc/matplotlibrc (rev 0) +++ trunk/matplotlib/doc/matplotlibrc 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,315 @@ +### MATPLOTLIBRC FORMAT + +# This is a sample matplotlib configuration file. It should be placed +# in HOME/.matplotlib/matplotlibrc (unix/linux like systems) and +# C:\Documents and Settings\yourname\.matplotlib (win32 systems) +# +# By default, the installer will overwrite the existing file in the +# install path, so if you want to preserve your's, please move it to +# your HOME dir and set the environment variable if necessary. +# +# This file is best viewed in a editor which supports python mode +# syntax highlighting +# +# Blank lines, or lines starting with a comment symbol, are ignored, +# as are trailing comments. Other lines must have the format +# +# key : val # optional comment +# +# Colors: for the color values below, you can either use +# - a matplotlib color string, such as r, k, or b +# - an rgb tuple, such as (1.0, 0.5, 0.0) +# - a hex string, such as ff00ff (no '#' symbol) +# - a scalar grayscale intensity such as 0.75 +# - a legal html color name, eg red, blue, darkslategray + +#### CONFIGURATION BEGINS HERE +# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg +# WX WXAgg Agg Cairo GD GDK Paint PS PDF SVG Template +backend : Agg +numerix : numpy # numpy, Numeric or numarray +#maskedarray : False # True to use external maskedarray module + # instead of numpy.ma; this is a temporary + # setting for testing maskedarray. +#interactive : False # see http://matplotlib.sourceforge.net/interactive.html +#toolbar : toolbar2 # None | classic | toolbar2 +#timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris + +# Where your matplotlib data lives if you installed to a non-default +# location. This is where the matplotlib fonts, bitmaps, etc reside +#datapath : /home/jdhunter/mpldata + + +### LINES +# See http://matplotlib.sourceforge.net/matplotlib.lines.html for more +# information on line properties. +#lines.linewidth : 1.0 # line width in points +#lines.linestyle : - # solid line +#lines.color : blue +#lines.marker : None # the default marker +#lines.markeredgewidth : 0.5 # the line width around the marker symbol +#lines.markersize : 6 # markersize, in points +#lines.dash_joinstyle : miter # miter|round|bevel +#lines.dash_capstyle : butt # butt|round|projecting +#lines.solid_joinstyle : miter # miter|round|bevel +#lines.solid_capstyle : projecting # butt|round|projecting +#lines.antialiased : True # render lines in antialised (no jaggies) + +### PATCHES +# Patches are graphical objects that fill 2D space, like polygons or +# circles. See +# http://matplotlib.sourceforge.net/matplotlib.patches.html for more +# information on patch properties +#patch.linewidth : 1.0 # edge width in points +#patch.facecolor : blue +#patch.edgecolor : black +#patch.antialiased : True # render patches in antialised (no jaggies) + +### FONT +# +# font properties used by text.Text. See +# http://matplotlib.sourceforge.net/matplotlib.font_manager.html for more +# information on font properties. The 6 font properties used for font +# matching are given below with their default values. +# +# The font.family property has five values: 'serif' (e.g. Times), +# 'sans-serif' (e.g. Helvetica), 'cursive' (e.g. Zapf-Chancery), +# 'fantasy' (e.g. Western), and 'monospace' (e.g. Courier). Each of +# these font families has a default list of font names in decreasing +# order of priority associated with them. +# +# The font.style property has three values: normal (or roman), italic +# or oblique. The oblique style will be used for italic, if it is not +# present. +# +# The font.variant property has two values: normal or small-caps. For +# TrueType fonts, which are scalable fonts, small-caps is equivalent +# to using a font size of 'smaller', or about 83% of the current font +# size. +# +# The font.weight property has effectively 13 values: normal, bold, +# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as +# 400, and bold is 700. bolder and lighter are relative values with +# respect to the current weight. +# +# The font.stretch property has 11 values: ultra-condensed, +# extra-condensed, condensed, semi-condensed, normal, semi-expanded, +# expanded, extra-expanded, ultra-expanded, wider, and narrower. This +# property is not currently implemented. +# +# The font.size property is the default font size for text, given in pts. +# 12pt is the standard value. +# +#font.family : sans-serif +#font.style : normal +#font.variant : normal +#font.weight : medium +#font.stretch : normal +# note that font.size controls default text sizes. To configure +# special text sizes tick labels, axes, labels, title, etc, see the rc +# settings for axes and ticks. Special text sizes can be defined +# relative to font.size, using the following values: xx-small, x-small, +# small, medium, large, x-large, xx-large, larger, or smaller +#font.size : 12.0 +#font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif +#font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif +#font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive +#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy +#font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace + +### TEXT +# text properties used by text.Text. See +# http://matplotlib.sourceforge.net/matplotlib.text.html for more +# information on text properties + +#text.color : black + +### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex +#text.usetex : False # use latex for all text handling. The following fonts + # are supported through the usual rc parameter settings: + # new century schoolbook, bookman, times, palatino, + # zapf chancery, charter, serif, sans-serif, helvetica, + # avant garde, courier, monospace, computer modern roman, + # computer modern sans serif, computer modern typewriter + # If another font is desired which can loaded using the + # LaTeX \usepackage command, please inquire at the + # matplotlib mailing list +#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling + # unicode strings. +#text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES + # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP + # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. + # preamble is a comma separated list of LaTeX statements + # that are included in the LaTeX document preamble. + # An example: + # text.latex.preamble : \usepackage{bm},\usepackage{euler} + # The following packages are always loaded with usetex, so + # beware of package collisions: color, geometry, graphicx, + # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages + # may also be loaded, depending on your font settings +#text.dvipnghack : False # some versions of dvipng don't handle + # alpha channel properly. Use True to correct and flush + # ~/.matplotlib/tex.cache before testing +#text.markup : 'plain' # Affects how text, such as titles and labels, are + # interpreted by default. + # 'plain': As plain, unformatted text + # 'tex': As TeX-like text. Text between $'s will be + # formatted as a TeX math expression. + # This setting has no effect when text.usetex is True. + # In that case, all text will be sent to TeX for + # processing. + +# The following settings allow you to select the fonts in math mode. +# They map from a TeX font name to a fontconfig font pattern. +# These settings are only used if mathtext.fontset is 'custom'. +#mathtext.cal : cursive +#mathtext.rm : serif +#mathtext.tt : monospace +#mathtext.it : serif:italic +#mathtext.bf : serif:bold +#mathtext.sf : sans +#mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix', + # 'stixsans' or 'custom' +#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern + # fonts when a symbol can not be found in one of + # the custom math fonts. + +### AXES +# default face and edge color, default tick sizes, +# default fontsizes for ticklabels, and so on. See +# http://matplotlib.sourceforge.net/matplotlib.axes.html#Axes +#axes.hold : True # whether to clear the axes by default on +#axes.facecolor : white # axes background color +#axes.edgecolor : black # axes edge color +#axes.linewidth : 1.0 # edge linewidth +#axes.grid : False # display grid or not +#axes.titlesize : 14 # fontsize of the axes title +#axes.labelsize : 12 # fontsize of the x any y labels +#axes.labelcolor : black +#axes.axisbelow : False # whether axis gridlines and ticks are below + # the axes elements (lines, text, etc) +#axes.formatter.limits : -7, 7 # use scientific notation if log10 + # of the axis range is smaller than the + # first or larger than the second + +#polaraxes.grid : True # display grid on polar axes + +### TICKS +# see http://matplotlib.sourceforge.net/matplotlib.axis.html#Ticks +#xtick.major.size : 4 # major tick size in points +#xtick.minor.size : 2 # minor tick size in points +#xtick.major.pad : 4 # distance to major tick label in points +#xtick.minor.pad : 4 # distance to the minor tick label in points +#xtick.color : k # color of the tick labels +#xtick.labelsize : 12 # fontsize of the tick labels +#xtick.direction : in # direction: in or out + +#ytick.major.size : 4 # major tick size in points +#ytick.minor.size : 2 # minor tick size in points +#ytick.major.pad : 4 # distance to major tick label in points +#ytick.minor.pad : 4 # distance to the minor tick label in points +#ytick.color : k # color of the tick labels +#ytick.labelsize : 12 # fontsize of the tick labels +#ytick.direction : in # direction: in or out + + +### GRIDS +#grid.color : black # grid color +#grid.linestyle : : # dotted +#grid.linewidth : 0.5 # in points + +### Legend +#legend.isaxes : True +#legend.numpoints : 2 # the number of points in the legend line +#legend.fontsize : 14 +#legend.pad : 0.2 # the fractional whitespace inside the legend border +#legend.markerscale : 1.0 # the relative size of legend markers vs. original +# the following dimensions are in axes coords +#legend.labelsep : 0.010 # the vertical space between the legend entries +#legend.handlelen : 0.05 # the length of the legend lines +#legend.handletextsep : 0.02 # the space between the legend line and legend text +#legend.axespad : 0.02 # the border between the axes and legend edge +#legend.shadow : False + +### FIGURE +# See http://matplotlib.sourceforge.net/matplotlib.figure.html#Figure +#figure.figsize : 8, 6 # figure size in inches +#figure.dpi : 80 # figure dots per inch +#figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray +#figure.edgecolor : white # figure edgecolor + +# 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.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.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 + +#figure.autolayout : False # when True, adjust the axes so that text doesn't overlap + +### IMAGES +#image.aspect : equal # equal | auto | a number +#image.interpolation : bilinear # see help(imshow) for options +#image.cmap : jet # gray | jet etc... +#image.lut : 256 # the size of the colormap lookup table +#image.origin : upper # lower | upper + + +### CONTOUR PLOTS +#contour.negative_linestyle : dashed # dashed | solid + +### SAVING FIGURES +# 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.facecolor : white # figure facecolor when saving +#savefig.edgecolor : white # figure edgecolor when saving + +#cairo.format : png # png, ps, pdf, svg + +# tk backend params +#tk.window_focus : False # Maintain shell focus for TkAgg +#tk.pythoninspect : False # tk sets PYTHONINSEPCT + +# ps backend params +#ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10 +#ps.useafm : False # use of afm fonts, results in small files +#ps.usedistiller : False # can be: None, ghostscript or xpdf + # Experimental: may produce smaller files. + # xpdf intended for production of publication quality files, + # but requires ghostscript, xpdf and ps2eps +#ps.distiller.res : 6000 # dpi +#ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) + +# pdf backend params +#pdf.compression : 6 # integer from 0 to 9 + # 0 disables compression (good for debugging) +#pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) + +# svg backend params +#svg.image_inline : True # write raster image data directly into the svg file +#svg.image_noscale : False # suppress scaling of raster data embedded in SVG +#svg.embed_chars : True # embed character outlines in the SVG file + +# Set the verbose flags. This controls how much information +# matplotlib gives you at runtime and where it goes. The verbosity +# levels are: silent, helpful, debug, debug-annoying. Any level is +# inclusive of all the levels below it. If you setting is debug, +# you'll get all the debug and helpful messages. When submitting +# problems to the mailing-list, please set verbose to helpful or debug +# and paste the output into your report. +# +# The fileo gives the destination for any calls to verbose.report. +# These objects can a filename, or a filehandle like sys.stdout. +# +# You can override the rc default verbosity from the command line by +# giving the flags --verbose-LEVEL where LEVEL is one of the legal +# levels, eg --verbose-helpful. +# +# You can access the verbose instance in your code +# from matplotlib import verbose. +#verbose.level : silent # one of silent, helpful, debug, debug-annoying +#verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr Copied: trunk/matplotlib/doc/pyplots (from rev 5507, trunk/matplotlib/doc/users/figures) Deleted: trunk/matplotlib/doc/pyplots/annotation_basic.py =================================================================== --- trunk/matplotlib/doc/users/figures/annotation_basic.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/annotation_basic.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,16 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.add_subplot(111) - -t = np.arange(0.0, 5.0, 0.01) -s = np.cos(2*np.pi*t) -line, = ax.plot(t, s, lw=2) - -ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5), - arrowprops=dict(facecolor='black', shrink=0.05), - ) - -ax.set_ylim(-2,2) -plt.show() Copied: trunk/matplotlib/doc/pyplots/annotation_basic.py (from rev 5512, trunk/matplotlib/doc/users/figures/annotation_basic.py) =================================================================== --- trunk/matplotlib/doc/pyplots/annotation_basic.py (rev 0) +++ trunk/matplotlib/doc/pyplots/annotation_basic.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,16 @@ +import numpy as np +import matplotlib.pyplot as plt + +fig = plt.figure() +ax = fig.add_subplot(111) + +t = np.arange(0.0, 5.0, 0.01) +s = np.cos(2*np.pi*t) +line, = ax.plot(t, s, lw=2) + +ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5), + arrowprops=dict(facecolor='black', shrink=0.05), + ) + +ax.set_ylim(-2,2) +plt.show() Deleted: trunk/matplotlib/doc/pyplots/annotation_polar.py =================================================================== --- trunk/matplotlib/doc/users/figures/annotation_polar.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/annotation_polar.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,21 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.add_subplot(111, polar=True) -r = np.arange(0,1,0.001) -theta = 2*2*np.pi*r -line, = ax.plot(theta, r, color='#ee8d18', lw=3) - -ind = 800 -thisr, thistheta = r[ind], theta[ind] -ax.plot([thistheta], [thisr], 'o') -ax.annotate('a polar annotation', - xy=(thistheta, thisr), # theta, radius - xytext=(0.05, 0.05), # fraction, fraction - textcoords='figure fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='left', - verticalalignment='bottom', - ) -plt.show() Copied: trunk/matplotlib/doc/pyplots/annotation_polar.py (from rev 5512, trunk/matplotlib/doc/users/figures/annotation_polar.py) =================================================================== --- trunk/matplotlib/doc/pyplots/annotation_polar.py (rev 0) +++ trunk/matplotlib/doc/pyplots/annotation_polar.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,21 @@ +import numpy as np +import matplotlib.pyplot as plt + +fig = plt.figure() +ax = fig.add_subplot(111, polar=True) +r = np.arange(0,1,0.001) +theta = 2*2*np.pi*r +line, = ax.plot(theta, r, color='#ee8d18', lw=3) + +ind = 800 +thisr, thistheta = r[ind], theta[ind] +ax.plot([thistheta], [thisr], 'o') +ax.annotate('a polar annotation', + xy=(thistheta, thisr), # theta, radius + xytext=(0.05, 0.05), # fraction, fraction + textcoords='figure fraction', + arrowprops=dict(facecolor='black', shrink=0.05), + horizontalalignment='left', + verticalalignment='bottom', + ) +plt.show() Deleted: trunk/matplotlib/doc/pyplots/dollar_ticks.py =================================================================== --- trunk/matplotlib/doc/users/figures/dollar_ticks.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/dollar_ticks.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,17 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.ticker as ticker - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(100*np.random.rand(20)) - -formatter = ticker.FormatStrFormatter('$%1.2f') -ax.yaxis.set_major_formatter(formatter) - -for tick in ax.yaxis.get_major_ticks(): - tick.label1On = False - tick.label2On = True - tick.label2.set_color('green') - - Copied: trunk/matplotlib/doc/pyplots/dollar_ticks.py (from rev 5512, trunk/matplotlib/doc/users/figures/dollar_ticks.py) =================================================================== --- trunk/matplotlib/doc/pyplots/dollar_ticks.py (rev 0) +++ trunk/matplotlib/doc/pyplots/dollar_ticks.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,17 @@ +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.ticker as ticker + +fig = plt.figure() +ax = fig.add_subplot(111) +ax.plot(100*np.random.rand(20)) + +formatter = ticker.FormatStrFormatter('$%1.2f') +ax.yaxis.set_major_formatter(formatter) + +for tick in ax.yaxis.get_major_ticks(): + tick.label1On = False + tick.label2On = True + tick.label2.set_color('green') + + Deleted: trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py =================================================================== --- trunk/matplotlib/doc/users/figures/fig_axes_customize_simple.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,27 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# plt.figure creates a matplotlib.figure.Figure instance -fig = plt.figure() -rect = fig.figurePatch # a rectangle instance -rect.set_facecolor('lightgoldenrodyellow') - -ax1 = fig.add_axes([0.1, 0.3, 0.4, 0.4]) -rect = ax1.axesPatch -rect.set_facecolor('lightslategray') - - -for label in ax1.xaxis.get_ticklabels(): - # label is a Text instance - label.set_color('red') - label.set_rotation(45) - label.set_fontsize(16) - -for line in ax1.yaxis.get_ticklines(): - # line is a Line2D instance - line.set_color('green') - line.set_markersize(25) - line.set_markeredgewidth(3) - - - Copied: trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py (from rev 5512, trunk/matplotlib/doc/users/figures/fig_axes_customize_simple.py) =================================================================== --- trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py (rev 0) +++ trunk/matplotlib/doc/pyplots/fig_axes_customize_simple.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,27 @@ +import numpy as np +import matplotlib.pyplot as plt + +# plt.figure creates a matplotlib.figure.Figure instance +fig = plt.figure() +rect = fig.figurePatch # a rectangle instance +rect.set_facecolor('lightgoldenrodyellow') + +ax1 = fig.add_axes([0.1, 0.3, 0.4, 0.4]) +rect = ax1.axesPatch +rect.set_facecolor('lightslategray') + + +for label in ax1.xaxis.get_ticklabels(): + # label is a Text instance + label.set_color('red') + label.set_rotation(45) + label.set_fontsize(16) + +for line in ax1.yaxis.get_ticklines(): + # line is a Line2D instance + line.set_color('green') + line.set_markersize(25) + line.set_markeredgewidth(3) + + + Deleted: trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py =================================================================== --- trunk/matplotlib/doc/users/figures/fig_axes_labels_simple.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,19 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -fig.subplots_adjust(top=0.8) -ax1 = fig.add_subplot(211) -ax1.set_ylabel('volts') -ax1.set_title('a sine wave') - -t = np.arange(0.0, 1.0, 0.01) -s = np.sin(2*np.pi*t) -line, = ax1.plot(t, s, color='blue', lw=2) - -ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3]) -n, bins, patches = ax2.hist(np.random.randn(1000), 50, - facecolor='yellow', edgecolor='yellow') -ax2.set_xlabel('time (s)') - - Copied: trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py (from rev 5512, trunk/matplotlib/doc/users/figures/fig_axes_labels_simple.py) =================================================================== --- trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py (rev 0) +++ trunk/matplotlib/doc/pyplots/fig_axes_labels_simple.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,19 @@ +import numpy as np +import matplotlib.pyplot as plt + +fig = plt.figure() +fig.subplots_adjust(top=0.8) +ax1 = fig.add_subplot(211) +ax1.set_ylabel('volts') +ax1.set_title('a sine wave') + +t = np.arange(0.0, 1.0, 0.01) +s = np.sin(2*np.pi*t) +line, = ax1.plot(t, s, color='blue', lw=2) + +ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3]) +n, bins, patches = ax2.hist(np.random.randn(1000), 50, + facecolor='yellow', edgecolor='yellow') +ax2.set_xlabel('time (s)') + + Deleted: trunk/matplotlib/doc/pyplots/fig_x.py =================================================================== --- trunk/matplotlib/doc/users/figures/fig_x.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/fig_x.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,12 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.lines as lines -fig = plt.figure() - -l1 = lines.Line2D([0, 1], [0, 1], transform=fig.transFigure, figure=fig) - -l2 = lines.Line2D([0, 1], [1, 0], transform=fig.transFigure, figure=fig) - -fig.lines.extend([l1, l2]) - - Copied: trunk/matplotlib/doc/pyplots/fig_x.py (from rev 5512, trunk/matplotlib/doc/users/figures/fig_x.py) =================================================================== --- trunk/matplotlib/doc/pyplots/fig_x.py (rev 0) +++ trunk/matplotlib/doc/pyplots/fig_x.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,12 @@ +import numpy as np +import matplotlib.pyplot as plt +import matplotlib.lines as lines +fig = plt.figure() + +l1 = lines.Line2D([0, 1], [0, 1], transform=fig.transFigure, figure=fig) + +l2 = lines.Line2D([0, 1], [1, 0], transform=fig.transFigure, figure=fig) + +fig.lines.extend([l1, l2]) + + Deleted: trunk/matplotlib/doc/pyplots/make.py =================================================================== --- trunk/matplotlib/doc/users/figures/make.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/make.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,68 +0,0 @@ -#!/usr/bin/env python -import sys, os, glob -import matplotlib -import IPython.Shell -#matplotlib.rcdefaults() -matplotlib.use('Agg') - -mplshell = IPython.Shell.MatplotlibShell('mpl') - -formats = [('png', 100), - ('hires.png', 200), - ('pdf', 72)] - -def figs(): - print 'making figs' - import matplotlib.pyplot as plt - for fname in glob.glob('*.py'): - if fname==__file__: continue - basename, ext = os.path.splitext(fname) - outfiles = ['%s.%s' % (basename, format) for format, dpi in formats] - all_exists = True - for format, dpi in formats: - if not os.path.exists('%s.%s' % (basename, format)): - all_exists = False - break - - if all_exists: - print ' already have %s'%fname - else: - print ' building %s'%fname - plt.close('all') # we need to clear between runs - mplshell.magic_run(basename) - for format, dpi in formats: - plt.savefig('%s.%s' % (basename, format), dpi=dpi) - print 'all figures made' - - -def clean(): - patterns = (['#*', '*~', '*pyc'] + - ['*.%s' % format for format, dpi in formats]) - for pattern in patterns: - for fname in glob.glob(pattern): - os.remove(fname) - print 'all clean' - - - -def all(): - figs() - -funcd = {'figs':figs, - 'clean':clean, - 'all':all, - } - -if len(sys.argv)>1: - for arg in sys.argv[1:]: - func = funcd.get(arg) - if func is None: - raise SystemExit('Do not know how to handle %s; valid args are'%( - arg, funcd.keys())) - func() -else: - all() - - - - Copied: trunk/matplotlib/doc/pyplots/make.py (from rev 5512, trunk/matplotlib/doc/users/figures/make.py) =================================================================== --- trunk/matplotlib/doc/pyplots/make.py (rev 0) +++ trunk/matplotlib/doc/pyplots/make.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,68 @@ +#!/usr/bin/env python +import sys, os, glob +import matplotlib +import IPython.Shell +#matplotlib.rcdefaults() +matplotlib.use('Agg') + +mplshell = IPython.Shell.MatplotlibShell('mpl') + +formats = [('png', 100), + ('hires.png', 200), + ('pdf', 72)] + +def figs(): + print 'making figs' + import matplotlib.pyplot as plt + for fname in glob.glob('*.py'): + if fname==__file__: continue + basename, ext = os.path.splitext(fname) + outfiles = ['%s.%s' % (basename, format) for format, dpi in formats] + all_exists = True + for format, dpi in formats: + if not os.path.exists('%s.%s' % (basename, format)): + all_exists = False + break + + if all_exists: + print ' already have %s'%fname + else: + print ' building %s'%fname + plt.close('all') # we need to clear between runs + mplshell.magic_run(basename) + for format, dpi in formats: + plt.savefig('%s.%s' % (basename, format), dpi=dpi) + print 'all figures made' + + +def clean(): + patterns = (['#*', '*~', '*pyc'] + + ['*.%s' % format for format, dpi in formats]) + for pattern in patterns: + for fname in glob.glob(pattern): + os.remove(fname) + print 'all clean' + + + +def all(): + figs() + +funcd = {'figs':figs, + 'clean':clean, + 'all':all, + } + +if len(sys.argv)>1: + for arg in sys.argv[1:]: + func = funcd.get(arg) + if func is None: + raise SystemExit('Do not know how to handle %s; valid args are'%( + arg, funcd.keys())) + func() +else: + all() + + + + Deleted: trunk/matplotlib/doc/pyplots/matplotlibrc =================================================================== Copied: trunk/matplotlib/doc/pyplots/matplotlibrc (from rev 5512, trunk/matplotlib/doc/users/figures/matplotlibrc) =================================================================== Deleted: trunk/matplotlib/doc/pyplots/pyplot_annotate.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_annotate.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_annotate.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,15 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -ax = plt.subplot(111) - -t = np.arange(0.0, 5.0, 0.01) -s = np.cos(2*np.pi*t) -line, = plt.plot(t, s, lw=2) - -plt.annotate('local max', xy=(2, 1), xytext=(3, 1.5), - arrowprops=dict(facecolor='black', shrink=0.05), - ) - -plt.ylim(-2,2) -plt.show() Copied: trunk/matplotlib/doc/pyplots/pyplot_annotate.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_annotate.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_annotate.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_annotate.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,15 @@ +import numpy as np +import matplotlib.pyplot as plt + +ax = plt.subplot(111) + +t = np.arange(0.0, 5.0, 0.01) +s = np.cos(2*np.pi*t) +line, = plt.plot(t, s, lw=2) + +plt.annotate('local max', xy=(2, 1), xytext=(3, 1.5), + arrowprops=dict(facecolor='black', shrink=0.05), + ) + +plt.ylim(-2,2) +plt.show() Deleted: trunk/matplotlib/doc/pyplots/pyplot_formatstr.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_formatstr.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_formatstr.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,5 +0,0 @@ -import matplotlib.pyplot as plt -plt.plot([1,2,3,4], [1,4,9,16], 'ro') -plt.axis([0, 6, 0, 20]) - - Copied: trunk/matplotlib/doc/pyplots/pyplot_formatstr.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_formatstr.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_formatstr.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_formatstr.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,5 @@ +import matplotlib.pyplot as plt +plt.plot([1,2,3,4], [1,4,9,16], 'ro') +plt.axis([0, 6, 0, 20]) + + Deleted: trunk/matplotlib/doc/pyplots/pyplot_mathtext.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_mathtext.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_mathtext.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,12 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -t = np.arange(0.0, 2.0, 0.01) -s = np.sin(2*np.pi*t) - -plt.plot(t,s) -plt.title(r'$\alpha_i > \beta_i$', fontsize=20) -plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20) -plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$', - fontsize=20) -plt.xlabel('time (s)') -plt.ylabel('volts (mV)') Copied: trunk/matplotlib/doc/pyplots/pyplot_mathtext.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_mathtext.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_mathtext.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_mathtext.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,12 @@ +import numpy as np +import matplotlib.pyplot as plt +t = np.arange(0.0, 2.0, 0.01) +s = np.sin(2*np.pi*t) + +plt.plot(t,s) +plt.title(r'$\alpha_i > \beta_i$', fontsize=20) +plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20) +plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$', + fontsize=20) +plt.xlabel('time (s)') +plt.ylabel('volts (mV)') Deleted: trunk/matplotlib/doc/pyplots/pyplot_simple.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_simple.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_simple.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,4 +0,0 @@ -import matplotlib.pyplot as plt -plt.plot([1,2,3]) -plt.ylabel('some numbers') -plt.show() Copied: trunk/matplotlib/doc/pyplots/pyplot_simple.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_simple.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_simple.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_simple.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,4 @@ +import matplotlib.pyplot as plt +plt.plot([1,2,3]) +plt.ylabel('some numbers') +plt.show() Deleted: trunk/matplotlib/doc/pyplots/pyplot_text.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_text.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_text.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,17 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -mu, sigma = 100, 15 -x = mu + sigma * np.random.randn(10000) - -# the histogram of the data -n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75) - - -plt.xlabel('Smarts') -plt.ylabel('Probability') -plt.title('Histogram of IQ') -plt.text(60, .025, r'$\mu=100,\ \sigma=15$') -plt.axis([40, 160, 0, 0.03]) -plt.grid(True) - Copied: trunk/matplotlib/doc/pyplots/pyplot_text.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_text.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_text.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_text.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,17 @@ +import numpy as np +import matplotlib.pyplot as plt + +mu, sigma = 100, 15 +x = mu + sigma * np.random.randn(10000) + +# the histogram of the data +n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75) + + +plt.xlabel('Smarts') +plt.ylabel('Probability') +plt.title('Histogram of IQ') +plt.text(60, .025, r'$\mu=100,\ \sigma=15$') +plt.axis([40, 160, 0, 0.03]) +plt.grid(True) + Deleted: trunk/matplotlib/doc/pyplots/pyplot_three.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_three.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_three.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,9 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# evenly sampled time at 200ms intervals -t = np.arange(0., 5., 0.2) - -# red dashes, blue squares and green triangles -plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^') - Copied: trunk/matplotlib/doc/pyplots/pyplot_three.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_three.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_three.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_three.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,9 @@ +import numpy as np +import matplotlib.pyplot as plt + +# evenly sampled time at 200ms intervals +t = np.arange(0., 5., 0.2) + +# red dashes, blue squares and green triangles +plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^') + Deleted: trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py =================================================================== --- trunk/matplotlib/doc/users/figures/pyplot_two_subplots.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,16 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -def f(t): - return np.exp(-t) * np.cos(2*np.pi*t) - -t1 = np.arange(0.0, 5.0, 0.1) -t2 = np.arange(0.0, 5.0, 0.02) - -plt.figure(1) -plt.subplot(211) -plt.plot(t1, f(t1), 'bo', t2, f(t2), 'k') - -plt.subplot(212) -plt.plot(t2, np.cos(2*np.pi*t2), 'r--') - Copied: trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py (from rev 5512, trunk/matplotlib/doc/users/figures/pyplot_two_subplots.py) =================================================================== --- trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py (rev 0) +++ trunk/matplotlib/doc/pyplots/pyplot_two_subplots.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,16 @@ +import numpy as np +import matplotlib.pyplot as plt + +def f(t): + return np.exp(-t) * np.cos(2*np.pi*t) + +t1 = np.arange(0.0, 5.0, 0.1) +t2 = np.arange(0.0, 5.0, 0.02) + +plt.figure(1) +plt.subplot(211) +plt.plot(t1, f(t1), 'bo', t2, f(t2), 'k') + +plt.subplot(212) +plt.plot(t2, np.cos(2*np.pi*t2), 'r--') + Deleted: trunk/matplotlib/doc/pyplots/text_commands.py =================================================================== --- trunk/matplotlib/doc/users/figures/text_commands.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/text_commands.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import matplotlib.pyplot as plt - -fig = plt.figure() -fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold') - -ax = fig.add_subplot(111) - -ax.set_title('axes title') - -ax.set_xlabel('xlabel') -ax.set_ylabel('ylabel') - -ax.text(5, 8, 'boxed italics text in data coords', style='italic', - bbox={'facecolor':'red', 'alpha':0.5, 'pad':10}) - -ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=20) - -ax.text(4, 3, unicode('unicode: Institut f374円r Festk366円rperphysik', 'latin-1')) - -ax.text(0.95, 0.01, 'colored text in axes coords', - verticalalignment='bottom', horizontalalignment='right', - transform=ax.transAxes, - color='green', fontsize=20) - - -ax.plot([2], [1], 'o') -ax.annotate('annotate', xy=(2, 1), xytext=(3, 4), - arrowprops=dict(facecolor='black', shrink=0.05)) - -ax.axis([0, 10, 0, 10]) - -plt.show() Copied: trunk/matplotlib/doc/pyplots/text_commands.py (from rev 5512, trunk/matplotlib/doc/users/figures/text_commands.py) =================================================================== --- trunk/matplotlib/doc/pyplots/text_commands.py (rev 0) +++ trunk/matplotlib/doc/pyplots/text_commands.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +import matplotlib.pyplot as plt + +fig = plt.figure() +fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold') + +ax = fig.add_subplot(111) + +ax.set_title('axes title') + +ax.set_xlabel('xlabel') +ax.set_ylabel('ylabel') + +ax.text(5, 8, 'boxed italics text in data coords', style='italic', + bbox={'facecolor':'red', 'alpha':0.5, 'pad':10}) + +ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=20) + +ax.text(4, 3, unicode('unicode: Institut f374円r Festk366円rperphysik', 'latin-1')) + +ax.text(0.95, 0.01, 'colored text in axes coords', + verticalalignment='bottom', horizontalalignment='right', + transform=ax.transAxes, + color='green', fontsize=20) + + +ax.plot([2], [1], 'o') +ax.annotate('annotate', xy=(2, 1), xytext=(3, 4), + arrowprops=dict(facecolor='black', shrink=0.05)) + +ax.axis([0, 10, 0, 10]) + +plt.show() Deleted: trunk/matplotlib/doc/pyplots/text_layout.py =================================================================== --- trunk/matplotlib/doc/users/figures/text_layout.py 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/doc/pyplots/text_layout.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -1,77 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.patches as patches - -# build a rectangle in axes coords -left, width = .25, .5 -bottom, height = .25, .5 -right = left + width -top = bottom + height - -fig = plt.figure() -ax = fig.add_subplot(111) - -# axes coordinates are 0,0 is bottom left and 1,1 is upper right -p = patches.Rectangle( - (left, bottom), width, height, - fill=False, transform=ax.transAxes, clip_on=False - ) - -ax.add_patch(p) - -ax.text(left, bottom, 'left top', - horizontalalignment='left', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(left, bottom, 'left bottom', - horizontalalignment='left', - verticalalignment='bottom', - transform=ax.transAxes) - -ax.text(right, top, 'right bottom', - horizontalalignment='right', - verticalalignment='bottom', - transform=ax.transAxes) - -ax.text(right, top, 'right top', - horizontalalignment='right', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(right, bottom, 'center top', - horizontalalignment='center', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(left, 0.5*(bottom+top), 'right center', - horizontalalignment='right', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(left, 0.5*(bottom+top), 'left center', - horizontalalignment='left', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle', - horizontalalignment='center', - verticalalignment='center', - fontsize=20, color='red', - transform=ax.transAxes) - -ax.text(right, 0.5*(bottom+top), 'centered', - horizontalalignment='center', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(left, top, 'rotated\nwith newlines', - horizontalalignment='center', - verticalalignment='center', - rotation=45, - transform=ax.transAxes) - -ax.set_axis_off() -plt.show() Copied: trunk/matplotlib/doc/pyplots/text_layout.py (from rev 5512, trunk/matplotlib/doc/users/figures/text_layout.py) =================================================================== --- trunk/matplotlib/doc/pyplots/text_layout.py (rev 0) +++ trunk/matplotlib/doc/pyplots/text_layout.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -0,0 +1,77 @@ +import matplotlib.pyplot as plt +import matplotlib.patches as patches + +# build a rectangle in axes coords +left, width = .25, .5 +bottom, height = .25, .5 +right = left + width +top = bottom + height + +fig = plt.figure() +ax = fig.add_subplot(111) + +# axes coordinates are 0,0 is bottom left and 1,1 is upper right +p = patches.Rectangle( + (left, bottom), width, height, + fill=False, transform=ax.transAxes, clip_on=False + ) + +ax.add_patch(p) + +ax.text(left, bottom, 'left top', + horizontalalignment='left', + verticalalignment='top', + transform=ax.transAxes) + +ax.text(left, bottom, 'left bottom', + horizontalalignment='left', + verticalalignment='bottom', + transform=ax.transAxes) + +ax.text(right, top, 'right bottom', + horizontalalignment='right', + verticalalignment='bottom', + transform=ax.transAxes) + +ax.text(right, top, 'right top', + horizontalalignment='right', + verticalalignment='top', + transform=ax.transAxes) + +ax.text(right, bottom, 'center top', + horizontalalignment='center', + verticalalignment='top', + transform=ax.transAxes) + +ax.text(left, 0.5*(bottom+top), 'right center', + horizontalalignment='right', + verticalalignment='center', + rotation='vertical', + transform=ax.transAxes) + +ax.text(left, 0.5*(bottom+top), 'left center', + horizontalalignment='left', + verticalalignment='center', + rotation='vertical', + transform=ax.transAxes) + +ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle', + horizontalalignment='center', + verticalalignment='center', + fontsize=20, color='red', + transform=ax.transAxes) + +ax.text(right, 0.5*(bottom+top), 'centered', + horizontalalignment='center', + verticalalignment='center', + rotation='vertical', + transform=ax.transAxes) + +ax.text(left, top, 'rotated\nwith newlines', + horizontalalignment='center', + verticalalignment='center', + rotation=45, + transform=ax.transAxes) + +ax.set_axis_off() +plt.show() Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 17:18:41 UTC (rev 5513) @@ -13,8 +13,8 @@ source will be included inline, as well as a link to the source. """ +import sys, os, glob from docutils.parsers.rst import directives -import os.path try: # docutils 0.4 @@ -24,6 +24,14 @@ from docutils.parsers.rst.directives.images import Image align = Image.align + +import matplotlib +import IPython.Shell +matplotlib.use('Agg') +import matplotlib.pyplot as plt + +mplshell = IPython.Shell.MatplotlibShell('mpl') + options = {'alt': directives.unchanged, 'height': directives.length_or_unitless, 'width': directives.length_or_percentage_or_unitless, @@ -35,40 +43,85 @@ template_no_source = """ .. htmlonly:: - .. image:: %(reference)s.png - :target: %(reference)s.hires.png + .. image:: ../%(srcdir)s/%(basename)s.png %(options)s + `[%(basename)s source py] `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ + .. latexonly:: - .. image:: %(reference)s.pdf + .. image:: ../%(srcdir)s/%(basename)s.pdf %(options)s """ template_source = """ -.. literalinclude:: %(reference)s.py +.. literalinclude:: ../pyplots/%(reference)s .. htmlonly:: - .. image:: %(reference)s.png - :target: %(reference)s.hires.png + .. image:: ../%(srcdir)s/%(basename)s.png %(options)s - `[%(basename)s.py] <%(reference)s.py>`_ + `[%(basename)s source py] <../%(srcdir)s/%(reference)s>`_ `[%(basename)s highres png] <../%(srcdir)s/%(basename)s.hires.png>`_ `[%(basename)s pdf] <../%(srcdir)s/%(basename)s.pdf>`_ .. latexonly:: - .. image:: %(reference)s.pdf + .. image:: ../%(srcdir)s/%(basename)s.pdf %(options)s """ +def makefig(fullpath, outdir): + """ + run a pyplot script and save the low and high res PNGs and a PDF in _static + """ + + fullpath = str(fullpath) # todo, why is unicode breaking this + formats = [('png', 100), + ('hires.png', 200), + ('pdf', 72)] + + basedir, fname = os.path.split(fullpath) + basename, ext = os.path.splitext(fname) + all_exists = True + + for format, dpi in formats: + outname = os.path.join(outdir, '%s.%s' % (basename, format)) + if not os.path.exists(outname): + all_exists = False + break + + if all_exists: + print ' already have %s'%fullpath + return + + print ' building %s'%fullpath, type(fullpath) + plt.close('all') # we need to clear between runs + + mplshell.magic_run(fullpath) + for format, dpi in formats: + #print 'saving', outdir, basename, format + outname = os.path.join(outdir, '%s.%s' % (basename, format)) + plt.savefig(outname, dpi=dpi) + print ' all figures made' + def run(arguments, options, state_machine, lineno): + #print 'arguments', arguments + #print 'options', options + reference = directives.uri(arguments[0]) - print reference - for ext in ('.py', '.png', '.pdf'): - if reference.endswith(ext): - reference = reference[:-len(ext)] - break + basename, ext = os.path.splitext(reference) + + # todo - should we be using the _static dir for the outdir, I am + # not sure we want to corrupt that dir with autogenerated files + # since it also has permanent files in it which makes it difficult + # to clean (save an rm -rf followed by and svn up) + srcdir = 'pyplots' + + makefig(os.path.join(srcdir, reference), srcdir) + + # todo: it is not great design to assume the makefile is putting + # the figs into the right place, so we may want to do that here instead. + if options.has_key('include-source'): template = template_source del options['include-source'] @@ -77,7 +130,7 @@ options = [' :%s: %s' % (key, val) for key, val in options.items()] options = "\n".join(options) - basename = os.path.basename(reference) + lines = template % locals() lines = lines.split('\n') @@ -85,6 +138,7 @@ lines, state_machine.input_lines.source(0)) return [] + try: from docutils.parsers.rst import Directive except ImportError: Modified: trunk/matplotlib/doc/users/annotations.rst =================================================================== --- trunk/matplotlib/doc/users/annotations.rst 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/users/annotations.rst 2008年06月13日 17:18:41 UTC (rev 5513) @@ -12,7 +12,7 @@ ``xy`` and the location of the text ``xytext``. Both of these arguments are ``(x,y)`` tuples. -.. plot:: figures/annotation_basic.py +.. plot:: annotation_basic.py :include-source: :scale: 75 @@ -72,7 +72,7 @@ ``fontsize are passed from the `~matplotlib.Axes.annotate` to the ``Text`` instance -.. plot:: figures/annotation_polar.py +.. plot:: annotation_polar.py :scale: 75 :include-source: Modified: trunk/matplotlib/doc/users/artists.rst =================================================================== --- trunk/matplotlib/doc/users/artists.rst 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/users/artists.rst 2008年06月13日 17:18:41 UTC (rev 5513) @@ -135,7 +135,7 @@ Try creating the figure below. -.. plot:: figures/fig_axes_labels_simple +.. plot:: fig_axes_labels_simple.py :scale: 75 .. _customizing-artists: @@ -326,7 +326,7 @@ In [195]: fig.canvas.draw() -.. plot:: figures/fig_x +.. plot:: fig_x.py :scale: 75 @@ -604,7 +604,7 @@ Here is an example, not recommended for its beauty, which customizes the axes and tick properties -.. plot:: figures/fig_axes_customize_simple.py +.. plot:: fig_axes_customize_simple.py :scale: 75 :include-source: @@ -642,6 +642,6 @@ Here is an example which sets the formatter for the upper ticks with dollar signs and colors them green on the right side of the yaxis -.. plot:: figures/dollar_ticks.py +.. plot:: dollar_ticks.py :scale: 75 :include-source: Modified: trunk/matplotlib/doc/users/mathtext.rst =================================================================== --- trunk/matplotlib/doc/users/mathtext.rst 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/users/mathtext.rst 2008年06月13日 17:18:41 UTC (rev 5513) @@ -271,7 +271,7 @@ Here is an example illustrating many of these features in context. -.. plot:: figures/pyplot_mathtext.py +.. plot:: pyplot_mathtext.py :scale: 75 :include-source: Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 15:54:21 UTC (rev 5512) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 17:18:41 UTC (rev 5513) @@ -12,7 +12,7 @@ keeps track of the current figure and plotting area, and the plotting functions are directed to the current axes -.. plot:: figures/pyplot_simple +.. plot:: pyplot_simple.py :scale: 75 :include-source: @@ -37,7 +37,7 @@ The default format string is 'b-', which is a solid blue line. For example, to plot the above with red circles, you would issue -.. plot:: figures/pyplot_formatstr.py +.. plot:: pyplot_formatstr.py :scale: 75 :include-source: @@ -54,7 +54,7 @@ plotting several lines with different format styles in one command using arrays. -.. plot:: figures/pyplot_three.py +.. plot:: pyplot_three.py :scale: 75 :include-source: @@ -160,7 +160,7 @@ to worry about this, because it is all taken care of behind the scenes. Below is an script to create two subplots. -.. plot:: figures/pyplot_two_subplots.py +.. plot:: pyplot_two_subplots.py :scale: 75 :include-source: @@ -220,7 +220,7 @@ are used tox add text in the indicated locations (see :ref:`text-intro` for a more detailed example) -.. plot:: figures/pyplot_text.py +.. plot:: pyplot_text.py :scale: 75 :include-source: @@ -265,8 +265,8 @@ two points to consider: the location being annotated represented by the argument ``xy`` and the location of the text ``xytext``. Both of these arguments are ``(x,y)`` tuples. - -.. plot:: figures/pyplot_annotate.py + +.. plot:: pyplot_annotate.py ... [truncated message content]
Revision: 5512 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5512&view=rev Author: jswhit Date: 2008年06月13日 08:54:21 -0700 (2008年6月13日) Log Message: ----------- fixed URL in drawlsmask docstring. Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 15:53:02 UTC (rev 5511) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 15:54:21 UTC (rev 5512) @@ -2787,7 +2787,7 @@ rgba_ocean (default is lakes=False). Default land-sea mask is from - http://www.ngdc.noaa.gov/seg/cdroms/graham/graham/graham.htm + http://www.ngdc.noaa.gov/ecosys/cdroms/graham/graham/graham.htm and has 5-minute resolution. To specify your own global land-sea mask, set the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5511 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5511&view=rev Author: jswhit Date: 2008年06月13日 08:53:02 -0700 (2008年6月13日) Log Message: ----------- more work on docstrings. Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 15:38:46 UTC (rev 5510) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 15:53:02 UTC (rev 5511) @@ -192,7 +192,7 @@ area_thresh coastline or lake with an area smaller than area_thresh in km^2 will not be plotted. Default 10000,1000,100,10,1 for resolution - ``c``,``l``,``i``,``h``,``f``. + ``c``, ``l``, ``i``, ``h``, ``f``. rsphere radius of the sphere used to define map projection (default 6370997 meters, close to the arithmetic mean radius of the earth). If given as a sequence, the @@ -1613,46 +1613,49 @@ dashes=[1,1],labels=[0,0,0,0],labelstyle=None, \ fmt='%g',xoffset=None,yoffset=None,ax=None,**kwargs): """ - draw parallels (latitude lines). + Draw and label parallels (latitude lines). - circles - list containing latitude values to draw (in degrees). + ============== ==================================================== + Keyword Description + ============== ==================================================== + circles sequence containing latitude values to draw (in + degrees). + color color to draw parallels (default black). + linewidth line width for parallels (default 1.) + zorder sets the zorder for parallels (if not specified, + uses default zorder for matplotlib.lines.Line2D + objects). + dashes dash pattern for parallels (default [1,1], i.e. + 1 pixel on, 1 pixel off). + labels list of 4 values (default [0,0,0,0]) that control + whether parallels are labelled where they intersect + the left, right, top or bottom of the plot. For + example labels=[1,0,0,1] will cause parallels + to be labelled where they intersect the left and + and bottom of the plot, but not the right and top. + labelstyle if set to "+/-", north and south latitudes are + labelled with "+" and "-", otherwise they are + labelled with "N" and "S". + fmt a format string to format the parallel labels + (default '%g') **or** a function that takes a + latitude value in degrees as it's only argument + and returns a formatted string. + xoffset label offset from edge of map in x-direction + (default is 0.01 times width of map in map + projection coordinates). + yoffset label offset from edge of map in y-direction + (default is 0.01 times height of map in map + projection coordinates). + ax axes instance (overrides default axes instance) + \**kwargs additional keyword arguments controlling text + for labels that are passed on to + the text method of the axes instance (see + matplotlib.pyplot.text documentation). + ============== ==================================================== - color - color to draw parallels (default black). - - linewidth - line width for parallels (default 1.) - - zorder - sets the zorder for parallels (if not specified, - uses default zorder for Line2D class). - - dashes - dash pattern for parallels (default [1,1], i.e. 1 pixel on, - 1 pixel off). - - labels - list of 4 values (default [0,0,0,0]) that control whether - parallels are labelled where they intersect the left, right, top or - bottom of the plot. For example labels=[1,0,0,1] will cause parallels - to be labelled where they intersect the left and bottom of the plot, - but not the right and top. - - labelstyle - if set to "+/-", north and south latitudes are labelled - with "+" and "-", otherwise they are labelled with "N" and "S". - - fmt can be is a format string to format the parallel labels - (default '%g') or a function that takes a latitude value - in degrees as it's only argument and returns a formatted string. - - xoffset - label offset from edge of map in x-direction - (default is 0.01 times width of map in map projection coordinates). - - yoffset - label offset from edge of map in y-direction - (default is 0.01 times height of map in map projection coordinates). - - ax - axes instance (overrides default axes instance) - - additional keyword arguments control text properties for labels (see - matplotlib.pyplot.text documentation) - - returns a dictionary whose keys are the parallels, and - whose values are tuples containing lists of the Line2D and Text instances + returns a dictionary whose keys are the parallel values, and + whose values are tuples containing lists of the + matplotlib.lines.Line2D and matplotlib.text.Text instances associated with each parallel. """ # get current axes instance (if none specified). @@ -1865,46 +1868,49 @@ dashes=[1,1],labels=[0,0,0,0],labelstyle=None,\ fmt='%g',xoffset=None,yoffset=None,ax=None,**kwargs): """ - draw meridians (longitude lines). + Draw and label meridians (longitude lines). - meridians - list containing longitude values to draw (in degrees). + ============== ==================================================== + Keyword Description + ============== ==================================================== + meridians sequence containing longitude values to draw (in + degrees). + color color to draw meridians (default black). + linewidth line width for meridians (default 1.) + zorder sets the zorder for meridians (if not specified, + uses default zorder for matplotlib.lines.Line2D + objects). + dashes dash pattern for meridians (default [1,1], i.e. + 1 pixel on, 1 pixel off). + labels list of 4 values (default [0,0,0,0]) that control + whether meridians are labelled where they intersect + the left, right, top or bottom of the plot. For + example labels=[1,0,0,1] will cause meridians + to be labelled where they intersect the left and + and bottom of the plot, but not the right and top. + labelstyle if set to "+/-", east and west longitudes are + labelled with "+" and "-", otherwise they are + labelled with "E" and "W". + fmt a format string to format the meridian labels + (default '%g') **or** a function that takes a + longitude value in degrees as it's only argument + and returns a formatted string. + xoffset label offset from edge of map in x-direction + (default is 0.01 times width of map in map + projection coordinates). + yoffset label offset from edge of map in y-direction + (default is 0.01 times height of map in map + projection coordinates). + ax axes instance (overrides default axes instance) + \**kwargs additional keyword arguments controlling text + for labels that are passed on to + the text method of the axes instance (see + matplotlib.pyplot.text documentation). + ============== ==================================================== - color - color to draw meridians (default black). - - linewidth - line width for meridians (default 1.) - - zorder - sets the zorder for meridians (if not specified, - uses default zorder for Line2D class). - - dashes - dash pattern for meridians (default [1,1], i.e. 1 pixel on, - 1 pixel off). - - labels - list of 4 values (default [0,0,0,0]) that control whether - meridians are labelled where they intersect the left, right, top or - bottom of the plot. For example labels=[1,0,0,1] will cause meridians - to be labelled where they intersect the left and bottom of the plot, - but not the right and top. - - labelstyle - if set to "+/-", east and west longitudes are labelled - with "+" and "-", otherwise they are labelled with "E" and "W". - - fmt can be is a format string to format the meridian labels - (default '%g') or a function that takes a longitude value - in degrees as it's only argument and returns a formatted string. - - xoffset - label offset from edge of map in x-direction - (default is 0.01 times width of map in map projection coordinates). - - yoffset - label offset from edge of map in y-direction - (default is 0.01 times height of map in map projection coordinates). - - ax - axes instance (overrides default axes instance) - - additional keyword arguments control text properties for labels (see - matplotlib.pyplot.text documentation) - - returns a dictionary whose keys are the meridians, and - whose values are tuples containing lists of the Line2D and Text instances + returns a dictionary whose keys are the meridian values, and + whose values are tuples containing lists of the + matplotlib.lines.Line2D and matplotlib.text.Text instances associated with each meridian. """ # get current axes instance (if none specified). @@ -2102,8 +2108,8 @@ def gcpoints(self,lon1,lat1,lon2,lat2,npoints): """ - compute npoints points along a great circle with endpoints - (lon1,lat1) and (lon2,lat2). + compute ``points`` points along a great circle with endpoints + ``(lon1,lat1)`` and ``(lon2,lat2)``. Returns arrays x,y with map projection coordinates. """ @@ -2118,21 +2124,25 @@ def drawgreatcircle(self,lon1,lat1,lon2,lat2,del_s=100.,**kwargs): """ - draw a great circle on the map. + Draw a great circle on the map. - lon1,lat1 - longitude,latitude of one endpoint of the great circle. + ============== ======================================================= + Keyword Description + ============== ======================================================= + lon1,lat1 longitude,latitude of one endpoint of the great circle. + lon2,lat2 longitude,latitude of the other endpoint of the great + circle. + del_s points on great circle computed every del_s kilometers + (default 100). + \**kwargs other keyword arguments are passed on to :meth:`plot` + method of Basemap instance. + ============== ======================================================= - lon2,lat2 - longitude,latitude of the other endpoint of the great circle. + .. note:: + Cannot handle situations in which the great circle intersects + the edge of the map projection domain, and then re-enters the domain. - del_s - points on great circle computed every delta kilometers (default 100). - - Other keyword arguments (\**kwargs) control plotting of great circle line, - see matplotlib.pyplot.plot documentation for details. - - Cannot handle situations in which the great circle intersects - the edge of the map projection domain, and then re-enters the domain. - - Returns a Line2D object. + Returns a matplotlib.lines.Line2D object. """ # use great circle formula for a perfect sphere. gc = pyproj.Geod(a=self.rmajor,b=self.rminor) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5510 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5510&view=rev Author: dsdale Date: 2008年06月13日 08:38:46 -0700 (2008年6月13日) Log Message: ----------- updated documentation guide to include Mike's plot directive Modified Paths: -------------- trunk/matplotlib/doc/devel/documenting_mpl.rst Modified: trunk/matplotlib/doc/devel/documenting_mpl.rst =================================================================== --- trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 15:13:39 UTC (rev 5509) +++ trunk/matplotlib/doc/devel/documenting_mpl.rst 2008年06月13日 15:38:46 UTC (rev 5510) @@ -56,11 +56,16 @@ The Sphinx website contains plenty of documentation_ concerning ReST markup and working with Sphinx in general. Here are a few additional things to keep in mind: +* Please familiarize yourself with the Sphinx directives for `inline + markup`_. Matplotlib's documentation makes heavy use of cross-referencing and + other semantic markup. For example, when referring to external files, use the + ``:file:`` directive. + * Sphinx does not support tables with column- or row-spanning cells for latex output. Such tables can not be used when documenting matplotlib. -* Mathematical expressions can be rendered as png images in html, and in - the usual way by latex. For example: +* Mathematical expressions can be rendered as png images in html, and in the + usual way by latex. For example: ``math:`sin(x_n^2)``` yields: :math:`sin(x_n^2)`, and:: @@ -88,31 +93,50 @@ In [69]: lines = plot([1,2,3]) .. _documentation: http://sphinx.pocoo.org/contents.html +.. _`inline markup`: http://sphinx.pocoo.org/markup/inline.html Figures ======= +Dynamically generated figures +----------------------------- + Each guide will have its own `figures/` directory for scripts to generate images -to be included in the dcoumentation. It is not necessary to explicitly save +to be included in the documentation. It is not necessary to explicitly save the figure in the script, a figure will be saved with the same name as the -filename when the documentation is generated. For example, use:: +filename when the documentation is generated. Matplotlib includes a Sphinx +extension for generating the images from the python script and including either +a png copy for html or a pdf for latex:: - .. literalinclude:: figures/pyplot_simple.py + .. plot:: figures/pyplot_simple + :scale: 75 + :include-source: - .. image:: figures/pyplot_simple.png - :scale: 75 +The ``:scale:`` directive rescales the image to some percentage of the original +size. ``:include-source:`` will present the contents of the file, marked up as +source code. +Static figures +-------------- Any figures that rely on optional system configurations should be generated with a script residing in doc/static_figs. The resulting figures will be saved to doc/_static, and will be named based on the name of the script, so we can -avoid unintentionally overwriting any existing figures. Please add a line to +avoid unintentionally overwriting any existing figures. Please run the +:file:`doc/static_figs/make.py` file when adding additional figures, and commit +the script **and** the images to svn. Please also add a line to the README in doc/static-figs for any additional requirements necessary to -generate a new figure. +generate a new figure. These figures are not to be generated during the +documentation build. Please use something like the following to include the +source code and the image:: + .. literalinclude:: ../mpl_examples/pylab_examples/tex_unicode_demo.py + .. image:: ../_static/tex_unicode_demo.png + + .. _referring-to-mpl-docs: Referring to mpl documents This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5509 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5509&view=rev Author: jswhit Date: 2008年06月13日 08:13:39 -0700 (2008年6月13日) Log Message: ----------- updating docstrings Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 15:04:49 UTC (rev 5508) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008年06月13日 15:13:39 UTC (rev 5509) @@ -112,6 +112,11 @@ and creates the coastline data structures in native map projection coordinates. + Calling a Basemap class instance with the arguments lon, lat will + convert lon/lat (in degrees) to x/y native map projection coordinates + (in meters). The inverse transformation is done if the optional keyword + ``inverse`` is set to True. + The desired projection is set with the projection keyword. Default is ``cyl``. Supported values for the projection keyword are: @@ -1296,18 +1301,19 @@ """ Draw coastlines. - linewidth - coastline width (default 1.) + ============== ==================================================== + Keyword Description + ============== ==================================================== + linewidth coastline width (default 1.) + color coastline color (default black) + antialiased antialiasing switch for coastlines (default True). + ax axes instance (overrides default axes instance) + zorder sets the zorder for the coastlines (if not specified, + uses default zorder for + matplotlib.patches.LineCollections). + ============== ==================================================== - color - coastline color (default black) - - antialiased - antialiasing switch for coastlines (default True). - - ax - axes instance (overrides default axes instance) - - zorder - sets the zorder for the coastlines (if not specified, - uses default zorder for LineCollections). - - returns a LineCollection. + returns a matplotlib.patches.LineCollection object. """ if self.resolution is None: raise AttributeError, 'there are no boundary datasets associated with this Basemap instance' @@ -1335,18 +1341,20 @@ """ Draw country boundaries. - linewidth - country boundary line width (default 0.5) + ============== ==================================================== + Keyword Description + ============== ==================================================== + linewidth country boundary line width (default 0.5) + color country boundary line color (default black) + antialiased antialiasing switch for country boundaries (default + True). + ax axes instance (overrides default axes instance) + zorder sets the zorder for the country boundaries (if not + specified uses default zorder for + matplotlib.patches.LineCollections). + ============== ==================================================== - color - country boundary line color (default black) - - antialiased - antialiasing switch for country boundaries (default True). - - ax - axes instance (overrides default axes instance) - - zorder - sets the zorder for the country boundaries (if not specified, - uses default zorder for LineCollections). - - returns a LineCollection. + returns a matplotlib.patches.LineCollection object. """ if self.resolution is None: raise AttributeError, 'there are no boundary datasets associated with this Basemap instance' @@ -1378,18 +1386,20 @@ """ Draw state boundaries in Americas. - linewidth - state boundary line width (default 0.5) + ============== ==================================================== + Keyword Description + ============== ==================================================== + linewidth state boundary line width (default 0.5) + color state boundary line color (default black) + antialiased antialiasing switch for state boundaries + (default True). + ax axes instance (overrides default axes instance) + zorder sets the zorder for the state boundaries (if not + specified, uses default zorder for + matplotlib.patches.LineCollections). + ============== ==================================================== - color - state boundary line color (default black) - - antialiased - antialiasing switch for state boundaries (default True). - - ax - axes instance (overrides default axes instance) - - zorder - sets the zorder for the state boundaries (if not specified, - uses default zorder for LineCollections). - - returns a LineCollection. + returns a matplotlib.patches.LineCollection object. """ if self.resolution is None: raise AttributeError, 'there are no boundary datasets associated with this Basemap instance' @@ -1421,18 +1431,20 @@ """ Draw major rivers. - linewidth - river boundary line width (default 0.5) + ============== ==================================================== + Keyword Description + ============== ==================================================== + linewidth river boundary line width (default 0.5) + color river boundary line color (default black) + antialiased antialiasing switch for river boundaries (default + True). + ax axes instance (overrides default axes instance) + zorder sets the zorder for the rivers (if not + specified uses default zorder for + matplotlib.patches.LineCollections). + ============== ==================================================== - color - river boundary line color (default black) - - antialiased - antialiasing switch for river boundaries (default True). - - ax - axes instance (overrides default axes instance) - - zorder - sets the zorder for the rivers (if not specified, - uses default zorder for LineCollections). - - returns a LineCollection + returns a matplotlib.patches.LineCollection object. """ if self.resolution is None: raise AttributeError, 'there are no boundary datasets associated with this Basemap instance' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5508 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5508&view=rev Author: jdh2358 Date: 2008年06月13日 08:04:49 -0700 (2008年6月13日) Log Message: ----------- fixed list of backends in the rc template Modified Paths: -------------- trunk/matplotlib/matplotlibrc.template trunk/matplotlib/src/ft2font.cpp Modified: trunk/matplotlib/matplotlibrc.template =================================================================== --- trunk/matplotlib/matplotlibrc.template 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/matplotlibrc.template 2008年06月13日 15:04:49 UTC (rev 5508) @@ -19,8 +19,8 @@ # such as 0.75 - a legal html color name, eg red, blue, darkslategray #### CONFIGURATION BEGINS HERE -# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg -# WX WXAgg Agg Cairo GD GDK Paint PS PDF SVG Template +# the default backend; one of GTK GTKAgg GTKCairo CocoaAgg FltkAgg +# QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG Template backend : %(backend)s numerix : %(numerix)s # numpy, Numeric or numarray #maskedarray : False # True to use external maskedarray module Modified: trunk/matplotlib/src/ft2font.cpp =================================================================== --- trunk/matplotlib/src/ft2font.cpp 2008年06月13日 14:57:50 UTC (rev 5507) +++ trunk/matplotlib/src/ft2font.cpp 2008年06月13日 15:04:49 UTC (rev 5508) @@ -265,15 +265,15 @@ _VERBOSE("FT2Image::as_array"); args.verify_length(0); - int dimensions[2]; + npy_intp dimensions[2]; dimensions[0] = get_height(); //numrows dimensions[1] = get_width(); //numcols - //PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNewFromData(2, dimensions, PyArray_UBYTE, _buffer); + PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNewFromData(2, dimensions, PyArray_UBYTE, _buffer); + /* - PyArrayObject *A = (PyArrayObject *) PyArray_FromDims(2, dimensions, PyArray_UBYTE); @@ -284,8 +284,8 @@ while (src != src_end) { *dst++ = *src++; } + */ - return Py::asObject((PyObject*)A); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5507 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5507&view=rev Author: mdboom Date: 2008年06月13日 07:57:50 -0700 (2008年6月13日) Log Message: ----------- Fix typo in docstring. Modified Paths: -------------- trunk/matplotlib/doc/sphinxext/ipython_console_highlighting.py Modified: trunk/matplotlib/doc/sphinxext/ipython_console_highlighting.py =================================================================== --- trunk/matplotlib/doc/sphinxext/ipython_console_highlighting.py 2008年06月13日 14:57:01 UTC (rev 5506) +++ trunk/matplotlib/doc/sphinxext/ipython_console_highlighting.py 2008年06月13日 14:57:50 UTC (rev 5507) @@ -13,7 +13,7 @@ Tracebacks are not currently supported. - .. sourcecode:: pycon + .. sourcecode:: ipython In [1]: a = 'foo' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5506 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5506&view=rev Author: mdboom Date: 2008年06月13日 07:57:01 -0700 (2008年6月13日) Log Message: ----------- Fix formatting typo Modified Paths: -------------- trunk/matplotlib/doc/faq/installing_faq.rst Modified: trunk/matplotlib/doc/faq/installing_faq.rst =================================================================== --- trunk/matplotlib/doc/faq/installing_faq.rst 2008年06月13日 14:40:39 UTC (rev 5505) +++ trunk/matplotlib/doc/faq/installing_faq.rst 2008年06月13日 14:57:01 UTC (rev 5506) @@ -131,7 +131,7 @@ TkAgg Agg rendering to a Tkinter canvas (`tkinter <http://wiki.python.org/moin/TkInter>`_) QtAgg Agg rendering to a Qt canvas (`pyqt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_) Qt4Agg Agg rendering to a Qt4 canvas (`pyqt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_) -FLTKAgg Agg rendering to a FLTK canvas (`pyfltk <http://pyfltk.sourceforge.net>`)_ +FLTKAgg Agg rendering to a FLTK canvas (`pyfltk <http://pyfltk.sourceforge.net>`_) ============ =================================================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5505 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5505&view=rev Author: mdboom Date: 2008年06月13日 07:40:39 -0700 (2008年6月13日) Log Message: ----------- Add "include-source" option. Modified Paths: -------------- trunk/matplotlib/doc/sphinxext/plot_directive.py trunk/matplotlib/doc/users/annotations.rst trunk/matplotlib/doc/users/artists.rst trunk/matplotlib/doc/users/mathtext.rst trunk/matplotlib/doc/users/pyplot_tutorial.rst trunk/matplotlib/doc/users/text_intro.rst trunk/matplotlib/doc/users/text_props.rst Modified: trunk/matplotlib/doc/sphinxext/plot_directive.py =================================================================== --- trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/sphinxext/plot_directive.py 2008年06月13日 14:40:39 UTC (rev 5505) @@ -3,10 +3,14 @@ Given a path to a .py file, it includes the source code inline, then: - On HTML, will include a .png with a link to a high-res .png. - Underneath that, a [source] link will go to a plain text .py of - the source. - On LaTeX, will include a .pdf + +This directive supports all of the options of the `image` directive, +except for `target` (since plot will add its own target). + +Additionally, if the :include-source: option is provided, the literal +source will be included inline, as well as a link to the source. """ from docutils.parsers.rst import directives @@ -25,9 +29,23 @@ 'width': directives.length_or_percentage_or_unitless, 'scale': directives.nonnegative_int, 'align': align, - 'class': directives.class_option} + 'class': directives.class_option, + 'include-source': directives.flag } -template = """ +template_no_source = """ +.. htmlonly:: + + .. image:: %(reference)s.png + :target: %(reference)s.hires.png +%(options)s + +.. latexonly:: + .. image:: %(reference)s.pdf +%(options)s + +""" + +template_source = """ .. literalinclude:: %(reference)s.py .. htmlonly:: @@ -36,7 +54,7 @@ :target: %(reference)s.hires.png %(options)s - `[original %(basename)s.py] <%(reference)s.py>`_ + `[%(basename)s.py] <%(reference)s.py>`_ .. latexonly:: .. image:: %(reference)s.pdf @@ -46,8 +64,16 @@ def run(arguments, options, state_machine, lineno): reference = directives.uri(arguments[0]) - if reference.endswith('.py'): - reference = reference[:-3] + print reference + for ext in ('.py', '.png', '.pdf'): + if reference.endswith(ext): + reference = reference[:-len(ext)] + break + if options.has_key('include-source'): + template = template_source + del options['include-source'] + else: + template = template_no_source options = [' :%s: %s' % (key, val) for key, val in options.items()] options = "\n".join(options) Modified: trunk/matplotlib/doc/users/annotations.rst =================================================================== --- trunk/matplotlib/doc/users/annotations.rst 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/users/annotations.rst 2008年06月13日 14:40:39 UTC (rev 5505) @@ -13,6 +13,7 @@ arguments are ``(x,y)`` tuples. .. plot:: figures/annotation_basic.py + :include-source: :scale: 75 In this example, both the ``xy`` (arrow tip) and ``xytext`` locations @@ -73,6 +74,7 @@ .. plot:: figures/annotation_polar.py :scale: 75 + :include-source: See the `annotations demo <http://matplotlib.sf.net/examples/pylab_examples/annotation_demo.py>`_ for more Modified: trunk/matplotlib/doc/users/artists.rst =================================================================== --- trunk/matplotlib/doc/users/artists.rst 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/users/artists.rst 2008年06月13日 14:40:39 UTC (rev 5505) @@ -135,7 +135,7 @@ Try creating the figure below. -.. image:: figures/fig_axes_labels_simple.png +.. plot:: figures/fig_axes_labels_simple :scale: 75 .. _customizing-artists: @@ -326,7 +326,7 @@ In [195]: fig.canvas.draw() -.. image:: figures/fig_x.png +.. plot:: figures/fig_x :scale: 75 @@ -606,6 +606,7 @@ .. plot:: figures/fig_axes_customize_simple.py :scale: 75 + :include-source: .. _tick-container: @@ -643,3 +644,4 @@ .. plot:: figures/dollar_ticks.py :scale: 75 + :include-source: Modified: trunk/matplotlib/doc/users/mathtext.rst =================================================================== --- trunk/matplotlib/doc/users/mathtext.rst 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/users/mathtext.rst 2008年06月13日 14:40:39 UTC (rev 5505) @@ -273,6 +273,7 @@ .. plot:: figures/pyplot_mathtext.py :scale: 75 + :include-source: Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst =================================================================== --- trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/users/pyplot_tutorial.rst 2008年06月13日 14:40:39 UTC (rev 5505) @@ -14,6 +14,7 @@ .. plot:: figures/pyplot_simple :scale: 75 + :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 @@ -38,6 +39,7 @@ .. plot:: figures/pyplot_formatstr.py :scale: 75 + :include-source: See the :func:`~matplotlib.pyplot.plot` documentation for a complete list of line styles and format strings. The @@ -54,6 +56,7 @@ .. plot:: figures/pyplot_three.py :scale: 75 + :include-source: .. _controlling-line-properties: @@ -159,6 +162,7 @@ .. plot:: figures/pyplot_two_subplots.py :scale: 75 + :include-source: The :func:`~matplotlib.pyplot.figure` command here is optional because ``figure(1)`` will be created by default, just as a ``subplot(111)`` @@ -218,8 +222,8 @@ .. plot:: figures/pyplot_text.py :scale: 75 + :include-source: - All of the :func:`~matplotlib.pyplot.text` commands return an :class:`matplotlib.text.Text` instance. Just as with with lines above, you can customize the properties by passing keyword arguments @@ -264,6 +268,7 @@ .. plot:: figures/pyplot_annotate.py :scale: 75 + :include-source: In this basic example, both the ``xy`` (arrow tip) and ``xytext`` locations (text location) are in data coordinates. There are a Modified: trunk/matplotlib/doc/users/text_intro.rst =================================================================== --- trunk/matplotlib/doc/users/text_intro.rst 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/users/text_intro.rst 2008年06月13日 14:40:39 UTC (rev 5505) @@ -57,4 +57,4 @@ .. plot:: figures/text_commands.py :scale: 75 - + :include-source: Modified: trunk/matplotlib/doc/users/text_props.rst =================================================================== --- trunk/matplotlib/doc/users/text_props.rst 2008年06月13日 14:24:40 UTC (rev 5504) +++ trunk/matplotlib/doc/users/text_props.rst 2008年06月13日 14:40:39 UTC (rev 5505) @@ -59,3 +59,4 @@ .. plot:: figures/text_layout.py :scale: 75 + :include-source: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.