{% set fill = "#dcfce7" %} {% set stroke = "#bbf7d0" %} {% set stroke_width = 4 %} {% set margin = 0 %} {# space allocated for axis labels and ticks #} {% macro path(data_points, vb_height) %} {% for value, position, message in data_points %} {% set x = position * vb_width %} {% set y = vb_height - value %} {% if loop.first %}M{{ x }} {{ y }}{% else %} L{{ x }} {{ y }}{% endif %} {% endfor %} {% endmacro %} {% macro circles(data_points, vb_height) %} {% for value, position, message in data_points %} {% set x = position * vb_width %} {% set y = vb_height - value %} {% endfor %} {% endmacro %} {% macro closed_path(points, vb_width, vb_height) %} {{ path(points, vb_width, vb_height) }} L {{ vb_width + 2*margin }} {{ vb_height + 2*margin }} L {{ 2*margin }} {{ vb_height + 2*margin }} Z {% endmacro %}
{{ circles(data_points, vb_height) }}