diff --git a/src/sk8plotlib/maps/__init__.py b/src/sk8plotlib/maps/__init__.py new file mode 100644 index 0000000..0c4da65 --- /dev/null +++ b/src/sk8plotlib/maps/__init__.py @@ -0,0 +1 @@ +from .sinepark import sinepark diff --git a/src/sk8plotlib/maps/sinepark.py b/src/sk8plotlib/maps/sinepark.py new file mode 100644 index 0000000..8531440 --- /dev/null +++ b/src/sk8plotlib/maps/sinepark.py @@ -0,0 +1,18 @@ +import numpy as np +from matplotlib import pyplot as plt +from matplotlib.figure import Figure + + +def sinepark() -> Figure: + """Simple example map. Full o' sines.""" + + x = np.linspace(-np.pi, 50 * np.pi, num=1000) + y = np.cos(x) - x * 0.2 * np.cos(x) - 0.5*x + + x = x * 2 - 1 + y = y - 2 + y = y * 3 + + fig, ax = plt.subplots(figsize=(8, 4), dpi=300) + ax.plot(x, y) + return fig