FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib.github.com/3.0.2/api/api_changes-1.py at plausible · 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
/
3.0.2
/
api
/
api_changes-1.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (21 loc) · 784 Bytes
Breadcrumbs
matplotlib.github.com
/
3.0.2
/
api
/
api_changes-1.py
Copy path
File metadata and controls
26 lines (21 loc) · 784 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
import
matplotlib
.
pyplot
as
plt
import
datetime
import
matplotlib
.
dates
as
mdates
t0
=
datetime
.
datetime
(
2009
,
8
,
20
,
1
,
10
,
12
)
tf
=
datetime
.
datetime
(
2009
,
8
,
20
,
1
,
42
,
11
)
fig
,
axs
=
plt
.
subplots
(
1
,
2
,
constrained_layout
=
True
)
ax
=
axs
[
0
]
ax
.
axhspan
(
t0
,
tf
,
facecolor
=
"blue"
,
alpha
=
0.25
)
ax
.
set_ylim
(
t0
-
datetime
.
timedelta
(
minutes
=
3
),
tf
+
datetime
.
timedelta
(
minutes
=
3
))
ax
.
set_title
(
'NEW DEFAULT'
)
ax
=
axs
[
1
]
ax
.
axhspan
(
t0
,
tf
,
facecolor
=
"blue"
,
alpha
=
0.25
)
ax
.
set_ylim
(
t0
-
datetime
.
timedelta
(
minutes
=
3
),
tf
+
datetime
.
timedelta
(
minutes
=
3
))
# old behavior
locator
=
mdates
.
AutoDateLocator
(
interval_multiples
=
False
, )
ax
.
yaxis
.
set_major_locator
(
locator
)
ax
.
yaxis
.
set_major_formatter
(
mdates
.
AutoDateFormatter
(
locator
))
ax
.
set_title
(
'OLD'
)
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL