在matplotlib上添加不带网格线的记号标签

2024-06-17 13:43:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在y轴上添加一个记号标签,但我不想在这个记号中添加网格线。你知道吗

当我在y轴上加一个记号时,它会加上网格线和标签。我想有网格线和标签,例如1,2,3,4,5。。。然后我想在3.14中添加一个标签,但不是一条网格线(因为我添加了一条以函数中的一个点结尾的axhline)

I want a label on the y-axe at the red line position

But I don't want to appear the gray grid-line on that label


Tags: the函数on结尾linepositionred标签