Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e809b3

Browse files
authored
Merge pull request#27520 from oscargus/markerdoc
[Doc] Minor consistency changes and correction of Marker docs
2 parentsdce9ea4 +8100cad commit1e809b3

File tree

2 files changed

+16
-25
lines changed

2 files changed

+16
-25
lines changed

‎lib/matplotlib/markers.py

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
``11`` (``CARETDOWNBASE``) |m36| caretdown (centered at base)
4848
``"none"`` or ``"None"`` nothing
4949
``" "`` or ``""`` nothing
50-
``'$...$'`` |m37| Render the string using mathtext.
50+
``"$...$"`` |m37| Render the string using mathtext.
5151
E.g ``"$f$"`` for marker showing the
5252
letter ``f``.
5353
``verts`` A list of (x, y) pairs used for Path
5454
vertices. The center of the marker is
5555
located at (0, 0) and the size is
5656
normalized, such that the created path
5757
is encapsulated inside the unit cell.
58-
path A `~matplotlib.path.Path` instance.
58+
``path`` A `~matplotlib.path.Path` instance.
5959
``(numsides, 0, angle)`` A regular polygon with ``numsides``
6060
sides, rotated by ``angle``.
6161
``(numsides, 1, angle)`` A star-like symbol with ``numsides``
@@ -64,11 +64,6 @@
6464
rotated by ``angle``.
6565
============================== ====== =========================================
6666
67-
As a deprecated feature, ``None`` also means 'nothing' when directly
68-
constructing a `.MarkerStyle`, but note that there are other contexts where
69-
``marker=None`` instead means "the default marker" (e.g. :rc:`scatter.marker`
70-
for `.Axes.scatter`).
71-
7267
Note that special symbols can be defined via the
7368
:ref:`STIX math font <mathtext>`,
7469
e.g. ``"$\u266B$"``. For an overview over the STIX font symbols refer to the
@@ -227,24 +222,22 @@ def __init__(self, marker,
227222
"""
228223
Parameters
229224
----------
230-
marker : str, array-like, Path, MarkerStyle, or None
231-
- Another instance of *MarkerStyle* copies the details of that
232-
``marker``.
233-
- *None* means no marker. This is the deprecated default.
225+
marker : str, array-like, Path, MarkerStyle
226+
- Another instance of `MarkerStyle` copies the details of that *marker*.
234227
- For other possible marker values, see the module docstring
235228
`matplotlib.markers`.
236229
237230
fillstyle : str, default: :rc:`markers.fillstyle`
238231
One of 'full', 'left', 'right', 'bottom', 'top', 'none'.
239232
240-
transform : transforms.Transform, default: None
233+
transform :`~matplotlib.transforms.Transform`, optional
241234
Transform that will be combined with the native transform of the
242235
marker.
243236
244-
capstyle : `.CapStyle` or %(CapStyle)s,default: None
237+
capstyle : `.CapStyle` or %(CapStyle)s,optional
245238
Cap style that will override the default cap style of the marker.
246239
247-
joinstyle : `.JoinStyle` or %(JoinStyle)s,default: None
240+
joinstyle : `.JoinStyle` or %(JoinStyle)s,optional
248241
Join style that will override the default join style of the marker.
249242
"""
250243
self._marker_function=None
@@ -309,10 +302,8 @@ def _set_marker(self, marker):
309302
310303
Parameters
311304
----------
312-
marker : str, array-like, Path, MarkerStyle, or None, default: None
313-
- Another instance of *MarkerStyle* copies the details of that
314-
``marker``.
315-
- *None* means no marker.
305+
marker : str, array-like, Path, MarkerStyle
306+
- Another instance of `MarkerStyle` copies the details of that *marker*.
316307
- For other possible marker values see the module docstring
317308
`matplotlib.markers`.
318309
"""
@@ -388,13 +379,13 @@ def get_user_transform(self):
388379
ifself._user_transformisnotNone:
389380
returnself._user_transform.frozen()
390381

391-
deftransformed(self,transform:Affine2D):
382+
deftransformed(self,transform):
392383
"""
393384
Return a new version of this marker with the transform applied.
394385
395386
Parameters
396387
----------
397-
transform : `~matplotlib.transforms.Affine2D`, default: None
388+
transform : `~matplotlib.transforms.Affine2D`
398389
Transform will be combined with current user supplied transform.
399390
"""
400391
new_marker=MarkerStyle(self)
@@ -410,10 +401,10 @@ def rotated(self, *, deg=None, rad=None):
410401
411402
Parameters
412403
----------
413-
deg : float,default: None
404+
deg : float,optional
414405
Rotation angle in degrees.
415406
416-
rad : float,default: None
407+
rad : float,optional
417408
Rotation angle in radians.
418409
419410
.. note:: You must specify exactly one of deg or rad.
@@ -437,14 +428,14 @@ def scaled(self, sx, sy=None):
437428
"""
438429
Return new marker scaled by specified scale factors.
439430
440-
If *sy* isNone, the same scale is applied in both the *x*- and
431+
If *sy* isnot given, the same scale is applied in both the *x*- and
441432
*y*-directions.
442433
443434
Parameters
444435
----------
445436
sx : float
446437
*X*-direction scaling factor.
447-
sy : float,default: None
438+
sy : float,optional
448439
*Y*-direction scaling factor.
449440
"""
450441
ifsyisNone:

‎lib/matplotlib/markers.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MarkerStyle:
2626

2727
def__init__(
2828
self,
29-
marker:str|ArrayLike|Path|MarkerStyle|None,
29+
marker:str|ArrayLike|Path|MarkerStyle,
3030
fillstyle:FillStyleType|None= ...,
3131
transform:Transform|None= ...,
3232
capstyle:CapStyleType|None= ...,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp