@@ -200,6 +200,7 @@ All skills are base on the implementation of Python 3.
200
200
<td ><ul style =" margin : 8px " >
201
201
<li ><a href =" #basic-seaborn " >Basic (Seaborn)</li >
202
202
<li ><a href =" #color-palette " >Color Palette</li >
203
+ <li ><a href =" #multiple-plots " >Multiple Plots</li >
203
204
</ul ></td >
204
205
</table >
205
206
@@ -2264,9 +2265,49 @@ plt.title("Pastel2 Colormap (Qualitative)")
2264
2265
2265
2266
- [ Details 🔥] ( seaborn/palette.ipynb )
2266
2267
2268
+ ## Multiple Plots
2269
+
2270
+ - [ Details 🔥] ( seaborn/multiple_plots.ipynb )
2271
+
2272
+ ### Using Matplotlib
2273
+ ``` py
2274
+ data = sns.load_dataset(" iris" )
2275
+
2276
+ plt.figure(figsize = (11 , 3 ))
2277
+ plt.subplot(121 )
2278
+ sns.lineplot(x = " sepal_length" , y = " sepal_width" , data = data)
2279
+
2280
+ plt.subplot(122 )
2281
+ sns.lineplot(x = " petal_length" , y = " petal_width" , data = data)
2282
+ ```
2283
+
2284
+ ![ ] ( assets/seaborn/subplot.jpg )
2285
+
2286
+ ### Using Seaborn
2287
+
2288
+ #### FacetGrid
2289
+
2290
+ ``` py
2291
+ grid = sns.FacetGrid(data, col = " species" )
2292
+ grid.map(plt.plot, " sepal_width" )
2293
+ ```
2294
+
2295
+ ![ ] ( assets/seaborn/facet_grid.jpg )
2296
+
2297
+ #### PairGrid
2298
+
2299
+ ``` py
2300
+ x_vars = [" sepal_length" , " sepal_width" , " petal_length" , " petal_width" ]
2301
+ y_vars = [" species" ]
2302
+
2303
+ grid = sns.PairGrid(data, x_vars = x_vars, y_vars = y_vars)
2304
+ grid.map(sns.barplot)
2305
+ ```
2306
+
2307
+ ![ ] ( assets/seaborn/pair_grid.jpg )
2308
+
2267
2309
<!-- ##
2268
2310
2269
- ## Multiple Axes
2270
2311
2271
2312
## Relational plots
2272
2313
0 commit comments