I want the first subplot to only include 'Máximo', 'Média', 'Mínimo', and the second to only include 'Amplitude', 'Desvio Padrão'.
I tried the following:
def plotGraph(title, z): #Todo Completar a função com legendas e título.
sns.set()
fig, ax = plt.subplots(2,1)
sns.lineplot(data=z, hue=['Máximo', 'Média', 'Mínimo'], ax=ax[0])
sns.lineplot(data=z, hue=['Amplitude', 'Desvio Padrão'], ax=ax[1])
plt.show()
I know I can make this with multiple calls using plt.plot(), but is there a way to do with seaborn?
**EDITED**
thanks, but I realized I don't need 'Desvio Padrão'. Is there a way to just legend 'Amplitude' ?
def plotGraph(title, df): #Todo Completar a função com legendas e título.
sns.set()
fig, ax = plt.subplots(2,1)
fig.suptitle(title)
sns.lineplot(data=df[['Máximo', 'Média', 'Mínimo']], hue=['Máximo', 'Média', 'Mínimo'], ax=ax[0])
sns.lineplot(data=df['Amplitude'], hue='Amplitude', ax=ax[1], legend='full')
fig.tight_layout(rect=[0.01, 0.01, 0.95, 0.95]) # Controla o tamanho dos gŕaficos na figura (valores entre 0 e 1).
plt.show()

