Commit fb02a5f6 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix the line style when going beyond the number of colours I have specified.

parent 758799e9
......@@ -228,7 +228,7 @@ if __name__ == '__main__':
# Plot a time series of the current temperature and salinity at the sites
# in timeseries.
colours = ['r', 'b', 'k', 'c', 'y']
styles = ['-', '--', '-.']
styles = ['--', '-.']
fig1 = plt.figure(figsize=(15, 10))
for i, c in enumerate(valid_indices):
......@@ -243,10 +243,10 @@ if __name__ == '__main__':
# No need to use the timeseriesNodesClean value for the FVCOM index
# because we've only extracted the indices in timeseriesNodesClean i.e.
# FVCOM has only len(timeseriesNodesClean) positions in it.
if j > len(colours):
if j >= len(colours):
style = styles[j % len(styles)]
else:
style = styles[0]
style = '-'
T1 = ax1.plot_date(FVCOM['times'], FVCOM['temp'][:, i], '.-',
color=colours[j % len(colours)],
ls=style,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment