Created
September 21, 2019 18:27
-
-
Save PkBadger/c91030cfa196a809b17b67c8fec54593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.rcParams['legend.fontsize'] = 10 | |
fig = plt.figure() | |
ax = fig.gca(projection='3d') | |
# Prepare arrays x, y, z | |
theta = np.linspace(-1 * np.pi, np.pi, 100) | |
x = np.cos(theta) * np.sin(2*theta) | |
y = np.sin(theta) * np.sin(2 * theta) | |
z = np.cos(2 * theta) | |
ax.plot(x, y, z, label='parametric curve') | |
ax.legend() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment