@@ -92,7 +92,7 @@ def register_backend(format, backend, description=None):
92
92
File extension
93
93
backend : module string or canvas class
94
94
Backend for handling file output
95
- description : str, optional, default: ""
95
+ description : str, default: ""
96
96
Description of the file type.
97
97
"""
98
98
if description is None :
@@ -450,14 +450,14 @@ def draw_image(self, gc, x, y, im, transform=None):
450
450
Parameters
451
451
----------
452
452
gc : `GraphicsContextBase`
453
- a graphics context with clipping information.
453
+ A graphics context with clipping information.
454
454
455
455
x : scalar
456
- the distance in physical units (i.e., dots or pixels) from the left
456
+ The distance in physical units (i.e., dots or pixels) from the left
457
457
hand side of the canvas.
458
458
459
459
y : scalar
460
- the distance in physical units (i.e., dots or pixels) from the
460
+ The distance in physical units (i.e., dots or pixels) from the
461
461
bottom side of the canvas.
462
462
463
463
im : array-like, shape=(N, M, 4), dtype=np.uint8
@@ -506,22 +506,22 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
506
506
----------
507
507
gc : `GraphicsContextBase`
508
508
The graphics context.
509
- x : scalar
509
+ x : float
510
510
The x location of the text in display coords.
511
- y : scalar
511
+ y : float
512
512
The y location of the text baseline in display coords.
513
513
s : str
514
514
The text string.
515
515
prop : `matplotlib.font_manager.FontProperties`
516
516
The font properties.
517
- angle : scalar
518
- The rotation angle in degrees.
517
+ angle : float
518
+ The rotation angle in degrees anti-clockwise .
519
519
mtext : `matplotlib.text.Text`
520
520
The original text object to be rendered.
521
521
522
522
Notes
523
523
-----
524
- **backend implementers note **
524
+ **Note for backend implementers: **
525
525
526
526
When you are trying to determine if you have gotten your bounding box
527
527
right (which is what enables the text layout/alignment to work
@@ -653,11 +653,11 @@ def points_to_pixels(self, points):
653
653
doesn't have a dpi, e.g., postscript or svg). Some imaging
654
654
systems assume some value for pixels per inch::
655
655
656
- points to pixels = points * pixels_per_inch/72.0 * dpi/72.0
656
+ points to pixels = points * pixels_per_inch/72 * dpi/72
657
657
658
658
Parameters
659
659
----------
660
- points : scalar or array-like
660
+ points : float or array-like
661
661
a float or a numpy array of float
662
662
663
663
Returns
@@ -1007,11 +1007,10 @@ def set_sketch_params(self, scale=None, length=None, randomness=None):
1007
1007
The amplitude of the wiggle perpendicular to the source line, in
1008
1008
pixels. If scale is `None`, or not provided, no sketch filter will
1009
1009
be provided.
1010
- length : float, optional
1011
- The length of the wiggle along the line, in pixels (default 128).
1012
- randomness : float, optional
1013
- The scale factor by which the length is shrunken or expanded
1014
- (default 16).
1010
+ length : float, default: 128
1011
+ The length of the wiggle along the line, in pixels.
1012
+ randomness : float, default: 16
1013
+ The scale factor by which the length is shrunken or expanded.
1015
1014
"""
1016
1015
self ._sketch = (
1017
1016
None if scale is None
@@ -1238,9 +1237,9 @@ class ResizeEvent(Event):
1238
1237
1239
1238
Attributes
1240
1239
----------
1241
- width : scalar
1240
+ width : int
1242
1241
Width of the canvas in pixels.
1243
- height : scalar
1242
+ height : int
1244
1243
Height of the canvas in pixels.
1245
1244
"""
1246
1245
def __init__ (self , name , canvas ):
@@ -1264,9 +1263,9 @@ class LocationEvent(Event):
1264
1263
1265
1264
Attributes
1266
1265
----------
1267
- x : scalar
1266
+ x : int
1268
1267
x position - pixels from left of canvas.
1269
- y : scalar
1268
+ y : int
1270
1269
y position - pixels from bottom of canvas.
1271
1270
inaxes : `~.axes.Axes` or None
1272
1271
The `~.axes.Axes` instance over which the mouse is, if any.
@@ -1374,7 +1373,7 @@ class MouseEvent(LocationEvent):
1374
1373
The key pressed when the mouse event triggered, e.g. 'shift'.
1375
1374
See `KeyEvent`.
1376
1375
1377
- step : scalar
1376
+ step : int
1378
1377
The number of scroll steps (positive for 'up', negative for 'down').
1379
1378
This applies only to 'scroll_event' and defaults to 0 otherwise.
1380
1379
@@ -1977,29 +1976,31 @@ def print_figure(self, filename, dpi=None, facecolor=None, edgecolor=None,
1977
1976
filename
1978
1977
can also be a file object on image backends
1979
1978
1980
- orientation : {'landscape', 'portrait'}, optional
1979
+ orientation : {'landscape', 'portrait'}, default: 'portrait'
1981
1980
only currently applies to PostScript printing.
1982
1981
1983
1982
dpi : float, default: :rc:`savefig.dpi`
1984
1983
The dots per inch to save the figure in.
1985
1984
1986
- facecolor : color or None, optional
1987
- the facecolor of the figure; if None, defaults to savefig.facecolor
1985
+ facecolor : color, default: :rc:`savefig.facecolor`
1986
+ The facecolor of the figure.
1988
1987
1989
- edgecolor : color or None, optional
1990
- the edgecolor of the figure; if None, defaults to savefig.edgecolor
1988
+ edgecolor : color, default: :rc:`savefig.edgecolor`
1989
+ The edgecolor of the figure.
1991
1990
1992
1991
format : str, optional
1993
- when set, forcibly set the file format to save to
1992
+ Force a specific file format. If not given, the format is inferred
1993
+ from the *filename* extension, and if that fails from
1994
+ :rc:`savefig.format`.
1994
1995
1995
- bbox_inches : str or `~matplotlib.transforms.Bbox`, optional
1996
+ bbox_inches : 'tight' or `~matplotlib.transforms.Bbox`, \
1997
+ default: :rc:`savefig.bbox`
1996
1998
Bbox in inches. Only the given portion of the figure is
1997
1999
saved. If 'tight', try to figure out the tight bbox of
1998
- the figure. If None, use savefig.bbox
2000
+ the figure.
1999
2001
2000
- pad_inches : scalar, optional
2001
- Amount of padding around the figure when bbox_inches is
2002
- 'tight'. If None, use savefig.pad_inches
2002
+ pad_inches : float, default: :rc:`savefig.pad_inches`
2003
+ Amount of padding around the figure when *bbox_inches* is 'tight'.
2003
2004
2004
2005
bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
2005
2006
A list of extra artists that will be considered when the
@@ -3401,9 +3402,9 @@ def mainloop(self):
3401
3402
3402
3403
class ShowBase (_Backend ):
3403
3404
"""
3404
- Simple base class to generate a show() callable in backends.
3405
+ Simple base class to generate a `` show()`` function in backends.
3405
3406
3406
- Subclass must override mainloop() method.
3407
+ Subclass must override `` mainloop()`` method.
3407
3408
"""
3408
3409
3409
3410
def __call__ (self , block = None ):
0 commit comments