A plain sine-wave

Author

Fernando Rivas

Published

2025-06-04

Wow! look at those curves!

import matplotlib.pyplot as plt

def plot_sine_wave():
    import numpy as np
    
    x = np.linspace(0, 2*np.pi, 100)
    y = np.sin(x)
    
    plt.figure(figsize=(8,6))
    plt.plot(x, y, label='Sine Wave')
    plt.xlabel('X Axis')
    plt.ylabel('Y Axis')
    plt.title('Plot of Sine Wave from -π to π')
    plt.grid(True)
    plt.legend()
    plt.show()

plot_sine_wave()