*offsetbox* : OffsetBox instance *xycoords* : same as Annotation but can be a tuple of two strings which are interpreted as x and y coordinates. *boxcoords* : similar to textcoords as Annotation but can be a tuple of two strings which are interpreted
(self, offsetbox, xy,
xybox=None,
xycoords='data',
boxcoords=None,
frameon=True, pad=0.4, # BboxPatch
annotation_clip=None,
box_alignment=(0.5, 0.5),
bboxprops=None,
arrowprops=None,
fontsize=None,
**kwargs)
| 1373 | |
| 1374 | @docstring.dedent_interpd |
| 1375 | def __init__(self, offsetbox, xy, |
| 1376 | xybox=None, |
| 1377 | xycoords='data', |
| 1378 | boxcoords=None, |
| 1379 | frameon=True, pad=0.4, # BboxPatch |
| 1380 | annotation_clip=None, |
| 1381 | box_alignment=(0.5, 0.5), |
| 1382 | bboxprops=None, |
| 1383 | arrowprops=None, |
| 1384 | fontsize=None, |
| 1385 | **kwargs): |
| 1386 | """ |
| 1387 | *offsetbox* : OffsetBox instance |
| 1388 | |
| 1389 | *xycoords* : same as Annotation but can be a tuple of two |
| 1390 | strings which are interpreted as x and y coordinates. |
| 1391 | |
| 1392 | *boxcoords* : similar to textcoords as Annotation but can be a |
| 1393 | tuple of two strings which are interpreted as x and y |
| 1394 | coordinates. |
| 1395 | |
| 1396 | *box_alignment* : a tuple of two floats for a vertical and |
| 1397 | horizontal alignment of the offset box w.r.t. the *boxcoords*. |
| 1398 | The lower-left corner is (0.0) and upper-right corner is (1.1). |
| 1399 | |
| 1400 | other parameters are identical to that of Annotation. |
| 1401 | """ |
| 1402 | |
| 1403 | martist.Artist.__init__(self, **kwargs) |
| 1404 | _AnnotationBase.__init__(self, |
| 1405 | xy, |
| 1406 | xycoords=xycoords, |
| 1407 | annotation_clip=annotation_clip) |
| 1408 | |
| 1409 | self.offsetbox = offsetbox |
| 1410 | |
| 1411 | self.arrowprops = arrowprops |
| 1412 | |
| 1413 | self.set_fontsize(fontsize) |
| 1414 | |
| 1415 | if xybox is None: |
| 1416 | self.xybox = xy |
| 1417 | else: |
| 1418 | self.xybox = xybox |
| 1419 | |
| 1420 | if boxcoords is None: |
| 1421 | self.boxcoords = xycoords |
| 1422 | else: |
| 1423 | self.boxcoords = boxcoords |
| 1424 | |
| 1425 | if arrowprops is not None: |
| 1426 | self._arrow_relpos = self.arrowprops.pop("relpos", (0.5, 0.5)) |
| 1427 | self.arrow_patch = FancyArrowPatch((0, 0), (1, 1), |
| 1428 | **self.arrowprops) |
| 1429 | else: |
| 1430 | self._arrow_relpos = None |
| 1431 | self.arrow_patch = None |
| 1432 |
nothing calls this directly
no test coverage detected