GitLab

The Zen of Python, by Tim Peters

import numpy as np
import matplotlib.pyplot as plt

def do_cardio_id():
    """Draw a CardioID."""

    theta = np.linspace(0, 2 * np.pi, 1000)
    a = 1.
    r = 2 * a * (1 - np.sin(theta))

    fig = plt.figure()
    ax = fig.add_subplot(111, projection='polar')
    ax.plot(theta, r, linewidth=4, color='#dd6827')
    ax.set_yticklabels([])
    ax.grid(True)

    plt.show()
Forgot your password?

Explore Help About GitLab