FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib.github.com/1.3.1/pyplots/text_layout.py at main · matplotlib/matplotlib.github.com · GitHub
matplotlib
/
matplotlib.github.com
Public
Notifications
You must be signed in to change notification settings
Fork
62
Star
29
Code
Issues
1
Pull requests
2
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib.github.com
/
1.3.1
/
pyplots
/
text_layout.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
77 lines (62 loc) · 2.04 KB
Breadcrumbs
matplotlib.github.com
/
1.3.1
/
pyplots
/
text_layout.py
Copy path
File metadata and controls
77 lines (62 loc) · 2.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import
matplotlib
.
pyplot
as
plt
import
matplotlib
.
patches
as
patches
# build a rectangle in axes coords
left
,
width
=
.25
,
.5
bottom
,
height
=
.25
,
.5
right
=
left
+
width
top
=
bottom
+
height
fig
=
plt
.
figure
()
ax
=
fig
.
add_axes
([
0
,
0
,
1
,
1
])
# axes coordinates are 0,0 is bottom left and 1,1 is upper right
p
=
patches
.
Rectangle
(
(
left
,
bottom
),
width
,
height
,
fill
=
False
,
transform
=
ax
.
transAxes
,
clip_on
=
False
)
ax
.
add_patch
(
p
)
ax
.
text
(
left
,
bottom
,
'left top'
,
horizontalalignment
=
'left'
,
verticalalignment
=
'top'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
left
,
bottom
,
'left bottom'
,
horizontalalignment
=
'left'
,
verticalalignment
=
'bottom'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
right
,
top
,
'right bottom'
,
horizontalalignment
=
'right'
,
verticalalignment
=
'bottom'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
right
,
top
,
'right top'
,
horizontalalignment
=
'right'
,
verticalalignment
=
'top'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
right
,
bottom
,
'center top'
,
horizontalalignment
=
'center'
,
verticalalignment
=
'top'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
left
,
0.5
*
(
bottom
+
top
),
'right center'
,
horizontalalignment
=
'right'
,
verticalalignment
=
'center'
,
rotation
=
'vertical'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
left
,
0.5
*
(
bottom
+
top
),
'left center'
,
horizontalalignment
=
'left'
,
verticalalignment
=
'center'
,
rotation
=
'vertical'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
0.5
*
(
left
+
right
),
0.5
*
(
bottom
+
top
),
'middle'
,
horizontalalignment
=
'center'
,
verticalalignment
=
'center'
,
fontsize
=
20
,
color
=
'red'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
right
,
0.5
*
(
bottom
+
top
),
'centered'
,
horizontalalignment
=
'center'
,
verticalalignment
=
'center'
,
rotation
=
'vertical'
,
transform
=
ax
.
transAxes
)
ax
.
text
(
left
,
top
,
'rotated
\n
with newlines'
,
horizontalalignment
=
'center'
,
verticalalignment
=
'center'
,
rotation
=
45
,
transform
=
ax
.
transAxes
)
ax
.
set_axis_off
()
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL