Skip to content

Commit

Permalink
fix: correct defintion of line colors for 2D axes
Browse files Browse the repository at this point in the history
Signed-off-by: Sietze van Buuren <[email protected]>
  • Loading branch information
swvanbuuren committed Nov 27, 2024
1 parent f3f87e7 commit 3fb95b0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mlpyqtgraph/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ class Axis2D(pg.PlotItem):
'--': QtCore.Qt.DashLine,
':': QtCore.Qt.DotLine,
'.-': QtCore.Qt.DashDotLine}
colors_defs = colors.ColorDefinitions()
line_colors = colors_defs.get_line_colors()
scale_box_line_color = colors_defs.get_scale_box_colors(part='line')
scale_box_fill_color = colors_defs.get_scale_box_colors(part='fill')

def __init__(self, index, **kwargs):
parent = kwargs.pop('parent', None)
super().__init__(parent=parent, **kwargs)
self.index = index
self.colors_defs = colors.ColorDefinitions()
self.line_colors = self.colors_defs.get_line_colors()
self.scale_box_line_color = \
self.colors_defs.get_scale_box_colors(part='line')
self.scale_box_fill_color = \
self.colors_defs.get_scale_box_colors(part='fill')
self.setup()

def setup(self, padding=0.01):
Expand Down

0 comments on commit 3fb95b0

Please sign in to comment.