Kozea / pygal

PYthon svg GrAph plotting Library
https://www.pygal.org
GNU Lesser General Public License v3.0
2.67k stars 413 forks source link

show_y_guides=False turns off the X axis at y=0 but show_x_guides=False does not turn off the Y axis at x=0 #566

Open aszilagyi opened 1 month ago

aszilagyi commented 1 month ago

show_y_guides=False turns off the dashed horizontal guide lines, but also removes the solid horizontal axis at y=0. On the other hand, show_x_guides=False still keeps the the vertical axis at x=0. So this code:

xy_chart = pygal.XY(show_y_guides=False, show_x_guides=False)
xy_chart.add('A', [(-3, -4), (-1, -2), (1, 2), (3, 4)])
xy_chart.render_to_file('xy.svg')

results in a graph with a vertical line at x=0 but no horizontal line at y=0. I think there should be a way to separately turn on/off the axis at zero, independently of the guides.