Debian Codegraph @

examples/tick_format.py

raw symbols SCIP
1 import leather
2
3 data = [
4 (0, 3),
5 (4, 5),
6 (7, 9),
7 (8, 4)
8 ]
9
10
11 def tick_formatter(value, index, tick_count):
12 return '%i (%i/%i)' % (value, index, tick_count)
13
14
15 chart = leather.Chart('Line')
16 chart.add_x_axis(tick_formatter=tick_formatter)
17 chart.add_line(data)
18 chart.to_svg('examples/charts/tick_format.svg')