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

Skip to content

Commit 92a8580

Browse files
committed
added text intro
svn path=/trunk/matplotlib/; revision=5449
1 parent d9653ee commit 92a8580

2 files changed

Lines changed: 56 additions & 50 deletions

File tree

doc/users/index_text.rst

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,10 @@ Working with text
55

66
.. toctree::
77

8+
text_intro.rst
89
text_props.rst
910
mathtext.rst
1011
usetex.rst
1112
annotations.rst
1213

1314

14-
matplotlib has excellent text support, including mathematical
15-
expressions, truetype support for raster and vector outputs, newline
16-
separated text with arbitrary rotations, and unicode support. Because
17-
we embed the fonts directly in the output documents, eg for postscript
18-
or PDF, what you see on the screen is what you get in the hardcopy.
19-
`freetype2 <http://freetype.sourceforge.net/index2.html>`_ support
20-
produces very nice, antialiased fonts, that look good even at small
21-
raster sizes. matplotlib includes its own
22-
:mod:`matplotlib.font_manager`, thanks to Paul Barrett, which
23-
implements a cross platform, W3C compliant font finding algorithm.
24-
25-
You have total control over every text property (font size, font
26-
weight, text location and color, etc) with sensible defaults set in
27-
the rc file. And significantly for those interested in mathematical
28-
or scientific figures, matplotlib implements a large number of TeX
29-
math symbols and commands, to support mathematical expressions
30-
anywhere in your figure.
31-
32-
33-
Basic text commands
34-
===================
35-
36-
The following commands are used to create text in the pyplot
37-
interface
38-
39-
* :func:`~matplotlib.pyplot.text` - add text at an arbitrary location to the ``Axes``;
40-
:meth:`matplotlib.axes.Axes.text` in the API.
41-
42-
* :func:`~matplotlib.pyplot.xlabel` - add an axis label to the x-axis;
43-
:meth:`matplotlib.axes.Axes.set_xlabel` in the API.
44-
45-
* :func:`~matplotlib.pyplot.ylabel` - add an axis label to the y-axis;;
46-
:meth:`matplotlib.axes.Axes.set_ylabel` in the API.
47-
48-
* :func:`~matplotlib.pyplot.title` - add a title to the ``Axes``;
49-
:meth:`matplotlib.axes.Axes.set_title` in the API.
50-
51-
* :func:`~matplotlib.pyplot.figtext` - add text at an arbitrary location to the ``Figure``;
52-
:meth:`matplotlib.figure.Figure.text` in the API.
53-
54-
* :func:`~matplotlib.pyplot.suptitle` - add a title to the ``Figure``;
55-
:meth:`matplotlib.figure.Figure.suptitle` in the API.
56-
57-
* :func:`~matplotlib.pyplot.annotate` - add an annotation, with
58-
optional arrow, to the ``Axes`` ; :meth:`matplotlib.axes.Axes.annotate`
59-
in the API.
60-
61-
All of these functions create and return a
62-
:func:`matplotlib.text.Text` instance, which can bew configured with a
63-
variety of font and other properties.

doc/users/text_intro.rst

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.. _text-intro:
2+
3+
Text introduction
4+
=================
5+
6+
matplotlib has excellent text support, including mathematical
7+
expressions, truetype support for raster and vector outputs, newline
8+
separated text with arbitrary rotations, and unicode support. Because
9+
we embed the fonts directly in the output documents, eg for postscript
10+
or PDF, what you see on the screen is what you get in the hardcopy.
11+
`freetype2 <http://freetype.sourceforge.net/index2.html>`_ support
12+
produces very nice, antialiased fonts, that look good even at small
13+
raster sizes. matplotlib includes its own
14+
:mod:`matplotlib.font_manager`, thanks to Paul Barrett, which
15+
implements a cross platform, W3C compliant font finding algorithm.
16+
17+
You have total control over every text property (font size, font
18+
weight, text location and color, etc) with sensible defaults set in
19+
the rc file. And significantly for those interested in mathematical
20+
or scientific figures, matplotlib implements a large number of TeX
21+
math symbols and commands, to support mathematical expressions
22+
anywhere in your figure.
23+
24+
25+
Basic text commands
26+
===================
27+
28+
The following commands are used to create text in the pyplot
29+
interface
30+
31+
* :func:`~matplotlib.pyplot.text` - add text at an arbitrary location to the ``Axes``;
32+
:meth:`matplotlib.axes.Axes.text` in the API.
33+
34+
* :func:`~matplotlib.pyplot.xlabel` - add an axis label to the x-axis;
35+
:meth:`matplotlib.axes.Axes.set_xlabel` in the API.
36+
37+
* :func:`~matplotlib.pyplot.ylabel` - add an axis label to the y-axis;;
38+
:meth:`matplotlib.axes.Axes.set_ylabel` in the API.
39+
40+
* :func:`~matplotlib.pyplot.title` - add a title to the ``Axes``;
41+
:meth:`matplotlib.axes.Axes.set_title` in the API.
42+
43+
* :func:`~matplotlib.pyplot.figtext` - add text at an arbitrary location to the ``Figure``;
44+
:meth:`matplotlib.figure.Figure.text` in the API.
45+
46+
* :func:`~matplotlib.pyplot.suptitle` - add a title to the ``Figure``;
47+
:meth:`matplotlib.figure.Figure.suptitle` in the API.
48+
49+
* :func:`~matplotlib.pyplot.annotate` - add an annotation, with
50+
optional arrow, to the ``Axes`` ; :meth:`matplotlib.axes.Axes.annotate`
51+
in the API.
52+
53+
All of these functions create and return a
54+
:func:`matplotlib.text.Text` instance, which can bew configured with a
55+
variety of font and other properties.

0 commit comments

Comments
 (0)