Skip to content

Commit a22ffc5

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 a22ffc5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

templategen/utils/__init__.py

+6-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',),
@@ -157,8 +158,12 @@ def initialize_template(annotation_defaults,
157158
'line': {'color': table_line_clr}}}]
158159

159160
# Bar outline
161+
# Changing marker line color also affects error color,
162+
# so reset default error colors
160163
template.data.bar = [
161-
{'marker': {'line': {'width': 0.5, 'color': panel_background_clr}}}]
164+
{'marker': {'line': {'width': 0.5, 'color': panel_background_clr}},
165+
'error_y': {'color': GRAY27},
166+
'error_x': {'color': GRAY27}}]
162167
template.data.barpolar = [
163168
{'marker': {'line': {'width': 0.5, 'color': panel_background_clr}}}]
164169

0 commit comments

Comments
 (0)