FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib.github.com/3.2.2/users/dflt_style_changes-5.py at main · 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.2.2
/
users
/
dflt_style_changes-5.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (30 loc) · 945 Bytes
Breadcrumbs
matplotlib.github.com
/
3.2.2
/
users
/
dflt_style_changes-5.py
Copy path
File metadata and controls
38 lines (30 loc) · 945 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
31
32
33
34
35
36
37
38
import
numpy
as
np
import
matplotlib
.
pyplot
as
plt
import
matplotlib
as
mpl
from
cycler
import
cycler
fig
, (
ax1
,
ax2
)
=
plt
.
subplots
(
1
,
2
,
figsize
=
(
6
,
3
))
N
=
15
x
=
np
.
arange
(
N
)
y
=
np
.
ones_like
(
x
)
sty_cycle
=
(
cycler
(
'ls'
, [
'--'
,
':'
,
'-.'
])
*
cycler
(
'lw'
, [
None
,
1
,
2
,
5
]))
classic
=
{
'lines.linewidth'
:
1.0
,
'lines.dashed_pattern'
: [
6
,
6
],
'lines.dashdot_pattern'
: [
3
,
5
,
1
,
5
],
'lines.dotted_pattern'
: [
1
,
3
],
'lines.scale_dashes'
:
False
}
v2
=
{}
# {'lines.linewidth': 1.5,
# 'lines.dashed_pattern' : [2.8, 1.2],
# 'lines.dashdot_pattern' : [4.8, 1.2, 0.8, 1.2],
# 'lines.dotted_pattern' : [1.1, 1.1],
# 'lines.scale_dashes': True}
def
demo
(
ax
,
rcparams
,
title
):
ax
.
axis
(
'off'
)
ax
.
set_title
(
title
)
with
mpl
.
rc_context
(
rc
=
rcparams
):
for
j
,
sty
in
enumerate
(
sty_cycle
):
ax
.
plot
(
x
,
y
+
j
,
**
sty
)
demo
(
ax1
,
classic
,
'classic'
)
demo
(
ax2
, {},
'v2.0'
)
Back
|
FazBrowse Home
|
New Git URL