Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何删除matplotlib批注并调整其大小?_Python_Matplotlib - Fatal编程技术网

Python 如何删除matplotlib批注并调整其大小?

Python 如何删除matplotlib批注并调整其大小?,python,matplotlib,Python,Matplotlib,我正在使用basicaxis.annotate(str(I))函数沿图形的点显示值。问题是他们很快就聚在一起了。所以我有两个问题:如何删除注释?我怎样才能使一个更小(字体大小) 以下是对注释方法的参考: 我做了研究,却意外地什么也没发现。干杯。axis.annotate(str(i))返回axes注释对象。您需要为其分配一个变量,然后根据需要对其进行操作 fig, ax = plt.subplots(1,1) ax.plot(range(5)) text = ax.annotate(xy =

我正在使用basic
axis.annotate(str(I))
函数沿图形的点显示值。问题是他们很快就聚在一起了。所以我有两个问题:如何删除注释?我怎样才能使一个更小(字体大小)

以下是对注释方法的参考:

我做了研究,却意外地什么也没发现。干杯。

axis.annotate(str(i))返回axes注释对象。您需要为其分配一个变量,然后根据需要对其进行操作

fig, ax = plt.subplots(1,1)
ax.plot(range(5))
text = ax.annotate(xy = (2,2), s='asdf')
# use any set_ function to change all the properties
text.set_fontsize(20)
axis.annotate(str(i))
返回axis注释对象。您需要为其分配一个变量,然后根据需要对其进行操作

fig, ax = plt.subplots(1,1)
ax.plot(range(5))
text = ax.annotate(xy = (2,2), s='asdf')
# use any set_ function to change all the properties
text.set_fontsize(20)

聚束注释的问题已经解决了,可能同样令人感兴趣。看起来很有趣。干杯。聚束注释的问题已经解决,可能同样令人感兴趣。看起来很有趣。干杯。您可以使用
del
从人物中删除任何艺术家。因此,在这种情况下,
del text
将起作用。您可以使用
del
从图形中删除任何艺术家。因此在这种情况下,
deltext
将起作用。