MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / _draw_line

Function _draw_line

numericals.py:951–966  ·  view source on GitHub ↗

Draw a line in matplotlib.

(
    ax: matplotlib.axes.Axes,
    p1: Point,
    p2: Point,
    color: Any = 'white',
    lw: float = 1.2,
    alpha: float = 0.8,
)

Source from the content-addressed store, hash-verified

949
950
951def _draw_line(
952 ax: matplotlib.axes.Axes,
953 p1: Point,
954 p2: Point,
955 color: Any = 'white',
956 lw: float = 1.2,
957 alpha: float = 0.8,
958) -> None:
959 """Draw a line in matplotlib."""
960 ls = '-'
961 if color == '--':
962 color = 'black'
963 ls = '--'
964
965 lx, ly = (p1.x, p2.x), (p1.y, p2.y)
966 ax.plot(lx, ly, color=color, lw=lw, alpha=alpha, ls=ls)
967
968
969def draw_line(

Callers 2

draw_lineFunction · 0.85
highlightFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected