/+junk/pygooglechart-py3k

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/pygooglechart-py3k

« back to all changes in this revision

Viewing changes to examples/labels.py

  • Committer: Gustav Hartvigsson
  • Date: 2011-01-03 20:24:45 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20110103202445-qh7ogio9ined8ufv
Made it compatible with Python 3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    chart.set_legend(['INTELLIGENCE', 'INSANITY OF STATEMENTS'])
37
37
 
38
38
    # intelligence
39
 
    data_index = chart.add_data([100. / y for y in xrange(1, 15)])
 
39
    data_index = chart.add_data([100. / y for y in range(1, 15)])
40
40
 
41
41
    # insanity of statements
42
 
    chart.add_data([100. - 100 / y for y in xrange(1, 15)])
 
42
    chart.add_data([100. - 100 / y for y in range(1, 15)])
43
43
 
44
44
    # line colours
45
45
    chart.set_colours(['208020', '202080'])
57
57
def many_labels():
58
58
    chart = SimpleLineChart(settings.width, settings.height)
59
59
 
60
 
    for a in xrange(3):
 
60
    for a in range(3):
61
61
        for axis_type in (Axis.LEFT, Axis.RIGHT, Axis.BOTTOM):
62
62
            index = chart.set_axis_range(axis_type, 0, random.random() * 100)
63
63
            chart.set_axis_style(index, colour=helper.random_colour(), \