1
1
from typing import Optional , Iterable , Type , Union
2
2
from matplotlib .artist import Artist
3
3
from matplotlib .axes import Axes
4
- from matplotview ._view_axes import view_wrapper , ViewSpecification , DEFAULT_RENDER_DEPTH
4
+ from matplotlib .transforms import Transform
5
+ from matplotview ._view_axes import (
6
+ view_wrapper ,
7
+ ViewSpecification ,
8
+ DEFAULT_RENDER_DEPTH
9
+ )
5
10
from matplotview ._docs import dynamic_doc_string , get_interpolation_list_str
6
11
7
12
8
13
__all__ = ["view" , "inset_zoom_axes" , "ViewSpecification" ]
9
14
10
15
11
- @dynamic_doc_string (render_depth = DEFAULT_RENDER_DEPTH , interp_list = get_interpolation_list_str ())
16
+ @dynamic_doc_string (
17
+ render_depth = DEFAULT_RENDER_DEPTH ,
18
+ interp_list = get_interpolation_list_str ()
19
+ )
12
20
def view (
13
21
axes : Axes ,
14
22
axes_to_view : Axes ,
@@ -32,15 +40,15 @@ def view(
32
40
33
41
image_interpolation: string, default of '{image_interpolation}'
34
42
The image interpolation method to use when displaying scaled images
35
- from the axes being viewed. Defaults to '{image_interpolation}'. Supported options
36
- are {interp_list}.
43
+ from the axes being viewed. Defaults to '{image_interpolation}'.
44
+ Supported options are {interp_list}.
37
45
38
46
render_depth: optional int, positive, defaults to None
39
47
The number of recursive draws allowed for this view, this can happen
40
48
if the view is a child of the axes (such as an inset axes) or if
41
49
two views point at each other. If None, uses the default render depth
42
- of {render_depth}, unless the axes passed is already a view axes, in which case the
43
- render depth the view already has will be used.
50
+ of {render_depth}, unless the axes passed is already a view axes, in
51
+ which case the render depth the view already has will be used.
44
52
45
53
filter_set: Iterable[Union[Type[Artist], Artist]] or None
46
54
An optional filter set, which can be used to select what artists
@@ -65,7 +73,10 @@ def view(
65
73
return view_obj
66
74
67
75
68
- @dynamic_doc_string (render_depth = DEFAULT_RENDER_DEPTH , interp_list = get_interpolation_list_str ())
76
+ @dynamic_doc_string (
77
+ render_depth = DEFAULT_RENDER_DEPTH ,
78
+ interp_list = get_interpolation_list_str ()
79
+ )
69
80
def inset_zoom_axes (
70
81
axes : Axes ,
71
82
bounds : Iterable ,
@@ -74,7 +85,7 @@ def inset_zoom_axes(
74
85
render_depth : Optional [int ] = None ,
75
86
filter_set : Optional [Iterable [Union [Type [Artist ], Artist ]]] = None ,
76
87
scale_lines : bool = True ,
77
- transform = None ,
88
+ transform : Transform = None ,
78
89
zorder : int = 5 ,
79
90
** kwargs
80
91
) -> Axes :
@@ -100,16 +111,16 @@ def inset_zoom_axes(
100
111
parent Axes.
101
112
102
113
image_interpolation: string
103
- Supported options are {interp_list}. The default value is '{image_interpolation}'. This
104
- determines the interpolation used when attempting to render a
105
- zoomed version of an image.
114
+ Supported options are {interp_list}. The default value is
115
+ '{image_interpolation}'. This determines the interpolation
116
+ used when attempting to render a zoomed version of an image.
106
117
107
118
render_depth: optional int, positive, defaults to None
108
119
The number of recursive draws allowed for this view, this can happen
109
120
if the view is a child of the axes (such as an inset axes) or if
110
121
two views point at each other. If None, uses the default render depth
111
- of {render_depth}, unless the axes passed is already a view axes, in which case the
112
- render depth the view already has will be used.
122
+ of {render_depth}, unless the axes passed is already a view axes,
123
+ in which case the render depth the view already has will be used.
113
124
114
125
filter_set: Iterable[Union[Type[Artist], Artist]] or None
115
126
An optional filter set, which can be used to select what artists
0 commit comments