import matplotlib.pyplot as plt
#前五个数的立方
x_value = list(range(1, 6))
y_value = [x**3 for x in x_value]
plt.scatter(x_value, y_value, c='green', edgecolor='none', s=100)
plt.axis([0, 8, 0, 150])
plt.show()
#前5000个数的立方
x = list(range(1,5001))
y = [xs**3 for xs in x]
plt.scatter(x, y, c=y, cmap=plt.cm.Blues, edgecolor='none', s=5)
plt.axis([0, 5001, 0, 125000000001])
plt.show()
结果: