mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-20 00:02:04 +00:00
update hilbert_curve.py
This commit is contained in:
parent
69824543c0
commit
af17e54d24
|
@ -106,7 +106,10 @@ def hilbert_curve(
|
||||||
def plot_hilbert_curve(points: list[tuple[float, float]]) -> None:
|
def plot_hilbert_curve(points: list[tuple[float, float]]) -> None:
|
||||||
"""
|
"""
|
||||||
Plots the hilbert curve using mtplotlib
|
Plots the hilbert curve using mtplotlib
|
||||||
No doctest implemented ( returns None )
|
|
||||||
|
Example
|
||||||
|
--------
|
||||||
|
>>> plot_hilbert_curve([(-0.25, 0.25), (-0.25, -0.25), (0.25, -0.25), (0.25, 0.25)])
|
||||||
"""
|
"""
|
||||||
x_coords = [p[0] for p in points]
|
x_coords = [p[0] for p in points]
|
||||||
y_coords = [p[1] for p in points]
|
y_coords = [p[1] for p in points]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user