Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba39454

Browse files
committed
Fix typo in mathtext_data.
As can be checked with ``` rcParams["ps.useafm"] = True figtext(.5, .5, "$\\Lambda\varphi$") savefig("/tmp/test.ps") ``` and inspecting the resulting file.
1 parent 664054a commit ba39454

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*facename* parameter of `.mathtext.Fonts.render_glyph`
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
This parameter was renamed to *font* for consistency with the rest of the
4+
`.Fonts` API.

lib/matplotlib/_mathtext_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
r'\gamma' : ('psyr', 103),
274274
r'\eta' : ('psyr', 104),
275275
r'\iota' : ('psyr', 105),
276-
r'\varpsi' : ('psyr', 106),
276+
r'\varphi' : ('psyr', 106),
277277
r'\kappa' : ('psyr', 108),
278278
r'\nu' : ('psyr', 110),
279279
r'\pi' : ('psyr', 112),
@@ -360,7 +360,7 @@
360360
r'\prime' : ('psyr', 0o242),
361361
r'\sharp' : ('psyr', 0o43),
362362
r'\slash' : ('psyr', 0o57),
363-
r'\Lamda' : ('psyr', 0o114),
363+
r'\Lambda' : ('psyr', 0o114),
364364
r'\neg' : ('psyr', 0o330),
365365
r'\Upsilon' : ('psyr', 0o241),
366366
r'\rightbrace' : ('psyr', 0o175),

lib/matplotlib/mathtext.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,13 @@ def set_canvas_size(self, w, h, d):
463463
self.mathtext_backend.set_canvas_size(
464464
self.width, self.height, self.depth)
465465

466-
def render_glyph(self, ox, oy, facename, font_class, sym, fontsize, dpi):
466+
@cbook._rename_parameter("3.4", "facename", "font")
467+
def render_glyph(self, ox, oy, font, font_class, sym, fontsize, dpi):
467468
"""
468469
At position (*ox*, *oy*), draw the glyph specified by the remaining
469470
parameters (see `get_metrics` for their detailed description).
470471
"""
471-
info = self._get_info(facename, font_class, sym, fontsize, dpi)
472+
info = self._get_info(font, font_class, sym, fontsize, dpi)
472473
self.used_characters.setdefault(info.font.fname, set()).add(info.num)
473474
self.mathtext_backend.render_glyph(ox, oy, info)
474475

0 commit comments

Comments
 (0)