Filled polygon
fill() draws a filled polygon based on lists of point
coordinates x, y.
This example uses the Koch snowflake as an example polygon.
import matplotlib.pyplot as plt
import numpy as np
def koch_snowflake(order
fill() draws a filled polygon based on lists of point
coordinates x, y.
This example uses the Koch snowflake as an example polygon.
import matplotlib.pyplot as plt
import numpy as np
def koch_snowflake(order
Basic usage:

Use keyword arguments facecolor and edgecolor to modify the colors of the polygon. Since the linewidth of the edge is 0 in the default Matplotlib style, we have to set it as well for the edge to become visible.

Total running time of the script: (0 minutes 1.420 seconds)