<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Grids
Grids are general types of plots that allow you to map plot types to rows and columns of a grid, this helps you create similar plots separated by features.
Step1:  PairGrid
Pairgrid is a subplot grid for plotting pairwise relationships in a dataset.
Step2:  pairplot
pairplot is a simpler version of PairGrid (you'll use quite often)
Step3:  Facet Grid
FacetGrid is the general way to create grids of plots based off of a feature
Step4:  JointGrid
JointGrid is the general version for jointplot() type grids, for a quick example
<ASSISTANT_TASK:>
Python Code:
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
iris = sns.load_dataset('iris')
iris.head()
Explanation: Grids
Grids are general types of plots that allow you to map plot types to rows and columns of a grid, this helps you create similar plots separated by features.
End of explanation
# Just the Grid
sns.PairGrid(iris)
# Then you map to the grid
g = sns.PairGrid(iris)
g.map(plt.scatter)
# Map to upper,lower, and diagonal
g = sns.PairGrid(iris)
g.map_diag(plt.hist)
g.map_upper(plt.scatter)
g.map_lower(sns.kdeplot)
Explanation: PairGrid
Pairgrid is a subplot grid for plotting pairwise relationships in a dataset.
End of explanation
sns.pairplot(iris)
sns.pairplot(iris,hue='species',palette='rainbow')
Explanation: pairplot
pairplot is a simpler version of PairGrid (you'll use quite often)
End of explanation
tips = sns.load_dataset('tips')
tips.head()
# Just the Grid
g = sns.FacetGrid(tips, col="time", row="smoker")
g = sns.FacetGrid(tips, col="time",  row="smoker")
g = g.map(plt.hist, "total_bill")
g = sns.FacetGrid(tips, col="time",  row="smoker",hue='sex')
# Notice hwo the arguments come after plt.scatter call
g = g.map(plt.scatter, "total_bill", "tip").add_legend()
Explanation: Facet Grid
FacetGrid is the general way to create grids of plots based off of a feature:
End of explanation
g = sns.JointGrid(x="total_bill", y="tip", data=tips)
g = sns.JointGrid(x="total_bill", y="tip", data=tips)
g = g.plot(sns.regplot, sns.distplot)
Explanation: JointGrid
JointGrid is the general version for jointplot() type grids, for a quick example:
End of explanation
<END_TASK>