FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/plot_types/stats/hexbin.py at main · map0logo/matplotlib · GitHub
map0logo
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
plot_types
/
stats
/
hexbin.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
25 lines (18 loc) · 411 Bytes
Breadcrumbs
matplotlib
/
plot_types
/
stats
/
hexbin.py
Copy path
File metadata and controls
25 lines (18 loc) · 411 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
"""
===============
hexbin(x, y, C)
===============
See `~matplotlib.axes.Axes.hexbin`.
"""
import
matplotlib
.
pyplot
as
plt
import
numpy
as
np
plt
.
style
.
use
(
'_mpl-gallery-nogrid'
)
# make data: correlated + noise
np
.
random
.
seed
(
1
)
x
=
np
.
random
.
randn
(
5000
)
y
=
1.2
*
x
+
np
.
random
.
randn
(
5000
)
/
3
# plot:
fig
,
ax
=
plt
.
subplots
()
ax
.
hexbin
(
x
,
y
,
gridsize
=
20
)
ax
.
set
(
xlim
=
(
-
2
,
2
),
ylim
=
(
-
3
,
3
))
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL