Skip to content

Commit 5e3bab4

Browse files
fix doc formatting, parameter name and spells
1 parent 5e5a03d commit 5e3bab4

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

doc/api/next_api_changes/behavior/25775-HZ.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Default antialiasing behavior changes for ``Text`` and ``Annotation``
22
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33

4-
``matplotlib.pyplot.annotate()`` and ``matplotlib.pyplot.text()`` now support parameter ``antialiased`` when initializing.
4+
``matplotlib.pyplot.annotate()`` and ``matplotlib.pyplot.text()`` now support parameter *antialiased* when initializing.
55
Examples:
66

77
.. code-block::
@@ -26,4 +26,4 @@ With this new feature, you may want to make sure that you are creating and savin
2626
with rccontext(text.antialiased=False):
2727
fig.savefig('/tmp/test.png')
2828

29-
Also note that antialiasing for tick labeles will be set with ``rcParams['text.antialiased']`` when they are created (usually when a ``Figure`` is created) - This means antialiasing for them can no longer be changed by modifying ``rcParams['text.antialiased']``.
29+
Also note that antialiasing for tick labels will be set with :rc:`text.antialiased` when they are created (usually when a ``Figure`` is created) - This means antialiasing for them can no longer be changed by modifying :rc:`text.antialiased`.

doc/users/next_whats_new/antialiasing_text_annotation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Support customizing antialiasing for text and annotation
22
--------------------------------------------------------
3-
``matplotlib.pyplot.annotate()`` and ``matplotlib.pyplot.text()`` now support parameter ``antialiased``.
4-
When ``antialiased`` is set to ``True``, antialiasing will be applied to the text.
5-
When ``antialiased`` is set to ``False``, antialiasing will not be applied to the text.
6-
When ``antialiased`` is not specified, antialiasing will be set by ``rcParams['text.antialiased']`` at the creation time of ``Text`` and ``Annotation`` object.
3+
``matplotlib.pyplot.annotate()`` and ``matplotlib.pyplot.text()`` now support parameter *antialiased*.
4+
When *antialiased* is set to ``True``, antialiasing will be applied to the text.
5+
When *antialiased* is set to ``False``, antialiasing will not be applied to the text.
6+
When *antialiased* is not specified, antialiasing will be set by :rc:`text.antialiased` at the creation time of ``Text`` and ``Annotation`` object.
77
Examples:
88

99
.. code-block::
@@ -12,7 +12,7 @@ Examples:
1212
plt.text(0.5, 0.5, '6 inches x 2 inches', antialiased=True)
1313
ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5), antialiased=False)
1414
15-
If the text contains math expression, then anaialiasing will be set by ``rcParams['text.antialiased']``, and ``antialiased`` will have no effect
15+
If the text contains math expression, then antialiasing will be set by :rc:`text.antialiased`, and *antialiased* will have no effect
1616
This applies to the whole text.
1717
Examples:
1818

@@ -21,7 +21,7 @@ Examples:
2121
# no part will be antialiased for the text below
2222
plt.text(0.5, 0.25, r"$I'm \sqrt{x}$", antialiased=False)
2323
24-
Also note that antialiasing for tick labeles will be set with ``rcParams['text.antialiased']`` when they are created (usually when a ``Figure`` is created) and cannot be changed afterwards.
24+
Also note that antialiasing for tick labels will be set with :rc:`text.antialiased` when they are created (usually when a ``Figure`` is created) and cannot be changed afterwards.
2525

2626
Furthermore, with this new feature, you may want to make sure that you are creating and saving/showing the figure under the same context::
2727

lib/matplotlib/text.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,21 +315,21 @@ def get_rotation_mode(self):
315315
"""Return the text rotation mode."""
316316
return self._rotation_mode
317317

318-
def set_antialiased(self, b):
318+
def set_antialiased(self, antialiased):
319319
"""
320320
Set whether to use antialiased rendering.
321321
322322
Parameters
323323
----------
324-
b : bool
324+
antialiased : bool
325325
326326
Notes
327327
-----
328-
Antialiasing will be determined by ``rcParams['text.antialiased']``
329-
and parameter ``antialiased`` will have no effect if the text contains
328+
Antialiasing will be determined by :rc:`text.antialiased`
329+
and the parameter *antialiased* will have no effect if the text contains
330330
math expressions.
331331
"""
332-
self._antialiased = b
332+
self._antialiased = antialiased
333333
self.stale = True
334334

335335
def get_antialiased(self):

0 commit comments

Comments
 (0)