Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5130aa5

Browse files
committed
some doc fixes
svn path=/branches/v0_99_maint/; revision=7414
1 parent 34e8a8f commit 5130aa5

4 files changed

Lines changed: 568 additions & 605 deletions

File tree

doc/users/annotations.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,4 @@ keyword args like ``horizontalalignment``, ``verticalalignment`` and
7878
.. plot:: pyplots/annotation_polar.py
7979
:include-source:
8080

81-
See the `annotations demo
82-
<http://matplotlib.sf.net/examples/pylab_examples/annotation_demo.py>`_ for more
83-
examples.
81+
For more on all the wild and wonderful things you can do with annotations, including fancy arrows, see :ref:`plotting-guide-annotation` and :ref:`pylab_examples-annotation_demo`.

doc/users/artists.rst

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,7 @@ the ``Artist`` handles all the high level constructs like representing
1919
and laying out the figure, text, and lines. The typical user will
2020
spend 95% of his time working with the ``Artists``.
2121

22-
There are two types of ``Artists``: primitives and containers. The
23-
primitives represent the standard graphical objects we want to paint
24-
onto our canvas: :class:`~matplotlib.lines.Line2D`,
25-
:class:`~matplotlib.patches.Rectangle`,
26-
:class:`~matplotlib.text.Text`, :class:`~matplotlib.image.AxesImage`,
27-
etc., and the containers are places to put them
28-
(:class:`~matplotlib.axis.Axis`, :class:`~matplotlib.axes.Axes` and
29-
:class:`~matplotlib.figure.Figure`). The standard use is to create a
30-
:class:`~matplotlib.figure.Figure` instance, use the ``Figure`` to
31-
create one or more :class:`~matplotlib.axes.Axes` or
32-
:class:`~matplotlib.axes.Subplot` instances, and use the ``Axes``
33-
instance helper methods to create the primitives. In the example
34-
below, we create a ``Figure`` instance using
35-
:func:`matplotlib.pyplot.figure`, which is a convenience method for
36-
instantiating ``Figure`` instances and connecting them with your user
37-
interface or drawing toolkit ``FigureCanvas``. As we will discuss
38-
below, this is not necessary, and you can work directly with
39-
PostScript, PDF Gtk+, or wxPython ``FigureCanvas`` instances. For
40-
example, instantiate your ``Figures`` directly and connect them
41-
yourselves, but since we are focusing here on the ``Artist`` API we'll let
42-
:mod:`~matplotlib.pyplot` handle some of those details for us::
22+
There are two types of ``Artists``: primitives and containers. The primitives represent the standard graphical objects we want to paint onto our canvas: :class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.patches.Rectangle`, :class:`~matplotlib.text.Text`, :class:`~matplotlib.image.AxesImage`, etc., and the containers are places to put them (:class:`~matplotlib.axis.Axis`, :class:`~matplotlib.axes.Axes` and :class:`~matplotlib.figure.Figure`). The standard use is to create a :class:`~matplotlib.figure.Figure` instance, use the ``Figure`` to create one or more :class:`~matplotlib.axes.Axes` or :class:`~matplotlib.axes.Subplot` instances, and use the ``Axes`` instance helper methods to create the primitives. In the example below, we create a ``Figure`` instance using :func:`matplotlib.pyplot.figure`, which is a convenience method for instantiating ``Figure`` instances and connecting them with your user interface or drawing toolkit ``FigureCanvas``. As we will discuss below, this is not necessary -- you can work directly with PostScript, PDF Gtk+, or wxPython ``FigureCanvas`` instances, instantiate your ``Figures`` directly and connect them yourselves -- but since we are focusing here on the ``Artist`` API we'll let :mod:`~matplotlib.pyplot` handle some of those details for us::
4323

4424
import matplotlib.pyplot as plt
4525
fig = plt.figure()
@@ -85,7 +65,7 @@ subclass of ``Axes``) and when you call ``ax.plot``, it creates a
8565
<matplotlib.axes.Axes.lines>` list. In the interactive `ipython
8666
<http://ipython.scipy.org/>`_ session below, you can see that the
8767
``Axes.lines`` list is length one and contains the same line that was
88-
returned by the ``line, = ax.plot(x, y, 'o')`` call:
68+
returned by the ``line, = ax.plot...`` call:
8969

9070
.. sourcecode:: ipython
9171

@@ -536,20 +516,7 @@ and zooming, as well as the :class:`~matplotlib.ticker.Locator` and
536516
:class:`~matplotlib.ticker.Formatter` instances which control where
537517
the ticks are placed and how they are represented as strings.
538518

539-
Each ``Axis`` object contains a :attr:`~matplotlib.axis.Axis.label`
540-
attribute (this is what the :mod:`~matplotlib.pylab` calls to
541-
:func:`~matplotlib.pylab.xlabel` and :func:`~matplotlib.pylab.ylabel`
542-
set) as well as a list of major and minor ticks. The ticks are
543-
:class:`~matplotlib.axis.XTick` and :class:`~matplotlib.axis.YTick`
544-
instances, which contain the actual line and text primitives that
545-
render the ticks and ticklabels. Because the ticks are dynamically
546-
created as needed (eg. when panning and zooming), you should access
547-
the lists of major and minor ticks through their accessor methods
548-
:meth:`~matplotlib.axis.Axis.get_major_ticks` and
549-
:meth:`~matplotlib.axis.Axis.get_minor_ticks`. Although the ticks
550-
contain all the primitives and will be covered below, the ``Axis`` methods
551-
contain accessor methods to return the tick lines, tick labels, tick
552-
locations etc.:
519+
Each ``Axis`` object contains a :attr:`~matplotlib.axis.Axis.label` attribute (this is what :mod:`~matplotlib.pylab` modifies in calls to :func:`~matplotlib.pylab.xlabel` and :func:`~matplotlib.pylab.ylabel`) as well as a list of major and minor ticks. The ticks are :class:`~matplotlib.axis.XTick` and :class:`~matplotlib.axis.YTick` instances, which contain the actual line and text primitives that render the ticks and ticklabels. Because the ticks are dynamically created as needed (eg. when panning and zooming), you should access the lists of major and minor ticks through their accessor methods :meth:`~matplotlib.axis.Axis.get_major_ticks` and :meth:`~matplotlib.axis.Axis.get_minor_ticks`. Although the ticks contain all the primitives and will be covered below, the ``Axis`` methods contain accessor methods to return the tick lines, tick labels, tick locations etc.:
553520

554521
.. sourcecode:: ipython
555522

@@ -636,7 +603,7 @@ label1On boolean which determines whether to draw tick label
636603
label2On boolean which determines whether to draw tick label
637604
============== ==========================================================
638605

639-
Here is an example which sets the formatter for the upper ticks with
606+
Here is an example which sets the formatter for the right side ticks with
640607
dollar signs and colors them green on the right side of the yaxis
641608

642609
.. plot:: pyplots/dollar_ticks.py

0 commit comments

Comments
 (0)