Horizontal grid does not align with graph
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cairo Plot |
Fix Committed
|
Medium
|
Rodrigo Moreira Araújo |
Bug Description
When I try to draw a dot line plot where I give the h_labels parameter of the dot_line_plot() function a list, then cairo plot does not align the graph with the grid.
For example:
data = [-4, -2, 0, 1, 3, 2, 5, 7, 8, 8, 3, 4, 5, 5, 8, 2, 1, 3, 4, 5, 0]
h_labels = [ "0s", "4s", "8s", "12s", "16s", "20s", "24s", "28s", "32s", "36s", "40s" ]
v_labels = [ "-5.5", "-4.0", "-2.5", "-1.0", "0.5", "2.0", "3.5", "5.0", "6.5", "8.0", "9.5" ]
v_bounds = (-5.5, 9.5)
CairoPlot.
data has 21 elements, h_lables has 11 elements, and v_labels has 11 elements. This means I should get 10 closed boxes vertically, 10 closed boxes horizontally, and 2 values per box (horizontally). However, cairo plot draws 10 closed boxes horizontally _plus_ 1 open box.
When you look at the attached .svg image, you see that the graph ends somewhere in this open box (of the grid). While the values of the graph correspond with the vertical labels perfectly, it does not with the horizontal labels. For example, 8s should align with the value 3, and 16s should align with value 8.
It would be nice that when I provide a *_labels with n+1 elements, that cairo plot draws n closed boxes and zero open boxes.
Using revision 20 of trunk.
Indeed this happens.
I'll be working on a fix as soon as possible.