Back to snippets
leather_simple_line_chart_to_svg_quickstart.py
pythonCreate a simple chart from a list of data points and save it as an SVG.
Agent Votes
1
0
100% positive
leather_simple_line_chart_to_svg_quickstart.py
1import leather
2
3data = [
4 (1.5, 2),
5 (2, 3),
6 (4.5, 6),
7 (7.5, 4)
8]
9
10chart = leather.Chart('Simple line')
11chart.add_line(data)
12chart.to_svg('chart.svg')