SourceForge logo
SourceForge logo
Menu

matplotlib-checkins

From: <md...@us...> - 2008年05月30日 18:59:47
Revision: 5328
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5328&view=rev
Author: mdboom
Date: 2008年05月30日 11:59:44 -0700 (2008年5月30日)
Log Message:
-----------
Elaborate on mathtext documentation.
Modified Paths:
--------------
 trunk/matplotlib/doc/users/index.rst
 trunk/matplotlib/doc/users/pyplot_tutorial.rst
Added Paths:
-----------
 trunk/matplotlib/doc/users/mathtext.rst
Modified: trunk/matplotlib/doc/users/index.rst
===================================================================
--- trunk/matplotlib/doc/users/index.rst	2008年05月30日 17:34:24 UTC (rev 5327)
+++ trunk/matplotlib/doc/users/index.rst	2008年05月30日 18:59:44 UTC (rev 5328)
@@ -93,6 +93,7 @@
 .. toctree::
 
 pyplot_tutorial.rst
+ mathtext.rst
 navigation_toolbar.rst
 customizing.rst
 artists.rst
Added: trunk/matplotlib/doc/users/mathtext.rst
===================================================================
--- trunk/matplotlib/doc/users/mathtext.rst	 (rev 0)
+++ trunk/matplotlib/doc/users/mathtext.rst	2008年05月30日 18:59:44 UTC (rev 5328)
@@ -0,0 +1,225 @@
+Writing mathematical expressions
+================================
+
+You can use TeX markup in any matplotlib text string; see the
+:mod:`matplotlib.mathtext` module documentation for details. Note
+that you do not need to have TeX installed, since matplotlib ships its
+own TeX expression parser, layout engine and fonts. The layout engine
+is a fairly direct adaptation of the layout algorithms in Donald
+Knuth's TeX, so the quality is quite good (matplotlib also provides a
+``usetex`` option for those who do want to call out to TeX to generate
+their text).
+
+Any text element can use math text. You need to use raw strings
+(preceed the quotes with an ``'r'``), and surround the string text
+with dollar signs, as in TeX. Regular text and mathtext can be
+interleaved within the same string. Mathtext can use the Computer
+Modern fonts (from (La)TeX), `STIX <http://www.aip.org/stixfonts/>`_
+fonts (with are designed to blend well with Times) or a Unicode font
+that you provide. The mathtext font can be selected with the
+customization variable ``mathtext.fontset``.
+
+Here is a simple example::
+
+ # plain text
+ plt.title('alpha > beta')
+
+produces "alpha > beta".
+
+Whereas this::
+
+ # math text
+ plt.title(r'$\alpha > \beta$')
+
+produces ":math:`\alpha > \beta`".
+
+.. TODO: Include a complete list here
+
+Subscripts and superscripts
+---------------------------
+
+To make subscripts and superscripts, use the ``'_'`` and ``'^'`` symbols::
+
+ r'$\alpha_i > \beta_i$'
+
+.. math::
+
+ \alpha_i > \beta_i
+
+Some symbols automatically put their sub/superscripts under and over
+the operator. For example, to write the sum of :math:`x_i` from :math:`0` to
+:math:`\infty`, you could do::
+
+ r'$\sum_{i=0}^\infty x_i$'
+
+.. math::
+
+ \sum_{i=0}^\infty x_i
+
+Fractions
+---------
+
+Fractions can be created with the ``\frac{}{}`` command::
+
+ r'$\frac{3}{4}$'
+
+produces
+
+.. math::
+
+ \frac{3}{4}
+
+Fractions can be arbitrarily nested::
+
+ r'$\frac{5 - \frac{1}{x}}{4}$'
+
+produces
+
+.. math::
+
+ \frac{5 - \frac{1}{x}}{4}
+
+Note that special care needs to be taken to place parentheses and brackets around
+fractions. Doing things the obvious way produces brackets that are
+too small::
+
+ r'$(\frac{5 - \frac{1}{x}}{4})$'
+
+.. math ::
+
+ (\frac{5 - \frac{1}{x}}{4})
+
+The solution is to precede the bracket with ``\left`` and ``\right``
+to inform the parser that those brackets encompass the entire object::
+
+ r'$\left(\frac{5 - \frac{1}{x}}{4}\right)$'
+
+.. math ::
+
+ \left(\frac{5 - \frac{1}{x}}{4}\right)
+
+Radicals
+--------
+
+Radicals can be produced with the ``\sqrt[]{}`` command. For example:
+
+ r'$\sqrt{2}$'
+
+.. math ::
+
+ \sqrt{2}
+
+Any base can (optionally) be provided inside square brackets. Note
+that the base must be a simple expression, and can not contain layout
+commands such as fractions or sub/superscripts.
+
+ r'$\sqrt[3]{x}$'
+
+.. math ::
+
+ \sqrt[3]{x}
+
+Fonts
+-----
+
+The default font is *italics* for mathematical symbols. To change
+fonts, eg, to write "sin" in a Roman font, enclose the text in a font
+command::
+
+ r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$'
+
+.. math::
+
+ s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)
+
+More conveniently, many commonly used function names that are typeset in a
+Roman font have shortcuts. So the expression above could be written
+as follows::
+
+ r'$s(t) = \mathcal{A}\sin(2 \omega t)$'
+
+.. math::
+
+ s(t) = \mathcal{A}\sin(2 \omega t)
+
+Here "s" and "t" are variable in italics font (default), "sin" is in
+Roman font, and the amplitude "A" is in calligraphy font.
+
+The choices available with all fonts are:
+
+ =============== =================================
+ Command Result
+ =============== =================================
+ ``\mathrm`` :math:`\mathrm{Roman}`
+ ``\mathit`` :math:`\mathit{Italic}`
+ ``\mathtt`` :math:`\mathtt{Typewriter}`
+ ``\mathcal`` :math:`\mathcal{CALLIGRAPHY}`
+ =============== =================================
+
+When using the STIX fonts, you also have the choice of:
+
+ ================ =================================
+ Command Result
+ ================ =================================
+ ``\mathbb`` :math:`\mathbb{Blackboard}`
+ ``\mathcircled`` :math:`\mathcircled{Circled}`
+ ``\mathfrak`` :math:`\mathfrak{Fraktur}`
+ ``\mathsf`` :math:`\mathsf{sans-serif}`
+ ================ =================================
+
+Accents
+-------
+
+An accent command may precede any symbol to add an accent above it.
+There are long and short forms for some of them.
+
+ ============================== =================================
+ Command Result
+ ============================== =================================
+ ``\acute a`` or ``\'a`` :math:`\acute a`
+ ``\bar a`` :math:`\bar a`
+ ``\breve a`` :math:`\breve a`
+ ``\ddot a`` or ``\"a`` :math:`\ddot a`
+ ``\dot a`` or ``\.a`` :math:`\dot a`
+ ``\grave a`` or ``\\`a`` :math:`\grave a`
+ ``\hat a`` or ``\^a`` :math:`\hat a`
+ ``\tilde a`` or ``\~a`` :math:`\tilde a`
+ ``\vec a`` :math:`\vec a`
+ ============================== =================================
+
+In addition, there are two special accents that automatically adjust
+to the width of the symbols below:
+
+ ============================== =================================
+ Command Result
+ ============================== =================================
+ ``\widehat{xyz}`` :math:`\widehat{xyz}`
+ ``\widetilde{xyz}`` :math:`\widetilde{xyz}`
+ ============================== =================================
+
+
+Symbols
+-------
+
+You can also use a large number of the TeX symbols, as in ``\infty``,
+``\leftarrow``, ``\sum``, ``\int``; see :class:`matplotlib.mathtext` for a
+complete list.
+
+If a particular symbol does not have a name (as is true of many of the
+more obscure symbols in the STIX fonts), Unicode characters can
+also be used::
+
+ ur'Generic symbol: $\u23ce$'
+
+Example
+-------
+
+Here is an example illustrating many of these features in context.
+
+.. literalinclude:: figures/pyplot_mathtext.py
+
+.. image:: figures/pyplot_mathtext.png
+ :scale: 50
+
+
+
Modified: trunk/matplotlib/doc/users/pyplot_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/pyplot_tutorial.rst	2008年05月30日 17:34:24 UTC (rev 5327)
+++ trunk/matplotlib/doc/users/pyplot_tutorial.rst	2008年05月30日 18:59:44 UTC (rev 5328)
@@ -76,7 +76,7 @@
 
 * Use the setter methods of the ``Line2D`` instance. ``plot`` returns a list
 of lines; eg ``line1, line2 = plot(x1,y1,x2,x2)``. Below I have only
- one line so it is a list of length 1. I use tuple unpacking in the
+ one line so it is a list of7 length 1. I use tuple unpacking in the
 ``line, = plot(x, y, 'o')`` to get the first element of the list::
 
 line, = plt.plot(x, y, 'o')
@@ -266,77 +266,3 @@
 
 
 
-Writing mathematical expressions
-================================
-
-You may have noticed in the histogram example above that we slipped a
-little TeX markup into the expression ``r'$\mu=100,\ \sigma=15$')``
-You can use TeX markup in any matplotlib text string; see the
-:mod:`matplotlib.mathtext` module documentation for details. Note
-that you do not need to have TeX installed, since matplotlib ships
-its own TeX expression parser, layout engine and fonts. Michael
-Droettboom has implemented the Knuth layout algorithms in python, so
-the quality is quite good (matplotlib also provides a ``usetex`` option
-for those who do want to call out to TeX to generate their text).
-
-Any text element can use math text. You need to use raw strings
-(preceed the quotes with an ``'r'``), and surround the string text
-with dollar signs, as in TeX. Regular text and mathtext can be
-interleaved within the same string. Mathtext can use the Bakoma
-Computer Modern fonts, STIX fonts or a Unicode font that you provide.
-The mathtext font can be selected with the customization variable
-``mathtext.fontset``::
-
- # plain text
- plt.title('alpha > beta')
-
- # math text
- plt.title(r'$\alpha > \beta$')
-
-
-To make subscripts and superscripts use the '_' and '^' symbols::
-
- plt.title(r'$\alpha_i > \beta_i$')
-
-You can also use a large number of the TeX symbols, as in ``\infty,
-\leftarrow, \sum, \int``; see :class:`matplotlib.mathtext` for a
-complete list. The over/under subscript/superscript style is also
-supported. To write the sum of x_i from 0 to infinity, you could do::
-
- plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$')
-
-The default font is *italics* for mathematical symbols. To change
-fonts, eg, to write "sin" in a Roman font, enclose the text in a font
-command::
-
- plt.text(1,2, r's(t) = $\mathcal{A}\mathrm{sin}(2 \omega t)$')
-
-
-Even better, many commonly used function names that are typeset in a
-Roman font have shortcuts. So the expression above could be written
-as follows::
-
- plt.text(1,2, r's(t) = $\mathcal{A}\sin(2 \omega t)$')
-
-
-Here "s" and "t" are variable in italics font (default), "sin" is in
-Roman font, and the amplitude "A" is in caligraphy font. The font
-choices are Roman ``\mathrm``, italics ``\mathit``, caligraphy
-``\mathcal``, and typewriter ``\mathtt``. If using the STIX fonts,
-you also have the choice of blackboard (double-struck) ``\mathbb``,
-circled ``\mathcircled``, Fraktur ``\mathfrak``, script (cursive)
-``\mathscr`` and sans-serif ``\mathsf``.
-
-The following accents are provided: ``\hat``, ``\breve``, ``\grave``,
-``\bar``, ``\acute``, ``\tilde``, ``\vec``, ``\dot``, ``\ddot``. All
-of them have the same syntax, eg to make an overbar you do ``\bar{o}``
-or to make an o umlaut you do ``\ddot{o}``.
-
-.. literalinclude:: figures/pyplot_mathtext.py
-
-.. image:: figures/pyplot_mathtext.png
- :scale: 50
-
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月09日 21:31:49
Revision: 5446
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5446&view=rev
Author: jdh2358
Date: 2008年06月09日 14:31:46 -0700 (2008年6月09日)
Log Message:
-----------
added text properties to users guide
Modified Paths:
--------------
 trunk/matplotlib/doc/users/figures/pyplot_text.py
 trunk/matplotlib/doc/users/pyplot_tutorial.rst
Added Paths:
-----------
 trunk/matplotlib/doc/users/figures/text_layout.py
 trunk/matplotlib/doc/users/text_props.rst
Modified: trunk/matplotlib/doc/users/figures/pyplot_text.py
===================================================================
--- trunk/matplotlib/doc/users/figures/pyplot_text.py	2008年06月09日 21:01:33 UTC (rev 5445)
+++ trunk/matplotlib/doc/users/figures/pyplot_text.py	2008年06月09日 21:31:46 UTC (rev 5446)
@@ -11,7 +11,7 @@
 plt.xlabel('Smarts')
 plt.ylabel('Probability')
 plt.title('Histogram of IQ')
-plt.text(85, .025, r'$\mu=100,\ \sigma=15$')
+plt.text(60, .025, r'$\mu=100,\ \sigma=15$')
 plt.axis([40, 160, 0, 0.03])
 plt.grid(True)
 
Added: trunk/matplotlib/doc/users/figures/text_layout.py
===================================================================
--- trunk/matplotlib/doc/users/figures/text_layout.py	 (rev 0)
+++ trunk/matplotlib/doc/users/figures/text_layout.py	2008年06月09日 21:31:46 UTC (rev 5446)
@@ -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/users/pyplot_tutorial.rst
===================================================================
--- trunk/matplotlib/doc/users/pyplot_tutorial.rst	2008年06月09日 21:01:33 UTC (rev 5445)
+++ trunk/matplotlib/doc/users/pyplot_tutorial.rst	2008年06月09日 21:31:46 UTC (rev 5446)
@@ -153,8 +153,8 @@
 
 .. _multiple-figs-axes:
 
-Working with multiple figure and axes
-=====================================
+Working with multiple figures and axes
+======================================
 
 
 Matlab, and :mod:`~matplotlib.pyplot`, have the concept of the current
@@ -232,47 +232,9 @@
 
 t = plt.xlabel('my data', fontsize=14, color='red')
 
-The following font properties can be set
+These properties are covered in more detail in :ref:`text-properties`.
 
-========================== ==============================================================================
-Property Value Type
-========================== ==============================================================================
-alpha			 float
-backgroundcolor		 any matplotlib color
-bbox			 rectangle prop dict plus key 'pad' which is a pad in points
-clip_box		 a matplotlib.transform.Bbox instance
-clip_on			 [True | False]
-clip_path		 a Path instance and a Transform instance, a Patch
-color			 any matplotlib color
-family			 [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
-fontproperties		 a matplotlib.font_manager.FontProperties instance
-horizontalalignment or ha [ 'center' | 'right' | 'left' ]
-label			 any string
-linespacing		 float
-multialignment		 ['left' | 'right' | 'center' ]
-name or fontname	 string eg, ['Sans' | 'Courier' | 'Helvetica' ...]
-picker			 [None|float|boolean|callable]
-position		 (x,y)
-rotation		 [ angle in degrees 'vertical' | 'horizontal'
-size or fontsize	 [ size in points | relative size eg 'smaller', 'x-large' ]
-style or fontstyle	 [ 'normal' | 'italic' | 'oblique']
-text			 string or anything printable with '%s' conversion
-transform		 a matplotlib.transform transformation instance
-variant			 [ 'normal' | 'small-caps' ]
-verticalalignment or va	 [ 'center' | 'top' | 'bottom' | 'baseline' ]
-visible			 [True | False]
-weight or fontweight	 [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']
-x			 float
-y			 float
-zorder			 any number
-========================== ==============================================================================
 
-
-See `align_text <http://matplotlib.sf.net/screenshots.html#align_text>`_ for
-examples of how to control the alignment and orientation of text.
-
-
-
 Using mathematical expressions in text
 --------------------------------------
 
