diff --git a/src/notebooks/533-introduction-boxplots-matplotlib.ipynb b/src/notebooks/533-introduction-boxplots-matplotlib.ipynb new file mode 100644 index 0000000000..a94baade75 --- /dev/null +++ b/src/notebooks/533-introduction-boxplots-matplotlib.ipynb @@ -0,0 +1,230 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Libraries\n", + "\n", + "First, you need to install the following librairies:\n", + "- [matplotlib](https://python-graph-gallery.com/matplotlib/) is used for creating the plot\n", + "- `pandas` for data manipulation" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import pandas as pd" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Dataset\n", + "\n", + "We will use a dataset about **temperature variation** in Trentino (Italy), that you can easily access using the `url` below. " + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "url = 'https://raw.githubusercontent.com/holtzy/The-Python-Graph-Gallery/master/static/data/trentino_temperature.csv'\n", + "df = pd.read_csv(url)\n", + "\n", + "# Drop rows (5 in total) with NaN values\n", + "df = df.dropna()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Basic boxplot\n", + "\n", + "Once we've opened our dataset, we'll now **create the graph**. The following displays the **distribution** of the temperature variation using the `boxplot()` function." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAisAAAGdCAYAAADT1TPdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAVJ0lEQVR4nO3df2zVd7348dfZyM5aaasE166hCMmK7ULGHcwsMHXMhBo0xIXEaBDCEregbBqymCVIotWE1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aSR8rw8PDERHR1tZW8CQAwDs1PDwcTU1NVz2nVLmWpEns4sWLcerUqWhoaIhSqVT0OMAEGhoaira2tujv74/GxsaixwEmUKVSieHh4WhtbY1bbrn6qpRJHyvAjWtoaCiamppicHBQrMBNzAJbACA1sQIApCZWgLTK5XJ89atfjXK5XPQoQIGsWQEAUnNnBQBITawAAKmJFQAgNbECAKQmVoB09u3bF8uWLYvW1tYolUrx3HPPFT0SUCCxAqRz7ty5mDdvXmzdurXoUYAEJv0XGQI3nqVLl8bSpUuLHgNIwp0VACA1sQIApCZWAIDUxAoAkJpYAQBS824gIJ3XX389Xnnllerj48ePx+HDh2PatGkxc+bMAicDiuBbl4F0nn/++XjooYcu27969erYvn379R8IKJRYAQBSs2YFAEhNrAAAqYkVACA1sQIApCZWAIDUxAoAkJpYAQBSEysAQGpiBQBITawAAKmJFQAgNbECAKT23y1xZZz4OwUVAAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Create a figure and axis\n", + "fig, ax = plt.subplots()\n", + "\n", + "# Create a boxplot for the desired column\n", + "ax.boxplot(df['temp'])\n", + "\n", + "# Show the plot\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Add title and label\n", + "\n", + "To clarify things for the reader, it's a good idea to **add a title and a name to the axes**. And to do this with [matplotlib](https://python-graph-gallery.com/matplotlib/), nothing could be simpler: we simply use the `set_xlabel()` (or `set_ylabel()`) and `set_title()` functions " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAroAAAIhCAYAAAChXBmZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAnAElEQVR4nO3dfZ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Ufv36ZciQIUmSAw44YIufD6AaPLoAUAU33HBD5s6dm7lz5+anP/1pxo8fn7PPPjtXXXVVkuTee+/NXnvtlY9+9KMtrnvtUYB77rmned/JJ5+cs846K//v//2/XHLJJfniF7+YkSNHvuH7nnLKKS1ev7aCfN9992111nvvvTcHH3xwc+T+5SyVSiX33nvvtv3QALuYFV2AKhgwYMAWH0Z7+umnc/7552fs2LF54YUX0r1799TU1LS4bv/990/79u3zwgsvtNh/2mmnZcaMGenQoUPziu3rtW/fPvvtt1+Lfd27d0+SLe73l1544YX07t17i/09e/b8m9cCVJMVXYDdxKBBg7Ju3br87ne/y3777ZfnnnsulUqlxTnPP/98Xn311XTp0qV535o1a3LqqaemX79+qaura34+9vVeffXVLaK0qakpSbYI4L+03377Zfny5Vvsf/bZZ5OkxSwAuxOhC7CbWLBgQZI/f4DrqKOOyurVq3Pbbbe1OOeGG25Ikhx11FHN+84888wsXbo0t956a77zne/k9ttvzxVXXPGG7/G9732vxeubbropSTJixIitznXUUUfliSeeyPz587eYpaamJkceeWSSPz9nnCTr1q376z8owC7i0QWAKnjsscfy6quvJvnzf/3feuutmTVrVj7ykY+kT58+GTduXL75zW9m/PjxWbJkSd797nfnl7/8ZaZOnZrjjz8+Rx99dJLk29/+dm688cZcd911OeSQQ3LIIYfknHPOyQUXXJDhw4e3eK62Q4cOufzyy7N69eocfvjhzd+6cNxxx+UDH/jAVmf93Oc+lxtuuCEnnHBCLr744vTq1St33nlnrr766px11lnp169fkqS+vj69evXKj3/84xx11FHZd99906VLlzd87AFgl6gAsMtcd911lSQttoaGhsp73/veyvTp0yuvvPJK87kvvPBC5cwzz6z06NGj0r59+0qvXr0qF154YfM5jz76aKWurq4yfvz4Fu/xyiuvVIYMGVLp3bt35aWXXqpUKpXK+PHjK3vttVfl0UcfrYwYMaJSV1dX2XfffStnnXVWZfXq1S2u79Wr1xb3fPrppytjxoyp7LfffpU99tij8q53vavy1a9+tbJp06YW5/385z+vHHrooZXa2tpKki3uA7Ar1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qgzYTuX9q0aVO+//3vZ82aNRk6dGgWL16cpqamjBo1qvmc2traHHHEEZkzZ85fvdf69euzcuXKFhsAAG1fmwrd//u//0unTp1SW1ubM888Mz/60Y9y8MEHp6mpKUnSrVu3Fud369at+djWTJs2LQ0NDc1bY2Njq80PAMCu06ZC913velcWLFiQBx98MGeddVbGjx+fJ554ovl4TU1Ni/MrlcoW+17vwgsvzIoVK5q3ZcuWtcrsAADsWu2rPcD26NChQw466KAkyWGHHZa5c+fm61//ei644IIkSVNTU3r06NF8/vPPP7/FKu/r1dbWpra2tvWGBgCgKtrUiu7rVSqVrF+/Pn369En37t0za9as5mMbNmzI7NmzM2zYsCpOCABAtbSZFd0vfvGLOe6449LY2JhVq1bl+9//fu6///7cddddqampyaRJkzJ16tT07ds3ffv2zdSpU9OxY8eMGTOm2qMDAFAFbSZ0n3vuuZx66qlZvnx5GhoaMmjQoNx1110ZOXJkkuT888/PunXrMnHixLz00kt5//vfn7vvvjv19fVVnhwAgGqoqVQqlWoPsTtZuXJlGhoasmLFinTu3Lna4wC8afPnz8+QIUMyb968DB48uNrjALxp29prbfoZXQAA2BqhCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABRJ6AIAUKQ2E7rTpk3L4Ycfnvr6+uy///458cQT89vf/rbFOZVKJVOmTEnPnj1TV1eXESNG5PHHH6/SxAAAVFObCd3Zs2fn7LPPzoMPPphZs2bl1VdfzahRo7JmzZrmcy677LJMnz49V111VebOnZvu3btn5MiRWbVqVRUnBwCgGtpXe4Btddddd7V4fd1112X//ffPvHnz8vd///epVCq58sorM3ny5Jx00klJkuuvvz7dunXLTTfdlDPOOKMaYwMAUCVtZkX39VasWJEk2XfffZMkixcvTlNTU0aNGtV8Tm1tbY444ojMmTNnq/dZv359Vq5c2WIDAKDta5OhW6lUcu655+YDH/hABg4cmCRpampKknTr1q3Fud26dWs+9kamTZuWhoaG5q2xsbH1BgcAYJdpk6F7zjnn5NFHH83NN9+8xbGampoWryuVyhb7/tKFF16YFStWNG/Lli3b6fMCALDrtZlndF/z6U9/OrfffnseeOCBHHDAAc37u3fvnuTPK7s9evRo3v/8889vscr7l2pra1NbW9t6AwMAUBVtZkW3UqnknHPOya233pp77703ffr0aXG8T58+6d69e2bNmtW8b8OGDZk9e3aGDRu2q8cFAKDK2syK7tlnn52bbropP/7xj1NfX9/83G1DQ0Pq6upSU1OTSZMmZerUqenbt2/69u2bqVOnpmPHjhkzZkyVpwcAYFdrM6E7Y8aMJMmIESNa7L/uuusyYcKEJMn555+fdevWZeLEiXnppZfy/ve/P3fffXfq6+t38bQAAFRbmwndSqXyN8+pqanJlClTMmXKlNYfCACA3VqbeUYXAAC2h9AFAKBIQhcAgCIJXQAAiiR0AQAoktAFAKBIQhcAgCIJXQAAiiR0AQAoUpv5zWgA1fbkk09m1apV1R5juy1cuLDFn21JfX19+vbtW+0xgDZK6AJsgyeffDL9+vWr9hhvytixY6s9wg753e9+J3aBHSJ0AbbBayu5N954YwYMGFDlabbPunXrsmTJkvTu3Tt1dXXVHmebLVy4MGPHjm2Tq+jA7kHoAmyHAQMGZPDgwdUeY7sNHz682iMA7HI+jAYAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6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cOH77TBAHYnNa++kkO7vy11L/8ueXanrRHwV9S9/Lsc2v1tqXn1lWqPArRR2x26J554YovXNTU16dq1az70oQ/l8ssv31lzAexW9ly9NPPP6JQ8cEbyQLWneWsYkGT+GZ2ycPXSJMOqPQ7QBm136G7evLk15gDYrb3S6R0Z/K3V+d73vpcB/ftXe5y3hIWLFuWUU07Jd45/R7VHAdqoHfqFEQBvNZX2e+aRps1Zt3e/pOd7qz3OW8K6ps15pGlzKu33rPYoQBu1TaF77rnnbvMNp0+fvsPDAADAzrJNofvII49s081qamre1DAAALCzbFPo3nfffa09BwAA7FRt6jtyHnjggYwePTo9e/ZMTU1NbrvtthbHK5VKpkyZkp49e6auri4jRozI448/Xp1hAQCoqh36MNrcuXPz3//931m6dGk2bNjQ4titt966UwZ7I2vWrMl73vOe/Mu//Ev+6Z/+aYvjl112WaZPn56ZM2emX79+ueSSSzJy5Mj89re/TX19favNBQDA7me7V3S///3vZ/jw4XniiSfyox/9KBs3bswTTzyRe++9Nw0NDa0xY7Pjjjsul1xySU466aQtjlUqlVx55ZWZPHlyTjrppAwcODDXX3991q5dm5tuuqlV5wIAYPez3aE7derUXHHFFbnjjjvSoUOHfP3rX8/ChQtz8skn5x3vqN53HS5evDhNTU0ZNWpU877a2tocccQRmTNnzlavW79+fVauXNliAwCg7dvu0H3qqadywgknJPlzSK5ZsyY1NTX53Oc+l2uvvXanD7itmpqakiTdunVrsb9bt27Nx97ItGnT0tDQ0Lw1Nja26pwAAOwa2x26++67b1atWpUkefvb357HHnssSfLyyy9n7dq1O3e6HfD6rzirVCp/9WvPLrzwwqxYsaJ5W7ZsWWuPCADALrDNobtgwYIkyQc/+MHMmjUrSXLyySfns5/9bD71qU/lE5/4RI466qhWGXJbdO/ePUm2WL19/vnnt1jl/Uu1tbXp3Llziw0AgLZvm0N38ODBGTJkSAYMGJBPfOITSf68Gnreeeflueeey0knnZTvfOc7rTbo39KnT5907969OcKTZMOGDZk9e3aGDRtWtbkAAKiObQ7dX/3qV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uAABFEroAABRJ6AIAUCShCwBAkYQuAABFEroAABSpzYTupZdemmHDhqVjx47Ze++93/CcpUuXZvTo0dlrr73SpUuXfOYzn8mGDRt27aAAAOwW2ld7gG21YcOGfOxjH8vQoUPzne98Z4vjmzZtygknnJCuXbvml7/8ZV544YWMHz8+lUol3/jGN6owMQAA1dRmQveiiy5KksycOfMNj99999154oknsmzZsvTs2TNJcvnll2fChAm59NJL07lz5101KgAAu4E28+jC3/LrX/86AwcObI7cJDnmmGOyfv36zJs3b6vXrV+/PitXrmyxAQDQ9hUTuk1NTenWrVuLffvss086dOiQpqamrV43bdq0NDQ0NG+NjY2tPSoAALtAVUN3ypQpqamp+avbww8/vM33q6mp2WJfpVJ5w/2vufDCC7NixYrmbdmyZTv0swAAsHup6jO655xzTv75n//5r57Tu3fvbbpX9+7d85vf/KbFvpdeeikbN27cYqX3L9XW1qa2tnab3gMAgLajqqHbpUuXdOnSZafca+jQobn00kuzfPny9OjRI8mfP6BWW1ubIUOG7JT3AACg7Wgz37qwdOnSvPjii1m6dGk2bdqUBQsWJEkOOuigdOrUKaNGjcrBBx+cU089NV/96lfz4osv5rzzzsunPvUp37gAAPAW1GZC90tf+lKuv/765teHHnpokuS+++7LiBEj0q5du9x5552ZOHFihg8fnrq6uowZMyZf+9rXqjUyAABV1GZCd+bMmVv9Dt3XvOMd78gdd9yxawYCAGC3VszXiwEAwF8SugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFKl9tQcAeKtbu3ZtFi1a1Gr3X7hwYYs/W0P//v3TsWPHVrs/wI4QugBVtmjRogwZMqTV32fs2LGtdu958+Zl8ODBrXZ/gB0hdAGqrH///pk3b16r3X/dunVZsmRJevfunbq6ulZ5j/79+7fKfQHejJpKpVKp9hC7k5UrV6ahoSErVqxI586dqz0OAACvs6295sNoAAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUqX21B9jdVCqVJMnKlSurPAkAAG/ktU57rdu2Rui+zqpVq5IkjY2NVZ4EAIC/ZtWqVWloaNjq8ZrK30rht5jNmzfn2WefTX19fWpqaqo9DsCbtnLlyjQ2NmbZsmXp3LlztccBeNMqlUpWrVqVnj175m1v2/qTuEIXoHArV65MQ0NDVqxYIXSBtxQfRgMAoEhCFwCAIgldgMLV1tbmy1/+cmpra6s9CsAu5RldAACKZEUXAIAiCV0AAIokdAEAKJLQBQCgSEIXoFAPPPBARo8enZ49e6ampia33XZbtUcC2KWELkCh1qxZk/e85z256qqrqj0KQFW0r/YAALSO4447Lscdd1y1xwCoGiu6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUybcuABRq9erV+f3vf9/8evHixVmwYEH23XffvOMd76jiZAC7Rk2lUqlUewgAdr77778/Rx555Bb7x48fn5kzZ+76gQB2MaELAECRPKMLAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELUIApU6bkve99b7XHANitCF2A3UBTU1M+/elP553vfGdqa2vT2NiY0aNH55577qn2aABtVvtqDwDwVrdkyZIMHz48e++9dy677LIMGjQoGzduzM9+9rOcffbZWbRoUbVHBGiTrOgCVNnEiRNTU1OThx56KB/96EfTr1+/HHLIITn33HPz4IMPJkmWLl2aD3/4w+nUqVM6d+6ck08+Oc8999xW7zlixIhMmjSpxb4TTzwxEyZMaH7du3fvXHLJJRk3blw6deqUXr165cc//nH++Mc/Nr/Xu9/97jz88MPN18ycOTN77713fvazn2XAgAHp1KlTjj322Cxfvnyn/psA7AxCF6CKXnzxxdx11105++yzs9dee21xfO+9906lUsmJJ56YF198MbNnz86sWbPy1FNP5eMf//ibfv8rrrgiw4cPzyOPPJITTjghp556asaNG5exY8dm/vz5OeiggzJu3LhUKpXma9auXZuvfe1r+e53v5sHHnggS5cuzXnnnfemZwHY2Ty6AFBFv//971OpVNK/f/+tnvPzn/88jz76aBYvXpzGxsYkyXe/+90ccsghmTt3bg4//PAdfv/jjz8+Z5xxRpLkS1/6UmbMmJHDDz88H/vYx5IkF1xwQYYOHZrnnnsu3bt3T5Js3Lgx11xzTQ488MAkyTnnnJOLL754h2cAaC1WdAGq6LWV0pqamq2es3DhwjQ2NjZHbpIcfPDB2XvvvbNw4cI39f6DBg1q/nu3bt2SJO9+97u32Pf888837+vYsWNz5CZJjx49WhwH2F0IXYAq6tu3b2pqav5qsFYqlTcM4a3tT5K3ve1tLR43SP68Evt6e+yxR/PfX7vXG+3bvHnzG17z2jmvfy+A3YHQBaiifffdN8ccc0y++c1vZs2aNVscf/nll3PwwQdn6dKlWbZsWfP+J554IitWrMiAAQPe8L5du3Zt8QGxTZs25bHHHtv5PwDAbkzoAlTZ1VdfnU2bNuV973tfbrnlljz55JNZuHBh/uM//iNDhw7N0UcfnUGDBuWUU07J/Pnz89BDD2XcuHE54ogjcthhh73hPT/0oQ/lzjvvzJ133plFixZl4sSJefnll3ftDwZQZUIXoMr69OmT+fPn58gjj8znP//5DBw4MCNHjsw999yTGTNmpKamJrfddlv22Wef/P3f/32OPvrovPOd78wPfvCDrd7ztNNOy/jx45uDuE+fPjnyyCN34U8FUH01FQ9WAQBQICu6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJH+Pz2oaqiUlTj8AAAAAElFTkSuQmCC", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Create a figure and axis\n", + "fig, ax = plt.subplots(figsize=(8,6))\n", + "\n", + "# Create a boxplot for the desired column with custom colors\n", + "boxplot = ax.boxplot(df['temp'])\n", + "\n", + "# Set labels and title\n", + "ax.set_xlabel('Column')\n", + "ax.set_ylabel('Values')\n", + "ax.set_title('Boxplot')\n", + "\n", + "# Show the plot\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Color customization features\n", + "\n", + "With [matplotlib](https://python-graph-gallery.com/matplotlib/), you can change the **color of each element** in our box plot.\n", + "\n", + "We just have to define what color we want for each element and then **add it** to our plot using `setp()` function. Here's an example of how: " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "tags": [] + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAroAAAIhCAYAAAChXBmZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAmw0lEQVR4nO3df5SWdZ3/8dcIMg4C4w+QHzkBJihKmKK2QCVo4K9lM7dsQwUWa1O0InM185xSV6E00TZT89SKtqvlrmZulkn+QItMFDmuP7dcFEpGS5DhNwj39w+/znEEjUGGm/n4eJxzHbyv67qv6z384XmeD9d9T02lUqkEAAAKs0O1BwAAgLYgdAEAKJLQBQCgSEIXAIAiCV0AAIokdAEAKJLQBQCgSEIXAIAiCV0AAIokdAG2oRkzZqSmpqbF1qNHj4wcOTI/+9nPqj1ekqRfv36ZOHFiq9+3cuXKnH/++bnvvvu2+kwAW0LoAlTBddddl9/+9reZPXt2rr322nTo0CFjx47Nf//3f1d7tC22cuXKXHDBBUIX2G50rPYAAO9GgwcPzsEHH9z8+qijjsquu+6am266KWPHjq3iZADlsKILsB3Yaaed0qlTp+y4447N+xYvXpzJkyfnPe95Tzp16pS99tor5513XtasWZMkWb16dQ488MDsvffeWbp0afP7Ghsb06tXr4wcOTLr169PkkycODFdunTJE088kSOOOCI777xzevTokTPOOCMrV678q/MtWLAgJ510UvbYY4/U1tZm0KBBueyyy7Jhw4YkyXPPPZcePXokSS644ILmxzK25BEIgK3Fii5AFaxfvz6vvvpqKpVKXnzxxVx66aVZsWJFxo0bl+S1iB01alSeffbZXHDBBRkyZEgeeOCBTJs2LfPmzcsdd9yRnXbaKTfffHOGDh2aSZMm5ZZbbsmGDRty4oknplKp5KabbkqHDh2a77lu3bocc8wx+dznPpevfOUrmT17di666KI8//zzb/vIxJ///OcMHz48a9euzb/8y7+kX79++dnPfpazzjorzz77bK666qr07t07d955Z4466qiccsop+cxnPpMkzfELUA1CF6AK/uZv/qbF69ra2lx55ZU58sgjkyTXX399Hnvssdx888355Cc/mSQZPXp0unTpknPOOSczZ87M6NGjM2DAgHz/+9/Ppz71qXz729/O4sWLc9999+XOO+9M7969W9xj7dq1+fKXv5wvfOELzdfbcccdc9555+U3v/lNRowYsclZp0+fnj/96U/53e9+l0MPPTRJcuSRR2b9+vW55pprMmXKlAwcODBDhw5Nkuy5554b/XwA1eDRBYAquOGGGzJnzpzMmTMnv/jFLzJhwoScfvrpufLKK5Mk99xzT3beeed84hOfaPG+1x8FuPvuu5v3nXDCCTnttNPyz//8z7nooovy1a9+NaNHj97kfU888cQWr19fQb733nvfctZ77rkn++23X3PkvnGWSqWSe+65Z/N+aIBtzIouQBUMGjRoow+jPf/88zn77LNz0kkn5eWXX06vXr1SU1PT4n177LFHOnbsmJdffrnF/kmTJuXqq69Op06dmlds36xjx47ZfffdW+zr1atXkmx0vTd6+eWX069fv4329+nT56++F6CarOgCbCeGDBmSVatW5X//93+z++6758UXX0ylUmlxzksvvZRXX3013bt3b963YsWKnHzyyRk4cGDq6uqan499s1dffXWjKG1sbEySjQL4jXbfffcsWrRoo/0vvPBCkrSYBWB7InQBthPz5s1L8toHuI444ogsX748t912W4tzbrjhhiTJEUcc0bzv1FNPzYIFC3LrrbfmBz/4QW6//fZcfvnlm7zHf/zHf7R4feONNyZJRo4c+ZZzHXHEEXnyySczd+7cjWapqanJqFGjkrz2nHGSrFq16u1/UIBtxKMLAFXw+OOP59VXX03y2j/933rrrZk5c2Y+/vGPp3///hk/fny++93vZsKECXnuuefy/ve/P7/+9a8zderUHHPMMfnoRz+aJPn+97+ff//3f891112X/fffP/vvv3/OOOOMnHPOORkxYkSL52o7deqUyy67LMuXL88hhxzS/K0LRx99dD70oQ+95axf+tKXcsMNN+TYY4/NhRdemL59++aOO+7IVVddldNOOy0DBw5MknTt2jV9+/bNT3/60xxxxBHZbbfd0r17900+9gCwTVQA2Gauu+66SpIWW319feUDH/hAZfr06ZXVq1c3n/vyyy9XTj311Erv3r0rHTt2rPTt27dy7rnnNp/z2GOPVerq6ioTJkxocY/Vq1dXhg4dWunXr19lyZIllUqlUpkwYUJl5513rjz22GOVkSNHVurq6iq77bZb5bTTTqssX768xfv79u270TWff/75yrhx4yq77757Zccdd6zss88+lUsvvbSyfv36Fuf96le/qhx44IGV2traSpKNrgOwLdVUKm96AAyA4kycODH/9V//leXLl1d7FIBtxjO6AAAUSegCAFAkjy4AAFAkK7oAABRJ6AIAUCShCwBAkfzCiDfZsGFDXnjhhXTt2nWj3zEPAED1VSqVLFu2LH369MkOO7z1uq3QfZMXXnghDQ0N1R4DAIC/YuHChdlzzz3f8rjQfZOuXbsmee0vrlu3blWeBgCAN2tqakpDQ0Nzt70Vofsmrz+u0K1bN6ELALAd+2uPmfowGgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARepY7QEA3vU2rEzWPt1ml1+1OnluftKvf1K3UxvdpNO+yQ6d2+jiAFtG6AJU29qnk+eGttnl65IMqkvS2Ga3SPo9kux0UBveAKD1hC5AtXXa97VQbCNPPZWceFLyH/+eDBrURjfptG8bXRhgywldgGrboXObroauqiSPPvnan2mrRxcAtkM+jAYAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAA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6urrU1NRkypQpmTp1agYMGJABAwZk6tSp6dy5c8aNG1fl6QEA2NbaTeheffXVSZKRI0e22H/ddddl4sSJSZKzzz47q1atyuTJk7NkyZJ88IMfzF133ZWuXbtu42kBAKi2dvs9um3F9+gCpfE9ukBpiv8eXQAAeDtCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEjt5lcAA1TbynXrs2b9hmqP0WpNa5JkxzStWZclq6s9TevUdtghnXfsUO0xgHZK6AJshpXr1ueu+S9lQzv8pen/t6hjkh55eNErWbzbq9Uep1V2qEnG9N9D7AJbxKMLAJthzfoN7TJyk+Q9e72aS2/5c96zV/uK3CTZUEm7XEUHtg9WdAEKV1uX7LV/+4tcgHfKii4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRhC4AAEUSugAAFEnoAgBQJKELAECRWh26CxcuzB//+Mfm1w899FCmTJmSa6+9dqsOBgAA70SrQ3fcuHG59957kySNjY0ZPXp0HnrooXz1q1/NhRdeuNUHBACALdHq0H388cdz6KGHJkluvvnmDB48OLNnz86NN96YGTNmbO35AABgi7Q6dNetW5fa2tokya9+9av83d/9XZJk3333zaJFi7budAAAsIVaHbr7779/rrnmmjzwwAOZOXNmjjrqqCTJCy+8kN13332rDwgAAFui1aH7zW9+M9/73vcycuTIfPrTn84BBxyQJLn99tubH2kAAIBq69jaN4wcOTJ/+ctf0tTUlF133bV5/z/90z+lc+fOW3U4AADYUlv0PbqVSiWPPPJIvve972XZsmVJkk6dOgldAAC2G61e0X3++edz1FFHZcGCBVmzZk1Gjx6drl275pJLLsnq1atzzTXXtMWcAADQKq1e0f3iF7+Ygw8+OEuWLEldXV3z/o9//OO5++67t+pwAACwpVq9ovvrX/86v/nNb9KpU6cW+/v27Zs//elPW20wAAB4J1q9orthw4asX79+o/1//OMf07Vr160yFAAAvFOtDt3Ro0fniiuuaH5dU1OT5cuX5+tf/3qOOeaYrTkbAABssVY/unD55Zdn1KhR2W+//bJ69eqMGzcuv//979O9e/fcdNNNbTEjAAC0WqtDt0+fPpk3b15uuummzJ07Nxs2bMgpp5ySE088scWH0wAAoJpaHbpJUldXl0mTJmXSpElbex4AANgqWh26N9xww9seHz9+/BYPAwAAW0urQ/eLX/xii9fr1q3LypUrm38zmtAFAGB70OpvXViyZEmLbfny5XnmmWfyoQ99yIfRAADYbrQ6dDdlwIAB+cY3vrHRai8AAFTLVgndJOnQoUNeeOGFrXU5AAB4R1r9jO7tt9/e4nWlUsmiRYty5ZVXZsSIEVttMIDtysqV2eWJx6o9xbtTj79Jdqqv9hRAO9Tq0D3uuONavK6pqUmPHj1y+OGH57LLLttacwFsVzo880wO//ujqj3Gu1LT7N8lww6t9hhAO9Tq0N2wYUNbzAGwXVu/zz6555Y7qz3Gu9KB++xT7RGAdmqLfmEEwLtO5855Zf8h1Z7i3alz52pPALRTmxW6Z5555mZfcPr06Vs8DAAAbC2bFbqPPvroZl2spqbmHQ0DAABby2aF7r333tvWcwAAwFa11b5Hd1u4//77M3bs2PTp0yc1NTW57bbbWhyvVCo5//zz06dPn9TV1WXkyJF54oknqjMsAABVtUUfRpszZ07+8z//MwsWLMjatWtbHLv11lu3ymCbsmLFihxwwAH5x3/8x/z93//9RscvueSSTJ8+PTNmzMjAgQNz0UUXZfTo0XnmmWfStWvXNpsLAIDtT6tXdH/0ox9lxIgRefLJJ/OTn/wk69aty5NPPpl77rkn9fVt+4XeRx99dC666KIcf/zxGx2rVCq54oorct555+X444/P4MGDc/3112flypW58cYb23QuAAC2P60O3alTp+byyy/Pz372s3Tq1Cnf/va389RTT+WEE07Ie9/73raYcbPMnz8/jY2NGTNmTPO+2traHHbYYZk9e/Zbvm/NmjVpampqsQEA0P61OnSfffbZHHvssUleC8kVK1akpqYmX/rSl3Lttddu9QE3V2NjY5KkZ8+eLfb37Nmz+dimTJs2LfX19c1bQ0NDm84JAMC20erQ3W233bJs2bIkyXve8548/vjjSZJXXnklK1eu3LrTbYE3f8VZpVJ52689O/fcc7N06dLmbeHChW09IgAA28Bmh+68efOSJB/+8Iczc+bMJMkJJ5yQL37xi/nsZz+bT3/60zniiCPaZMjN0atXryTZaPX2pZde2miV941qa2vTrVu3FhsAAO3fZofuQQcdlKFDh2bQoEH59Kc/neS11dCzzjorL774Yo4//vj84Ac/aLNB/5r+/funV69ezRGeJGvXrs2sWbMyfPjwqs0FAEB1bHbo/uY3v8lBBx2Ub33rW3nf+96Xk046KbNmzcrZZ5+d22+/PdOnT8+uu+7alrNm+fLlmTdvXvPq8vz58zNv3rwsWLAgNTU1mTJlSqZOnZqf/OQnefzxxzNx4sR07tw548aNa9O5AADY/tRUKpVKa96watWq3HzzzbnuuuvywAMPpF+/fpk0aVImTJiQPffcs63mTJLcd999GTVq1Eb7J0yYkBkzZqRSqeSCCy7I9773vSxZsiQf/OAH893vfjeDBw/e7Hs0NTWlvr4+S5cu9RgD0GzJ6nW59/m/VHuMd6VRfbtn1512rPYYwHZkc3ut1aH7Rs8++2yuu+663HDDDVm0aFFGjx6dn//851t6ue2C0AU2RehWj9AF3mxze+0d/Qrg973vffnKV76S8847L926dcsvf/nLd3I5AADYarboVwAnyaxZs/Jv//ZvueWWW9KhQ4eccMIJOeWUU7bmbAAAsMVaFboLFy7MjBkzMmPGjMyfPz/Dhw/Pd77znZxwwgnZeeed22pGAABotc0O3dGjR+fee+9Njx49Mn78+EyaNCn77LNPW84GAABbbLNDt66uLrfcckv+9m//Nh06dGjLmQAA4B3b7NC9/fbb23IOAADYqt7Rty4AAMD2SugCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AA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gldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEjtJnQvvvjiDB8+PJ07d84uu+yyyXMWLFiQsWPHZuedd0737t3zhS98IWvXrt22gwIAsF3oWO0BNtfatWvzyU9+MsOGDcsPfvCDjY6vX78+xx57bHr06JFf//rXefnllzNhwoRUKpV85zvfqcLEAABUU7sJ3QsuuCBJMmPGjE0ev+uuu/Lkk09m4cKF6dOnT5Lksssuy8SJE3PxxRenW7du22pUAAC2A+3m0YW/5re//W0GDx7cHLlJcuSRR2bNmjV55JFH3vJ9a9asSVNTU4sNAID2r5jQbWxsTM+ePVvs23XXXdOpU6c0Nja+5fumTZuW+vr65q2hoaGtRwUAYBuoauief/75qampedvt4Ycf3uzr1dTUbLSvUqlscv/rzj333CxdurR5W7hw4Rb9LAAAbF+q+ozuGWeckX/4h39423P69eu3Wdfq1atXfve737XYt2TJkqxbt26jld43qq2tTW1t7WbdAwCA9qOqodu9e/d07959q1xr2LBhufjii7No0aL07t07yWsfUKutrc3QoUO3yj0AAGg/2s23LixYsCCLFy/OggULsn79+sybNy9Jsvfee6dLly4ZM2ZM9ttvv5x88sm59NJLs3jx4px11ln57Gc/6xsXAADehdpN6H7ta1/L9ddf3/z6wAMPTJLce++9GTlyZDp06JA77rgjkydPzogRI1JXV5dx48blW9/6VrVGBgCgimoqlUql2kNsT5qamlJfX5+lS5daCQaKMHduMnRo8sgjyUEHVXsagHduc3utmK8XAwCANxK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUqWO1BwB419uwMln7dJtdvq4mOXC/1/7M6ja6Sad9kx06t9HFAbaM0AWotrVPJ88NbbPLD6pL5t7y/18810Y36fdIstNBbXRxgC0jdAGqrdO+r4ViG1m1OnluftKvf1K3UxvdpNO+bXRhgC0ndAGqbYfObboaWrdTMujANrs8wHbLh9EAACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBAChSx2oPsL2pVCpJkqampipPAgDAprzeaa9321sRum+ybNmyJElDQ0OVJwEA4O0sW7Ys9fX1b3m8pvLXUvhdZsOGDXnhhRfStWvX1NTUVHscgHesqakpDQ0NWbhwYbp161btcQDesUqlkmXLlqVPnz7ZYYe3fhJX6AIUrqmpKfX19Vm6dKnQBd5VfBgNAIAiCV0AAIokdAEKV1tbm69//eupra2t9igA25RndAEAKJIVXQAAiiR0AQAoktAFAKBIQhcAgCIJXYBC3X///Rk7dmz69OmTmpqa3HbbbdUeCWCbEroAhVqxYkUOOOCAXHnlldUeBaAqOlZ7AADaxtFHH52jjz662mMAVI0VXQAAiiR0AQAoktAFAKBIQhcAgCIJXQAAiuRbFwAKtXz58vzhD39ofj1//vzMmzcvu+22W9773vdWcTKAbaOmUqlUqj0EAFvffffdl1GjRm20f8KECZkxY8a2HwhgGxO6AAAUyTO6AAAUSegCAFAkoQsAQJGELgAARRK6AAAUSegCAFAkoQsAQJGELgAARRK6AAU4//zz84EPfKDaYwBsV4QuwHagsbExn//857PXXnultrY2DQ0NGTt2bO6+++5qjwbQbnWs9gAA73bPPfdcRowYkV122SWXXHJJhgwZknXr1uWXv/xlTj/99Dz99NPVHhGgXbKiC1BlkydPTk1NTR566KF84hOfyMCBA7P//vvnzDPPzIMPPpgkWbBgQT72sY+lS5cu6datW0444YS8+OKLb3nNkSNHZsqUKS32HXfccZk4cWLz6379+uWiiy7K+PHj06VLl/Tt2zc//elP8+c//7n5Xu9///vz8MMPN79nxowZ2WWXXfLLX/4ygwYNSpcuXXLUUUdl0aJFW/XvBGBrELoAVbR48eLceeedOf3007PzzjtvdHyXXXZJpVLJcccdl8WLF2fWrFmZOXNmnn322XzqU596x/e//PLLM2LEiDz66KM59thjc/LJJ2f8+PE56aSTMnfu3Oy9994ZP358KpVK83tWrlyZb33rW/nhD3+Y+++/PwsWLMhZZ531jmcB2No8ugBQRX/4wx9SqVSy7777vuU5v/rVr/LYY49l/vz5aWhoSJL88Ic/zP777585c+bkkEMO2eL7H3PMMfnc5z6XJPna176Wq6++Ooccckg++clPJknOOeecDBs2LC+++GJ69eqVJFm3bl2uueaavO9970uSnHHGGbnwwgu3eAaAtmJFF6CKXl8prampectznnrqqTQ0NDRHbpLst99+2WWXXfLUU0+9o/sPGTKk+b979uyZJHn/+9+/0b6XXnqpeV/nzp2bIzdJevfu3eI4wPZC6AJU0YABA1JTU/O2wVqpVDYZwm+1P0l22GGHFo8bJK+txL7Zjjvu2Pzfr19rU/s2bNiwyfe8fs6b7wWwPRC6AFW022675cgjj8x3v/vdrFixYqPjr7zySvbbb78sWLAgCxcubN7/5JNPZunSpRk0aNAmr9ujR48WHxBbv359Hn/88a3/AwBsx4QuQJVdddVVWb9+fQ499NDccsst+f3vf5+nnnoq//qv/5phw4blox/9aIYMGZITTzwxc+fOzUMPPZTx48fnsMMOy8EHH7zJax5++OG54447cscdd+Tpp5/O5MmT88orr2zbHwygyoQuQJX1798/c+fOzahRo/LlL385gwcPzujRo3P33Xfn6quvTk1NTW677bbsuuuu+chHPpKPfvSj2WuvvfLjH//4La85adKkTJgwoTmI+/fvn1GjRm3Dnwqg+moqHqwCAKBAVnQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIgldAACKJHQBACiS0AUAoEhCFwCAIv0/zvhmUNYR5cUAAAAASUVORK5CYII=", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Create a figure and axis\n", + "fig, ax = plt.subplots(figsize=(8,6))\n", + "\n", + "# Create a boxplot for the desired column with custom colors\n", + "boxplot = ax.boxplot(df['temp'], patch_artist=True)\n", + "\n", + "# Set custom colors\n", + "box_color = 'lightblue'\n", + "whisker_color = 'blue'\n", + "cap_color = 'gold'\n", + "flier_color = 'red'\n", + "median_color = 'red'\n", + "\n", + "# Add the right color for each part of the box\n", + "plt.setp(boxplot['boxes'], color=box_color)\n", + "plt.setp(boxplot['whiskers'], color=whisker_color)\n", + "plt.setp(boxplot['caps'], color=cap_color)\n", + "plt.setp(boxplot['fliers'], markerfacecolor=flier_color)\n", + "plt.setp(boxplot['medians'], color=median_color)\n", + "\n", + "# Set labels and title\n", + "ax.set_xlabel('Column')\n", + "ax.set_ylabel('Values')\n", + "ax.set_title('Boxplot')\n", + "\n", + "# Show the plot\n", + "plt.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Going further\n", + "\n", + "This post explains how to create a simple boxplot with [matplotlib](https://python-graph-gallery.com/matplotlib/).\n", + "\n", + "For more examples of **how to create or customize** your boxplots, see the [boxplot section](https://python-graph-gallery.com/boxplot/). You may also be interested in how to created an [boxplot with multiple groups](https://python-graph-gallery.com/30-basic-boxplot-with-seaborn/)." + ] + } + ], + "metadata": { + "chartType": "boxplot", + "description": "A [boxplot](https://python-graph-gallery.com/boxplot/) is a graphical representation used to display the distribution of a dataset, showing key statistics such as the median, quartiles, and potential outliers. It provides a concise summary of the data's central tendency and spread.
Creating boxplots with [Matplotlib](https://python-graph-gallery.com/matplotlib/) allows us to effectively visualize the distribution of data points. In this post, we will explore how to use [Matplotlib](https://python-graph-gallery.com/matplotlib/) to customize boxplots, creating visually informative representations of data distribution while exploring available customization options.", + "family": "distribution", + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "keywords": "boxplot, plot, chart, matplotlib, box", + "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.9.13" + }, + "seoDescription": "How to create a boxplot with matplotlib in python", + "slug": "533-introduction-boxplots-matplotlib", + "title": "Introduction to boxplots with matplotlib" + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/src/pages/boxplot.js b/src/pages/boxplot.js index bdea0c672a..158247b703 100644 --- a/src/pages/boxplot.js +++ b/src/pages/boxplot.js @@ -202,6 +202,11 @@ export default function Boxplot() { finest customization:

+