1010
1111
1212fig = plt .figure (figsize = (4.25 , 4.25 * 95 / 115 ))
13- ax = fig .add_axes ([0 ,0 , 1 , 1 ], frameon = False , aspect = 1 ,
14- xlim = (0 - 5 ,100 + 10 ), ylim = (- 10 ,80 + 5 ), xticks = [], yticks = [])
13+ ax = fig .add_axes ([0 , 0 , 1 , 1 ], frameon = False , aspect = 1 ,
14+ xlim = (0 - 5 , 100 + 10 ), ylim = (- 10 , 80 + 5 ), xticks = [], yticks = [])
1515
1616
1717box = mpatches .FancyBboxPatch (
18- (0 ,0 ), 100 , 83 , mpatches .BoxStyle ("Round" , pad = 0 , rounding_size = 2 ),
18+ (0 , 0 ), 100 , 83 , mpatches .BoxStyle ("Round" , pad = 0 , rounding_size = 2 ),
1919 linewidth = 1. , facecolor = "0.9" , edgecolor = "black" )
2020ax .add_artist (box )
2121
2222box = mpatches .FancyBboxPatch (
23- (0 ,0 ), 100 , 75 , mpatches .BoxStyle ("Round" , pad = 0 , rounding_size = 0 ),
23+ (0 , 0 ), 100 , 75 , mpatches .BoxStyle ("Round" , pad = 0 , rounding_size = 0 ),
2424 linewidth = 1. , facecolor = "white" , edgecolor = "black" )
2525ax .add_artist (box )
2626
2727
2828box = mpatches .Rectangle (
29- (5 ,5 ), 45 , 30 , zorder = 10 ,
29+ (5 , 5 ), 45 , 30 , zorder = 10 ,
3030 linewidth = 1.0 , facecolor = "white" , edgecolor = "black" )
3131ax .add_artist (box )
3232
3333box = mpatches .Rectangle (
34- (5 ,40 ), 45 , 30 , zorder = 10 ,
34+ (5 , 40 ), 45 , 30 , zorder = 10 ,
3535 linewidth = 1.0 , facecolor = "white" , edgecolor = "black" )
3636ax .add_artist (box )
3737
3838box = mpatches .Rectangle (
39- (55 ,5 ), 40 , 65 , zorder = 10 ,
39+ (55 , 5 ), 40 , 65 , zorder = 10 ,
4040 linewidth = 1.0 , facecolor = "white" , edgecolor = "black" )
4141ax .add_artist (box )
4242
4343# Window button
44- X , Y = [5 ,10 ,15 ], [79 ,79 ,79 ]
45- plt .scatter (X , Y , s = 75 , zorder = 10 ,
44+ X , Y = [5 , 10 , 15 ], [79 , 79 , 79 ]
45+ plt .scatter (X , Y , s = 75 , zorder = 10 ,
4646 edgecolor = "black" , facecolor = "white" , linewidth = 1 )
4747
4848
6060plt .plot (X , Y , color = "black" , linestyle = ":" , linewidth = 1 , clip_on = False )
6161
6262
63- def ext_arrow (p0 ,p1 ,p2 ,p3 ):
63+ def ext_arrow (p0 , p1 , p2 , p3 ):
6464 p0 , p1 = np .asarray (p0 ), np .asarray (p1 )
6565 p2 , p3 = np .asarray (p2 ), np .asarray (p3 )
6666 ax .arrow (* p0 , * (p1 - p0 ), zorder = 20 , linewidth = 0 ,
@@ -69,9 +69,10 @@ def ext_arrow(p0,p1,p2,p3):
6969 ax .arrow (* p3 , * (p2 - p3 ), zorder = 20 , linewidth = 0 ,
7070 length_includes_head = True , width = .4 ,
7171 head_width = 2 , head_length = 2 , color = "black" )
72- plt .plot ([p1 [0 ],p2 [0 ]], [p1 [1 ],p2 [1 ]], linewidth = .9 , color = "black" )
72+ plt .plot ([p1 [0 ], p2 [0 ]], [p1 [1 ], p2 [1 ]], linewidth = .9 , color = "black" )
7373
74- def int_arrow (p0 ,p1 ):
74+
75+ def int_arrow (p0 , p1 ):
7576 p0 , p1 = np .asarray (p0 ), np .asarray (p1 )
7677 ax .arrow (* ((p0 + p1 )/ 2 ), * ((p1 - p0 )/ 2 ), zorder = 20 , linewidth = 0 ,
7778 length_includes_head = True , width = .4 ,
@@ -81,48 +82,47 @@ def int_arrow(p0,p1):
8182 head_width = 2 , head_length = 2 , color = "black" )
8283
8384
84-
8585x = 0
8686y = 10
87- ext_arrow ( (x - 4 ,y ), (x ,y ), (x + 5 ,y ), (x + 9 ,y ) )
87+ ext_arrow ( (x - 4 , y ), (x , y ), (x + 5 , y ), (x + 9 , y ) )
8888ax .text (x + 9.5 , y , "left" , ha = "left" , va = "center" , size = "x-small" , zorder = 20 )
8989
9090x += 50
91- ext_arrow ( (x - 4 ,y ), (x ,y ), (x + 5 ,y ), (x + 9 ,y ) )
91+ ext_arrow ( (x - 4 , y ), (x , y ), (x + 5 , y ), (x + 9 , y ) )
9292ax .text (x - 4.5 , y , "wspace" , ha = "right" , va = "center" , size = "x-small" , zorder = 20 )
9393
9494x += 45
95- ext_arrow ( (x - 4 ,y ), (x ,y ), (x + 5 ,y ), (x + 9 ,y ) )
95+ ext_arrow ( (x - 4 , y ), (x , y ), (x + 5 , y ), (x + 9 , y ) )
9696ax .text (x - 4.5 , y , "right" , ha = "right" , va = "center" , size = "x-small" , zorder = 20 )
9797
9898y = 0
9999x = 25
100- ext_arrow ( (x ,y - 4 ), (x ,y ), (x ,y + 5 ), (x ,y + 9 ) )
100+ ext_arrow ( (x , y - 4 ), (x , y ), (x , y + 5 ), (x , y + 9 ) )
101101ax .text (x , y + 9.5 , "bottom" , ha = "center" , va = "bottom" , size = "x-small" , zorder = 20 )
102102
103103y += 35
104- ext_arrow ( (x ,y - 4 ), (x ,y ), (x ,y + 5 ), (x ,y + 9 ) )
104+ ext_arrow ( (x , y - 4 ), (x , y ), (x , y + 5 ), (x , y + 9 ) )
105105ax .text (x , y - 4.5 , "hspace" , ha = "center" , va = "top" , size = "x-small" , zorder = 20 )
106106
107107y += 35
108- ext_arrow ( (x ,y - 4 ), (x ,y ), (x ,y + 5 ), (x ,y + 9 ) )
108+ ext_arrow ( (x , y - 4 ), (x , y ), (x , y + 5 ), (x , y + 9 ) )
109109ax .text (x , y - 4.5 , "top" , ha = "center" , va = "top" , size = "x-small" , zorder = 20 )
110110
111- int_arrow ((0 ,- 5 ), (100 ,- 5 ))
111+ int_arrow ((0 , - 5 ), (100 , - 5 ))
112112ax .text (50 , - 5 , "figure width" , backgroundcolor = "white" , zorder = 30 ,
113113 ha = "center" , va = "center" , size = "x-small" )
114114
115- int_arrow ((105 ,0 ), (105 ,75 ))
115+ int_arrow ((105 , 0 ), (105 , 75 ))
116116ax .text (105 , 75 / 2 , "figure height" , backgroundcolor = "white" , zorder = 30 ,
117- rotation = "vertical" , ha = "center" , va = "center" , size = "x-small" )
117+ rotation = "vertical" , ha = "center" , va = "center" , size = "x-small" )
118118
119- int_arrow ((55 ,62.5 ), (95 ,62.5 ))
119+ int_arrow ((55 , 62.5 ), (95 , 62.5 ))
120120ax .text (75 , 62.5 , "axes width" , backgroundcolor = "white" , zorder = 30 ,
121121 ha = "center" , va = "center" , size = "x-small" )
122122
123- int_arrow ((62.5 ,5 ), (62.5 ,70 ))
123+ int_arrow ((62.5 , 5 ), (62.5 , 70 ))
124124ax .text (62.5 , 35 , "axes height" , backgroundcolor = "white" , zorder = 30 ,
125- rotation = "vertical" , ha = "center" , va = "center" , size = "x-small" )
125+ rotation = "vertical" , ha = "center" , va = "center" , size = "x-small" )
126126
127127
128128plt .savefig ("../figures/adjustments.pdf" )
0 commit comments