10000 nicer default reds and greens · skytree-brian/plotly.py@c3c8672 · GitHub
[go: up one dir, main page]

Skip to content

Commit c3c8672

Browse files
committed
nicer default reds and greens
1 parent 2f2361a commit c3c8672

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plotly/tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,10 @@ def sum_streamlines(self):
20982098
return streamline_x, streamline_y
20992099

21002100

2101+
_DEFAULT_INCREASING_COLOR = '#3D9970' # http://clrs.cc
2102+
_DEFAULT_DECREASING_COLOR = '#FF4136'
2103+
2104+
21012105
class FigureFactory(object):
21022106
"""
21032107
BETA functions to create specific chart types.
@@ -2183,7 +2187,7 @@ def _make_increasing_ohlc(open, high, low, close, dates, **kwargs):
21832187
kwargs.setdefault('name', 'Increasing')
21842188
showlegend = False
21852189

2186-
kwargs.setdefault('line', dict(color='rgb(44, 160, 44)'))
2190+
kwargs.setdefault('line', dict(color=_DEFAULT_INCREASING_COLOR))
21872191
kwargs.setdefault('text', text_increase)
21882192

21892193
ohlc_incr = dict(type='scatter',
@@ -2214,7 +2218,7 @@ def _make_decreasing_ohlc(open, high, low, close, dates, **kwargs):
22142218
flat_decrease_y,
22152219
text_decrease) = _OHLC(open, high, low, close, dates).get_decrease()
22162220

2217-
kwargs.setdefault('line', dict(color='rgb(214, 39, 40)'))
2221+
kwargs.setdefault('line', dict(color=_DEFAULT_DECREASING_COLOR))
22182222
kwargs.setdefault('text', text_decrease)
22192223
kwargs.setdefault('showlegend', False)
22202224
kwargs.setdefault('name', 'Decreasing')

0 commit comments

Comments
 (0)
0