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

Function draw_point

numericals.py:925–948  ·  view source on GitHub ↗

draw a point.

(
    ax: matplotlib.axes.Axes,
    p: Point,
    name: str,
    lines: list[Line],
    circles: list[Circle],
    color: Any = 'white',
    size: float = 15,
)

Source from the content-addressed store, hash-verified

923
924
925def draw_point(
926 ax: matplotlib.axes.Axes,
927 p: Point,
928 name: str,
929 lines: list[Line],
930 circles: list[Circle],
931 color: Any = 'white',
932 size: float = 15,
933) -> None:
934 """draw a point."""
935 ax.scatter(p.x, p.y, color=color, s=size)
936
937 if color == 'white':
938 color = 'lightgreen'
939 else:
940 color = 'grey'
941
942 name = name.upper()
943 if len(name) > 1:
944 name = name[0] + '_' + name[1:]
945
946 ax.annotate(
947 name, naming_position(ax, p, lines, circles), color=color, fontsize=15
948 )
949
950
951def _draw_line(

Callers 1

_drawFunction · 0.85

Calls 1

naming_positionFunction · 0.85

Tested by

no test coverage detected