FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/api/joinstyle.py at master · BrenBarn/matplotlib · GitHub
BrenBarn
/
matplotlib
Public
forked from
matplotlib/matplotlib
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
api
/
joinstyle.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (26 loc) · 833 Bytes
Breadcrumbs
matplotlib
/
examples
/
api
/
joinstyle.py
Copy path
File metadata and controls
31 lines (26 loc) · 833 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
#!/usr/bin/env python
"""
Illustrate the three different join styles
"""
import
numpy
as
np
import
matplotlib
import
matplotlib
.
pyplot
as
plt
def
plot_angle
(
ax
,
x
,
y
,
angle
,
style
):
phi
=
angle
/
180
*
np
.
pi
xx
=
[
x
+
.5
,
x
,
x
+
.5
*
np
.
cos
(
phi
)]
yy
=
[
y
,
y
,
y
+
.5
*
np
.
sin
(
phi
)]
ax
.
plot
(
xx
,
yy
,
lw
=
8
,
color
=
'blue'
,
solid_joinstyle
=
style
)
ax
.
plot
(
xx
[
1
:],
yy
[
1
:],
lw
=
1
,
color
=
'black'
)
ax
.
plot
(
xx
[
1
::
-
1
],
yy
[
1
::
-
1
],
lw
=
1
,
color
=
'black'
)
ax
.
plot
(
xx
[
1
:
2
],
yy
[
1
:
2
],
'o'
,
color
=
'red'
,
markersize
=
3
)
ax
.
text
(
x
,
y
+
.2
,
'%.0f degrees'
%
angle
)
fig
=
plt
.
figure
()
ax
=
fig
.
add_subplot
(
111
)
ax
.
set_title
(
'Join style'
)
for
x
,
style
in
enumerate
(((
'miter'
,
'round'
,
'bevel'
))):
ax
.
text
(
x
,
5
,
style
)
for
i
in
range
(
5
):
plot_angle
(
ax
,
x
,
i
,
pow
(
2.0
,
3
+
i
),
style
)
ax
.
set_xlim
(
-
.5
,
2.75
)
ax
.
set_ylim
(
-
.5
,
5.5
)
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL