FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib.github.com/1.2.1/pyplots/text_commands.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.2.1
/
pyplots
/
text_commands.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (22 loc) · 898 Bytes
Breadcrumbs
matplotlib.github.com
/
1.2.1
/
pyplots
/
text_commands.py
Copy path
File metadata and controls
33 lines (22 loc) · 898 Bytes
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
# -*- coding: utf-8 -*-
import
matplotlib
.
pyplot
as
plt
fig
=
plt
.
figure
()
fig
.
suptitle
(
'bold figure suptitle'
,
fontsize
=
14
,
fontweight
=
'bold'
)
ax
=
fig
.
add_subplot
(
111
)
fig
.
subplots_adjust
(
top
=
0.85
)
ax
.
set_title
(
'axes title'
)
ax
.
set_xlabel
(
'xlabel'
)
ax
.
set_ylabel
(
'ylabel'
)
ax
.
text
(
3
,
8
,
'boxed italics text in data coords'
,
style
=
'italic'
,
bbox
=
{
'facecolor'
:
'red'
,
'alpha'
:
0.5
,
'pad'
:
10
})
ax
.
text
(
2
,
6
,
r'an equation: $E=mc^2$'
,
fontsize
=
15
)
ax
.
text
(
3
,
2
,
unicode
(
'unicode: Institut f
\374
r Festk
\366
rperphysik'
,
'latin-1'
))
ax
.
text
(
0.95
,
0.01
,
'colored text in axes coords'
,
verticalalignment
=
'bottom'
,
horizontalalignment
=
'right'
,
transform
=
ax
.
transAxes
,
color
=
'green'
,
fontsize
=
15
)
ax
.
plot
([
2
], [
1
],
'o'
)
ax
.
annotate
(
'annotate'
,
xy
=
(
2
,
1
),
xytext
=
(
3
,
4
),
arrowprops
=
dict
(
facecolor
=
'black'
,
shrink
=
0.05
))
ax
.
axis
([
0
,
10
,
0
,
10
])
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL