|
From: <jd...@us...> - 2009-08-23 05:28:02
|
Revision: 7536
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7536&view=rev
Author: jdh2358
Date: 2009-08-23 05:27:40 +0000 (Sun, 23 Aug 2009)
Log Message:
-----------
fix some typos in the docs
Modified Paths:
--------------
branches/v0_99_maint/doc/users/annotations_guide.rst
branches/v0_99_maint/doc/users/event_handling.rst
branches/v0_99_maint/doc/users/installing.rst
branches/v0_99_maint/doc/users/path_tutorial.rst
branches/v0_99_maint/doc/users/shell.rst
branches/v0_99_maint/doc/users/transforms_tutorial.rst
Added Paths:
-----------
branches/v0_99_maint/examples/animation/animate_decay_tk_blit.py
Modified: branches/v0_99_maint/doc/users/annotations_guide.rst
===================================================================
--- branches/v0_99_maint/doc/users/annotations_guide.rst 2009-08-23 05:18:45 UTC (rev 7535)
+++ branches/v0_99_maint/doc/users/annotations_guide.rst 2009-08-23 05:27:40 UTC (rev 7536)
@@ -4,7 +4,7 @@
Annotating Axes
****************
-Do not proceed unless you already have read
+Do not proceed unless you already have read
:func:`~matplotlib.pyplot.text` and :func:`~matplotlib.pyplot.annotate`!
@@ -38,7 +38,7 @@
bb.set_boxstyle("rarrow", pad=0.6)
The arguments are the name of the box style with its attributes as
-keyword arguments. Currently, followign box styles are implemented.
+keyword arguments. Currently, following box styles are implemented.
========== ============== ==========================
Class Name Attrs
@@ -55,7 +55,7 @@
.. plot:: mpl_examples/pylab_examples/fancybox_demo2.py
-Note that the attrubutes arguments can be specified within the style
+Note that the attributes arguments can be specified within the style
name with separating comma (this form can be used as "boxstyle" value
of bbox argument when initializing the text instance) ::
@@ -103,7 +103,7 @@
2. If patch object is given (*patchA* & *patchB*), the path is clipped to
avoid the patch.
-3. The path is further shrinked by given amount of pixels (*shirnkA*
+3. The path is further shrunk by given amount of pixels (*shirnkA*
& *shrinkB*)
4. The path is transmuted to arrow patch, which is controlled by the
@@ -114,7 +114,7 @@
The creation of the connecting path between two points is controlled by
-``connectionstyle`` key and follwing styles are available.
+``connectionstyle`` key and following styles are available.
========== =============================================
Name Attrs
@@ -197,7 +197,7 @@
ax2.add_artist(con)
The above code connects point xy in data coordinate of ``ax1`` to
-point xy int data coordiante of ``ax2``. Here is a simple example.
+point xy int data coordinate of ``ax2``. Here is a simple example.
.. plot:: users/plotting/examples/connect_simple01.py
@@ -230,7 +230,7 @@
The *loc* keyword has same meaning as in the legend command.
A simple application is when the size of the artist (or collection of
-artists) is knwon in pixel size during the time of creation. For
+artists) is known in pixel size during the time of creation. For
example, If you want to draw a circle with fixed size of 20 pixel x 20
pixel (radius = 10 pixel), you can utilize
``AnchoredDrawingArea``. The instance is created with a size of the
@@ -280,7 +280,7 @@
.. plot:: users/plotting/examples/anchored_box04.py
Note that unlike the legend, the ``bbox_transform`` is set
-to IdentityTransform by default.
+to IdentityTransform by default.
Advanced Topics
***************
@@ -288,7 +288,7 @@
Zoom effect between Axes
========================
-mpl_toolkits.axes_grid.inset_locator defines some patch classs useful
+mpl_toolkits.axes_grid.inset_locator defines some patch classes useful
for interconnect two axes. Understanding the code requires some
knowledge of how mpl's transform works. But, utilizing it will be
straight forward.
@@ -327,6 +327,6 @@
:include-source:
-Similarly, you can define custom ConnectionStyle and Custome ArrowStyle.
+Similarly, you can define custom ConnectionStyle and custom ArrowStyle.
See the source code of ``lib/matplotlib/patches.py`` and check
how each style class is defined.
Modified: branches/v0_99_maint/doc/users/event_handling.rst
===================================================================
--- branches/v0_99_maint/doc/users/event_handling.rst 2009-08-23 05:18:45 UTC (rev 7535)
+++ branches/v0_99_maint/doc/users/event_handling.rst 2009-08-23 05:27:40 UTC (rev 7536)
@@ -5,7 +5,7 @@
**************************
matplotlib works with 6 user interface toolkits (wxpython, tkinter,
-qt, gtk, fltk abd macosx) and in order to support features like interactive
+qt, gtk, fltk and macosx) and in order to support features like interactive
panning and zooming of figures, it is helpful to the developers to
have an API for interacting with the figure via key presses and mouse
movements that is "GUI neutral" so we don't have to repeat a lot of
@@ -150,7 +150,7 @@
Write draggable rectangle class that is initialized with a
:class:`~matplotlib.patches.Rectangle` instance but will move its x,y
-location when dragged. Hint: you will need to store the orginal
+location when dragged. Hint: you will need to store the original
``xy`` location of the rectangle which is stored as rect.xy and
connect to the press, motion and release mouse events. When the mouse
is pressed, check to see if the click occurs over your rectangle (see
Modified: branches/v0_99_maint/doc/users/installing.rst
===================================================================
--- branches/v0_99_maint/doc/users/installing.rst 2009-08-23 05:18:45 UTC (rev 7535)
+++ branches/v0_99_maint/doc/users/installing.rst 2009-08-23 05:27:40 UTC (rev 7536)
@@ -22,7 +22,7 @@
One single click installer and you are done.
-Ok, so you want to do it the hard way?
+OK, so you want to do it the hard way?
======================================
For some people, the prepackaged pythons discussed above are not an
@@ -109,7 +109,7 @@
packaging matplotlib.
-.. _install_requrements:
+.. _install_requirements:
Build requirements
==================
@@ -152,7 +152,7 @@
The Qt3 widgets library python wrappers for the QtAgg backend
:term:`pyqt` 4.0 or later
- The Qt4 widgets library python wrappersfor the Qt4Agg backend
+ The Qt4 widgets library python wrappers for the Qt4Agg backend
:term:`pygtk` 2.2 or later
The python wrappers for the GTK widgets library for use with the GTK or GTKAgg backend
@@ -201,5 +201,5 @@
instruction in the README. This directory has a Makefile which will
automatically grab the zlib, png and freetype dependencies from the
web, build them with the right flags to make universal libraries, and
-then build the matplotlib source and binary installers.
-
\ No newline at end of file
+then build the matplotlib source and binary installers.
+
Modified: branches/v0_99_maint/doc/users/path_tutorial.rst
===================================================================
--- branches/v0_99_maint/doc/users/path_tutorial.rst 2009-08-23 05:18:45 UTC (rev 7535)
+++ branches/v0_99_maint/doc/users/path_tutorial.rst 2009-08-23 05:27:40 UTC (rev 7536)
@@ -71,7 +71,7 @@
control point and one end point, and CURVE4 has three vertices for the
two control points and the end point. The example below shows a
CURVE4 Bézier spline -- the bézier curve will be contained in the
-convex hul of the start point, the two control points, and the end
+convex hull of the start point, the two control points, and the end
point
.. plot::
@@ -123,7 +123,7 @@
like :meth:`~matplotlib.axes.Axes.hist` and
:meth:`~matplotlib.axes.Axes.bar`, which create a number of
primitives, eg a bunch of Rectangles, can usually be implemented more
-efficiently using a compund path. The reason ``bar`` creates a list
+efficiently using a compound path. The reason ``bar`` creates a list
of rectangles and not a compound path is largely historical: the
:class:`~matplotlib.path.Path` code is comparatively new and ``bar``
predates it. While we could change it now, it would break old code,
Modified: branches/v0_99_maint/doc/users/shell.rst
===================================================================
--- branches/v0_99_maint/doc/users/shell.rst 2009-08-23 05:18:45 UTC (rev 7535)
+++ branches/v0_99_maint/doc/users/shell.rst 2009-08-23 05:27:40 UTC (rev 7536)
@@ -66,7 +66,7 @@
=========================
If you can't use ipython, and still want to use matplotlib/pylab from
-an interactive python shell, eg the plain-ol standard python
+an interactive python shell, eg the plain-ole standard python
interactive interpreter, or the interpreter in your favorite IDE, you
are going to need to understand what a matplotlib backend is
:ref:`what-is-a-backend`.
Modified: branches/v0_99_maint/doc/users/transforms_tutorial.rst
===================================================================
--- branches/v0_99_maint/doc/users/transforms_tutorial.rst 2009-08-23 05:18:45 UTC (rev 7535)
+++ branches/v0_99_maint/doc/users/transforms_tutorial.rst 2009-08-23 05:27:40 UTC (rev 7536)
@@ -225,7 +225,7 @@
:meth:`~matplotlib.axes.Axes.axvspan`) but for didactic purposes we
will implement the horizontal span here using a blended
transformation. This trick only works for separable transformations,
-like you see in normal cartesian coordinate systems, but not on
+like you see in normal Cartesian coordinate systems, but not on
inseparable transformations like the
:class:`~matplotlib.projections.polar.PolarAxes.PolarTransform`.
@@ -301,7 +301,7 @@
shadow_transform = ax.transData + offset
showing that can chain transformations using the addition operator.
-This code says: first appy the data transformation ``ax.transData`` and
+This code says: first apply the data transformation ``ax.transData`` and
then translate the data by `dx` and `dy` points.
.. plot::
@@ -352,7 +352,7 @@
in your axes which affects the affine transformation, but you may not
need to compute the potentially expensive nonlinear scales or
projections on simple navigation events. It is also possible to
-multiply affine transformation matrices togeter, and then apply them
+multiply affine transformation matrices together, and then apply them
to coordinates in one step. This is not true of all possible
transformations.
@@ -404,7 +404,7 @@
The final piece is the ``self.transScale`` attribute, which is
responsible for the optional non-linear scaling of the data, eg. for
-logarithmic axes. When an Axes is initally setup, this is just set to
+logarithmic axes. When an Axes is initially setup, this is just set to
the identity transform, since the basic matplotlib axes has linear
scale, but when you call a logarithmic scaling function like
:meth:`~matplotlib.axes.Axes.semilogx` or explicitly set the scale to
@@ -426,7 +426,7 @@
``transProjection`` handles the projection from the space,
eg. latitude and longitude for map data, or radius and theta for polar
-data, to a separable cartesian coordinate system. There are several
+data, to a separable Cartesian coordinate system. There are several
projection examples in the ``matplotlib.projections`` package, and the
best way to learn more is to open the source for those packages and
see how to make your own, since matplotlib supports extensible axes
Added: branches/v0_99_maint/examples/animation/animate_decay_tk_blit.py
===================================================================
--- branches/v0_99_maint/examples/animation/animate_decay_tk_blit.py (rev 0)
+++ branches/v0_99_maint/examples/animation/animate_decay_tk_blit.py 2009-08-23 05:27:40 UTC (rev 7536)
@@ -0,0 +1,58 @@
+import time, sys
+import numpy as np
+import matplotlib.pyplot as plt
+
+
+def data_gen():
+ t = data_gen.t
+ data_gen.t += 0.05
+ return np.sin(2*np.pi*t) * np.exp(-t/10.)
+data_gen.t = 0
+
+fig = plt.figure()
+ax = fig.add_subplot(111)
+line, = ax.plot([], [], animated=True, lw=2)
+ax.set_ylim(-1.1, 1.1)
+ax.set_xlim(0, 5)
+ax.grid()
+xdata, ydata = [], []
+def run(*args):
+ background = fig.canvas.copy_from_bbox(ax.bbox)
+ # for profiling
+ tstart = time.time()
+
+ while 1:
+ # restore the clean slate background
+ fig.canvas.restore_region(background)
+ # update the data
+ t = data_gen.t
+ y = data_gen()
+ xdata.append(t)
+ ydata.append(y)
+ xmin, xmax = ax.get_xlim()
+ if t>=xmax:
+ ax.set_xlim(xmin, 2*xmax)
+ fig.canvas.draw()
+ background = fig.canvas.copy_from_bbox(ax.bbox)
+
+ line.set_data(xdata, ydata)
+
+ # just draw the animated artist
+ ax.draw_artist(line)
+ # just redraw the axes rectangle
+ fig.canvas.blit(ax.bbox)
+
+ if run.cnt==1000:
+ # print the timing info and quit
+ print 'FPS:' , 1000/(time.time()-tstart)
+ sys.exit()
+
+ run.cnt += 1
+run.cnt = 0
+
+
+
+manager = plt.get_current_fig_manager()
+manager.window.after(100, run)
+
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|