FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/misc/tight_bbox_test.py at master · gitcheng/matplotlib · GitHub
gitcheng
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
misc
/
tight_bbox_test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
15 lines (13 loc) · 504 Bytes
Breadcrumbs
matplotlib
/
examples
/
misc
/
tight_bbox_test.py
Copy path
File metadata and controls
15 lines (13 loc) · 504 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
from
__future__
import
print_function
import
matplotlib
.
pyplot
as
plt
import
numpy
as
np
ax
=
plt
.
axes
([
0.1
,
0.3
,
0.5
,
0.5
])
ax
.
pcolormesh
(
np
.
array
([[
1
,
2
],[
3
,
4
]]))
plt
.
yticks
([
0.5
,
1.5
], [
"long long tick label"
,
"tick label"
])
plt
.
ylabel
(
"My y-label"
)
plt
.
title
(
"Check saved figures for their bboxes"
)
for
ext
in
[
"png"
,
"pdf"
,
"svg"
,
"svgz"
,
"eps"
]:
print
(
"saving tight_bbox_test.%s"
%
(
ext
,))
plt
.
savefig
(
"tight_bbox_test.%s"
%
(
ext
,),
bbox_inches
=
"tight"
)
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL