Open
Description
(This issue was created because PR #117 could not be finished in its entirety)
Some code in PlotCanvas._drawAxesValues
, PlotCanvas._drawGrid
, and PlotCanvas._drawTicks
look awfully similar to each other.
This could be a good thing to abstract out into a dedicated function.
The code in question:
if self._xSpec != 'none':
if self.enableGrid[0]:
for x, _ in xticks:
pt = scale_and_shift_point(x, p1[1], scale, shift)
dc.DrawLine(pt[0], pt[1], pt[0], pt[1] - height)
if self._ySpec != 'none':
if self.enableGrid[1]:
for y, label in yticks:
pt = scale_and_shift_point(p1[0], y, scale, shift)
dc.DrawLine(pt[0], pt[1], pt[0] + width, pt[1])