FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/plot_types/stats/eventplot.py at getmaskarray · oscargus/matplotlib · GitHub
oscargus
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
plot_types
/
stats
/
eventplot.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (19 loc) · 459 Bytes
Breadcrumbs
matplotlib
/
plot_types
/
stats
/
eventplot.py
Copy path
File metadata and controls
26 lines (19 loc) · 459 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
"""
============
eventplot(D)
============
See `~matplotlib.axes.Axes.eventplot`.
"""
import
matplotlib
.
pyplot
as
plt
import
numpy
as
np
plt
.
style
.
use
(
'_mpl-gallery'
)
# make data:
np
.
random
.
seed
(
1
)
x
=
[
2
,
4
,
6
]
D
=
np
.
random
.
gamma
(
4
,
size
=
(
3
,
50
))
# plot:
fig
,
ax
=
plt
.
subplots
()
ax
.
eventplot
(
D
,
orientation
=
"vertical"
,
lineoffsets
=
x
,
linewidth
=
0.75
)
ax
.
set
(
xlim
=
(
0
,
8
),
xticks
=
np
.
arange
(
1
,
8
),
ylim
=
(
0
,
8
),
yticks
=
np
.
arange
(
1
,
8
))
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL