I want to plot different layers in a facetgrid as follows:
grid = sns.FacetGrid(data=tips, row='time', col='sex')
grid.map_dataframe(sns.lineplot, x="total_bill", y="tip", hue="smoker")
grid.map_dataframe(sns.scatterplot, x="total_bill", y="tip", hue="smoker")
#.
#.
#.
# n number of plots
In the above example both the lineplot and scatterplot use the same dataframe tips. Now, I want to change the rows in the dataframe for different plots as follows:
tips = tips.head(n) # n is any number
So, for one plot I may have 120 rows of data whereas for another plot I will have 50 rows and so on.
Is there any way to achieve this?
