Skip to content

Commit 8e6aff2

Browse files
committed
Update patches doc and example.
Added Circle to annotations_guide.rst. Moved DArrow up so that entries are sorted. Made fancybox_demo2.py outputs sorted box demo (so that ordering matches annotations_guide). Increased spacing between boxes in fancybox_demo2 to prevent overlap of images.
1 parent 50ba22f commit 8e6aff2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doc/users/annotations_guide.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ keyword arguments. Currently, following box styles are implemented.
4646
========== ============== ==========================
4747
Class Name Attrs
4848
========== ============== ==========================
49+
Circle ``circle`` pad=0.3
50+
DArrow ``darrow`` pad=0.3
4951
LArrow ``larrow`` pad=0.3
5052
RArrow ``rarrow`` pad=0.3
51-
DArrow ``darrow`` pad=0.3
5253
Round ``round`` pad=0.3,rounding_size=None
5354
Round4 ``round4`` pad=0.3,rounding_size=None
5455
Roundtooth ``roundtooth`` pad=0.3,tooth_size=None

examples/pylab_examples/fancybox_demo2.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
import matplotlib.pyplot as plt
33

44
styles = mpatch.BoxStyle.get_styles()
5+
spacing = 1.2
56

6-
figheight = (len(styles)+.5)
7+
figheight = (spacing * len(styles) + .5)
78
fig1 = plt.figure(1, (4/1.5, figheight/1.5))
89
fontsize = 0.3 * 72
910

10-
for i, (stylename, styleclass) in enumerate(styles.items()):
11-
fig1.text(0.5, (float(len(styles)) - 0.5 - i)/figheight, stylename,
11+
for i, stylename in enumerate(sorted(styles.keys())):
12+
fig1.text(0.5, (spacing * (float(len(styles)) - i) - 0.5)/figheight, stylename,
1213
ha="center",
1314
size=fontsize,
1415
transform=fig1.transFigure,

0 commit comments

Comments
 (0)