Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/users/next_whats_new/mathtext.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
``matplotlib.mathtext`` now supports *overset* and *underset* LaTeX symbols
---------------------------------------------------------------------------

`.mathtext`, the default TeX layout engine which is shipped along with
Matplotlib now supports symbols like *overset* and *underset*.

The structure which should be followed: "\overset{body}{annotation}" or
"\underset{body}{annotation}", where *body* would be the text "above" or
"below" the *annotation* - the baseline character.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`.mathtext`, the default TeX layout engine which is shipped along with
Matplotlib now supports symbols like *overset* and *underset*.
The structure which should be followed: "\overset{body}{annotation}" or
"\underset{body}{annotation}", where *body* would be the text "above" or
"below" the *annotation* - the baseline character.
`.mathtext` now supports *overset* and *underset*, called as
``\overset{body}{annotation}`` or ``\underset{body}{annotation}``, where
*annotation* is the text "above" or "below" the *body*.


.. plot::

math_expr = r"$ x \overset{f}{\rightarrow} y \underset{f}{\leftarrow} z $"
plt.text(0.4, 0.5, math_expr, usetex=False)