Skip to content

Commit 9905cf0

Browse files
authored
Merge pull request #22778 from oscargus/latexfixes
Fix LaTeX formatting in examples
2 parents 9e0eb54 + 75d9fb5 commit 9905cf0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/mplot3d/projections.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
1717
You can calculate focal length from a FOV via the equation:
1818
19-
.. mathmpl::
19+
.. math::
2020
21-
1 / \tan (FOV / 2)
21+
1 / \\tan (\\mathrm{FOV} / 2)
2222
2323
Or vice versa:
2424
25-
.. mathmpl::
25+
.. math::
2626
27-
FOV = 2 * \atan (1 / focal length)
27+
\\mathrm{FOV} = 2 \\arctan (1 / \\mathrm{focal length})
2828
2929
"""
3030

examples/scales/asinh_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
1616
.. math::
1717
18-
a \\rightarrow a + {\\cal O}(a^3)
18+
a \\rightarrow a + \\mathcal{O}(a^3)
1919
2020
but for larger values (i.e. :math:`|a| \\gg a_0`, this is asymptotically
2121
2222
.. math::
2323
24-
a \\rightarrow a_0 \\, {\\rm sgn}(a) \\ln |a| + {\\cal O}(1)
24+
a \\rightarrow a_0 \\, \\mathrm{sgn}(a) \\ln |a| + \\mathcal{O}(1)
2525
2626
As with the `symlog <.scale.SymmetricalLogScale>` scaling,
2727
this allows one to plot quantities

lib/matplotlib/scale.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ class AsinhScale(ScaleBase):
505505
:math:`a \\rightarrow a_0 \\sinh^{-1} (a / a_0)` where :math:`a_0`
506506
is the effective width of the linear region of the transformation.
507507
In that region, the transformation is
508-
:math:`a \\rightarrow a + {\\cal O}(a^3)`.
508+
:math:`a \\rightarrow a + \\mathcal{O}(a^3)`.
509509
For large values of :math:`a` the transformation behaves as
510-
:math:`a \\rightarrow a_0 \\, {\\rm sgn}(a) \\ln |a| + {\\cal O}(1)`.
510+
:math:`a \\rightarrow a_0 \\, \\mathrm{sgn}(a) \\ln |a| + \\mathcal{O}(1)`.
511511
512512
.. note::
513513

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy