Skip to content

Commit a4615ce

Browse files
committed
making sure colors are consistent in mixed line/scatter plots
1 parent f45e889 commit a4615ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

simpleplotlib/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def plot_data(ax, x, y, options, series_options):
120120
options.plot_type = 'ERROR'
121121
if options.plot_type == 'LINE':
122122
for i in xrange(len(x)):
123+
if 'color' not in series_options[i].toDict():
124+
series_options[i].color = 'C%d' % i
123125
if len(x[i]) > 1:
124126
ax.plot(x[i], y[i], label=str(SERIES_NUMBER),
125127
**series_options[i].toDict())

0 commit comments

Comments
 (0)