@@ -99,35 +99,35 @@ def __init__(self, *, block=None, timeout=0, forgive_failure=False):
99
99
self ._timeout = timeout
100
100
self ._forgive_failure = forgive_failure
101
101
self ._block = block
102
- self ._figs = []
102
+ self .figures = []
103
103
104
104
def __enter__ (self ):
105
105
# TODO only allow the creation methods to work when in the context
106
- self ._figs .clear ()
106
+ self .figures .clear ()
107
107
return self
108
108
109
109
@functools .wraps (figure )
110
110
def figure (self , * args , ** kwargs ):
111
111
fig = figure (* args , ** kwargs )
112
- self ._figs .append (fig )
112
+ self .figures .append (fig )
113
113
return fig
114
114
115
115
@functools .wraps (subplots )
116
116
def subplots (self , * args , ** kwargs ):
117
117
fig , axs = subplots (* args , ** kwargs )
118
- self ._figs .append (fig )
118
+ self .figures .append (fig )
119
119
return fig , axs
120
120
121
121
@functools .wraps (subplot_mosaic )
122
122
def subplot_mosaic (self , * args , ** kwargs ):
123
123
fig , axd = subplot_mosaic (* args , ** kwargs )
124
- self ._figs .append (fig )
124
+ self .figures .append (fig )
125
125
return fig , axd
126
126
127
127
def __exit__ (self , exc_type , exc_value , traceback ):
128
128
if exc_value is not None and not self ._forgive_failure :
129
129
return
130
- show (self ._figs , block = self ._block , timeout = self ._timeout )
130
+ show (self .figures , block = self ._block , timeout = self ._timeout )
131
131
132
132
def show (self ):
133
133
show (self ._figs , block = self ._block , timeout = self ._timeout )
0 commit comments