答案 0 :(得分:0)
您可以使用pyplot.scatter
并为x
和y
传递单个值。这是一个示例:
from matplotlib import pyplot as plt
import numpy as np
fig = plt.figure()
x_data = np.linspace(0,3.5,100)
y_data = [-x * (x - 3.2) for x in x_data]
plt.plot(x_data, y_data, color='#0000ff', zorder=0)
x_point = x_data[20]
y_point = y_data[20]
plt.scatter(x_point, y_point, color='#ff0000', zorder=1)