Hi,
I want to customize grid lines, as in:
- using specific pens to allow customization of grid line color, thickness, and style, independent of the corresponding axis object
- notion of major / minor gridlines
- separate control over horizontal / vertical grid lines
As these specifications are not available in pyqtgraph by default, I'd like to understand the best way to implement this.
My current understanding is that I need to subclass GridItem, and re-implement GridItem.generatePicture(self).
Even for Spec 1, I don't see a simple way to do this. Following Luke's suggestion (see
here) of subclassing GridItem and creating a
setPen() method also requires rewriting the
generatePicture() to replace the hard-coded pens with the customized ones.
Furthermore, the drawing algorithm in GridItem.generatePicture() makes it difficult to implement spec 2 or 3.
Before I implement such a change, I want to ensure that I am looking at the right method to modify. Am I right that re-implementing GridItem.generatePicture() is the way forward?
regards,
Nick