FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/fill_between.py at transforms · tecki/matplotlib · GitHub
tecki
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
fill_between.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (22 loc) · 581 Bytes
Breadcrumbs
matplotlib
/
examples
/
fill_between.py
Copy path
File metadata and controls
29 lines (22 loc) · 581 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
#!/usr/bin/env python
import
matplotlib
.
mlab
as
mlab
from
pylab
import
figure
,
show
import
numpy
as
npy
x
=
npy
.
arange
(
0
,
2
,
0.01
)
y1
=
npy
.
sin
(
2
*
npy
.
pi
*
x
)
y2
=
npy
.
sin
(
4
*
npy
.
pi
*
x
)
+
2
fig
=
figure
()
ax
=
fig
.
add_subplot
(
311
)
ax2
=
fig
.
add_subplot
(
312
)
ax3
=
fig
.
add_subplot
(
313
)
xs
,
ys
=
mlab
.
poly_between
(
x
,
0
,
y1
)
ax
.
fill
(
xs
,
ys
)
ax
.
set_ylabel
(
'between y1 and 0'
)
xs
,
ys
=
mlab
.
poly_between
(
x
,
y1
,
1
)
ax2
.
fill
(
xs
,
ys
)
ax2
.
set_ylabel
(
'between y1 and 1'
)
xs
,
ys
=
mlab
.
poly_between
(
x
,
y1
,
y2
)
ax3
.
fill
(
xs
,
ys
)
ax3
.
set_ylabel
(
'between y1 and y2'
)
ax3
.
set_xlabel
(
'x'
)
show
()
Back
|
FazBrowse Home
|
New Git URL