MCPcopy Index your code
hub / github.com/shapely/shapely / test_plot_polygon

Function test_plot_polygon

shapely/tests/test_plotting.py:42–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41
42def test_plot_polygon():
43 poly = box(0, 0, 1, 1)
44 artist, _ = plot_polygon(poly)
45 plot_coords = artist.get_path().vertices
46 assert_allclose(plot_coords, get_coordinates(poly))
47
48 # overriding default styling
49 artist = plot_polygon(poly, add_points=False, color="red", linewidth=3)
50 assert equal_color(artist.get_facecolor(), "red", alpha=0.3)
51 assert equal_color(artist.get_edgecolor(), "red", alpha=1.0)
52 assert artist.get_linewidth() == 3
53
54
55def test_plot_polygon_with_interior():

Callers

nothing calls this directly

Calls 4

boxFunction · 0.90
plot_polygonFunction · 0.90
get_coordinatesFunction · 0.90
equal_colorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…