FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib.github.com/2.1.2/users/dflt_style_changes-1.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
/
2.1.2
/
users
/
dflt_style_changes-1.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (32 loc) · 1.26 KB
Breadcrumbs
matplotlib.github.com
/
2.1.2
/
users
/
dflt_style_changes-1.py
Copy path
File metadata and controls
41 lines (32 loc) · 1.26 KB
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
39
40
41
import
numpy
as
np
import
matplotlib
.
pyplot
as
plt
th
=
np
.
linspace
(
0
,
2
*
np
.
pi
,
512
)
fig
, (
ax1
,
ax2
)
=
plt
.
subplots
(
1
,
2
,
figsize
=
(
6
,
3
))
def
color_demo
(
ax
,
colors
,
title
):
ax
.
set_title
(
title
)
for
j
,
c
in
enumerate
(
colors
):
v_offset
=
-
(
j
/
len
(
colors
))
ax
.
plot
(
th
,
.1
*
np
.
sin
(
th
)
+
v_offset
,
color
=
c
)
ax
.
annotate
(
"'C{}'"
.
format
(
j
), (
0
,
v_offset
),
xytext
=
(
-
1.5
,
0
),
ha
=
'right'
,
va
=
'center'
,
color
=
c
,
textcoords
=
'offset points'
,
family
=
'monospace'
)
ax
.
annotate
(
"{!r}"
.
format
(
c
), (
2
*
np
.
pi
,
v_offset
),
xytext
=
(
1.5
,
0
),
ha
=
'left'
,
va
=
'center'
,
color
=
c
,
textcoords
=
'offset points'
,
family
=
'monospace'
)
ax
.
axis
(
'off'
)
old_colors
=
[
'b'
,
'g'
,
'r'
,
'c'
,
'm'
,
'y'
,
'k'
]
new_colors
=
[
'#1f77b4'
,
'#ff7f0e'
,
'#2ca02c'
,
'#d62728'
,
'#9467bd'
,
'#8c564b'
,
'#e377c2'
,
'#7f7f7f'
,
'#bcbd22'
,
'#17becf'
]
color_demo
(
ax1
,
old_colors
,
'classic'
)
color_demo
(
ax2
,
new_colors
,
'v2.0'
)
fig
.
subplots_adjust
(
**
{
'bottom'
:
0.0
,
'left'
:
0.059
,
'right'
:
0.869
,
'top'
:
0.895
})
Back
|
FazBrowse Home
|
New Git URL