| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../mathtext_api.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib.mathtextmatplotlib.mathtext#Inheritance diagram of matplotlib.mathtext
A module for parsing a subset of the TeX math syntax and rendering it to a Matplotlib backend.
For a tutorial of its usage, see Writing mathematical expressions. This document is primarily concerned with implementation details.
The module uses pyparsing to parse the TeX expression.
The Bakoma distribution of the TeX Computer Modern fonts, and STIX fonts are supported. There is experimental support for using arbitrary fonts, but results may vary without proper tweaking and metrics for those fonts.
Bases: object
Create a MathTextParser for the given backend output.
Whether to return a VectorParse ("path") or a
RasterParse ("agg", or its synonym "macosx").
Parse the given math expression s at the given dpi. If prop is
provided, it is a FontProperties object specifying the "default"
font to use in the math expression, used for all non-math text.
The results are cached, so multiple calls to parse
with the same expression should be fast.
Depending on the output type, this returns either a VectorParse or
a RasterParse.
Bases: NamedTuple
The namedtuple type returned by MathTextParser("agg").parse(...).
The offsets are always zero.
The global metrics.
A raster image.
Create new instance of RasterParse(ox, oy, width, height, depth, image)
Alias for field number 4
Alias for field number 3
Alias for field number 5
Alias for field number 0
Alias for field number 1
Alias for field number 2
Bases: NamedTuple
The namedtuple type returned by MathTextParser("path").parse(...).
The global metrics.
The glyphs including their positions.
The list of rectangles.
Create new instance of VectorParse(width, height, depth, glyphs, rects)
Alias for field number 2
Alias for field number 3
Alias for field number 1
Alias for field number 4
Alias for field number 0
Return the integer index (from the Unicode table) of symbol.
A single (Unicode) character, a TeX command (e.g. r'pi') or a Type1 symbol name (e.g. 'phi').
Given a math expression, renders it in a closely-clipped bounding box to an image file.
A math expression. The math portion must be enclosed in dollar signs.
Where to write the image data.
FontProperties, optionalThe size and style of the text.
The output dpi. If not set, the dpi is determined as for
Figure.savefig.
The output format, e.g., 'svg', 'pdf', 'ps' or 'png'. If not set, the
format is determined as for Figure.savefig.
Foreground color, defaults to rcParams["text.color"] (default: 'black').
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |