SourceForge logo
SourceForge logo
Menu

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

You can subscribe to this list here.

2007 Jan
Feb
Mar
Apr
May
Jun
Jul
(115)
Aug
(120)
Sep
(137)
Oct
(170)
Nov
(461)
Dec
(263)
2008 Jan
(120)
Feb
(74)
Mar
(35)
Apr
(74)
May
(245)
Jun
(356)
Jul
(240)
Aug
(115)
Sep
(78)
Oct
(225)
Nov
(98)
Dec
(271)
2009 Jan
(132)
Feb
(84)
Mar
(74)
Apr
(56)
May
(90)
Jun
(79)
Jul
(83)
Aug
(296)
Sep
(214)
Oct
(76)
Nov
(82)
Dec
(66)
2010 Jan
(46)
Feb
(58)
Mar
(51)
Apr
(77)
May
(58)
Jun
(126)
Jul
(128)
Aug
(64)
Sep
(50)
Oct
(44)
Nov
(48)
Dec
(54)
2011 Jan
(68)
Feb
(52)
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
(1)
2018 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S



1
(3)
2
(3)
3
4
(2)
5
(9)
6
(4)
7
(9)
8
(7)
9
(2)
10
(3)
11
(2)
12
13
(2)
14
(10)
15
(24)
16
(17)
17
(21)
18
(3)
19
(23)
20
(6)
21
(4)
22
(14)
23
(11)
24
(15)
25
(6)
26
(1)
27
(4)
28
(3)
29
(9)
30
(6)
31
(2)

Showing 10 results of 10

From: <ef...@us...> - 2008年10月14日 23:25:38
Revision: 6192
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6192&view=rev
Author: efiring
Date: 2008年10月14日 23:25:29 +0000 (2008年10月14日)
Log Message:
-----------
Improve docstrings in nxutils
Modified Paths:
--------------
 trunk/matplotlib/src/nxutils.c
Modified: trunk/matplotlib/src/nxutils.c
===================================================================
--- trunk/matplotlib/src/nxutils.c	2008年10月14日 22:45:31 UTC (rev 6191)
+++ trunk/matplotlib/src/nxutils.c	2008年10月14日 23:25:29 UTC (rev 6192)
@@ -219,9 +219,19 @@
 
 static PyMethodDef module_methods[] = {
 {"pnpoly", pnpoly, METH_VARARGS,
- "inside = pnpoly(x, y, xyverts)\nreturn 1 if x,y is inside the polygon defined by the sequence of x,y vertices in xyverts"},
+ "inside = pnpoly(x, y, xyverts)\n\n"
+ "Return 1 if x,y is inside the polygon, 0 otherwise.\n\n"
+ "xyverts is a sequence of x,y vertices.\n\n"
+ "A point on the boundary may be treated as inside or outside.\n"
+ "See http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html"},
 {"points_inside_poly", points_inside_poly, METH_VARARGS,
- "mask = points_inside_poly(xypoints, xyverts)\nreturn a mask of length xypoints indicating whether each x,y point is inside the polygon defined by the sequence of x,y vertices in xyverts"},
+ "mask = points_inside_poly(xypoints, xyverts)\n\n"
+ "Return a boolean ndarray, True for points inside the polygon.\n\n"
+ "xypoints is a sequence of N x,y pairs.\n"
+ "xyverts is a sequence of x,y vertices of the polygon.\n"
+ "mask is an ndarray of length N.\n\n"
+ "A point on the boundary may be treated as inside or outside.\n"
+ "See http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html"},
 {NULL} /* Sentinel */
 };
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <ef...@us...> - 2008年10月14日 22:45:52
Revision: 6191
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6191&view=rev
Author: efiring
Date: 2008年10月14日 22:45:31 +0000 (2008年10月14日)
Log Message:
-----------
Change nxutils.points_inside_poly to return an array of bool, not int.
Modified Paths:
--------------
 trunk/matplotlib/src/nxutils.c
Modified: trunk/matplotlib/src/nxutils.c
===================================================================
--- trunk/matplotlib/src/nxutils.c	2008年10月14日 21:20:16 UTC (rev 6190)
+++ trunk/matplotlib/src/nxutils.c	2008年10月14日 22:45:31 UTC (rev 6191)
@@ -45,7 +45,7 @@
 if (! PyArg_ParseTuple(args, "ddO", &x, &y, &vertsarg))
 return NULL;
 
