简体   繁体   English

数据点注释在matplotlib中的位置

[英]Position of data point annotation in matplotlib

Is there a way in matplotlib to specify the position of a data point annotation? matplotlib中是否可以指定数据点注释的位置?

Now, it appears that the data point specified is the anchor of the bottom left corner of the annotation. 现在,看来指定的数据点是注释左下角的锚点。 Can I specify for it to be anchored at the top right? 我可以指定将其锚定在右上角吗?

The attached image shows my point: FDO is at [17.1, 100]. 上图显示了我的观点:FDO为[17.1,100]。 100 is a percent, it shouldn't be above it. 100是一个百分比,不应高于该百分比。

图片

You can pass various keyword arguments corresponding to Text properties: see the docs . 您可以传递与Text属性相对应的各种关键字参数:请参阅docs In your case, have you tried setting verticalalignment='top' ? 就您而言,您是否尝试过将verticalalignment='top'设置verticalalignment='top' (Perhaps center would be more appropriate, though). (不过,也许center会更合适)。

You'll have to post your code to get more detailed help, however. 但是,您必须发布代码以获得更详细的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM