You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

495 lines
408 KiB

2 years ago
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___\n",
"\n",
"<a href='http://www.pieriandata.com'><img src='../Pierian_Data_Logo.png'/></a>\n",
"___\n",
"<center><em>Copyright by Pierian Data Inc.</em></center>\n",
"<center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Grids"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Imports"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## The Data"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv('StudentsPerformance.csv')"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>gender</th>\n",
" <th>race/ethnicity</th>\n",
" <th>parental level of education</th>\n",
" <th>lunch</th>\n",
" <th>test preparation course</th>\n",
" <th>math score</th>\n",
" <th>reading score</th>\n",
" <th>writing score</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>female</td>\n",
" <td>group B</td>\n",
" <td>bachelor's degree</td>\n",
" <td>standard</td>\n",
" <td>none</td>\n",
" <td>72</td>\n",
" <td>72</td>\n",
" <td>74</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>female</td>\n",
" <td>group C</td>\n",
" <td>some college</td>\n",
" <td>standard</td>\n",
" <td>completed</td>\n",
" <td>69</td>\n",
" <td>90</td>\n",
" <td>88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>female</td>\n",
" <td>group B</td>\n",
" <td>master's degree</td>\n",
" <td>standard</td>\n",
" <td>none</td>\n",
" <td>90</td>\n",
" <td>95</td>\n",
" <td>93</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>male</td>\n",
" <td>group A</td>\n",
" <td>associate's degree</td>\n",
" <td>free/reduced</td>\n",
" <td>none</td>\n",
" <td>47</td>\n",
" <td>57</td>\n",
" <td>44</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>male</td>\n",
" <td>group C</td>\n",
" <td>some college</td>\n",
" <td>standard</td>\n",
" <td>none</td>\n",
" <td>76</td>\n",
" <td>78</td>\n",
" <td>75</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" gender race/ethnicity parental level of education lunch \\\n",
"0 female group B bachelor's degree standard \n",
"1 female group C some college standard \n",
"2 female group B master's degree standard \n",
"3 male group A associate's degree free/reduced \n",
"4 male group C some college standard \n",
"\n",
" test preparation course math score reading score writing score \n",
"0 none 72 72 74 \n",
"1 completed 69 90 88 \n",
"2 none 90 95 93 \n",
"3 none 47 57 44 \n",
"4 none 76 78 75 "
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## catplot()\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x1e24e235b08>"
]
},
"execution_count": 9,
"metadata": {},
"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5X4YmDvr8t5umyRpAXoJ4GVV9cD+je7zY/pXkiSNh14CeHeSh247TnI2cFf/SpKk8dDLVRCvo7N6xX+l8yPcd4Dz+lqVJI2BXq6C+D/A85KcAGQBi3FKkubo5VbkDUlOpDMT2n9Ocl2SM/tfmiSNtl7GgH+tqu4GzgQeT2cBzYv7WpUkjYFeAjjdx5cB76+q6+e0SZKOUC8BfG2ST9EJ4E8meQwPvy5YknQEerkK4nzgJ4FvVdW9SZbTGYaQJC1AL1dB7AOum7M9S2dGNEnSAjitpCQ1YgBLUiO9jAGTZILOBKsPvb+qbu1XUZI0DnqZjnI98DbgDn549UMBP9HHuiRp5PXSA94APLX745skaZH0Mgb8HeB7/S5EksbNAXvASX6z+/RbwNVJ/jdw//7Xq+qdfa5NkkbawYYgHtN9vLX75xh+OBF79bMoSRoHBwzgqvp9gCTnVNXDliBKck6/C5OkUdfLGPCbe2yTJB2Gg40Bn0VnAp7VSd4156UTgT39LkySRt3BxoBvB7YBLweundN+D/Ab/SxKksbBwcaArweuT/I/q+rBAdYkSWOhlxsxTknyh8DpwKP3N1bVU/pWlSSNgV5+hHs/8B46474/A1wK/Pd+FiVJ46CXAD62qrbSWRH521X1e8BL+luWJI2+XoYg/j7JUcCOJG8EdtJZnFOStAC99IB/HTgOuBB4NvArwFQfa5KksdDLkkRf7j79Pq4FJ0mLppf5gCeBtwJP4uETsjsfsCQtQC9jwB8EfhvYjsvRS9Ki6SWAd1fVlX2vRJLGTC8B/LYk7wW28vD5gC/vW1WSNAZ6CeBfBU4Djubha8ItKIC7C31uA3ZW1c8lOQn4M+AU4Bb
"text/plain": [
"<Figure size 360x360 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"# Kind Options are: “point”, “bar”, “strip”, “swarm”, “box”, “violin”, or “boxen”\n",
"sns.catplot(x='gender',y='math score',data=df,kind='box')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x1e24e37b2c8>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAALICAYAAABBxipSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAuRUlEQVR4nO3de7jdZX3n/feHHZEA0kKMKY1FsGFkKJ7oxsdTHRSw0bbiVLH42BJbLmk7GtJ2ekBtiz6t1nk6jx2atraprYbWsaLSgpYJQhQd24puwkkEJ3s4xxRCtBwEwYTv/LF+kU2enWSR7LXuvfd6v65rX2v97vU7fNfO4sO977XWfaeqkCQN336tC5CkUWUAS1IjBrAkNWIAS1IjBrAkNWIAS1IjBrCGIskDc+Gcu7jOm5P84Aye74ok4/tw/IlJPj1T9agdA1jaszcDMxbAT1SSsVbX1mAZwBqqnXtvSf4kyZu7+7cmeXeSDUmuT3JM135wkg91bdcled2U49+T5NokX0qyZB9rG0vy4SRf7a71q0leD4wDH0lyTZKFSX43yVe6/dYkSXf8FUn+S5IvJ/lfSX6sa1+Y5O+62j8GLJxyzQ8kmUhyQ5J3T2m/tbvOF4HTkixPclO3/dP78jw1exjAmm3uqarjgQ8Av961/Q5wb1U9u6qeA3y2az8I+FJVPRf4AvCWnU+W5OVdcO7888/TXPt5wNKqOq6qng18qKo+AUwAb6qq51XVQ8CfVNUJVXUcvTD9ySnnWFBVLwB+BTi3a/tl4MGu9vcAPzpl/3dW1TjwHOA/JHnOlMe+U1UvBf4B+Evgp4AfA35gd79AzR0GsGabC7vbq4Aju/snA3+6Y4eq+lZ39xHg09Psz5R9P9cF584/L57m2jcDz0yyOsly4L5d1PjyJFcmuR54BfAje6j/ZcDfdvVcB1w3Zf83JNkAXN2d59gpj32suz0GuKWqNlZv7oC/3UVdmmMWtC5AI2cbj/8f/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FPHTMq1uXogFYeNMlLF26pHUZ0h7ZA5akRgxgSWrEAJakRgxgSWrEAJakRgxgSWrEAJakRgxgSWrEAJakRgxgSWrEAJakRgxgSWpkJCfjkQbh9gfGeO+GQ1qXMRR3Pdjruy058NHGlQzH7Q+McfQAzmsASzNg2bJlrUsYqkcmJwF48jNG43kfzWD+jQ1gaQasXLmydQlDtWrVKgDOO++8xpXMbU3GgJN8f5JPJLkpyY1JXpTksCSXJdnY3R7aojZJGpZWb8KdB6yrqmOA5wI3AucA66vqaGB9ty1J89bQAzjJIcDLgL8CqKpHqurfgFOBtd1ua4HXDrs2SRqmFj3gZwJbgA8luTrJB5McBCypqs0A3e3Tpjs4yVlJJpJMbNmyZXhVS9IMaxHAC4DjgQ9U1fOBb/MEhhuqak1VjVfV+OLFiwdVoyQNXF+fgkjyDODoqro8yUJgQVXdv5fXvBO4s6qu7LY/QS+A70pyeFVtTnI4cPdenr8vYw9+c2SWpd/vO/cB8OgBo/EZ1bEHvwm4KKdmvz0GcJK3AGcBhwE/DDwd+HPgpL25YFX9a5I7kjyrqr7enedr3c8K4H3d7UV7c/5+jNpnNicne/+vXPbMUQmlJSP3b6y5qZ8e8FuBFwBXAlTVxiTTjs8+ASuBjyTZH7gZ+Hl6wyEXJDkTuB04bR+vseuL+5lNSbNAPwH8cFU9kgSAJAuA2peLVtU1wPg0D+1Vr1qS5qJ+3oT7fJJ3AAuTnAJ8HPjUYMuSpPmvnwD+LXofG7se+EXgEuC3B1mUJI2C3Q5BJNkPuK6qjgP+cjglSdJo2G0PuKoeBa5NcsSQ6pGkkdHPm3CHAzck+TK9L00AUFWvGVhVkjQC+gngdw+8CkkaQXsM4Kr6fJI
"text/plain": [
"<Figure size 360x720 with 2 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.catplot(x='gender',y='math score',data=df,kind='box',row='lunch')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x1e24e856388>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAALICAYAAABiqwZ2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAABHfElEQVR4nO3de5xddX3v/9cnM1wCAZUx5oexGDQcKfWCNlrvRQmeSK1oC16OlsF6yvFUJ6M9WlHbqrVa7MUW0tYWPcrQUhUUFZWOBhTvigGBgMBhCuESUwiDCpgYnOTz+2OtIV+GPTM7lz1rZvbr+XjMY9Zee+21Pmvvtb/7Pd/57rUiM5EkSZJUWdB0AZIkSdJsYkCWJEmSCgZkSZIkqWBAliRJkgoGZEmSJKlgQJYkSZIKBmRJkiSpYEDeiyLivrmwzkm2c0pEPHovru/SiFixB48/JiK+OMl9GyaZ/+aIOGA3t/eyiDhqdx7bpImvW0R8dC7uh+YP28EHrc92cAbYDs4O071PI+LhEfGHu7He90TEW3e/st1jQNa4U4C99sGwqyKiZy+s5s3Abn0wAC8DdrtBjYje3X1sG+ue6rk5heJ1y8z/mZk/6lQte6KTz5G0l5yC7aDtYAd1eTv4cGCXA3JjMtOfvfQD3Ff/Pgb4YjH/H4BT6ukNwHuBK4D1wJH1/EXAx+t5VwO/O75O4P3AVcD3gCV7WGMPcDZwTb2ttwAn1tu5AbgSWAj8GfCDermzgKgffynwQeAy4P8Bz6vnLwQ+Wdf+KeD7wIr6vg8D64BrgfcWtWyot/Mt4FXAKuD6+vaZ5XM4YR82tJi3Gri/3qev1fNeBHy3fq7PBxbV808HflTX+jfAs4G7gZvr/X/8hHWfDfwz8M16n19Szz+lXu8XgK8CBwIfq5+3HwInFMt9Hhiun+N3F+v+HHB5/dycWh5LwJ/Xz+NzW70ek7xulxbP+6vr5+Ma4IMT1j3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S+IiFOAT0TE+L/E/4TqDfr5ujciqL6cA9WXBz4SEaupxuD954R130DViCwB3lDXO3H77wP+Hri6/nDYALykvu9bVGPmlgP/npnrovq31Rvq5+wGqg+zh8jMn0bEZK/H2Tz4dRt/zKaIeAfVl0ICuCgzP9/yWWvtIcdjZl4wxTpPo/p35W1UY9IWTbLeN0fV07ed6gtC/5GZ2yLiV4Hv1s/pfcBrgTt3od62ZOYVUfXeXVbP+mhm/rBFz0bpNcCHI+JPqMbjfZLqiz2agu2g7aDtYOPt4K7W366HvI7lnZn5lVb7kpn/GRHfruv5j8x82yTLXRFVT/mVVH9oT9qJ0UnjA/SlOSMiNmTmshnc3tlUX5T59G4+/hSqfwu+abplJakdtoNqQje9jg6xkCRJkgr2IGvOiYg3Z+bfN12HJDXFdlDqLAOyJEmSVJjTX9JbtWpVDg8PT7+gJM1fU522aUq2oZLUug2d02OQ77rrrqZLkKQ5yzZUklqb0wFZkiRJ2tsMyJIkSVLBgCxJkiQVDMiSJElSwYAsSZIkFQzIkiRJUsGALEmSJBUMyJIkSVLBgCxJkiQVOhaQI+JjEXFnRFxTzDskItZGxI3170cU970jIkYi4oaI+O+dqkuSJEmaSid7kM8GVk2YdxpwSWYeAVxS3yYijgJeBfxa/Zh/ioieDtYmSZIktdSxgJyZ3wDunjD7BGConh4CXlbM/2RmbsvMm4ER4Bmdqk2SJEmaTO8Mb29JZm4CyMxNEfGoev5S4HvFcrfX8+a1NWvWMDIy0tj2N27cCMDSpc091cuXL2dgYKCx7UuStDv8DJ/fn+EzHZAnEy3mZcsFI04FTgU47LDDOlnTvLd169amS5A0w2xDpfnBz/DOisyWOXTvrDxiGfDFzHxiffsG4Ji69/hQ4NLMfEJEvAMgM/+yXu7LwHsy87tTrX/FihW5bt2
"text/plain": [
"<Figure size 720x720 with 4 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.catplot(x='gender',y='math score',data=df,kind='box',row='lunch',col='test preparation course')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pairgrid\n",
"\n",
"Grid that pairplot is built on top of, allows for heavy customization of the pairplot seen earlier."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAImCAYAAABuJeE8AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOydd3hUZfq/73dqJoUkhISWUI1AhGAIHVdRVmzsskpRKSoWwLrr2tjCrrusvy+CrruoSFFBigqCLoqKrCjqiggEBCVSpCa0hJCElMnU9/fHyTnMZCaASvp7X9dcYWZOeSc8OfOcp3weIaVEoVAoFAqFoi4w1fUCFAqFQqFQNF2UI6JQKBQKhaLOUI6IQqFQKBSKOkM5IgqFQqFQKOoM5YgoFAqFQqGoM5QjolAoFAqFos5o0I7ItddeKwH1UI8L+agxlL2qRw08agRlq+pRA49qadCOyMmTJ+t6CQrFeaPsVdFQULaqqE0atCOiUCgUCoWiYaMcEYVCoVAoFHWGpaYOLIR4FRgG5Ekpu1e+1hxYBnQADgKjpZSFle/9AbgL8AEPSSk/qqm1KRQKxYXA75cUlLlxe33YLGYSomyYTAK/X1LkdON0+/BJSYTVTKzNwslyN16/xGISJEbZsNlq7BKsaIJUZ49nex+goMyN3+/HJ8FqFri9fsNOk6LtWK3mGl13Tf4VLAReABYFvDYFWCelnC6EmFL5/AkhRBpwC3AJ0Ab4WAhxsZTSV4PrUygUip+M3y/ZfaKEexZtIbfQSXK8g/m39SY1MZrDheWcOF3BYyt2kFvoZNIvOjDs0mTuXZJlbPvSuEy6JEYpZ0RxQajOHru0jDGc46rvL7qzLy6vn+f+u5vbB3bk890nuKFnW+5bujXITrsmRdeoM1JjqRkp5efAqSovDwdeq/z3a8BvAl5/U0rpklIeAH4A+tbU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JCNonRPGH67visNWsYqWi/vNThcgeGnIxExZuDqrv+Hx3Hr06NA96/eXbMkmKsRvOtl4ovetYEUvv7kd+iYuCMjcrs3K4fWBHVm07wtzxmZXRO8Gj13Qhyt5wlVUVDZTvj5+msNxDm9gIOiREht2mVWwEQy9pyQffHmdFVg4PVNaNKBT1gepaHN+5bxCJMfagbasW/2WkxDF5cGcOFZQzddV3Qcd45K3tLLmrL8eKK4z3tC+BDJZPGoCUEqvFRGmFl+kffs/UYWkkRNloGx/ByRJ3kLPy0rhMkmPVJbipcy5bDfd+ONu8//WtvHFPf26dvzG4NmlRFs+NvtSwxeZRNj7ffYLeHVsw9uWvDXucMy6TLQdOMjyjLU+sPON8zxyZTkK0rUZ/B+qvQBHCl5XRkIEXtUCcJYk9uncKH3x7nOVbcrlv8EVhw94KRV1QXYuj23smXRIY7n797n784/1s1mbn8dCQVE6Vuaut/RBChLTz3v/6NpZN7E/beM1xbxEleerGdON85W4/z3+yl6nD0ohzWClyenh+3R6e/HV32sQFFxMqmhbnslW310ditD3IduIirWH30Ws6qr7ul5JJi7MALf2y4I4+RtRE32bykiyWTezP397bGXSuBV9WphCjauo3oBwRRRi+/KEAgMsuOrt66i9SE2kTG8HhU+VsPFDAwM5KbVVRP6iuxdFq0erzq4a7h6Yl8acb0vjzDWmYTIKcU+VYTCYW3NHHyK3PWb+P/FIXZhFeJdUnzzg3Lq8PAQgBUkKkzcTtAzsG3Wk+PSKdanQbFU2I6mzVZjHjr2wRf2Z0T06VanbVqlkECdE2hqYlsTY7z9hnaFoSZpNgxeQBFJS5jZoRvbV37vhM4hxW/FLisJl5dlRPw6635RQZ5w9np6YalrtRjogiCK/Pz+aDWjPTwM5nVzgwmwQjM5OZ9ckPrNiSqxwRRb0h3mFlzrhMJlfJi7s8vpC
"text/plain": [
"<Figure size 540x540 with 12 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"g = sns.PairGrid(df)\n",
"g = g.map_upper(sns.scatterplot)\n",
"g = g.map_diag(sns.kdeplot, lw=2)\n",
"g = g.map_lower(sns.kdeplot, colors=\"red\")"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"c:\\users\\marcial\\anaconda3\\envs\\ml_master\\lib\\site-packages\\seaborn\\distributions.py:434: UserWarning: The following kwargs were not used by contour: 'marker'\n",
" cset = contour_func(xx, yy, z, n_levels, **kwargs)\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAmoAAAImCAYAAADjSKZoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAEAAElEQVR4nOydeXxU5b3/3885s89kXyAkIeygLCKoaFFQNrXiQpG6sVgrrf213t5LrVWrbFprrXJve+2tLbUVRWuNChVwF0VExQIi+04gCQGyJ5PMds55fn+czJCQgFSBsDzv1ytm5pwzM0/C1zzf810+XyGlRKFQKBQKhUJx6qG19wIUCoVCoVAoFG2jHDWFQqFQKBSKUxTlqCkUCoVCoVCcoihHTaFQKBQKheIURTlqCoVCoVAoFKcoylFTKBQKhUKhOEU5rR21q666SgLqS30dz68ThrJX9XUCvk4IylbV1wn4UnxNTmtHraKior2XoFAcM8peFacLylYVilOH09pRUygUCoVCoTiTUY6aQqFQKBQKxSnKCXPUhBB/FUIcFEJsaHYsXQjxrhBie9P3tGbn7hdC7BBCbBVCXHmi1qVQKBTHg1AkRnlNkO2lFZTXBAlFYi3OLy5ZzeKS1QDUNYTZX1XPzz97gf1V9dQ1hNtjyYqzgLjNHcv5w234Hzs+ZX9VPXPXfaDs9BTiREbUngWuOuzYfcD7UsqewPtNzxFCnAvcDPRtes3/CSH0E7g2hUKh+NqEIjGWrdvJ2If+yk2PPM/Yh/7KsnU7Wzhri0vXsLh0DXUNYZat28X1M/7Gh+Wb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uAwH2HIb2+r
"text/plain": [
"<Figure size 610.5x540 with 12 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"g = sns.PairGrid(df, hue=\"gender\", palette=\"viridis\",hue_kws={\"marker\": [\"o\", \"+\"]})\n",
"g = g.map_upper(sns.scatterplot, linewidths=1, edgecolor=\"w\", s=40)\n",
"g = g.map_diag(sns.distplot)\n",
"g = g.map_lower(sns.kdeplot)\n",
"g = g.add_legend();\n",
"\n",
"# Safely ignore the warning, its telling you it didn't use the marker for kde plot"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## FacetGrid"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x1e24be00748>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAagAAAGoCAYAAAATsnHAAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXGUlEQVR4nO3dUYid93nn8e9vpRocksahnoREUljtIjdRgl2ciWPKdutsaCM5FyKQC9vZmpoEIYhDerPY7NJ2ITcbQiEEOxbCCJOb6CYmVYpS77Il8YLXW03AsS0Hm4kM1kQGj+OQggP1yn72Yk67p8dHmlfjczKPdb4fGJj3ff8681iaP1+/54yOUlVIktTNv9ruASRJmsZASZJaMlCSpJYMlCSpJQMlSWrJQEmSWto0UEmOJ3kpydMXuZ4k30yymuTJJDfOfkxJ0qIZcgf1EHDgEtcPAvtGH4eBB976WJKkRbdpoKrqUeCVSyw5BHy7NjwOXJPk/bMaUJK0mGbxGtQu4NzY8dro3JskOZxkJcnKRz7ykQL88OPt/DE37hU/rrCPLZlFoDLl3NSBqupYVS1X1fLVV189gy8tXZncK9JsArU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gJGkxzeI1qF3AubHjtdE5SZK2bNN/sHCATDk39R+ZSnKYjacB2b9//8fOnDkzgy8vbZtp3/uzeWD3iq4sW9ors7iDWgP2jB3vBs5PW1hVx6pquaqWr7766hl8aenK5F6RZhOok8Cdo5/muxn4VVW9OIPHlSQtsE2f4kvyHeAW4Noka8BfAr8FUFVHgVPArcAq8GvgrnkNK0laHJsGqqpu3+R6AV+a2USSJOE7SUiSmjJQkqSWDJQkqSUDJUlqyUB
"text/plain": [
"<Figure size 432x432 with 4 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"sns.FacetGrid(data=df,col='gender',row='lunch')"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x1e24f4fcb08>"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAbUAAAGoCAYAAADB4nuYAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACU7klEQVR4nO2de3zU5ZX/32cumWSSIBeBBZUi5dItEMJFrVZbbxWxu9RKaWGLYGuxurZIWdTaut3sVmuplJ+wdb1gW0VaUKql7FbFS6VWa1Eu4VYLREREKCBBSTLJXJ/fH9/vdzLXZBJymSTn/XrNa2a+8708M/mePM9znnM+R4wxKIqiKEp3wNXZDVAURVGUtkI7NUVRFKXboJ2aoiiK0m3QTk1RFEXpNminpiiKonQbtFNTFEVRug3aqSmKoijdhi7fqYlIbVc4Z5brXCcig9vwfBtEZNIpHH+xiPxfls/2t7phrWvLdSLysw683idEpFJEtorIx9vpGkNFZGd7nLuZ66qNNJ5PbaSTEJH9InJ6e1+ny3dqXZzrgDYz2JYiIu7OunZbIyKeUzzF1cDvjDHjj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irunV6WdMzSGeX4vbpkrOQ3fq+bZTPHJ927y2aOP6V7tz3OmUq7aj/ahfH+zxgzxn5/L3DcGPNjEfku0NcYc5uIjAZ+jbWONhgriGSEMabJ7nvSpElm06ZN7dZ+pfsQixkC4Sj+Ajd1wQj+Ajf14Rh+rxuXq9FRUNMQ5oYVm3l9X2P1+fOH9ePh2RMpLvAQixnqI1GKfR5O1ocp8Xl4+1gd979cxbGaID+fM4moMRT7PPHrBMOx5G1eN253xvFkU1WSm0XtQWlrEu0mEIqm2UtriEZjBMLRdrOH9gzpX4V
"text/plain": [
"<Figure size 440x432 with 4 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"g = sns.FacetGrid(data=df,col='gender',row='lunch')\n",
"g = g.map(plt.scatter, \"math score\", \"reading score\", edgecolor=\"w\")\n",
"g.add_legend()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"# https://stackoverflow.com/questions/43669229/increase-space-between-rows-on-facetgrid-plot"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAc4AAAGoCAYAAADPSwX3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy86wFpkAAAACXBIWXMAAAsTAAALEwEAmpwYAACFN0lEQVR4nO2deXxU5bn4v8+sySRBCQIFhSIGsEVDWJRaqxU3xN6LVoqFW0RvW1xqC5Ri1da2ub9qLUq5QK91oYsoLSjV2vRWxQ2u1VoUMGxaICIiQlkSlCSTzGRm3t8f58wwM5lJJkCWmTzfz2c+c86Zs7xnZt7zvO+zijEGRVEURVEyw9HZDVAURVGUbEIFp6IoiqK0ARWciqIoitIGVHAqiqIoShtQwakoiqIobUAFp6IoiqK0ARWciqIoitIG2kVwikhdNpwzzXVuEJH+J/B8a0RkzHEcf5G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HSNRRelO+NxOFk8dmdBfF08d2Wp/tY4rSzoue/p5R+u/KoDrgZ/b73+O2/4HEVkA9Meq4v1mB7dNaQOWcT/AzOWVMVXs/ZNLKfK6KMpzUx8Icc6gYt7YebQY+zmDivEHQvznF07n25cMwR8I09BkCduZK46e56Fpo3hk+mgKvC7qAyF8bidOZ1dRjiiKEsXhEHoVeFhy/Rh8Hif+YBif24nD0VJNbQuP08G915zNgGIfH9b48WRRH2/PcJTlWLXchonIHhH5BpbAvExEdgCX2esYY7Zi1e57B6vG2q3GmOyYs3dTLON+oir2tpWbOOxvwt9kdZ5FU8qazRzz3U4KPC6q64LMeGwdjU0
"text/plain": [
"<Figure size 440x432 with 4 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"g = sns.FacetGrid(data=df,col='gender',row='lunch')\n",
"g = g.map(plt.scatter, \"math score\", \"reading score\", edgecolor=\"w\")\n",
"g.add_legend()\n",
"\n",
"plt.subplots_adjust(hspace=0.4, wspace=1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----\n",
"----"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 1
}