Reputation: 31
I'm trying to use a seaborn
facetgrid
to plot timeseries data from a large file.
from matplotlib import pyplot as plt
import seaborn as sb
import pandas as pd
df_ready=pd.read_hdf('data.hdf')
... # drop null rows, etc.
fg=sb.FacetGrid(data=df_ready[ df_ready.medium == 'LSM'],row='ARS853',col='fMLP',legend_out=True)
fg.map(sb.lineplot,data=df_ready[ df_ready.medium == 'LSM'],x='qtime',y='A',hue='RNA',hue_order=['siC','si6','si7','si8'])
The code produces this plot:output, which as you can see is identical in all four panels. I have verified using seaborn.lineplot
that the data itself is actually distinguishable between the four cases, so clearly I am misusing seaborn
somehow. A similar issue occurs when I change the axes (e.g. row='RNA'
and hue='ARS853'
) Can anybody tell me how to plot the data faithfully (and still use facetgrid
)?
Upvotes: 0
Views: 928
Reputation: 31
D'oh!
The answer is that I'm passing kwargs to the mapped function, which is not supported. They should be positional instead. cf. Plotting errors bars from dataframe using Seaborn FacetGrid
Upvotes: 1