21 lines
460 B
Python

import matplotlib.pyplot as plt
# Define data.
x_values = range(1, 5001)
y_values = [x**3 for x in x_values]
# Make plot.
plt.style.use('seaborn-v0_8')
fig, ax = plt.subplots()
ax.scatter(x_values, y_values, s=10)
# Set chart title and label axes.
ax.set_title("Cubes", fontsize=24)
ax.set_xlabel('Value', fontsize=14)
ax.set_ylabel('Cube of Value', fontsize=14)
# Set size of tick labels.
ax.tick_params(axis='both', labelsize=14)
# Show plot.
plt.show()