FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/plot_types/stats/boxplot_plot.py at v3.7.x · matplotlib/matplotlib · GitHub
matplotlib
matplotlib
Repository navigation
Code
Issues
1.1k
(1.1k)
Pull requests
424
(424)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
plot_types
/
stats
/
boxplot_plot.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (24 loc) · 814 Bytes
Breadcrumbs
matplotlib
/
plot_types
/
stats
/
boxplot_plot.py
Copy path
File metadata and controls
30 lines (24 loc) · 814 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
29
30
"""
==========
boxplot(X)
==========
See `~matplotlib.axes.Axes.boxplot`.
"""
import
matplotlib
.
pyplot
as
plt
import
numpy
as
np
plt
.
style
.
use
(
'_mpl-gallery'
)
# make data:
np
.
random
.
seed
(
10
)
D
=
np
.
random
.
normal
((
3
,
5
,
4
), (
1.25
,
1.00
,
1.25
), (
100
,
3
))
# plot
fig
,
ax
=
plt
.
subplots
()
VP
=
ax
.
boxplot
(
D
,
positions
=
[
2
,
4
,
6
],
widths
=
1.5
,
patch_artist
=
True
,
showmeans
=
False
,
showfliers
=
False
,
medianprops
=
{
"color"
:
"white"
,
"linewidth"
:
0.5
},
boxprops
=
{
"facecolor"
:
"C0"
,
"edgecolor"
:
"white"
,
"linewidth"
:
0.5
},
whiskerprops
=
{
"color"
:
"C0"
,
"linewidth"
:
1.5
},
capprops
=
{
"color"
:
"C0"
,
"linewidth"
:
1.5
})
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