This is my first Jupyter Notebook!¶

This is subtitle font size¶

In [1]:
import numpy as np
import matplotlib.pyplot as plt

# Define the function you want to plot
def f(x):
    return x ** 2  # You can change this to any function, e.g., np.sin(x), np.exp(x), etc.

# Define the range for x
x = np.linspace(-10, 10, 400)  # from -10 to 10, with 400 points

# Calculate the corresponding y values
y = f(x)

# Plot the function
plt.figure(figsize=(8, 6))
plt.plot(x, y, label='f(x) = x²', color='blue')
plt.title('Plot of f(x) = x²')
plt.xlabel('x')
plt.ylabel('f(x)')
plt.grid(True)
plt.axhline(0, color='black', linewidth=0.8)
plt.axvline(0, color='black', linewidth=0.8)
plt.legend()
plt.show()
No description has been provided for this image