In my python program I have three families of curves to each I want to assign a seaborn colour palette and plot them all into one single plot.
My solution so far is the following code.
sns.set_style('whitegrid')
volt = np.zeros(N)
states = np.zeros([6,N])
for k in range(1,4):
if k == 1:
sns.set_palette('Blues_d',6)
if k == 2:
sns.set_palette('BuGn_d',6)
if k == 3:
sns.set_palette('Oranges_d',6)
for i in range(N):
j = -1 + 2*float(i)/N
volt[i] = j*(mu[1]-mu[0])
state = evolve(s, ss, PP, beta, float(k) * D / 3, B, j * mu, tmax)
for j in range(6):
states[j,i] = state[j]
for i in range(6):
y = np.zeros(N)
for j in range(N):
y[j] = states[i,j]
plt.plot(volt,y)
plt.show()
However, the plot always ends up being rendered in the first palette 'Blues_d'. How can I change the code, so that the first family of curves is plotted with 'Blues_d', the second with 'BuGn_d' and the third with 'Oranges_d' but in the same figure?