import numpy as np
import matplotlib.pyplot as plt

def quadratic_function(a, b, c, x_range=(-10, 10), num_points=100):
    x = np.linspace(x_range[0], x_range[1], num_points)
    y = a * x**2 + b * x + c
    
    plt.figure(figsize=(8, 6))
    plt.plot(x, y, label=f'y = {a}x² + {b}x + {c}', color='b')
    plt.axhline(0, color='black', linewidth=0.5)
    plt.axvline(0, color='black', linewidth=0.5)
    plt.grid(True, linestyle='--', alpha=0.6)
    plt.legend()
    plt.xlabel('x')
    plt.ylabel('y')
    plt.title('Quadratic Function')
    plt.show()

# 例: y = x^2 - 3x + 2 を描画
quadratic_function(1, -3, 2)