- verts = (PyArrayObject *) PyArray_FromObject(vertsarg,PyArray_DOUBLE, 2, 2);
+ verts = (PyArrayObject *) PyArray_FromObject(vertsarg,NPY_DOUBLE, 2, 2);
 
 if (verts == NULL)
 {
@@ -113,7 +113,7 @@
 if (! PyArg_ParseTuple(args, "OO", &xypointsarg, &vertsarg))
 return NULL;
 
- verts = (PyArrayObject *) PyArray_FromObject(vertsarg,PyArray_DOUBLE, 2, 2);
+ verts = (PyArrayObject *) PyArray_FromObject(vertsarg, NPY_DOUBLE, 2, 2);
 
 if (verts == NULL)
 {
@@ -158,7 +158,7 @@
 //printf("adding vert: %1.3f, %1.3f\n", xv[i], yv[i]);
 }
 
- xypoints = (PyArrayObject *) PyArray_FromObject(xypointsarg,PyArray_DOUBLE, 2, 2);
+ xypoints = (PyArrayObject *) PyArray_FromObject(xypointsarg, NPY_DOUBLE, 2, 2);
 
 if (xypoints == NULL)
 {
@@ -187,7 +187,7 @@
 npoints = xypoints->dimensions[0];
 dimensions[0] = npoints;
 
- mask = (PyArrayObject *)PyArray_SimpleNew(1,dimensions,PyArray_INT);
+ mask = (PyArrayObject *)PyArray_SimpleNew(1,dimensions, NPY_BOOL);
 if (mask==NULL) {
 Py_XDECREF(verts);
 Py_XDECREF(xypoints);
@@ -200,7 +200,7 @@
 y = *(double *)(xypoints->data + i*xypoints->strides[0] + xypoints->strides[1]);
 b = pnpoly_api(npol, xv, yv, x, y);
 //printf("checking %d, %d, %1.3f, %1.3f, %d\n", npol, npoints, x, y, b);
- *(int *)(mask->data+i*mask->strides[0]) = b;
+ *(char *)(mask->data + i*mask->strides[0]) = b;
 
 }
 
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年10月14日 21:20:22
Revision: 6190
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6190&view=rev
Author: jdh2358
Date: 2008年10月14日 21:20:16 +0000 (2008年10月14日)
Log Message:
-----------
replaced index with contents for main page
Added Paths:
-----------
 trunk/matplotlib/doc/contents.rst
Removed Paths:
-------------
 trunk/matplotlib/doc/index.rst
Added: trunk/matplotlib/doc/contents.rst
===================================================================
--- trunk/matplotlib/doc/contents.rst	 (rev 0)
+++ trunk/matplotlib/doc/contents.rst	2008年10月14日 21:20:16 UTC (rev 6190)
@@ -0,0 +1,26 @@
+
+
+Overview
+========
+
+.. htmlonly::
+
+ :Release: |version|
+ :Date: |today|
+
+ Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_
+
+.. toctree::
+ :maxdepth: 2
+
+ users/index.rst
+ faq/index.rst
+ devel/index.rst
+ api/index.rst
+ glossary/index.rst
+
+.. htmlonly::
+
+ * :ref:`genindex`
+ * :ref:`modindex`
+ * :ref:`search`
Deleted: trunk/matplotlib/doc/index.rst
===================================================================
--- trunk/matplotlib/doc/index.rst	2008年10月14日 21:17:52 UTC (rev 6189)
+++ trunk/matplotlib/doc/index.rst	2008年10月14日 21:20:16 UTC (rev 6190)
@@ -1,26 +0,0 @@
-
-
-Welcome to matplotlib's documentation!
-======================================
-
-.. htmlonly::
-
- :Release: |version|
- :Date: |today|
-
- Download `PDF <http://matplotlib.sf.net/doc/Matplotlib.pdf>`_
-
-.. toctree::
- :maxdepth: 2
-
- users/index.rst
- faq/index.rst
- devel/index.rst
- api/index.rst
- glossary/index.rst
-
-.. htmlonly::
-
- * :ref:`genindex`
- * :ref:`modindex`
- * :ref:`search`
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年10月14日 21:18:05
Revision: 6189
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6189&view=rev
Author: jdh2358
Date: 2008年10月14日 21:17:52 +0000 (2008年10月14日)
Log Message:
-----------
removed defunct colours mod
Removed Paths:
-------------
 trunk/matplotlib/doc/pyplots/colours.py
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年10月14日 21:17:41
Revision: 6188
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6188&view=rev
Author: jdh2358
Date: 2008年10月14日 21:17:37 +0000 (2008年10月14日)
Log Message:
-----------
added sidebar for web docs
Added Paths:
-----------
 trunk/matplotlib/doc/_static/logo_sidebar.png
Added: trunk/matplotlib/doc/_static/logo_sidebar.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/logo_sidebar.png
___________________________________________________________________
Added: svn:mime-type
 + application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年10月14日 21:16:59
Revision: 6187
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6187&view=rev
Author: jdh2358
Date: 2008年10月14日 21:16:51 +0000 (2008年10月14日)
Log Message:
-----------
preparing to move entire web site to sphinx; things may be whacked for a day or so
Modified Paths:
--------------
 trunk/matplotlib/doc/api/index.rst
 trunk/matplotlib/doc/conf.py
 trunk/matplotlib/doc/devel/transformations.rst
 trunk/matplotlib/doc/matplotlibrc
 trunk/matplotlib/doc/pyplots/matplotlibrc
 trunk/matplotlib/doc/pyplots/tex_demo.hires.png
 trunk/matplotlib/doc/pyplots/tex_demo.pdf
 trunk/matplotlib/doc/pyplots/tex_demo.png
 trunk/matplotlib/doc/pyplots/tex_unicode_demo.hires.png
 trunk/matplotlib/doc/pyplots/tex_unicode_demo.pdf
 trunk/matplotlib/doc/pyplots/tex_unicode_demo.png
 trunk/matplotlib/doc/sphinxext/plot_directive.py
 trunk/matplotlib/doc/users/index.rst
Added Paths:
-----------
 trunk/matplotlib/doc/_static/logo2.png
 trunk/matplotlib/doc/_templates/index.html
 trunk/matplotlib/doc/_templates/indexsidebar.html
 trunk/matplotlib/doc/_templates/layout.html
 trunk/matplotlib/doc/api/path_api.rst
 trunk/matplotlib/doc/pyplots/colours.py
 trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_date_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py
 trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py
 trunk/matplotlib/doc/pyplots/screenshots_table_demo.py
 trunk/matplotlib/doc/users/screenshots.rst
Added: trunk/matplotlib/doc/_static/logo2.png
===================================================================
(Binary files differ)
Property changes on: trunk/matplotlib/doc/_static/logo2.png
___________________________________________________________________
Added: svn:mime-type
 + application/octet-stream
Added: trunk/matplotlib/doc/_templates/index.html
===================================================================
--- trunk/matplotlib/doc/_templates/index.html	 (rev 0)
+++ trunk/matplotlib/doc/_templates/index.html	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,1141 @@
+{% extends "layout.html" %}
+{% set title = 'Overview' %}
+{% block body %}
+ <h1>Welcome</h1>
+
+ matplotlib is a python 2D plotting library which produces
+ publication quality figures in a variety of hardcopy formats and
+ interactive environments across platforms. matplotlib can be used
+ in python scripts, the python and <a
+ href=http://ipython.scipy.org>ipython</a> shell (ala matlab or
+ mathematica), web application servers, and six graphical user
+ interface toolkits. <p>
+
+ matplotlib tries to make easy things easy and hard things possible.
+ You can generate plots, histograms, power spectra, bar charts,
+ errorcharts, scatterplots, etc, with just a few lines of code. For
+ example, to make a histogram of data in x, you simply need to type
+
+ <pre>
+ >>> hist(x, 100) # use 100 bins
+ </pre>
+
+ For the power user, you have full control of line styles, font
+ properties, axes properties, etc, via an object oriented interface
+ or via a handle graphics interface familiar to matlab users. A
+ summary of the goals of matplotlib and the progress so far can be
+ found <a href=goals.html>here</a>.<p>
+
+ The plotting functions in the <a href=api/pyplot_api.html>pyplot
+ interface</a> have a high degree of Matlab&reg compatibility.<p>
+
+ <br>
+ <table border=1 cellpadding=3 cellspacing=2>
+ <caption><h3>Plotting commands</h3></caption>
+ <tr><th>Function</th><th>Description</th></tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.acorr>acorr</a>
+
+ </th>
+
+ <td align="left">
+ plot the autocorrelation function
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.annotate>annotate</a>
+
+ </th>
+
+ <td align="left">
+ annotate something in the figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.arrow>arrow</a>
+
+ </th>
+
+ <td align="left">
+ add an arrow to the axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.axes>axes</a>
+
+ </th>
+
+ <td align="left">
+ Create a new axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.axhline>axhline</a>
+
+ </th>
+
+ <td align="left">
+ draw a horizontal line across axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.axvline>axvline</a>
+
+ </th>
+
+ <td align="left">
+ draw a vertical line across axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.axhspan>axhspan</a>
+
+ </th>
+
+ <td align="left">
+ draw a horizontal bar across axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.axvspan>axvspan</a>
+
+ </th>
+
+ <td align="left">
+ draw a vertical bar across axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.axis>axis</a>
+
+ </th>
+
+ <td align="left">
+ Set or return the current axis limits
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.bar>bar</a>
+
+ </th>
+
+ <td align="left">
+ make a bar chart
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.barh>barh</a>
+
+ </th>
+
+ <td align="left">
+ a horizontal bar chart
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.broken_barh>broken_barh</a>
+
+ </th>
+
+ <td align="left">
+ a set of horizontal bars with gaps
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.box>box</a>
+
+ </th>
+
+ <td align="left">
+ set the axes frame on/off state
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.boxplot>boxplot</a>
+
+ </th>
+
+ <td align="left">
+ make a box and whisker plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.cla>cla</a>
+
+ </th>
+
+ <td align="left">
+ clear current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.clabel>clabel</a>
+
+ </th>
+
+ <td align="left">
+ label a contour plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.clf>clf</a>
+
+ </th>
+
+ <td align="left">
+ clear a figure window
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.clim>clim</a>
+
+ </th>
+
+ <td align="left">
+ adjust the color limits of the current image
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.close>close</a>
+
+ </th>
+
+ <td align="left">
+ close a figure window
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.colorbar>colorbar</a>
+
+ </th>
+
+ <td align="left">
+ add a colorbar to the current figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.cohere>cohere</a>
+
+ </th>
+
+ <td align="left">
+ make a plot of coherence
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.contour>contour</a>
+
+ </th>
+
+ <td align="left">
+ make a contour plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.contourf>contourf</a>
+
+ </th>
+
+ <td align="left">
+ make a filled contour plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.csd>csd</a>
+
+ </th>
+
+ <td align="left">
+ make a plot of cross spectral density
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.delaxes>delaxes</a>
+
+ </th>
+
+ <td align="left">
+ delete an axes from the current figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.draw>draw</a>
+
+ </th>
+
+ <td align="left">
+ Force a redraw of the current figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.errorbar>errorbar</a>
+
+ </th>
+
+ <td align="left">
+ make an errorbar graph
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.figlegend>figlegend</a>
+
+ </th>
+
+ <td align="left">
+ make legend on the figure rather than the axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.figimage>figimage</a>
+
+ </th>
+
+ <td align="left">
+ make a figure image
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.figtext>figtext</a>
+
+ </th>
+
+ <td align="left">
+ add text in figure coords
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.figure>figure</a>
+
+ </th>
+
+ <td align="left">
+ create or change active figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.fill>fill</a>
+
+ </th>
+
+ <td align="left">
+ make filled polygons
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.findobj>findobj</a>
+
+ </th>
+
+ <td align="left">
+ recursively find all objects matching some criteria
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.gca>gca</a>
+
+ </th>
+
+ <td align="left">
+ return the current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.gcf>gcf</a>
+
+ </th>
+
+ <td align="left">
+ return the current figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.gci>gci</a>
+
+ </th>
+
+ <td align="left">
+ get the current image, or None
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.getp>getp</a>
+
+ </th>
+
+ <td align="left">
+ get a handle graphics property
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.grid>grid</a>
+
+ </th>
+
+ <td align="left">
+ set whether gridding is on
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.hist>hist</a>
+
+ </th>
+
+ <td align="left">
+ make a histogram
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.hold>hold</a>
+
+ </th>
+
+ <td align="left">
+ set the axes hold state
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.ioff>ioff</a>
+
+ </th>
+
+ <td align="left">
+ turn interaction mode off
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.ion>ion</a>
+
+ </th>
+
+ <td align="left">
+ turn interaction mode on
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.isinteractive>isinteractive</a>
+
+ </th>
+
+ <td align="left">
+ return True if interaction mode is on
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.imread>imread</a>
+
+ </th>
+
+ <td align="left">
+ load image file into array
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.imshow>imshow</a>
+
+ </th>
+
+ <td align="left">
+ plot image data
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.ishold>ishold</a>
+
+ </th>
+
+ <td align="left">
+ return the hold state of the current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.legend>legend</a>
+
+ </th>
+
+ <td align="left">
+ make an axes legend
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.loglog>loglog</a>
+
+ </th>
+
+ <td align="left">
+ a log log plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.matshow>matshow</a>
+
+ </th>
+
+ <td align="left">
+ display a matrix in a new figure preserving aspect
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.pcolor>pcolor</a>
+
+ </th>
+
+ <td align="left">
+ make a pseudocolor plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.pcolormesh>pcolormesh</a>
+
+ </th>
+
+ <td align="left">
+ make a pseudocolor plot using a quadrilateral mesh
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.pie>pie</a>
+
+ </th>
+
+ <td align="left">
+ make a pie chart
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.plot>plot</a>
+
+ </th>
+
+ <td align="left">
+ make a line plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.plot_date>plot_date</a>
+
+ </th>
+
+ <td align="left">
+ plot dates
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.plotfile>plotfile</a>
+
+ </th>
+
+ <td align="left">
+ plot column data from an ASCII tab/space/comma delimited file
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.pie>pie</a>
+
+ </th>
+
+ <td align="left">
+ pie charts
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.polar>polar</a>
+
+ </th>
+
+ <td align="left">
+ make a polar plot on a PolarAxes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.psd>psd</a>
+
+ </th>
+
+ <td align="left">
+ make a plot of power spectral density
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.quiver>quiver</a>
+
+ </th>
+
+ <td align="left">
+ make a direction field (arrows) plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.rc>rc</a>
+
+ </th>
+
+ <td align="left">
+ control the default params
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.rgrids>rgrids</a>
+
+ </th>
+
+ <td align="left">
+ customize the radial grids and labels for polar
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.savefig>savefig</a>
+
+ </th>
+
+ <td align="left">
+ save the current figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.scatter>scatter</a>
+
+ </th>
+
+ <td align="left">
+ make a scatter plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.setp>setp</a>
+
+ </th>
+
+ <td align="left">
+ set a handle graphics property
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.semilogx>semilogx</a>
+
+ </th>
+
+ <td align="left">
+ log x axis
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.semilogy>semilogy</a>
+
+ </th>
+
+ <td align="left">
+ log y axis
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.show>show</a>
+
+ </th>
+
+ <td align="left">
+ show the figures
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.specgram>specgram</a>
+
+ </th>
+
+ <td align="left">
+ a spectrogram plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.spy>spy</a>
+
+ </th>
+
+ <td align="left">
+ plot sparsity pattern using markers or image
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.stem>stem</a>
+
+ </th>
+
+ <td align="left">
+ make a stem plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.subplot>subplot</a>
+
+ </th>
+
+ <td align="left">
+ make a subplot (numrows, numcols, axesnum)
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.subplots_adjust>subplots_adjust</a>
+
+ </th>
+
+ <td align="left">
+ change the params controlling the subplot positions of current figure
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.subplot_tool>subplot_tool</a>
+
+ </th>
+
+ <td align="left">
+ launch the subplot configuration tool
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.suptitle>suptitle</a>
+
+ </th>
+
+ <td align="left">
+ add a figure title
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.table>table</a>
+
+ </th>
+
+ <td align="left">
+ add a table to the plot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.text>text</a>
+
+ </th>
+
+ <td align="left">
+ add some text at location x,y to the current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.thetagrids>thetagrids</a>
+
+ </th>
+
+ <td align="left">
+ customize the radial theta grids and labels for polar
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.title>title</a>
+
+ </th>
+
+ <td align="left">
+ add a title to the current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.xcorr>xcorr</a>
+
+ </th>
+
+ <td align="left">
+ plot the autocorrelation function of x and y
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.xlim>xlim</a>
+
+ </th>
+
+ <td align="left">
+ set/get the xlimits
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.ylim>ylim</a>
+
+ </th>
+
+ <td align="left">
+ set/get the ylimits
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.xticks>xticks</a>
+
+ </th>
+
+ <td align="left">
+ set/get the xticks
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.yticks>yticks</a>
+
+ </th>
+
+ <td align="left">
+ set/get the yticks
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.xlabel>xlabel</a>
+
+ </th>
+
+ <td align="left">
+ add an xlabel to the current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.ylabel>ylabel</a>
+
+ </th>
+
+ <td align="left">
+ add a ylabel to the current axes
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.autumn>autumn</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to autumn
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.bone>bone</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to bone
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.cool>cool</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to cool
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.copper>copper</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to copper
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.flag>flag</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to flag
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.gray>gray</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to gray
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.hot>hot</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to hot
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.hsv>hsv</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to hsv
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.jet>jet</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to jet
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.pink>pink</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to pink
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.prism>prism</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to prism
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.spring>spring</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to spring
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.summer>summer</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to summer
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.winter>winter</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to winter
+ </td>
+
+ </tr>
+ <tr>
+ <th align="left">
+ <a href=api/pyplot_api.html#matplotlib.pyplot.spectral>spectral</a>
+
+ </th>
+
+ <td align="left">
+ set the default colormap to spectral
+ </td>
+
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+</table>
+{% endblock %}
Added: trunk/matplotlib/doc/_templates/indexsidebar.html
===================================================================
--- trunk/matplotlib/doc/_templates/indexsidebar.html	 (rev 0)
+++ trunk/matplotlib/doc/_templates/indexsidebar.html	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,21 @@
+<h3>Download</h3>
+<p>Current version: <b>{{ version }}</b></p>
+<p>Get matplotlib from the sourceforge <a
+href="http://sourceforge.net/projects/matplotlib">download</a> page
+
+<h3>Need help?</h3>
+<p>Join the matplotlib <a
+href="http://sourceforge.net/mail/?group_id=80706">mailing lists</a>
+
+<p>You can file bugs and patches on the sourceforge <a href="http://sourceforge.net/tracker/?group_id=80706">tracker</a>, but it is a good idea to ping us on the mailing list too.</p>
+
+<h3>Screenshots</h3>
+
+<a href="{{ pathto('users/screenshots') }}"><img align=center src="{{
+pathto("_static/logo_sidebar.png", 1) }}"></a>
+
+<a href="{{ pathto('users/screenshots') }}">screenshots</a> and <a href=examples>examples</a>
+
+
+
+
Added: trunk/matplotlib/doc/_templates/layout.html
===================================================================
--- trunk/matplotlib/doc/_templates/layout.html	 (rev 0)
+++ trunk/matplotlib/doc/_templates/layout.html	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,19 @@
+{% extends "!layout.html" %}
+
+{% block rootrellink %}
+ <li><a href="{{ pathto('index') }}">matplotlib home </a> |&nbsp;</li>
+ <li><a href="{{ pathto('contents') }}">documentation </a> &raquo;</li>
+{% endblock %}
+
+{% block relbar1 %}
+<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
+<img src="{{ pathto("_static/logo2.png", 1) }}">
+</div>
+{{ super() }}
+{% endblock %}
+
+{# put the sidebar before the body #}
+{% block sidebar1 %}{{ sidebar() }}{% endblock %}
+{% block sidebar2 %}{% endblock %}
+
+
Modified: trunk/matplotlib/doc/api/index.rst
===================================================================
--- trunk/matplotlib/doc/api/index.rst	2008年10月14日 15:59:49 UTC (rev 6186)
+++ trunk/matplotlib/doc/api/index.rst	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -22,5 +22,6 @@
 collections_api.rst
 colorbar_api.rst
 colors_api.rst
+ path_api.rst
 pyplot_api.rst
 index_backend_api.rst
Added: trunk/matplotlib/doc/api/path_api.rst
===================================================================
--- trunk/matplotlib/doc/api/path_api.rst	 (rev 0)
+++ trunk/matplotlib/doc/api/path_api.rst	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,12 @@
+***************
+matplotlib path
+***************
+
+
+:mod:`matplotlib.path`
+=======================
+
+.. automodule:: matplotlib.path
+ :members:
+ :undoc-members:
+ :show-inheritance:
Modified: trunk/matplotlib/doc/conf.py
===================================================================
--- trunk/matplotlib/doc/conf.py	2008年10月14日 15:59:49 UTC (rev 6186)
+++ trunk/matplotlib/doc/conf.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -37,7 +37,7 @@
 source_suffix = '.rst'
 
 # The master toctree document.
-master_doc = 'index'
+master_doc = 'contents'
 
 # General substitutions.
 project = 'Matplotlib'
@@ -47,9 +47,10 @@
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '0.98'
+import matplotlib
+version = matplotlib.__version__
 # The full version, including alpha/beta/rc tags.
-release = '0.98'
+release = version
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
@@ -81,7 +82,8 @@
 # The style sheet to use for HTML and HTML Help pages. A file of that name
 # must exist either in Sphinx' static/ path, or in one of the custom paths
 # given in html_static_path.
-html_style = 'matplotlib.css'
+#html_style = 'matplotlib.css'
+html_style = 'mpl.css'
 
 # The name for this set of Sphinx documents. If None, it defaults to
 # "<project> v<release> documentation".
@@ -108,12 +110,20 @@
 # typographically correct entities.
 #html_use_smartypants = True
 
+# Content template for the index page.
+html_index = 'index.html'
+
 # Custom sidebar templates, maps document names to template names.
 #html_sidebars = {}
 
+# Custom sidebar templates, maps page names to templates.
+html_sidebars = {'index': 'indexsidebar.html',
+ }
+
+
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
-#html_additional_pages = {}
+html_additional_pages = {'index': 'index.html'}
 
 # If false, no module index is generated.
 #html_use_modindex = True
Modified: trunk/matplotlib/doc/devel/transformations.rst
===================================================================
--- trunk/matplotlib/doc/devel/transformations.rst	2008年10月14日 15:59:49 UTC (rev 6186)
+++ trunk/matplotlib/doc/devel/transformations.rst	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -18,9 +18,3 @@
 interval_contains, interval_contains_open
 :show-inheritance:
 
-:mod:`matplotlib.path`
-=============================
-
-.. automodule:: matplotlib.path
- :members: Path, get_path_collection_extents
- :show-inheritance:
Modified: trunk/matplotlib/doc/matplotlibrc
===================================================================
--- trunk/matplotlib/doc/matplotlibrc	2008年10月14日 15:59:49 UTC (rev 6186)
+++ trunk/matplotlib/doc/matplotlibrc	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -240,9 +240,9 @@
 
 # The figure subplot parameters. All dimensions are fraction of the
 # figure width or height
-#figure.subplot.left : 0.125 # the left side of the subplots of the figure
+figure.subplot.left : 0.2 # the left side of the subplots of the figure
 #figure.subplot.right : 0.9 # the right side of the subplots of the figure
-#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
+figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
 #figure.subplot.top : 0.9 # the top of the subplots of the figure
 #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots
 #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots
@@ -264,7 +264,7 @@
 # the default savefig params can be different for the GUI backends.
 # Eg, you may want a higher resolution, or to make the figure
 # background white
-#savefig.dpi : 100 # figure dots per inch
+savefig.dpi : 80 # figure dots per inch
 #savefig.facecolor : white # figure facecolor when saving
 #savefig.edgecolor : white # figure edgecolor when saving
 
Modified: trunk/matplotlib/doc/pyplots/matplotlibrc
===================================================================
--- trunk/matplotlib/doc/pyplots/matplotlibrc	2008年10月14日 15:59:49 UTC (rev 6186)
+++ trunk/matplotlib/doc/pyplots/matplotlibrc	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -240,9 +240,9 @@
 
 # The figure subplot parameters. All dimensions are fraction of the
 # figure width or height
-#figure.subplot.left : 0.125 # the left side of the subplots of the figure
+#figure.subplot.left : 0.15 # the left side of the subplots of the figure
 #figure.subplot.right : 0.9 # the right side of the subplots of the figure
-#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
+#figure.subplot.bottom : 0.15 # the bottom of the subplots of the figure
 #figure.subplot.top : 0.9 # the top of the subplots of the figure
 #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots
 #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots
Added: trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_barchart_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,24 @@
+# a bar plot with errorbars
+# a bar plot with errorbars
+from pylab import *
+
+N = 5
+menMeans = (20, 35, 30, 35, 27)
+menStd = ( 2, 3, 4, 1, 2)
+
+ind = arange(N) # the x locations for the groups
+width = 0.35 # the width of the bars
+p1 = bar(ind, menMeans, width, color='r', yerr=menStd)
+
+womenMeans = (25, 32, 34, 20, 25)
+womenStd = ( 3, 5, 2, 3, 3)
+p2 = bar(ind+width, womenMeans, width, color='y', yerr=womenStd)
+
+ylabel('Scores')
+title('Scores by group and gender')
+xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') )
+xlim(-width,len(ind))
+yticks(arange(0,41,10))
+
+legend( (p1[0], p2[0]), ('Men', 'Women'), shadow=True)
+show()
Added: trunk/matplotlib/doc/pyplots/screenshots_date_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_date_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_date_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+"""
+Show how to make date plots in matplotlib using date tick locators and
+formatters. See major_minor_demo1.py for more information on
+controlling major and minor ticks
+
+All matplotlib date plotting is done by converting date instances into
+days since the 0001年01月01日 UTC. The conversion, tick locating and
+formatting is done behind the scenes so this is most transparent to
+you. The dates module provides several converter functions date2num
+and num2date
+
+"""
+
+import datetime
+import matplotlib.pyplot as plt
+import matplotlib.dates as mdates
+import matplotlib.mlab as mlab
+
+years = mdates.YearLocator() # every year
+months = mdates.MonthLocator() # every month
+yearsFmt = mdates.DateFormatter('%Y')
+
+intc = mlab.csv2rec('mpl_examples/data/intc.csv')
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(intc.date, intc.adj_close)
+
+# format the ticks
+ax.xaxis.set_major_locator(years)
+ax.xaxis.set_major_formatter(yearsFmt)
+ax.xaxis.set_minor_locator(months)
+ax.autoscale_view()
+
+# format the coords message box
+def price(x): return '$%1.2f'%x
+ax.format_xdata = mdates.DateFormatter('%Y-%m-%d')
+ax.format_ydata = price
+
+ax.grid(True)
+plt.show()
Added: trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_ellipse_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,149 @@
+
+# This example can be boiled down to a more simplistic example
+# to show the problem, but bu including the upper and lower
+# bound ellipses, it demonstrates how significant this error
+# is to our plots.
+
+import math
+from pylab import *
+from matplotlib.patches import Ellipse, Arc
+
+# given a point x, y
+x = 2692.440
+y = 6720.850
+
+# get is the radius of a circle through this point
+r = math.sqrt( x*x+y*y )
+
+# show some comparative circles
+delta = 6
+
+
+##################################################
+def custom_ellipse( ax, x, y, major, minor, theta, numpoints = 750, **kwargs ):
+ xs = []
+ ys = []
+ incr = 2.0*math.pi / numpoints
+ incrTheta = 0.0
+ while incrTheta <= (2.0*math.pi):
+ a = major * math.cos( incrTheta )
+ b = minor * math.sin( incrTheta )
+ l = math.sqrt( ( a**2 ) + ( b**2 ) )
+ phi = math.atan2( b, a )
+ incrTheta += incr
+
+ xs.append( x + ( l * math.cos( theta + phi ) ) )
+ ys.append( y + ( l * math.sin( theta + phi ) ) )
+ # end while
+
+ incrTheta = 2.0*math.pi
+ a = major * math.cos( incrTheta )
+ b = minor * math.sin( incrTheta )
+ l = sqrt( ( a**2 ) + ( b**2 ) )
+ phi = math.atan2( b, a )
+ xs.append( x + ( l * math.cos( theta + phi ) ) )
+ ys.append( y + ( l * math.sin( theta + phi ) ) )
+
+ ellipseLine = ax.plot( xs, ys, **kwargs )
+
+
+
+
+##################################################
+# make the axes
+ax1 = subplot( 311, aspect='equal' )
+ax1.set_aspect( 'equal', 'datalim' )
+
+# make the lower-bound ellipse
+diam = (r - delta) * 2.0
+lower_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" )
+ax1.add_patch( lower_ellipse )
+
+# make the target ellipse
+diam = r * 2.0
+target_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" )
+ax1.add_patch( target_ellipse )
+
+# make the upper-bound ellipse
+diam = (r + delta) * 2.0
+upper_ellipse = Ellipse( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" )
+ax1.add_patch( upper_ellipse )
+
+# make the target
+diam = delta * 2.0
+target = Ellipse( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" )
+ax1.add_patch( target )
+
+# give it a big marker
+ax1.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 )
+
+##################################################
+# make the axes
+ax = subplot( 312, aspect='equal' , sharex=ax1, sharey=ax1)
+ax.set_aspect( 'equal', 'datalim' )
+
+# make the lower-bound arc
+diam = (r - delta) * 2.0
+lower_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkgreen" )
+ax.add_patch( lower_arc )
+
+# make the target arc
+diam = r * 2.0
+target_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkred" )
+ax.add_patch( target_arc )
+
+# make the upper-bound arc
+diam = (r + delta) * 2.0
+upper_arc = Arc( (0.0, 0.0), diam, diam, 0.0, fill=False, edgecolor="darkblue" )
+ax.add_patch( upper_arc )
+
+# make the target
+diam = delta * 2.0
+target = Arc( (x, y), diam, diam, 0.0, fill=False, edgecolor="#DD1208" )
+ax.add_patch( target )
+
+# give it a big marker
+ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 )
+
+
+
+
+
+##################################################
+# now lets do the same thing again using a custom ellipse function
+
+
+
+# make the axes
+ax = subplot( 313, aspect='equal', sharex=ax1, sharey=ax1 )
+ax.set_aspect( 'equal', 'datalim' )
+
+# make the lower-bound ellipse
+custom_ellipse( ax, 0.0, 0.0, r-delta, r-delta, 0.0, color="darkgreen" )
+
+# make the target ellipse
+custom_ellipse( ax, 0.0, 0.0, r, r, 0.0, color="darkred" )
+
+# make the upper-bound ellipse
+custom_ellipse( ax, 0.0, 0.0, r+delta, r+delta, 0.0, color="darkblue" )
+
+# make the target
+custom_ellipse( ax, x, y, delta, delta, 0.0, color="#BB1208" )
+
+# give it a big marker
+ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 )
+
+
+# give it a big marker
+ax.plot( [x], [y], marker='x', linestyle='None', mfc='red', mec='red', markersize=10 )
+
+##################################################
+# lets zoom in to see the area of interest
+
+ax1.set_xlim(2650, 2735)
+ax1.set_ylim(6705, 6735)
+
+savefig("ellipse")
+show()
+
+
Added: trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_fill_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,7 @@
+from pylab import *
+t = arange(0.0, 1.01, 0.01)
+s = sin(2*2*pi*t)
+
+fill(t, s*exp(-5*t), 'r')
+grid(True)
+show()
Added: trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_histogram_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,20 @@
+from matplotlib import rcParams
+from pylab import *
+
+
+mu, sigma = 100, 15
+x = mu + sigma*randn(10000)
+
+# the histogram of the data
+n, bins, patches = hist(x, 100, normed=1)
+
+# add a 'best fit' line
+y = normpdf( bins, mu, sigma)
+l = plot(bins, y, 'r--', linewidth=2)
+xlim(40, 160)
+
+xlabel('Smarts')
+ylabel('P')
+title(r'$\rm{IQ:}\/ \mu=100,\/ \sigma=15$')
+
+show()
Added: trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_path_patch_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,36 @@
+import numpy as np
+import matplotlib.path as mpath
+import matplotlib.patches as mpatches
+import matplotlib.pyplot as plt
+
+Path = mpath.Path
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+
+pathdata = [
+ (Path.MOVETO, (1.58, -2.57)),
+ (Path.CURVE4, (0.35, -1.1)),
+ (Path.CURVE4, (-1.75, 2.0)),
+ (Path.CURVE4, (0.375, 2.0)),
+ (Path.LINETO, (0.85, 1.15)),
+ (Path.CURVE4, (2.2, 3.2)),
+ (Path.CURVE4, (3, 0.05)),
+ (Path.CURVE4, (2.0, -0.5)),
+ (Path.CLOSEPOLY, (1.58, -2.57)),
+ ]
+
+codes, verts = zip(*pathdata)
+path = mpath.Path(verts, codes)
+patch = mpatches.PathPatch(path, facecolor='red', edgecolor='yellow', alpha=0.5)
+ax.add_patch(patch)
+
+x, y = zip(*path.vertices)
+line, = ax.plot(x, y, 'go-')
+ax.grid()
+ax.set_xlim(-3,4)
+ax.set_ylim(-3,4)
+ax.set_title('spline paths')
+plt.show()
+
+
Added: trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_pie_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,26 @@
+"""
+Make a pie chart - see
+http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring.
+
+This example shows a basic pie chart with labels optional features,
+like autolabeling the percentage, offsetting a slice with "explode"
+and adding a shadow.
+
+Requires matplotlib0-0.70 or later
+
+"""
+from pylab import *
+
+# make a square figure and axes
+figure(1, figsize=(6,6))
+ax = axes([0.1, 0.1, 0.8, 0.8])
+
+labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
+fracs = [15,30,45, 10]
+
+explode=(0, 0.05, 0, 0)
+pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%', shadow=True)
+title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})
+
+show()
+
Added: trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_scatter_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,28 @@
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.mlab as mlab
+
+intc = mlab.csv2rec('mpl_examples/data/intc.csv')
+
+delta1 = np.diff(intc.adj_close)/intc.adj_close[:-1]
+
+# size in points ^2
+volume = (15*intc.volume[:-2]/intc.volume[0])**2
+close = 0.003*intc.close[:-2]/0.003*intc.open[:-2]
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.75)
+
+#ticks = arange(-0.06, 0.061, 0.02)
+#xticks(ticks)
+#yticks(ticks)
+
+ax.set_xlabel(r'$\Delta_i$', fontsize=20)
+ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20)
+ax.set_title('Volume and percent change')
+ax.grid(True)
+
+plt.show()
+
+
Added: trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_simple_plots.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,11 @@
+from pylab import *
+
+t = arange(0.0, 2.0, 0.01)
+s = sin(2*pi*t)
+plot(t, s, linewidth=1.0)
+
+xlabel('time (s)')
+ylabel('voltage (mV)')
+title('About as simple as it gets, folks')
+grid(True)
+show()
Added: trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_slider_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,43 @@
+from pylab import *
+from matplotlib.widgets import Slider, Button, RadioButtons
+
+ax = subplot(111)
+subplots_adjust(left=0.25, bottom=0.25)
+t = arange(0.0, 1.0, 0.001)
+a0 = 5
+f0 = 3
+s = a0*sin(2*pi*f0*t)
+l, = plot(t,s, lw=2, color='red')
+axis([0, 1, -10, 10])
+
+axcolor = 'lightgoldenrodyellow'
+axfreq = axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor)
+axamp = axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor)
+
+sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0)
+samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0)
+
+def update(val):
+ amp = samp.val
+ freq = sfreq.val
+ l.set_ydata(amp*sin(2*pi*freq*t))
+ draw()
+sfreq.on_changed(update)
+samp.on_changed(update)
+
+resetax = axes([0.8, 0.025, 0.1, 0.04])
+button = Button(resetax, 'Reset', color=axcolor, hovercolor=0.975)
+def reset(event):
+ sfreq.reset()
+ samp.reset()
+button.on_clicked(reset)
+
+rax = axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor)
+radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0)
+def colorfunc(label):
+ l.set_color(label)
+ draw()
+radio.on_clicked(colorfunc)
+
+show()
+
Added: trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_subplot_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+from pylab import *
+
+def f(t):
+ s1 = cos(2*pi*t)
+ e1 = exp(-t)
+ return multiply(s1,e1)
+
+t1 = arange(0.0, 5.0, 0.1)
+t2 = arange(0.0, 5.0, 0.02)
+t3 = arange(0.0, 2.0, 0.01)
+
+subplot(211)
+plot(t1, f(t1), 'bo', t2, f(t2), 'k--', markerfacecolor='green')
+grid(True)
+title('A tale of 2 subplots')
+ylabel('Damped oscillation')
+
+subplot(212)
+plot(t3, cos(2*pi*t3), 'r.')
+grid(True)
+xlabel('time (s)')
+ylabel('Undamped')
+show()
+
Added: trunk/matplotlib/doc/pyplots/screenshots_table_demo.py
===================================================================
--- trunk/matplotlib/doc/pyplots/screenshots_table_demo.py	 (rev 0)
+++ trunk/matplotlib/doc/pyplots/screenshots_table_demo.py	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+import matplotlib
+
+from pylab import *
+from matplotlib.colors import colorConverter
+
+
+#Some simple functions to generate colours.
+def pastel(colour, weight=2.4):
+ """ Convert colour into a nice pastel shade"""
+ rgb = asarray(colorConverter.to_rgb(colour))
+ # scale colour
+ maxc = max(rgb)
+ if maxc < 1.0 and maxc > 0:
+ # scale colour
+ scale = 1.0 / maxc
+ rgb = rgb * scale
+ # now decrease saturation
+ total = sum(rgb)
+ slack = 0
+ for x in rgb:
+ slack += 1.0 - x
+
+ # want to increase weight from total to weight
+ # pick x s.t. slack * x == weight - total
+ # x = (weight - total) / slack
+ x = (weight - total) / slack
+
+ rgb = [c + (x * (1.0-c)) for c in rgb]
+
+ return rgb
+
+def get_colours(n):
+ """ Return n pastel colours. """
+ base = asarray([[1,0,0], [0,1,0], [0,0,1]])
+
+ if n <= 3:
+ return base[0:n]
+
+ # how many new colours to we need to insert between
+ # red and green and between green and blue?
+ needed = (((n - 3) + 1) / 2, (n - 3) / 2)
+
+ colours = []
+ for start in (0, 1):
+ for x in linspace(0, 1, needed[start]+2):
+ colours.append((base[start] * (1.0 - x)) +
+ (base[start+1] * x))
+
+ return [pastel(c) for c in colours[0:n]]
+
+
+
+axes([0.2, 0.2, 0.7, 0.6]) # leave room below the axes for the table
+
+data = [[ 66386, 174296, 75131, 577908, 32015],
+ [ 58230, 381139, 78045, 99308, 160454],
+ [ 89135, 80552, 152558, 497981, 603535],
+ [ 78415, 81858, 150656, 193263, 69638],
+ [ 139361, 331509, 343164, 781380, 52269]]
+
+colLabels = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail')
+rowLabels = ['%d year' % x for x in (100, 50, 20, 10, 5)]
+
+# Get some pastel shades for the colours
+colours = get_colours(len(colLabels))
+colours.reverse()
+rows = len(data)
+
+ind = arange(len(colLabels)) + 0.3 # the x locations for the groups
+cellText = []
+width = 0.4 # the width of the bars
+yoff = array([0.0] * len(colLabels)) # the bottom values for stacked bar chart
+for row in xrange(rows):
+ bar(ind, data[row], width, bottom=yoff, color=colours[row])
+ yoff = yoff + data[row]
+ cellText.append(['%1.1f' % (x/1000.0) for x in yoff])
+
+# Add a table at the bottom of the axes
+colours.reverse()
+cellText.reverse()
+the_table = table(cellText=cellText,
+ rowLabels=rowLabels, rowColours=colours,
+ colLabels=colLabels,
+ loc='bottom')
+ylabel("Loss 1000ドル's")
+vals = arange(0, 2500, 500)
+yticks(vals*1000, ['%d' % val for val in vals])
+xticks([])
+title('Loss by Disaster')
+#savefig('table_demo_small', dpi=75)
+#savefig('table_demo_large', dpi=300)
+
+show()
Modified: trunk/matplotlib/doc/pyplots/tex_demo.hires.png
===================================================================
(Binary files differ)
Modified: trunk/matplotlib/doc/pyplots/tex_demo.pdf
===================================================================
--- trunk/matplotlib/doc/pyplots/tex_demo.pdf	2008年10月14日 15:59:49 UTC (rev 6186)
+++ trunk/matplotlib/doc/pyplots/tex_demo.pdf	2008年10月14日 21:16:51 UTC (rev 6187)
@@ -4,9 +4,9 @@
 << /Type /Catalog /Pages 3 0 R >>
 endobj
 2 0 obj
