Non zero origin

Issue #3 wontfix
Lorenzo Gil
repo owner created an issue

Stacked Bar charts whose data sets don't start from zero on the x axis don't get drawn properly

Note: this issue was manually imported from http://www.lorenzogil.com/projects/pycha/ticket/33

Comments (4)

  1. Lorenzo Gil reporter

    I forgot to include the data used to generate the chart

    dataSet = (

    ('internal', [(0+5, 8), (1+5, 10), (2+5, 5), (3+5, 6), (4+5, 8), (5+5, 10), (6+5, 5), (7+5, 6)]), ('external', [(0+5, 5), (1+5, 2), (2+5, 4), (3+5, 8),(4+5, 5), (5+5, 2), (6+5, 4), (7+5, 8)]), )

  2. Lorenzo Gil reporter

    Hey Mayowa,

    This isn't a bug in PyCha?. When you write (0+5,8), PyCha? draws the bar at (5,8), which is what is shown in vstacked.png. Your code is offsetting all your bars by 5. I'm not sure why you have the "5" there if you don't want an offset. If you want the graph to start at 0, just use:

    dataSet = (

    ('internal', [(0, 8), (1, 10), (2, 5), (3, 6), (4, 8), (5, 10), (6, 5), (7, 6)]), ('external', [(0, 5), (1, 2), (2, 4), (3, 8),(4, 5), (5, 2), (6, 4), (7, 8)]), )

    I will close the bug if this works for you.

  3. Lorenzo Gil reporter

    Hey Andrew, From your comment it seems i've misconstrued the purpose of the first member of the set. i thought it was just another data point, now it seems its a positional offset on the axis?

    If that's the case its not a bug.

    Thank you.

  4. Log in to comment