Skip to content

Commit 75d9fb5

Browse files
committed
Fix LaTeX formatting in examples
1 parent 8b1881f commit 75d9fb5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/mplot3d/projections.py

+4-4
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

+2-2
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

+2-2
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)