-<< /CreationDate (D:20080731010125-07'00')
+<< /CreationDate (D:20081014161405-05'00')
 /Producer (matplotlib pdf backend)
-/Creator (matplotlib 0.98.3rc2, http://matplotlib.sf.net) >>
+/Creator (matplotlib 0.98.3, http://matplotlib.sf.net) >>
 endobj
 3 0 obj
 << /Count 1 /Kids [ 4 0 R ] /Type /Pages >>
@@ -44,214 +44,637 @@
 1864
 endobj
 36 0 obj
-<< /BaseFont /CMSY10 /Type /Font /Subtype /Type1 /FontDescriptor 35 0 R
+<< /BaseFont /CMMI12 /Type /Font /Subtype /Type1 /FontDescriptor 35 0 R
 /Widths 34 0 R /LastChar 125 /FirstChar 0 >>
 endobj
 34 0 obj
-[ 777 277 777 500 777 500 777 777 777 777 777 777 777 1000 500 500 777 777
-777 777 777 777 777 777 777 777 777 777 1000 1000 777 777 1000 1000 500 500
-1000 1000 1000 777 1000 1000 611 611 1000 1000 1000 777 274 1000 666 666
-888 888 0 0 555 555 666 500 722 722 777 777 611 798 656 526 771 527 718 594
-844 544 677 761 689 1200 820 796 695 816 847 605 544 625 612 987 713 668
-724 666 666 666 666 666 611 611 444 444 444 444 500 500 388 388 277 500 500
-611 500 277 833 750 833 416 666 666 777 777 444 444 444 611 777 777 ]
+[ 606 815 748 679 728 811 765 571 652 598 757 622 552 507 433 395 427 483
+456 346 563 571 589 483 427 555 505 556 425 527 579 613 636 609 458 577 808
+505 354 641 979 979 979 979 271 271 489 489 489 489 489 489 489 489 489 489
+489 489 271 271 761 489 761 489 516 734 743 700 812 724 633 772 811 431 541
+833 666 947 784 748 631 775 745 602 573 665 570 924 812 568 670 380 380 380
+979 979 410 513 416 421 508 453 482 468 563 334 405 509 291 856 584 470 491
+434 441 461 353 557 473 699 556 477 454 312 377 623 ]
 endobj
 35 0 obj
-<< /FontFile 37 0 R /FontName /CMSY10 /Descent -960
-/FontBBox [ -29 -960 1116 775 ] /CapHeight 1000 /Ascent 775
+<< /FontFile 37 0 R /FontName /CMMI12 /Descent -250
+/FontBBox [ -30 -250 1026 750 ] /CapHeight 1000 /Ascent 750
 /FontFamily (Computer Modern) /StemV 50 /Flags 68 /XHeight 500
 /ItalicAngle -14 /Type /FontDescriptor >>
 endobj
 37 0 obj
-<< /Length3 0 /Length2 21763 /Length1 4313 /Length 23626
+<< /Length3 0 /Length2 27245 /Length1 3667 /Length 28908
 /Filter /FlateDecode >>
 stream
-x\x9C\x94\xBAuX\x95[\xD7=LKKKʦA\xBA\xBBC\xBAK\xBA6\xB0a\xD3\xDD]"\xD2\xDD(\x8DHw*ݍH\x97tI\xF7o{\xDE\xF3<x\xE2\xF9\xAE\xEB\xBB\xF8\x879\xE6Z\xF7=\xC6Zk\xCC5o\x85\x8ALY\x8DQ\xD4\xCC\xCE(eg\xEB\xCC\xC8\xCA\xC4\xCAWP{\xC3\xCA`ebA\xA3\xA2w;\x83\xECl%\x8C\x9D\x81|
Revision: 6186
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6186&view=rev
Author: jdh2358
Date: 2008年10月14日 15:59:49 +0000 (2008年10月14日)
Log Message:
-----------
fixed data file in rec group by example
Modified Paths:
--------------
 trunk/matplotlib/examples/misc/rec_groupby_demo.py
Modified: trunk/matplotlib/examples/misc/rec_groupby_demo.py
===================================================================
--- trunk/matplotlib/examples/misc/rec_groupby_demo.py	2008年10月14日 15:57:59 UTC (rev 6185)
+++ trunk/matplotlib/examples/misc/rec_groupby_demo.py	2008年10月14日 15:59:49 UTC (rev 6186)
@@ -2,7 +2,7 @@
 import matplotlib.mlab as mlab
 
 
-r = mlab.csv2rec('../data/intc.csv')
+r = mlab.csv2rec('../data/aapl.csv')
 r.sort()
 
 def daily_return(prices):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 6185
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6185&view=rev
Author: jdh2358
Date: 2008年10月14日 15:57:59 +0000 (2008年10月14日)
Log Message:
-----------
fixed data file in rec group by example
Modified Paths:
--------------
 trunk/matplotlib/examples/misc/rec_groupby_demo.py
Modified: trunk/matplotlib/examples/misc/rec_groupby_demo.py
===================================================================
--- trunk/matplotlib/examples/misc/rec_groupby_demo.py	2008年10月14日 15:51:44 UTC (rev 6184)
+++ trunk/matplotlib/examples/misc/rec_groupby_demo.py	2008年10月14日 15:57:59 UTC (rev 6185)
@@ -2,7 +2,7 @@
 import matplotlib.mlab as mlab
 
 
-r = mlab.csv2rec('data/aapl.csv')
+r = mlab.csv2rec('../data/intc.csv')
 r.sort()
 
 def daily_return(prices):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年10月14日 15:51:54
Revision: 6184
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6184&view=rev
Author: jdh2358
Date: 2008年10月14日 15:51:44 +0000 (2008年10月14日)
Log Message:
-----------
added long/short rec array example
Added Paths:
-----------
 trunk/matplotlib/examples/misc/longshort.py
Added: trunk/matplotlib/examples/misc/longshort.py
===================================================================
--- trunk/matplotlib/examples/misc/longshort.py	 (rev 0)
+++ trunk/matplotlib/examples/misc/longshort.py	2008年10月14日 15:51:44 UTC (rev 6184)
@@ -0,0 +1,47 @@
+"""
+Illustrate the rec array utility funcitons by loading prices from a
+csv file, computing the daily returns, appending the results to the
+record arrays, joining on date
+"""
+import urllib
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.mlab as mlab
+
+# grab the price data off yahoo
+u1 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=AAPL&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv')
+u2 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv')
+
+# load the CSV files into record arrays
+r1 = mlab.csv2rec(file(u1[0]))
+r2 = mlab.csv2rec(file(u2[0]))
+
+# compute the daily returns and add these columns to the arrays
+gains1 = np.zeros_like(r1.adj_close)
+gains2 = np.zeros_like(r2.adj_close)
+gains1[1:] = np.diff(r1.adj_close)/r1.adj_close[:-1]
+gains2[1:] = np.diff(r2.adj_close)/r2.adj_close[:-1]
+r1 = mlab.rec_append_fields(r1, 'gains', gains1)
+r2 = mlab.rec_append_fields(r2, 'gains', gains2)
+
+# now join them by date; the default postfixes are 1 and 2. The
+# default jointype is inner so it will do an intersection of dates and
+# drop the dates in AAPL which occurred before GOOG started trading in
+# 2004. r1 and r2 are reverse ordered by date since Yahoo returns
+# most recent first in the CSV files, but rec_join will sort by key so
+# r below will be properly sorted
+r = mlab.rec_join('date', r1, r2)
+
+
+# long appl, short goog
+g = r.gains1-r.gains2
+tr = (1+g).cumprod() # the total return
+
+# plot the return
+fig = plt.figure()
+ax = fig.add_subplot(111)
+ax.plot(r.date, tr)
+ax.set_title('total return: long appl, short goog')
+ax.grid()
+fig.autofmt_xdate()
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年10月14日 13:19:49
Revision: 6183
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6183&view=rev
Author: jdh2358
Date: 2008年10月14日 13:19:31 +0000 (2008年10月14日)
Log Message:
-----------
point to new sf web server
Modified Paths:
--------------
 trunk/matplotlib/doc/make.py
Modified: trunk/matplotlib/doc/make.py
===================================================================
--- trunk/matplotlib/doc/make.py	2008年10月13日 19:16:58 UTC (rev 6182)
+++ trunk/matplotlib/doc/make.py	2008年10月14日 13:19:31 UTC (rev 6183)
@@ -16,11 +16,11 @@
 
 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; rsync -avz html jd...@we...:/home/groups/m/ma/matplotlib/htdocs/doc/ -essh')
 
 def sfpdf():
 'push a copy to the sf site'
- os.system('cd build/latex; scp Matplotlib.pdf jd...@ma...:/home/groups/m/ma/matplotlib/htdocs/doc/')
+ os.system('cd build/latex; scp Matplotlib.pdf jd...@we...:/home/groups/m/ma/matplotlib/htdocs/doc/')
 
 def figs():
 os.system('cd users/figures/ && python make.py')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Showing 10 results of 10

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





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

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

More information about our ad policies

Ad destination/click URL:

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