Added: trunk/matplotlib/doc/users/text_props.rst
===================================================================
--- trunk/matplotlib/doc/users/text_props.rst	 (rev 0)
+++ trunk/matplotlib/doc/users/text_props.rst	2008年06月09日 21:31:46 UTC (rev 5446)
@@ -0,0 +1,63 @@
+.. _text-properties:
+
+Text properties and layout
+==========================
+
+The :class:`matplotlib.text.Text` instances have a variety of
+properties which can be configured via keyword arguments to the text
+commands (eg :func:`~matplotlib.pyplot.title`,
+:func:`~matplotlib.pyplot.xlabel` and :func:`~matplotlib.pyplot.text`).
+
+========================== ==============================================================================
+Property Value Type
+========================== ==============================================================================
+alpha			 float
+backgroundcolor		 any matplotlib color
+bbox			 rectangle prop dict plus key 'pad' which is a pad in points
+clip_box		 a matplotlib.transform.Bbox instance
+clip_on			 [True | False]
+clip_path		 a Path instance and a Transform instance, a Patch
+color			 any matplotlib color
+family			 [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
+fontproperties		 a matplotlib.font_manager.FontProperties instance
+horizontalalignment or ha [ 'center' | 'right' | 'left' ]
+label			 any string
+linespacing		 float
+multialignment		 ['left' | 'right' | 'center' ]
+name or fontname	 string eg, ['Sans' | 'Courier' | 'Helvetica' ...]
+picker			 [None|float|boolean|callable]
+position		 (x,y)
+rotation		 [ angle in degrees 'vertical' | 'horizontal'
+size or fontsize	 [ size in points | relative size eg 'smaller', 'x-large' ]
+style or fontstyle	 [ 'normal' | 'italic' | 'oblique']
+text			 string or anything printable with '%s' conversion
+transform		 a matplotlib.transform transformation instance
+variant			 [ 'normal' | 'small-caps' ]
+verticalalignment or va	 [ 'center' | 'top' | 'bottom' | 'baseline' ]
+visible			 [True | False]
+weight or fontweight	 [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']
+x			 float
+y			 float
+zorder			 any number
+========================== ==============================================================================
+
+
+You can layout text with the alignment arguments
+``horizontalalignment``, ``verticalalignment``, and
+``multialignment``. ``horizontalalignment`` controls whether the x
+positional argument for the text indicates the left, center or right
+side of the text bounding box. ``verticalalignment`` controls whether
+the y positional argument for the text indicates the bottom, center or
+top side of the text bounding box. ``multialignment``, for newline
+separated strings only, controls whether the different lines are left,
+center or right justified. Here is an example which uses the
+:func:`~matplotlib.pyplot.text` command to show the various alignment
+possibilities. The use of ``transform=ax.transAxes`` throughout the
+code indicates that the coordinates are given relative to the axes
+bounding box, with 0,0 being the lower left of the axes and 1,1 the
+upper right.
+
+.. literalinclude:: figures/text_layout.py
+
+.. image:: figures/text_layout.png
+ :scale: 50
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
From: <jd...@us...> - 2008年06月09日 21:51:12
Revision: 5449
 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5449&view=rev
Author: jdh2358
Date: 2008年06月09日 14:51:10 -0700 (2008年6月09日)
Log Message:
-----------
added text intro
Modified Paths:
--------------
 trunk/matplotlib/doc/users/index_text.rst
Added Paths:
-----------
 trunk/matplotlib/doc/users/text_intro.rst
Modified: trunk/matplotlib/doc/users/index_text.rst
===================================================================
--- trunk/matplotlib/doc/users/index_text.rst	2008年06月09日 21:47:38 UTC (rev 5448)
+++ trunk/matplotlib/doc/users/index_text.rst	2008年06月09日 21:51:10 UTC (rev 5449)
@@ -5,59 +5,10 @@
 
 .. toctree::
 
+ text_intro.rst
 text_props.rst
 mathtext.rst
 usetex.rst
 annotations.rst
 
 
-matplotlib has excellent text support, including mathematical
-expressions, truetype support for raster and vector outputs, newline
-separated text with arbitrary rotations, and unicode support. Because
-we embed the fonts directly in the output documents, eg for postscript
-or PDF, what you see on the screen is what you get in the hardcopy.
-`freetype2 <http://freetype.sourceforge.net/index2.html>`_ support
-produces very nice, antialiased fonts, that look good even at small
-raster sizes. matplotlib includes its own
-:mod:`matplotlib.font_manager`, thanks to Paul Barrett, which
-implements a cross platform, W3C compliant font finding algorithm.
-
-You have total control over every text property (font size, font
-weight, text location and color, etc) with sensible defaults set in
-the rc file. And significantly for those interested in mathematical
-or scientific figures, matplotlib implements a large number of TeX
-math symbols and commands, to support mathematical expressions
-anywhere in your figure.
-
-
-Basic text commands
-===================
-
-The following commands are used to create text in the pyplot
-interface
-
-* :func:`~matplotlib.pyplot.text` - add text at an arbitrary location to the ``Axes``;
- :meth:`matplotlib.axes.Axes.text` in the API.
-
-* :func:`~matplotlib.pyplot.xlabel` - add an axis label to the x-axis;
- :meth:`matplotlib.axes.Axes.set_xlabel` in the API.
-
-* :func:`~matplotlib.pyplot.ylabel` - add an axis label to the y-axis;;
- :meth:`matplotlib.axes.Axes.set_ylabel` in the API.
-
-* :func:`~matplotlib.pyplot.title` - add a title to the ``Axes``;
- :meth:`matplotlib.axes.Axes.set_title` in the API.
-
-* :func:`~matplotlib.pyplot.figtext` - add text at an arbitrary location to the ``Figure``;
- :meth:`matplotlib.figure.Figure.text` in the API.
-
-* :func:`~matplotlib.pyplot.suptitle` - add a title to the ``Figure``;
- :meth:`matplotlib.figure.Figure.suptitle` in the API.
-
-* :func:`~matplotlib.pyplot.annotate` - add an annotation, with
- optional arrow, to the ``Axes`` ; :meth:`matplotlib.axes.Axes.annotate`
- in the API.
-
-All of these functions create and return a
-:func:`matplotlib.text.Text` instance, which can bew configured with a
-variety of font and other properties.
Added: trunk/matplotlib/doc/users/text_intro.rst
===================================================================
--- trunk/matplotlib/doc/users/text_intro.rst	 (rev 0)
+++ trunk/matplotlib/doc/users/text_intro.rst	2008年06月09日 21:51:10 UTC (rev 5449)
@@ -0,0 +1,55 @@
+.. _text-intro:
+
+Text introduction
+=================
+
+matplotlib has excellent text support, including mathematical
+expressions, truetype support for raster and vector outputs, newline
+separated text with arbitrary rotations, and unicode support. Because
+we embed the fonts directly in the output documents, eg for postscript
+or PDF, what you see on the screen is what you get in the hardcopy.
+`freetype2 <http://freetype.sourceforge.net/index2.html>`_ support
+produces very nice, antialiased fonts, that look good even at small
+raster sizes. matplotlib includes its own
+:mod:`matplotlib.font_manager`, thanks to Paul Barrett, which
+implements a cross platform, W3C compliant font finding algorithm.
+
+You have total control over every text property (font size, font
+weight, text location and color, etc) with sensible defaults set in
+the rc file. And significantly for those interested in mathematical
+or scientific figures, matplotlib implements a large number of TeX
+math symbols and commands, to support mathematical expressions
+anywhere in your figure.
+
+
+Basic text commands
+===================
+
+The following commands are used to create text in the pyplot
+interface
+
+* :func:`~matplotlib.pyplot.text` - add text at an arbitrary location to the ``Axes``;
+ :meth:`matplotlib.axes.Axes.text` in the API.
+
+* :func:`~matplotlib.pyplot.xlabel` - add an axis label to the x-axis;
+ :meth:`matplotlib.axes.Axes.set_xlabel` in the API.
+
+* :func:`~matplotlib.pyplot.ylabel` - add an axis label to the y-axis;;
+ :meth:`matplotlib.axes.Axes.set_ylabel` in the API.
+
+* :func:`~matplotlib.pyplot.title` - add a title to the ``Axes``;
+ :meth:`matplotlib.axes.Axes.set_title` in the API.
+
+* :func:`~matplotlib.pyplot.figtext` - add text at an arbitrary location to the ``Figure``;
+ :meth:`matplotlib.figure.Figure.text` in the API.
+
+* :func:`~matplotlib.pyplot.suptitle` - add a title to the ``Figure``;
+ :meth:`matplotlib.figure.Figure.suptitle` in the API.
+
+* :func:`~matplotlib.pyplot.annotate` - add an annotation, with
+ optional arrow, to the ``Axes`` ; :meth:`matplotlib.axes.Axes.annotate`
+ in the API.
+
+All of these functions create and return a
+:func:`matplotlib.text.Text` instance, which can bew configured with a
+variety of font and other properties.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
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 によって変換されたページ (->オリジナル) /