8000 doc: Add types to backend listings. · jkokorian/matplotlib@487a508 · GitHub
[go: up one dir, main page]

Skip to content

Commit 487a508

Browse files
committed
doc: Add types to backend listings.
1 parent b4afdb6 commit 487a508

15 files changed

+155
-158
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 90 additions & 94 deletions
Large diffs are not rendered by default.

lib/matplotlib/backends/backend_agg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ class FigureCanvasAgg(FigureCanvasBase):
439439
440440
Attributes
441441
----------
442-
figure
443-
A Figure instance
442+
figure : `matplotlib.figure.Figure`
443+
A high-level Figure instance
444444
445445
"""
446446

lib/matplotlib/backends/backend_gtk.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,9 @@ def new_timer(self, *args, **kwargs):
516516
517517
Other Parameters
518518
----------------
519-
interval
519+
interval : scalar
520520
Timer interval in milliseconds
521-
callbacks
521+
callbacks : list
522522
Sequence of (func, args, kwargs) where ``func(*args, **kwargs)``
523523
will be executed by the timer every *interval*.
524524
"""
@@ -543,15 +543,15 @@ class FigureManagerGTK(FigureManagerBase):
543543
"""
544544
Attributes
545545
----------
546-
canvas
546+
canvas : `FigureCanvas`
547547
The FigureCanvas instance
548-
num
548+
num : int or str
549549
The Figure number
550-
toolbar
550+
toolbar : gtk.Toolbar
551551
The gtk.Toolbar (gtk only)
552-
vbox
552+
vbox : gtk.VBox
553553
The gtk.VBox containing the canvas and toolbar (gtk only)
554-
window
554+
window : gtk.Window
555555
The gtk.Window (gtk only)
556556
557557
"""

lib/matplotlib/backends/backend_gtk3.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ def new_timer(self, *args, **kwargs):
354354
355355
Other Parameters
356356
----------------
357-
interval
357+
interval : scalar
358358
Timer interval in milliseconds
359-
callbacks
359+
callbacks : list
360360
Sequence of (func, args, kwargs) where ``func(*args, **kwargs)``
361361
will be executed by the timer every *interval*.
362362
"""
@@ -382,15 +382,15 @@ class FigureManagerGTK3(FigureManagerBase):
382382
"""
383383
Attributes
384384
----------
385-
canvas
385+
canvas : `FigureCanvas`
386386
The FigureCanvas instance
387-
num
387+
num : int or str
388388
The Figure number
389-
toolbar
389+
toolbar : Gtk.Toolbar
390390
The Gtk.Toolbar (gtk only)
391-
vbox
391+
vbox : Gtk.VBox
392392
The Gtk.VBox containing the canvas and toolbar (gtk only)
393-
window
393+
window : Gtk.Window
394394
The Gtk.Window (gtk only)
395395
396396
"""

lib/matplotlib/backends/backend_macosx.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ class FigureCanvasMac(_macosx.FigureCanvas, FigureCanvasAgg):
9999
100100
Attributes
101101
----------
102-
figure
103-
A Figure instance
102+
figure : `matplotlib.figure.Figure`
103+
A high-level Figure instance
104104
105105
"""
106106

@@ -169,9 +169,9 @@ def new_timer(self, *args, **kwargs):
169169
170170
Other Parameters
171171
----------------
172-
interval
172+
interval : scalar
173173
Timer interval in milliseconds
174-
callbacks
174+
callbacks : list
175175
Sequence of (func, args, kwargs) where ``func(*args, **kwargs)``
176176
will be executed by the timer every *interval*.
177177
"""

lib/matplotlib/backends/backend_mixed.py

Lines changed: 8 additions & 7 deletions
----------
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,24 @@ def __init__(self, figure, width, height, dpi, vector_renderer,
2323
"""
2424
Parameters
2525
26-
figure
26+
figure : `matplotlib.figure.Figure`
2727
The figure instance.
2828
29-
width
29+
width : scalar
3030
The width of the canvas in logical units
3131
32-
height
32+
height : scalar
3333
The height of the canvas in logical units
3434
35-
dpi
35+
dpi : scalar
3636
The dpi of the canvas
3737
38-
vector_renderer
39-
An instance of a subclass of RendererBase that will be used for the
38+
vector_renderer : `matplotlib.backend_bases.RendererBase`
39+
An instance of a subclass of
40+
`~matplotlib.backend_bases.RendererBase` that will be used for the
4041
vector drawing.
4142
42-
raster_renderer_class
43+
raster_renderer_class : `matplotlib.backend_bases.RendererBase`
4344
The renderer class to use for the raster drawing. If not provided,
4445
this will use the Agg backend (which is currently the only viable
4546
option anyway.)

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,8 +2504,8 @@ class FigureCanvasPdf(FigureCanvasBase):
25042504
25052505
Attributes
25062506
----------
2507-
figure
2508-
A Figure instance
2507+
figure : `matplotlib.figure.Figure`
2508+
A high-level Figure instance
25092509
25102510
"""
25112511

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,9 @@ def __init__(self, figure, fh, dummy=False):
406406
407407
Attributes
408408
----------
409-
figure
409+
figure : `matplotlib.figure.Figure`
410410
Matplotlib figure to initialize height, width and dpi from.
411-
fh
411+
fh : file-like
412412
File handle for the output of the drawing commands.
413413
414414
"""

lib/matplotlib/backends/backend_qt4agg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class FigureCanvasQTAgg(FigureCanvasQTAggBase,
6767
6868
Attributes
6969
----------
70-
figure
71-
A Figure instance
70+
figure : `matplotlib.figure.Figure`
71+
A high-level Figure instance
7272
7373
"""
7474

lib/matplotlib/backends/backend_qt5.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,11 @@ def new_timer(self, *args, **kwargs):
408408
409409
Other Parameters
410410
----------------
411-
interval
411+
interval : scalar
412412
Timer interval in milliseconds
413413
414-
callbacks
415-
Sequence of (func, args, kwargs) where func(\*args, \*\*kwargs)
414+
callbacks : list
415+
Sequence of (func, args, kwargs) where ``func(*args, **kwargs)``
416416
will be executed by the timer every *interval*.
417417
418418
"""
@@ -446,13 +446,13 @@ class FigureManagerQT(FigureManagerBase):
446446
"""
447447
Attributes
448448
----------
449-
canvas
449+
canvas : `FigureCanvas`
450450
The FigureCanvas instance
451-
num
451+
num : int or str
452452
The Figure number
453-
toolbar
453+
toolbar : qt.QToolBar
454454
The qt.QToolBar
455-
window
455+
window : qt.QMainWindow
456456
The qt.QMainWindow
457457
458458
"""

0 commit comments

Comments
 (0)
0