FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/mplot3d/lines3d.py at master · mitar/matplotlib · GitHub
mitar
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
mplot3d
/
lines3d.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (22 loc) · 553 Bytes
Breadcrumbs
matplotlib
/
examples
/
mplot3d
/
lines3d.py
Copy path
File metadata and controls
29 lines (22 loc) · 553 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
'''
================
Parametric Curve
================
This example demonstrates plotting a parametric curve in 3D.
'''
import
matplotlib
as
mpl
from
mpl_toolkits
.
mplot3d
import
Axes3D
import
numpy
as
np
import
matplotlib
.
pyplot
as
plt
mpl
.
rcParams
[
'legend.fontsize'
]
=
10
fig
=
plt
.
figure
()
ax
=
fig
.
gca
(
projection
=
'3d'
)
# Prepare arrays x, y, z
theta
=
np
.
linspace
(
-
4
*
np
.
pi
,
4
*
np
.
pi
,
100
)
z
=
np
.
linspace
(
-
2
,
2
,
100
)
r
=
z
**
2
+
1
x
=
r
*
np
.
sin
(
theta
)
y
=
r
*
np
.
cos
(
theta
)
ax
.
plot
(
x
,
y
,
z
,
label
=
'parametric curve'
)
ax
.
legend
()
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL