简体   繁体   English

在 Chaco 图中绘制水平/垂直标记线

[英]Draw horizontal / vertical marker lines in a Chaco plot

I am looking for some help to draw a marker line in a Chaco plot (equivalent to QwtPlotMarker https://qwt.sourceforge.io/class_qwt_plot_marker.html ).我正在寻找一些帮助以在 Chaco 图中绘制标记线(相当于 QwtPlotMarker https://qwt.sourceforge.io/class_qwt_plot_marker.html )。

The marker line is just an horizontal or vertical line that is drawing between ymin/ymax or xmin/xmax whatever the zoom factor is.标记线只是在 ymin/ymax 或 xmin/xmax 之间绘制的水平或垂直线,无论缩放系数是多少。

Question asked on groups.google.com/g/ets-users/about following Jonathan's advice.在groups.google.com/g/ets-users/上询问有关遵循乔纳森建议的问题。 Answer from Corran Webster :科兰·韦伯斯特的回答:

you probably want a CoordinateLineOverlay.你可能想要一个 CoordinateLineOverlay。 Unfortunately, it seems to be missing from the overlay documentation, but the class definition is here: https://github.com/enthought/chaco/blob/master/chaco/overlays/coordinate_line_overlay.py#L14 and an example of how to use it is here: https://github.com/enthought/chaco/blob/b89b2e5c0935d79eef9e2928d32356c4043dc624/examples/demo/coordinate_line_overlay_demo.py不幸的是,覆盖文档中似乎缺少它,但类定义在这里: https : //github.com/enthought/chaco/blob/master/chaco/overlays/coordinate_line_overlay.py#L14以及如何在这里使用它: https : //github.com/enthought/chaco/blob/b89b2e5c0935d79eef9e2928d32356c4043dc624/examples/demo/coordinate_line_overlay_demo.py

There is also the LineInspector tool if you want a line which tracks the mouse position, and of course the Grid class for drawing multiple vertical/horizontal gridlines.如果您想要一条跟踪鼠标位置的线,还有 LineInspector 工具,当然还有用于绘制多个垂直/水平网格线的 Grid 类。 -- Corran ——科兰

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

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