@@ -24,39 +24,25 @@ def __init__(self, width, height, xdescent, ydescent,
24
24
----------
25
25
width, height : float
26
26
width and height of the container, in pixels.
27
-
28
27
xdescent, ydescent : float
29
28
descent of the container in the x- and y- direction, in pixels.
30
-
31
- loc : int
32
- Location of this artist. Valid location codes are::
33
-
34
- 'upper right' : 1,
35
- 'upper left' : 2,
36
- 'lower left' : 3,
37
- 'lower right' : 4,
38
- 'right' : 5,
39
- 'center left' : 6,
40
- 'center right' : 7,
41
- 'lower center' : 8,
42
- 'upper center' : 9,
43
- 'center' : 10
44
-
29
+ loc : str
30
+ Location of this artist. Valid locations are
31
+ 'upper left', 'upper center', 'upper right',
32
+ 'center left', 'center', 'center right',
33
+ 'lower left', 'lower center, 'lower right'.
34
+ For backward compatibility, numeric values are accepted as well.
35
+ See the parameter *loc* of `.Legend` for details.
45
36
pad : float, default: 0.4
46
37
Padding around the child objects, in fraction of the font size.
47
-
48
38
borderpad : float, default: 0.5
49
39
Border padding, in fraction of the font size.
50
-
51
40
prop : `matplotlib.font_manager.FontProperties`, optional
52
41
Font property used as a reference for paddings.
53
-
54
42
frameon : bool, default: True
55
43
If True, draw a box around this artists.
56
-
57
44
**kwargs
58
- Keyworded arguments to pass to
59
- :class:`matplotlib.offsetbox.AnchoredOffsetbox`.
45
+ Keyword arguments forwarded to `.AnchoredOffsetbox`.
60
46
61
47
Attributes
62
48
----------
@@ -98,36 +84,23 @@ def __init__(self, transform, loc,
98
84
transform : `matplotlib.transforms.Transform`
99
85
The transformation object for the coordinate system in use, i.e.,
100
86
:attr:`matplotlib.axes.Axes.transData`.
101
-
102
- loc : int
103
- Location of this artist. Valid location codes are::
104
-
105
- 'upper right' : 1,
106
- 'upper left' : 2,
107
- 'lower left' : 3,
108
- 'lower right' : 4,
109
- 'right' : 5,
110
- 'center left' : 6,
111
- 'center right' : 7,
112
- 'lower center' : 8,
113
- 'upper center' : 9,
114
- 'center' : 10
115
-
87
+ loc : str
88
+ Location of this artist. Valid locations are
89
+ 'upper left', 'upper center', 'upper right',
90
+ 'center left', 'center', 'center right',
91
+ 'lower left', 'lower center, 'lower right'.
92
+ For backward compatibility, numeric values are accepted as well.
93
+ See the parameter *loc* of `.Legend` for details.
116
94
pad : float, default: 0.4
117
95
Padding around the child objects, in fraction of the font size.
118
-
119
96
borderpad : float, default: 0.5
120
97
Border padding, in fraction of the font size.
121
-
122
98
prop : `matplotlib.font_manager.FontProperties`, optional
123
99
Font property used as a reference for paddings.
124
-
125
100
frameon : bool, default: True
126
101
If True, draw a box around this artists.
127
-
128
102
**kwargs
129
- Keyworded arguments to pass to
130
- :class:`matplotlib.offsetbox.AnchoredOffsetbox`.
103
+ Keyword arguments forwarded to `.AnchoredOffsetbox`.
131
104
132
105
Attributes
133
106
----------
@@ -162,44 +135,28 @@ def __init__(self, transform, width, height, angle, loc,
162
135
transform : `matplotlib.transforms.Transform`
163
136
The transformation object for the coordinate system in use, i.e.,
164
137
:attr:`matplotlib.axes.Axes.transData`.
165
-
166
138
width, height : float
167
139
Width and height of the ellipse, given in coordinates of
168
140
*transform*.
169
-
170
141
angle : float
171
142
Rotation of the ellipse, in degrees, anti-clockwise.
172
-
173
- loc : int
174
- Location of this size bar. Valid location codes are::
175
-
176
- 'upper right' : 1,
177
- 'upper left' : 2,
178
- 'lower left' : 3,
179
- 'lower right' : 4,
180
- 'right' : 5,
181
- 'center left' : 6,
182
- 'center right' : 7,
183
- 'lower center' : 8,
184
- 'upper center' : 9,
185
- 'center' : 10
186
-
187
- pad : float, optional
188
- Padding around the ellipse, in fraction of the font size. Defaults
189
- to 0.1.
190
-
143
+ loc : str
144
+ Location of this ellipse. Valid locations are
145
+ 'upper left', 'upper center', 'upper right',
146
+ 'center left', 'center', 'center right',
147
+ 'lower left', 'lower center, 'lower right'.
148
+ For backward compatibility, numeric values are accepted as well.
149
+ See the parameter *loc* of `.Legend` for details.
150
+ pad : float, default: 0.1
151
+ Padding around the ellipse, in fraction of the font size.
191
152
borderpad : float, default: 0.1
192
153
Border padding, in fraction of the font size.
193
-
194
154
frameon : bool, default: True
195
155
If True, draw a box around the ellipse.
196
-
197
156
prop : `matplotlib.font_manager.FontProperties`, optional
198
157
Font property used as a reference for paddings.
199
-
200
158
**kwargs
201
- Keyworded arguments to pass to
202
- :class:`matplotlib.offsetbox.AnchoredOffsetbox`.
159
+ Keyword arguments forwarded to `.AnchoredOffsetbox`.
203
160
204
161
Attributes
205
162
----------
@@ -228,75 +185,54 @@ def __init__(self, transform, size, label, loc,
228
185
transform : `matplotlib.transforms.Transform`
229
186
The transformation object for the coordinate system in use, i.e.,
230
187
:attr:`matplotlib.axes.Axes.transData`.
231
-
232
188
size : float
233
189
Horizontal length of the size bar, given in coordinates of
234
190
*transform*.
235
-
236
191
label : str
237
192
Label to display.
238
-
239
- loc : int
240
- Location of this size bar. Valid location codes are::
241
-
242
- 'upper right' : 1,
243
- 'upper left' : 2,
244
- 'lower left' : 3,
245
- 'lower right' : 4,
246
- 'right' : 5,
247
- 'center left' : 6,
248
- 'center right' : 7,
249
- 'lower center' : 8,
250
- 'upper center' : 9,
251
- 'center' : 10
252
-
193
+ loc : str
194
+ Location of this ellipse. Valid locations are
195
+ 'upper left', 'upper center', 'upper right',
196
+ 'center left', 'center', 'center right',
197
+ 'lower left', 'lower center, 'lower right'.
198
+ For backward compatibility, numeric values are accepted as well.
199
+ See the parameter *loc* of `.Legend` for details.
253
200
pad : float, default: 0.1
254
201
Padding around the label and size bar, in fraction of the font
255
202
size.
256
-
257
203
borderpad : float, default: 0.1
258
204
Border padding, in fraction of the font size.
259
-
260
205
sep : float, default: 2
261
206
Separation between the label and the size bar, in points.
262
-
263
207
frameon : bool, default: True
264
208
If True, draw a box around the horizontal bar and label.
265
-
266
209
size_vertical : float, default: 0
267
210
Vertical length of the size bar, given in coordinates of
268
211
*transform*.
269
-
270
212
color : str, default: 'black'
271
213
Color for the size bar and label.
272
-
273
214
label_top : bool, default: False
274
215
If True, the label will be over the size bar.
275
-
276
216
fontproperties : `matplotlib.font_manager.FontProperties`, optional
277
217
Font properties for the label text.
278
-
279
218
fill_bar : bool, optional
280
219
If True and if size_vertical is nonzero, the size bar will
281
220
be filled in with the color specified by the size bar.
282
221
Defaults to True if *size_vertical* is greater than
283
222
zero and False otherwise.
284
-
285
223
**kwargs
286
- Keyworded arguments to pass to
287
- :class:`matplotlib.offsetbox.AnchoredOffsetbox`.
224
+ Keyword arguments forwarded to `.AnchoredOffsetbox`.
288
225
289
226
Attributes
290
227
----------
291
228
size_bar : `matplotlib.offsetbox.AuxTransformBox`
292
229
Container for the size bar.
293
-
294
230
txt_label : `matplotlib.offsetbox.TextArea`
295
231
Container for the label of the size bar.
296
232
297
233
Notes
298
234
-----
299
- If *prop* is passed as a keyworded argument, but *fontproperties* is
235
+ If *prop* is passed as a keyword argument, but *fontproperties* is
300
236
not, then *prop* is be assumed to be the intended *fontproperties*.
301
237
Using both *prop* and *fontproperties* is not supported.
302
238
@@ -354,8 +290,8 @@ def __init__(self, transform, size, label, loc,
354
290
355
291
class AnchoredDirectionArrows (AnchoredOffsetbox ):
356
292
def __init__ (self , transform , label_x , label_y , length = 0.15 ,
357
- fontsize = 0.08 , loc = 2 , angle = 0 , aspect_ratio = 1 , pad = 0.4 ,
358
- borderpad = 0.4 , frameon = False , color = 'w' , alpha = 1 ,
293
+ fontsize = 0.08 , loc = 'upper left' , angle = 0 , aspect_ratio = 1 ,
294
+ pad = 0.4 , borderpad = 0.4 , frameon = False , color = 'w' , alpha = 1 ,
359
295
sep_x = 0.01 , sep_y = 0 , fontproperties = None , back_length = 0.15 ,
360
296
head_width = 10 , head_length = 15 , tail_width = 2 ,
361
297
text_props = None , arrow_props = None ,
@@ -368,90 +304,61 @@ def __init__(self, transform, label_x, label_y, length=0.15,
368
304
transform : `matplotlib.transforms.Transform`
369
305
The transformation object for the coordinate system in use, i.e.,
370
306
:attr:`matplotlib.axes.Axes.transAxes`.
371
-
372
307
label_x, label_y : str
373
308
Label text for the x and y arrows
374
-
375
309
length : float, default: 0.15
376
310
Length of the arrow, given in coordinates of *transform*.
377
-
378
311
fontsize : float, default: 0.08
379
312
Size of label strings, given in coordinates of *transform*.
380
-
381
- loc : int, default: 2
382
- Location of the direction arrows. Valid location codes are::
383
-
384
- 'upper right' : 1,
385
- 'upper left' : 2,
386
- 'lower left' : 3,
387
- 'lower right' : 4,
388
- 'right' : 5,
389
- 'center left' : 6,
390
- 'center right' : 7,
391
- 'lower center' : 8,
392
- 'upper center' : 9,
393
- 'center' : 10
394
-
313
+ loc : str, default: 'upper left'
314
+ Location of this ellipse. Valid locations are
315
+ 'upper left', 'upper center', 'upper right',
316
+ 'center left', 'center', 'center right',
317
+ 'lower left', 'lower center, 'lower right'.
318
+ For backward compatibility, numeric values are accepted as well.
319
+ See the parameter *loc* of `.Legend` for details.
395
320
angle : float, default: 0
396
321
The angle of the arrows in degrees.
397
-
398
322
aspect_ratio : float, default: 1
399
323
The ratio of the length of arrow_x and arrow_y.
400
324
Negative numbers can be used to change the direction.
401
-
402
325
pad : float, default: 0.4
403
326
Padding around the labels and arrows, in fraction of the font size.
404
-
405
327
borderpad : float, default: 0.4
406
328
Border padding, in fraction of the font size.
407
-
408
329
frameon : bool, default: False
409
330
If True, draw a box around the arrows and labels.
410
-
411
331
color : str, default: 'white'
412
332
Color for the arrows and labels.
413
-
414
333
alpha : float, default: 1
415
334
Alpha values of the arrows and labels
416
-
417
335
sep_x, sep_y : float, default: 0.01 and 0 respectively
418
336
Separation between the arrows and labels in coordinates of
419
337
*transform*.
420
-
421
338
fontproperties : `matplotlib.font_manager.FontProperties`, optional
422
339
Font properties for the label text.
423
-
424
340
back_length : float, default: 0.15
425
341
Fraction of the arrow behind the arrow crossing.
426
-
427
342
head_width : float, default: 10
428
343
Width of arrow head, sent to ArrowStyle.
429
-
430
344
head_length : float, default: 15
431
345
Length of arrow head, sent to ArrowStyle.
432
-
433
346
tail_width : float, default: 2
434
347
Width of arrow tail, sent to ArrowStyle.
435
-
436
348
text_props, arrow_props : dict
437
349
Properties of the text and arrows, passed to
438
350
`.textpath.TextPath` and `.patches.FancyArrowPatch`.
439
-
440
351
**kwargs
441
- Keyworded arguments to pass to
442
- :class:`matplotlib.offsetbox.AnchoredOffsetbox`.
352
+ Keyword arguments forwarded to `.AnchoredOffsetbox`.
443
353
444
354
Attributes
445
355
----------
446
356
arrow_x, arrow_y : `matplotlib.patches.FancyArrowPatch`
447
357
Arrow x and y
448
-
449
358
text_path_x, text_path_y : `matplotlib.textpath.TextPath`
450
359
Path for arrow labels
451
-
452
360
p_x, p_y : `matplotlib.patches.PathPatch`
453
361
Patch for arrow labels
454
-
455
362
box : `matplotlib.offsetbox.AuxTransformBox`
456
363
Container for the arrows and labels.
457
364
0 commit comments