I have a long form data table and I want to plot results from different simulations. At the same time, the visualization should be split into facets by another variable.
Here's an example:
import seaborn as sns
import pandas as pd
import numpy as np
sim = ['a'] * 100 + ['b'] * 100 + ['c'] * 100
var = (['u'] * 50 + ['v'] * 50)*3
x = np.linspace(0, 50, 50)
x = np.hstack([x]*6)
y = np.random.rand(300)
df = pd.DataFrame({'x':x, 'y':y, 'sim':sim, 'var':var})
sns.relplot(data=df, x='x', y='y', kind='line', col='var', hue='sim')
The created plot looks like this:
Now, I want all lines to be a of a certain color, while one specific line should be of another specific color.
Maybe there is a way to create a color palette that only consists of one color? And then map another sns.lineplot on top with another color? Maybe it would be easier to manually create the plot with matplotlib, but my actual dataframe contains a lot more variables and simulations, which is why seaborn comes in handy.