def test_axis_with_custom_labels():
    coordinate_system = cartesius.CoordinateSystem()

    coordinate_system.add(elements.Axis(horizontal=True, labels=1, points=0.25))
    coordinate_system.add(elements.Axis(vertical=True, labels=2, labels_decorator=lambda x:'speed=%sm/s' % x, points=1))

    f = lambda x : math.sin(x) * 2
    coordinate_system.add(charts.Function(f, start=-4, end=5, step=0.02, color=(0, 0, 255)))

    return coordinate_system.draw(300, 200), coordinate_system.draw(300, 200, antialiasing=True)
Axis with custom label positions and decorations:
dataset/ETHPy150Open tkrajina/cartesius/create_images_and_readme.py/test_axis_with_custom_labels