简体   繁体   中英

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 ).

The marker line is just an horizontal or vertical line that is drawing between ymin/ymax or xmin/xmax whatever the zoom factor is.

Question asked on groups.google.com/g/ets-users/about following Jonathan's advice. Answer from Corran Webster :

you probably want a 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

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. -- Corran

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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