Skip to content

Commit 74be0c5

Browse files
author
Olof-Hojvall
committed
Fix template error bar coloring for bar plots
Previous addition of bar outline in templates also changed error color
1 parent dc11111 commit 74be0c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: templategen/utils/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from plotly import graph_objs as go
2+
from .colors import GRAY27
23

34
colorscale_parent_paths = [
45
('histogram2dcontour',),
@@ -158,7 +159,9 @@ def initialize_template(annotation_defaults,
158159

159160
# Bar outline
160161
template.data.bar = [
161-
{'marker': {'line': {'width': 0.5, 'color': panel_background_clr}}}]
162+
{'marker': {'line': {'width': 0.5, 'color': panel_background_clr}},
163+
'error_y': {'color': GRAY27}, # Changing marker line color also affects error color, so reset defaults
164+
'error_x': {'color': GRAY27}}]
162165
template.data.barpolar = [
163166
{'marker': {'line': {'width': 0.5, 'color': panel_background_clr}}}]
164167

0 commit comments

Comments
 (0)