[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/users/mathtext.html#radicals [Back]  [Original]

Writing mathematical expressions — Matplotlib 2.0.2 documentation
You are reading an old version of the documentation (v2.0.2). For the latest version see https://matplotlib.org/stable/
forkme_right_orange_ff7600.png [forkme_right_orange_ff7600.png]
matplotlib [matplotlib]
depsy_badge.svg [depsy_badge.svg]
Travis-CI: matplotlib.svg [matplotlib.svg]

Table Of Contents

This Page

Writing mathematical expressions

You can use a subset TeX markup in any matplotlib text string by placing it inside a pair of dollar signs ($).

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 (see Text rendering With LaTeX).

Any text element can use math text. You should use raw strings (precede the quotes with an 'r'), and surround the math text with dollar signs ($), as in TeX. Regular text and mathtext can be interleaved within the same string. Mathtext can use DejaVu Sans (default), DejaVu Serif, the Computer Modern fonts (from (La)TeX), STIX 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 (see Customizing matplotlib)

Note

On “narrow” builds of Python, if you use the STIX fonts you should also set ps.fonttype and pdf.fonttype to 3 (the default), not 42. Otherwise some characters will not be visible.

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-3ba37e0517.png [math-3ba37e0517.png]”.

Note

Mathtext should be placed between a pair of dollar signs ($). To make it easy to display monetary values, e.g., “$100.00”, if a single dollar sign is present in the entire string, it will be displayed verbatim as a dollar sign. This is a small change from regular TeX, where the dollar sign in non-math text would have to be escaped (‘\$’).

Note

While the syntax inside the pair of dollar signs ($) aims to be TeX-like, the text outside does not. In particular, characters such as:

# $ % & ~ _ ^ \ { } \( \) \[ \]

have special meaning outside of math mode in TeX. Therefore, these characters will behave differently depending on the rcParam text.usetex flag. See the usetex tutorial for more information.

Subscripts and superscripts

To make subscripts and superscripts, use the '_' and '^' symbols:

r'$\alpha_i > \beta_i$'
math-e2db32b4d0.png [math-e2db32b4d0.png]

Some symbols automatically put their sub/superscripts under and over the operator. For example, to write the sum of math-ccea9f4e30.png [math-ccea9f4e30.png] from math-f9f98764da.png [math-f9f98764da.png] to math-c899412e92.png [math-c899412e92.png], you could do:

r'$\sum_{i=0}^\infty x_i$'
math-a3ca6be911.png [math-a3ca6be911.png]

Fractions, binomials and stacked numbers

Fractions, binomials and stacked numbers can be created with the \frac{}{}, \binom{}{} and \stackrel{}{} commands, respectively:

r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$'

produces

math-3025afbc71.png [math-3025afbc71.png]

Fractions can be arbitrarily nested:

r'$\frac{5 - \frac{1}{x}}{4}$'

produces

math-2e885fe67f.png [math-2e885fe67f.png]

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-07b17ba8f6.png [math-07b17ba8f6.png]

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-9d267a8c3c.png [math-9d267a8c3c.png]

Radicals

Radicals can be produced with the \sqrt[]{} command. For example:

r'$\sqrt{2}$'
math-f151e9b6c6.png [math-f151e9b6c6.png]

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-6b6cc30aef.png [math-6b6cc30aef.png]

Fonts

The default font is italics for mathematical symbols.

Note

This default can be changed using the mathtext.default rcParam. This is useful, for example, to use the same font as regular non-math text for math text, by setting it to regular.

To change fonts, e.g., 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-c8056d47b3.png [math-c8056d47b3.png]

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-77926a09ec.png [math-77926a09ec.png]

Here “s” and “t” are variable in italics font (default), “sin” is in Roman font, and the amplitude “A” is in calligraphy font. Note in the example above the caligraphy A is squished into the sin. You can use a spacing command to add a little whitespace between them:

s(t) = \mathcal{A}\/\sin(2 \omega t)
math-44f45b7160.png [math-44f45b7160.png]

The choices available with all fonts are:

Command Result
\mathrm{Roman} math-89f87a2f0c.png [math-89f87a2f0c.png]
\mathit{Italic} math-968de0e26b.png [math-968de0e26b.png]
\mathtt{Typewriter} math-ca3f612baa.png [math-ca3f612baa.png]
\mathcal{CALLIGRAPHY} math-1f62587cf2.png [math-1f62587cf2.png]

When using the STIX fonts, you also have the choice of:

Command Result
\mathbb{blackboard} math-a12676f03f.png [math-a12676f03f.png]
\mathrm{\mathbb{blackboard}} math-014e74dc81.png [math-014e74dc81.png]
\mathfrak{Fraktur} math-4f55ade322.png [math-4f55ade322.png]
\mathsf{sansserif} math-e9444fe0c8.png [math-e9444fe0c8.png]
\mathrm{\mathsf{sansserif}} math-c3a13bbc63.png [math-c3a13bbc63.png]
\mathcircled{circled} math-e82daa3fb7.png [math-e82daa3fb7.png]

There are also three global “font sets” to choose from, which are selected using the mathtext.fontset parameter in matplotlibrc.

cm: Computer Modern (TeX)

../_images/cm_fontset.png [../_images/cm_fontset.png]

stix: STIX (designed to blend well with Times)

../_images/stix_fontset.png [../_images/stix_fontset.png]

stixsans: STIX sans-serif

../_images/stixsans_fontset.png [../_images/stixsans_fontset.png]

Additionally, you can use \mathdefault{...} or its alias \mathregular{...} to use the font used for regular text outside of mathtext. There are a number of limitations to this approach, most notably that far fewer symbols will be available, but it can be useful to make math expressions blend well with other text in the plot.

Custom fonts

mathtext also provides a way to use custom fonts for math. This method is fairly tricky to use, and should be considered an experimental feature for patient users only. By setting the rcParam mathtext.fontset to custom, you can then set the following parameters, which control which font file to use for a particular set of math characters.

Parameter Corresponds to
mathtext.it \mathit{} or default italic
mathtext.rm \mathrm{} Roman (upright)
mathtext.tt \mathtt{} Typewriter (monospace)
mathtext.bf \mathbf{} bold italic
mathtext.cal \mathcal{} calligraphic
mathtext.sf \mathsf{} sans-serif

Each parameter should be set to a fontconfig font descriptor (as defined in the yet-to-be-written font chapter).

The fonts used should have a Unicode mapping in order to find any non-Latin characters, such as Greek. If you want to use a math symbol that is not contained in your custom fonts, you can set the rcParam mathtext.fallback_to_cm to True which will cause the mathtext system to use characters from the default Computer Modern fonts whenever a particular character can not be found in the custom font.

Note that the math glyphs specified in Unicode have evolved over time, and many fonts may not have glyphs in the correct place for mathtext.

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-fac074d098.png [math-fac074d098.png]
\bar a math-b7c546c13f.png [math-b7c546c13f.png]
\breve a math-88814f8d66.png [math-88814f8d66.png]
\ddot a or \"a math-adb99bedc4.png [math-adb99bedc4.png]
\dot a or \.a math-b5496f6786.png [math-b5496f6786.png]
\grave a or \`a math-54cbc28bce.png [math-54cbc28bce.png]
\hat a or \^a math-16da2c10a1.png [math-16da2c10a1.png]
\tilde a or \~a math-3a8b2e99d6.png [math-3a8b2e99d6.png]
\vec a math-be2ea18bef.png [math-be2ea18bef.png]
\overline{abc} math-75e95f3f2b.png [math-75e95f3f2b.png]

In addition, there are two special accents that automatically adjust to the width of the symbols below:

Command Result
\widehat{xyz} math-8e4b9eb82b.png [math-8e4b9eb82b.png]
\widetilde{xyz} math-bf67fbdaae.png [math-bf67fbdaae.png]

Care should be taken when putting accents on lower-case i’s and j’s. Note that in the following \imath is used to avoid the extra dot over the i:

r"$\hat i\ \ \hat \imath$"
math-80117b16d3.png [math-80117b16d3.png]

Symbols

You can also use a large number of the TeX symbols, as in \infty, \leftarrow, \sum, \int.

Lower-case Greek

math-5149852f08.png [math-5149852f08.png] \alpha math-59ed813421.png [math-59ed813421.png] \beta math-7d54d13fc9.png [math-7d54d13fc9.png] \chi math-e15357ad29.png [math-e15357ad29.png] \delta math-41188a0c1b.png [math-41188a0c1b.png] \digamma
math-21b6ff3aa7.png [math-21b6ff3aa7.png] \epsilon math-0fa258552e.png [math-0fa258552e.png] \eta math-ae65c1de79.png [math-ae65c1de79.png] \gamma math-ff6a67483e.png [math-ff6a67483e.png] \iota math-436efe52d1.png [math-436efe52d1.png] \kappa
math-3642ca147d.png [math-3642ca147d.png] \lambda math-3488de1d0a.png [math-3488de1d0a.png] \mu math-79a0df421c.png [math-79a0df421c.png] \nu math-b555ccd28d.png [math-b555ccd28d.png] \omega math-e22cc525ec.png [math-e22cc525ec.png] \phi
math-2c7a9dac6d.png [math-2c7a9dac6d.png] \pi math-3fc9142b1d.png [math-3fc9142b1d.png] \psi math-f2e3547a85.png [math-f2e3547a85.png] \rho math-293c147d21.png [math-293c147d21.png] \sigma math-f970af607c.png [math-f970af607c.png] \tau
math-5dc8912759.png [math-5dc8912759.png] \theta math-ac7cfff3a1.png [math-ac7cfff3a1.png] \upsilon math-a88976d8dd.png [math-a88976d8dd.png] \varepsilon math-67a8f5ca79.png [math-67a8f5ca79.png] \varkappa math-a79325da6f.png [math-a79325da6f.png] \varphi
math-5e94f6d1ef.png [math-5e94f6d1ef.png] \varpi math-d6c1d2bb14.png [math-d6c1d2bb14.png] \varrho math-92fc1ff85f.png [math-92fc1ff85f.png] \varsigma math-d11bf19a50.png [math-d11bf19a50.png] \vartheta math-1859062b14.png [math-1859062b14.png] \xi
math-d51bb4d6d4.png [math-d51bb4d6d4.png] \zeta        

Upper-case Greek

Hebrew

Delimiters

Big symbols

Standard function names

math-a174a79fa7.png [math-a174a79fa7.png] \Pr math-c7d2b9a8fd.png [math-c7d2b9a8fd.png] \arccos math-bab33d6e68.png [math-bab33d6e68.png] \arcsin math-f8ee41a28a.png [math-f8ee41a28a.png] \arctan
math-510e2aecba.png [math-510e2aecba.png] \arg math-a539c63e58.png [math-a539c63e58.png] \cos math-46d99aa165.png [math-46d99aa165.png] \cosh math-06c793e494.png [math-06c793e494.png] \cot
math-993151c5de.png [math-993151c5de.png] \coth math-c72f36312c.png [math-c72f36312c.png] \csc math-efdcd0e7c3.png [math-efdcd0e7c3.png] \deg math-a4f974e6ac.png [math-a4f974e6ac.png] \det
math-4ceaca4089.png [math-4ceaca4089.png] \dim math-9b8a721035.png [math-9b8a721035.png] \exp math-705a921d5a.png [math-705a921d5a.png] \gcd math-ec200f4f3a.png [math-ec200f4f3a.png] \hom
math-d78d7b5c1b.png [math-d78d7b5c1b.png] \inf math-9c3c23a23d.png [math-9c3c23a23d.png] \ker math-0c0d015405.png [math-0c0d015405.png] \lg math-441aa359eb.png [math-441aa359eb.png] \lim
math-2f010c89dd.png [math-2f010c89dd.png] \liminf math-a9a0109ea9.png [math-a9a0109ea9.png] \limsup math-a5edc7016a.png [math-a5edc7016a.png] \ln math-e5cdb1d314.png [math-e5cdb1d314.png] \log
math-fb64cdd50f.png [math-fb64cdd50f.png] \max math-bf7d25e347.png [math-bf7d25e347.png] \min math-a0b5414d31.png [math-a0b5414d31.png] \sec math-d8d19f17ef.png [math-d8d19f17ef.png] \sin
math-fce9663ad9.png [math-fce9663ad9.png] \sinh math-358f2a2131.png [math-358f2a2131.png] \sup math-fb3512b848.png [math-fb3512b848.png] \tan math-8e6df07c24.png [math-8e6df07c24.png] \tanh

Binary operation and relation symbols

math-f610b8e469.png [math-f610b8e469.png] \Bumpeq math-2a327a85e8.png [math-2a327a85e8.png] \Cap math-0fbbe481d0.png [math-0fbbe481d0.png] \Cup
math-2303577dee.png [math-2303577dee.png] \Doteq math-70e89758da.png [math-70e89758da.png] \Join math-3d85215bfa.png [math-3d85215bfa.png] \Subset
math-191c6ba7fa.png [math-191c6ba7fa.png] \Supset math-219444d8f5.png [math-219444d8f5.png] \Vdash math-7db176731c.png [math-7db176731c.png] \Vvdash
math-c957a5ae9f.png [math-c957a5ae9f.png] \approx math-cf8f5e2275.png [math-cf8f5e2275.png] \approxeq math-4ea8b1e13e.png [math-4ea8b1e13e.png] \ast
math-23c4970a1a.png [math-23c4970a1a.png] \asymp math-ea0303ad72.png [math-ea0303ad72.png] \backepsilon math-b1d77626bb.png [math-b1d77626bb.png] \backsim
math-af3bc8ac21.png [math-af3bc8ac21.png] \backsimeq math-71771b9385.png [math-71771b9385.png] \barwedge math-937e2c148d.png [math-937e2c148d.png] \because
math-51ae43b24b.png [math-51ae43b24b.png] \between math-3b72c12de0.png [math-3b72c12de0.png] \bigcirc math-e98739824f.png [math-e98739824f.png] \bigtriangledown
math-52ddd6655e.png [math-52ddd6655e.png] \bigtriangleup math-679967c920.png [math-679967c920.png] \blacktriangleleft math-2ff97d8581.png [math-2ff97d8581.png] \blacktriangleright
math-d2bc160257.png [math-d2bc160257.png] \bot math-88c0703f35.png [math-88c0703f35.png] \bowtie math-0cc3cb6c41.png [math-0cc3cb6c41.png] \boxdot
math-b5a379f4e8.png [math-b5a379f4e8.png] \boxminus math-3e25be9041.png [math-3e25be9041.png] \boxplus math-d3219d7443.png [math-d3219d7443.png] \boxtimes
math-ef7a046183.png [math-ef7a046183.png] \bullet math-c5baac4e57.png [math-c5baac4e57.png] \bumpeq math-f0c7f8f01c.png [math-f0c7f8f01c.png] \cap
math-5a90bc5099.png [math-5a90bc5099.png] \cdot math-f9b0df773f.png [math-f9b0df773f.png] \circ math-5af298e692.png [math-5af298e692.png] \circeq
math-e4d9d4c64b.png [math-e4d9d4c64b.png] \coloneq math-b43c061111.png [math-b43c061111.png] \cong math-20b287ac85.png [math-20b287ac85.png] \cup
math-c0df1e9b19.png [math-c0df1e9b19.png] \curlyeqprec math-995f666935.png [math-995f666935.png] \curlyeqsucc math-615de138a6.png [math-615de138a6.png] \curlyvee
math-5af1fa6042.png [math-5af1fa6042.png] \curlywedge math-9b12241d0c.png [math-9b12241d0c.png] \dag math-9e1beabce9.png [math-9e1beabce9.png] \dashv
math-f0fa40854a.png [math-f0fa40854a.png] \ddag math-765d4eae57.png [math-765d4eae57.png] \diamond math-a1903b29fd.png [math-a1903b29fd.png] \div
math-3df678db55.png [math-3df678db55.png] \divideontimes math-a5b22dbdac.png [math-a5b22dbdac.png] \doteq math-ff23293ae5.png [math-ff23293ae5.png] \doteqdot
math-397b5fc155.png [math-397b5fc155.png] \dotplus math-d5242ce585.png [math-d5242ce585.png] \doublebarwedge math-a4f1a69c76.png [math-a4f1a69c76.png] \eqcirc
math-17826fcd24.png [math-17826fcd24.png] \eqcolon math-c104febab3.png [math-c104febab3.png] \eqsim math-45eaae26d2.png [math-45eaae26d2.png] \eqslantgtr
math-c3fea548da.png [math-c3fea548da.png] \eqslantless math-cc1340c453.png [math-cc1340c453.png] \equiv math-7965c0c1af.png [math-7965c0c1af.png] \fallingdotseq
math-a41c184ca6.png [math-a41c184ca6.png] \frown math-0bf42a25bb.png [math-0bf42a25bb.png] \geq math-9b14251f65.png [math-9b14251f65.png] \geqq
math-1fca7a951f.png [math-1fca7a951f.png] \geqslant math-f9990bc9cf.png [math-f9990bc9cf.png] \gg math-a3de1e5b51.png [math-a3de1e5b51.png] \ggg
math-04c47dcb6e.png [math-04c47dcb6e.png] \gnapprox math-a3f9f1f014.png [math-a3f9f1f014.png] \gneqq math-793d9cedd0.png [math-793d9cedd0.png] \gnsim
math-207852189a.png [math-207852189a.png] \gtrapprox math-9336896bb3.png [math-9336896bb3.png] \gtrdot math-4cd21f8ba6.png [math-4cd21f8ba6.png] \gtreqless
math-18a0084a2d.png [math-18a0084a2d.png] \gtreqqless math-8e388594ad.png [math-8e388594ad.png] \gtrless math-9d5e427aeb.png [math-9d5e427aeb.png] \gtrsim
math-58e3fcf6fd.png [math-58e3fcf6fd.png] \in math-0e049fe80b.png [math-0e049fe80b.png] \intercal math-1a503a50f2.png [math-1a503a50f2.png] \leftthreetimes
math-aca311c641.png [math-aca311c641.png] \leq math-d87b34b699.png [math-d87b34b699.png] \leqq math-764751dad5.png [math-764751dad5.png] \leqslant
math-b8571a3cc2.png [math-b8571a3cc2.png] \lessapprox math-6cb5c3c310.png [math-6cb5c3c310.png] \lessdot math-1632a38331.png [math-1632a38331.png] \lesseqgtr
math-d367d088c6.png [math-d367d088c6.png] \lesseqqgtr math-268c486057.png [math-268c486057.png] \lessgtr math-b53ab799d1.png [math-b53ab799d1.png] \lesssim
math-f5e02865f3.png [math-f5e02865f3.png] \ll math-2303518311.png [math-2303518311.png] \lll math-c408639f33.png [math-c408639f33.png] \lnapprox
math-38bf4cf10d.png [math-38bf4cf10d.png] \lneqq math-ad67ff4a6f.png [math-ad67ff4a6f.png] \lnsim math-f557917efd.png [math-f557917efd.png] \ltimes
math-96c9a8ca95.png [math-96c9a8ca95.png] \mid math-b5ae8c62a3.png [math-b5ae8c62a3.png] \models math-608c4a02ea.png [math-608c4a02ea.png] \mp
math-e0ca686f62.png [math-e0ca686f62.png] \nVDash math-4d5d5f4ffb.png [math-4d5d5f4ffb.png] \nVdash math-8aa32761da.png [math-8aa32761da.png] \napprox
math-92306485fb.png [math-92306485fb.png] \ncong math-6e6c5971ad.png [math-6e6c5971ad.png] \ne math-da1122f776.png [math-da1122f776.png] \neq
math-da1122f776.png [math-da1122f776.png] \neq math-989088989a.png [math-989088989a.png] \nequiv math-07c03ece9c.png [math-07c03ece9c.png] \ngeq
math-c2c43a5762.png [math-c2c43a5762.png] \ngtr math-7e90b124a8.png [math-7e90b124a8.png] \ni math-1c2ed5670a.png [math-1c2ed5670a.png] \nleq
math-c9136df47e.png [math-c9136df47e.png] \nless math-4c5d76f523.png [math-4c5d76f523.png] \nmid math-9afe2d20f8.png [math-9afe2d20f8.png] \notin
math-e63a2108d5.png [math-e63a2108d5.png] \nparallel math-201b65e42c.png [math-201b65e42c.png] \nprec math-37454f1e25.png [math-37454f1e25.png] \nsim
math-b045970090.png [math-b045970090.png] \nsubset math-e2dcef116c.png [math-e2dcef116c.png] \nsubseteq math-0dc1c96f16.png [math-0dc1c96f16.png] \nsucc
math-0d1363d575.png [math-0d1363d575.png] \nsupset math-8963eae853.png [math-8963eae853.png] \nsupseteq math-2eaa265b46.png [math-2eaa265b46.png] \ntriangleleft
math-343170b287.png [math-343170b287.png] \ntrianglelefteq math-813dcf0a93.png [math-813dcf0a93.png] \ntriangleright math-df6899ad3e.png [math-df6899ad3e.png] \ntrianglerighteq
math-a55f718abe.png [math-a55f718abe.png] \nvDash math-fefbb15af0.png [math-fefbb15af0.png] \nvdash math-b8348856ea.png [math-b8348856ea.png] \odot
math-497b831b05.png [math-497b831b05.png] \ominus math-cfcebc2ef8.png [math-cfcebc2ef8.png] \oplus math-6fd5eead33.png [math-6fd5eead33.png] \oslash
math-3d7ac4bb5c.png [math-3d7ac4bb5c.png] \otimes math-305e05a6ab.png [math-305e05a6ab.png] \parallel math-86ea2beb93.png [math-86ea2beb93.png] \perp
math-62d5e1ef75.png [math-62d5e1ef75.png] \pitchfork math-813255d42d.png [math-813255d42d.png] \pm math-2a54002803.png [math-2a54002803.png] \prec
math-6f127405a3.png [math-6f127405a3.png] \precapprox math-5686c5a93f.png [math-5686c5a93f.png] \preccurlyeq math-c6975aea0e.png [math-c6975aea0e.png] \preceq
math-53e4edd44d.png [math-53e4edd44d.png] \precnapprox math-b7c281dd54.png [math-b7c281dd54.png] \precnsim math-58f182e47e.png [math-58f182e47e.png] \precsim
math-4225d47da8.png [math-4225d47da8.png] \propto math-03cbb97a54.png [math-03cbb97a54.png] \rightthreetimes math-8f609835cb.png [math-8f609835cb.png] \risingdotseq
math-61a5f3fde0.png [math-61a5f3fde0.png] \rtimes math-10ab63f88f.png [math-10ab63f88f.png] \sim math-f5e3901a47.png [math-f5e3901a47.png] \simeq
math-cd5adea2d9.png [math-cd5adea2d9.png] \slash math-11c6bdf228.png [math-11c6bdf228.png] \smile math-2fc0f7c957.png [math-2fc0f7c957.png] \sqcap
math-f3f9a5c2b6.png [math-f3f9a5c2b6.png] \sqcup math-32710445c4.png [math-32710445c4.png] \sqsubset math-32710445c4.png [math-32710445c4.png] \sqsubset
math-6462f633f1.png [math-6462f633f1.png] \sqsubseteq math-b373234f3b.png [math-b373234f3b.png] \sqsupset math-b373234f3b.png [math-b373234f3b.png] \sqsupset
math-301349a96f.png [math-301349a96f.png] \sqsupseteq math-3ea081f1d9.png [math-3ea081f1d9.png] \star math-d7ee7c1348.png [math-d7ee7c1348.png] \subset
math-ab35a80a37.png [math-ab35a80a37.png] \subseteq math-329584d288.png [math-329584d288.png] \subseteqq math-26f9e5316b.png [math-26f9e5316b.png] \subsetneq
math-d6c1dc73f3.png [math-d6c1dc73f3.png] \subsetneqq math-3b5db3b36b.png [math-3b5db3b36b.png] \succ math-29a7c6603c.png [math-29a7c6603c.png] \succapprox
math-764af5d0f7.png [math-764af5d0f7.png] \succcurlyeq math-f083286645.png [math-f083286645.png] \succeq math-12e9272240.png [math-12e9272240.png] \succnapprox
math-22a812f02e.png [math-22a812f02e.png] \succnsim math-f313a5f9af.png [math-f313a5f9af.png] \succsim math-7a88315c05.png [math-7a88315c05.png] \supset
math-b15f9f29ec.png [math-b15f9f29ec.png] \supseteq math-2b42f15859.png [math-2b42f15859.png] \supseteqq math-0ebac5d490.png [math-0ebac5d490.png] \supsetneq
math-7cafbba6d3.png [math-7cafbba6d3.png] \supsetneqq math-21e977e4ec.png [math-21e977e4ec.png] \therefore math-ae7023d9db.png [math-ae7023d9db.png] \times
math-f0fe2a4a9f.png [math-f0fe2a4a9f.png] \top math-7a5bdaf004.png [math-7a5bdaf004.png] \triangleleft math-3234da3142.png [math-3234da3142.png] \trianglelefteq
math-5325d825f0.png [math-5325d825f0.png] \triangleq math-61187783ee.png [math-61187783ee.png] \triangleright math-229058201e.png [math-229058201e.png] \trianglerighteq
math-8c6a0f04b9.png [math-8c6a0f04b9.png] \uplus math-8da9245788.png [math-8da9245788.png] \vDash math-7450111856.png [math-7450111856.png] \varpropto
math-311d2647c5.png [math-311d2647c5.png] \vartriangleleft math-7da885dcbf.png [math-7da885dcbf.png] \vartriangleright math-d8ad6ecbe6.png [math-d8ad6ecbe6.png] \vdash
math-f5af631a03.png [math-f5af631a03.png] \vee math-0ca72c02e5.png [math-0ca72c02e5.png] \veebar math-4c229f580d.png [math-4c229f580d.png] \wedge
math-953993beed.png [math-953993beed.png] \wr    

Arrow symbols

math-0c8ba18b43.png [math-0c8ba18b43.png] \Downarrow math-1a6ec6d88f.png [math-1a6ec6d88f.png] \Leftarrow
math-74b9b263f9.png [math-74b9b263f9.png] \Leftrightarrow math-3ce6141dea.png [math-3ce6141dea.png] \Lleftarrow
math-e3d8965f58.png [math-e3d8965f58.png] \Longleftarrow math-eb3a880058.png [math-eb3a880058.png] \Longleftrightarrow
math-c985be990e.png [math-c985be990e.png] \Longrightarrow math-459d7c5693.png [math-459d7c5693.png] \Lsh
math-0f08e28a07.png [math-0f08e28a07.png] \Nearrow math-a608a7ae83.png [math-a608a7ae83.png] \Nwarrow
math-5e42a40994.png [math-5e42a40994.png] \Rightarrow math-317920b703.png [math-317920b703.png] \Rrightarrow
math-26fab8f44f.png [math-26fab8f44f.png] \Rsh math-ba64c5e997.png [math-ba64c5e997.png] \Searrow
math-6722d13e60.png [math-6722d13e60.png] \Swarrow math-d00ab41d80.png [math-d00ab41d80.png] \Uparrow
math-94ff64057f.png [math-94ff64057f.png] \Updownarrow math-a59e0fa5ee.png [math-a59e0fa5ee.png] \circlearrowleft
math-ea5765e8b3.png [math-ea5765e8b3.png] \circlearrowright math-68b96a49a5.png [math-68b96a49a5.png] \curvearrowleft
math-eb8d6ee4ad.png [math-eb8d6ee4ad.png] \curvearrowright math-682a5688ef.png [math-682a5688ef.png] \dashleftarrow
math-8bc070eada.png [math-8bc070eada.png] \dashrightarrow math-56b7078922.png [math-56b7078922.png] \downarrow
math-1d11ce50b2.png [math-1d11ce50b2.png] \downdownarrows math-a019dc17a7.png [math-a019dc17a7.png] \downharpoonleft
math-16b15cdedd.png [math-16b15cdedd.png] \downharpoonright math-3db5c70042.png [math-3db5c70042.png] \hookleftarrow
math-580fac9571.png [math-580fac9571.png] \hookrightarrow math-09e354a93e.png [math-09e354a93e.png] \leadsto
math-097464d1cd.png [math-097464d1cd.png] \leftarrow math-a2e07eb2ff.png [math-a2e07eb2ff.png] \leftarrowtail
math-792b216977.png [math-792b216977.png] \leftharpoondown math-3c072a15c0.png [math-3c072a15c0.png] \leftharpoonup
math-433174617c.png [math-433174617c.png] \leftleftarrows math-bce42da457.png [math-bce42da457.png] \leftrightarrow
math-dec391be07.png [math-dec391be07.png] \leftrightarrows math-8c68333295.png [math-8c68333295.png] \leftrightharpoons
math-1afd9d2af0.png [math-1afd9d2af0.png] \leftrightsquigarrow math-0a36be904f.png [math-0a36be904f.png] \leftsquigarrow
math-c8fe9fb96c.png [math-c8fe9fb96c.png] \longleftarrow math-91b94c6be9.png [math-91b94c6be9.png] \longleftrightarrow
math-02ce986a2e.png [math-02ce986a2e.png] \longmapsto math-80a13771b7.png [math-80a13771b7.png] \longrightarrow
math-3bfe8e8950.png [math-3bfe8e8950.png] \looparrowleft math-64aa42214e.png [math-64aa42214e.png] \looparrowright
math-9a483a288a.png [math-9a483a288a.png] \mapsto math-c40f3bc7dc.png [math-c40f3bc7dc.png] \multimap
math-ea5241d5f2.png [math-ea5241d5f2.png] \nLeftarrow math-9119a30630.png [math-9119a30630.png] \nLeftrightarrow
math-eeabc86e5f.png [math-eeabc86e5f.png] \nRightarrow math-640fa94ebe.png [math-640fa94ebe.png] \nearrow
math-f9cc3f8904.png [math-f9cc3f8904.png] \nleftarrow math-1278a024c8.png [math-1278a024c8.png] \nleftrightarrow
math-f11a3eab57.png [math-f11a3eab57.png] \nrightarrow math-3223454152.png [math-3223454152.png] \nwarrow
math-fb1cbbd43f.png [math-fb1cbbd43f.png] \rightarrow math-2e03b9e387.png [math-2e03b9e387.png] \rightarrowtail
math-41f636a823.png [math-41f636a823.png] \rightharpoondown math-2cdbf2db88.png [math-2cdbf2db88.png] \rightharpoonup
math-2617106b1e.png [math-2617106b1e.png] \rightleftarrows math-2617106b1e.png [math-2617106b1e.png] \rightleftarrows
math-a2eb9bae76.png [math-a2eb9bae76.png] \rightleftharpoons math-a2eb9bae76.png [math-a2eb9bae76.png] \rightleftharpoons
math-43575c473c.png [math-43575c473c.png] \rightrightarrows math-43575c473c.png [math-43575c473c.png] \rightrightarrows
math-2aff52a07e.png [math-2aff52a07e.png] \rightsquigarrow math-93a935b705.png [math-93a935b705.png] \searrow
math-8d37bd9196.png [math-8d37bd9196.png] \swarrow math-306ea70acd.png [math-306ea70acd.png] \to
math-ae2fa40b25.png [math-ae2fa40b25.png] \twoheadleftarrow math-8e6cdc7038.png [math-8e6cdc7038.png] \twoheadrightarrow
math-f1bfb0bbf7.png [math-f1bfb0bbf7.png] \uparrow math-eb3b3a6d5c.png [math-eb3b3a6d5c.png] \updownarrow
math-eb3b3a6d5c.png [math-eb3b3a6d5c.png] \updownarrow math-bbdf3d8983.png [math-bbdf3d8983.png] \upharpoonleft
math-5fea7c5657.png [math-5fea7c5657.png] \upharpoonright math-d831d8aa62.png [math-d831d8aa62.png] \upuparrows
   

Miscellaneous symbols

math-390d3dc75c.png [math-390d3dc75c.png] \$ math-7ffb7d798c.png [math-7ffb7d798c.png] \AA math-38501d21c9.png [math-38501d21c9.png] \Finv
math-be84d4168e.png [math-be84d4168e.png] \Game math-3207fff524.png [math-3207fff524.png] \Im math-482297a060.png [math-482297a060.png] \P
math-6ea3150bfd.png [math-6ea3150bfd.png] \Re math-a99c89f6e1.png [math-a99c89f6e1.png] \S math-2fcd70072d.png [math-2fcd70072d.png] \angle
math-9db5c962c8.png [math-9db5c962c8.png] \backprime math-8082fb34e8.png [math-8082fb34e8.png] \bigstar math-4b07b72122.png [math-4b07b72122.png] \blacksquare
math-8f8c0c020c.png [math-8f8c0c020c.png] \blacktriangle math-58162c32f0.png [math-58162c32f0.png] \blacktriangledown math-e90d63d41d.png [math-e90d63d41d.png] \cdots
math-800bb70468.png [math-800bb70468.png] \checkmark math-762c3b5e9e.png [math-762c3b5e9e.png] \circledR math-52eae78384.png [math-52eae78384.png] \circledS
math-4d24dff6f8.png [math-4d24dff6f8.png] \clubsuit math-b225b29af4.png [math-b225b29af4.png] \complement math-8f454df900.png [math-8f454df900.png] \copyright
math-dbcc77f1d2.png [math-dbcc77f1d2.png] \ddots math-bc54d541fc.png [math-bc54d541fc.png] \diamondsuit math-923c665edb.png [math-923c665edb.png] \ell
math-51cd44e108.png [math-51cd44e108.png] \emptyset math-19f957fc71.png [math-19f957fc71.png] \eth math-cac5abe8bf.png [math-cac5abe8bf.png] \exists
math-518af824c6.png [math-518af824c6.png] \flat math-92a896986d.png [math-92a896986d.png] \forall math-2525d5d71d.png [math-2525d5d71d.png] \hbar
math-eab5c7cdff.png [math-eab5c7cdff.png] \heartsuit math-dcb2243778.png [math-dcb2243778.png] \hslash math-f8daa97519.png [math-f8daa97519.png] \iiint
math-14a5baf1f1.png [math-14a5baf1f1.png] \iint math-14a5baf1f1.png [math-14a5baf1f1.png] \iint math-6a5f1c0ebd.png [math-6a5f1c0ebd.png] \imath
math-c899412e92.png [math-c899412e92.png] \infty math-cca8605565.png [math-cca8605565.png] \jmath math-ee226905c4.png [math-ee226905c4.png] \ldots
math-d78cd804a4.png [math-d78cd804a4.png] \measuredangle math-07933b21e0.png [math-07933b21e0.png] \natural math-21d4b9ec5e.png [math-21d4b9ec5e.png] \neg
math-a01094061c.png [math-a01094061c.png] \nexists math-fea35fa8ec.png [math-fea35fa8ec.png] \oiiint math-7d9222c03b.png [math-7d9222c03b.png] \partial
math-d4d8611cbc.png [math-d4d8611cbc.png] \prime math-0525bc07de.png [math-0525bc07de.png] \sharp math-799e766e98.png [math-799e766e98.png] \spadesuit
math-96aad37e82.png [math-96aad37e82.png] \sphericalangle math-e51ac520e2.png [math-e51ac520e2.png] \ss math-62e1ea5660.png [math-62e1ea5660.png] \triangledown
math-91a36bab96.png [math-91a36bab96.png] \varnothing math-449680794f.png [math-449680794f.png] \vartriangle math-0716fbd542.png [math-0716fbd542.png] \vdots
math-6eca465169.png [math-6eca465169.png] \wp math-12713adf78.png [math-12713adf78.png] \yen  

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'$\u23ce$'

Example

Here is an example illustrating many of these features in context.

import numpy as np
import matplotlib.pyplot as plt
t = np.arange(0.0, 2.0, 0.01)
s = np.sin(2*np.pi*t)

plt.plot(t,s)
plt.title(r'$\alpha_i > \beta_i$', fontsize=20)
plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
         fontsize=20)
plt.xlabel('time (s)')
plt.ylabel('volts (mV)')
plt.show()

(Source code, png, pdf)


Web Proxy Viewer  |  New URL  |  Original Page