擅长:python、mysql、java
<p>我解决了我自己的问题。我需要打印点,然后对它们进行注释,注释没有内置的打印功能。</p>
<pre><code>import matplotlib.pyplot as plt
allPoints = [[1,3,9],[2,4,8],[3,5,4]]
f, diagram = plt.subplots(1)
for i in range(3):
pointRefNumber = allPoints[i][0]
xPoint = allPoints[i][1]
yPoint = allPoints[i][2]
diagram.plot(xPoint, yPoint, 'bo')
diagram.annotate(nodeRefNumber, (xPoint, yPoint), fontsize=12)
</code></pre>
<p>编辑后添加fontsize选项,就像Gregoux的回答一样</p>