draw a point.
(
ax: matplotlib.axes.Axes,
p: Point,
name: str,
lines: list[Line],
circles: list[Circle],
color: Any = 'white',
size: float = 15,
)
| 923 | |
| 924 | |
| 925 | def 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 | |
| 951 | def _draw_line( |
no test coverage detected