@@ -152,6 +152,10 @@ def test_select_by_type_and_selector(self):
152
152
"xaxis" , "xaxes" , [], selector = {"title.text" : "C" }, test_no_grid = True
153
153
)
154
154
155
+ self .assert_select_subplots (
156
+ "xaxis" , "xaxes" , [4 ], selector = - 1 , test_no_grid = True
157
+ )
158
+
155
159
# yaxis
156
160
self .assert_select_subplots (
157
161
"yaxis" , "yaxes" , [1 , 3 ], selector = {"title.text" : "A" }, test_no_grid = True
@@ -165,6 +169,14 @@ def test_select_by_type_and_selector(self):
165
169
"yaxis" , "yaxes" , [], selector = {"title.text" : "C" }, test_no_grid = True
166
170
)
167
171
172
+ self .assert_select_subplots (
173
+ "yaxis" , "yaxes" , [5 ], selector = - 1 , test_no_grid = True
174
+ )
175
+
176
+ self .assert_select_subplots (
177
+ "yaxis" , "yaxes" , [2 ], selector = 1 , test_no_grid = True
178
+ )
179
+
168
180
# scene
169
181
self .assert_select_subplots (
170
182
"scene" ,
@@ -190,6 +202,10 @@ def test_select_by_type_and_selector(self):
190
202
test_no_grid = True ,
191
203
)
192
204
205
+ self .assert_select_subplots (
206
+ "scene" , "scenes" , [1 ], selector = 0 , test_no_grid = True
207
+ )
208
+
193
209
# polar
194
210
self .assert_select_subplots (
195
211
"polar" ,
@@ -215,6 +231,10 @@ def test_select_by_type_and_selector(self):
215
231
test_no_grid = True ,
216
232
)
217
233
234
+ self .assert_select_subplots (
235
+ "polar" , "polars" , [2 ], selector = - 1 , test_no_grid = True
236
+ )
237
+
218
238
# ternary
219
239
self .assert_select_subplots (
220
240
"ternary" ,
@@ -240,6 +260,10 @@ def test_select_by_type_and_selector(self):
240
260
test_no_grid = True ,
241
261
)
242
262
263
+ self .assert_select_subplots (
264
+ "ternary" , "ternaries" , [1 ], selector = - 1 , test_no_grid = True
265
+ )
266
+
243
267
# No 'geo' or 'mapbox' subplots initialized, but the first subplot
244
268
# object is always present
245
269
self .assert_select_subplots (
@@ -272,6 +296,8 @@ def test_select_by_type_and_grid_and_selector(self):
272
296
"xaxis" , "xaxes" , [3 , 4 ], col = 1 , selector = {"title.text" : "B" }
273
297
)
274
298
299
+ self .assert_select_subplots ("xaxis" , "xaxes" , [4 ], col = 1 , selector = - 1 )
300
+
275
301
self .assert_select_subplots (
276
302
"xaxis" , "xaxes" , [3 ], row = 2 , selector = {"title.text" : "B" }
277
303
)
@@ -285,6 +311,10 @@ def test_select_by_type_and_grid_and_selector(self):
285
311
"yaxis" , "yaxes" , [1 , 3 ], col = 1 , selector = {"title.text" : "A" }
286
312
)
287
313
314
+ self .assert_select_subplots ("yaxis" , "yaxes" , [5 ], col = 1 , selector = - 1 )
315
+
316
+ self .assert_select_subplots ("yaxis" , "yaxes" , [1 ], col = 1 , selector = 0 )
317
+
288
318
self .assert_select_subplots (
289
319
"yaxis" , "yaxes" , [4 ], col = 1 , selector = {"title.text" : "B" }
290
320
)
@@ -294,6 +324,8 @@ def test_select_by_type_and_grid_and_selector(self):
294
324
"polar" , "polars" , [1 , 2 ], row = 2 , selector = {"angularaxis.rotation" : 45 }
295
325
)
296
326
327
+ self .assert_select_subplots ("polar" , "polars" , [2 ], row = 2 , selector = - 1 )
328
+
297
329
self .assert_select_subplots (
298
330
"polar" , "polars" , [1 ], col = 2 , selector = {"angularaxis.rotation" : 45 }
299
331
)
0 commit comments