From 86d06a87caa84496b90cf96b0b125eed7d02340b Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Sat, 22 May 2021 10:55:53 +0200 Subject: [PATCH] fig7 --- figure_7/figure_7.ipynb | 51 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/figure_7/figure_7.ipynb b/figure_7/figure_7.ipynb index 4a799012..f2218dd3 100644 --- a/figure_7/figure_7.ipynb +++ b/figure_7/figure_7.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -27,7 +27,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -43,8 +43,7 @@ " else:\n", " return \"Monitoring\"\n", "\n", - "def categorical_plot(df, key, title, sorted_xs = None):\n", - " \n", + "def categorical_plot(df, key, title, sorted_xs = None): \n", " if sorted_xs == None:\n", " xs = set()\n", " lines = []\n", @@ -87,7 +86,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -413,6 +412,29 @@ "needs_background": "light" }, "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " term priority count\n", + "0 4 0-1 18\n", + "1 4 2-4 38\n", + "2 4 5-8 20\n", + "3 4 9-11 28\n", + "4 5 0-1 0\n", + "5 5 2-4 4\n", + "6 5 5-8 21\n", + "7 5 9-11 78\n", + "8 6 0-1 0\n", + "9 6 2-4 7\n", + "10 6 5-8 25\n", + "11 6 9-11 65\n", + "12 7 0-1 0\n", + "13 7 2-4 4\n", + "14 7 5-8 17\n", + "15 7 9-11 90\n" + ] } ], "source": [ @@ -485,6 +507,23 @@ "categorical_plot(dfbtot, \"exectime\", \"2019 data\", xs)\n", "\n", "categorical_plot(dfctot, \"n_exec\", \"2019 data\")\n", + "\n", + "\n", + "dfa11 = {'term': [4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7],\n", + " 'priority': [\"0-1\", \"2-4\", \"5-8\", \"9-11\"] * 4,\n", + " 'count': [18, 38, 20, 28, 0, 4, 21, 78, 0, 7, 25, 65, 0, 4, 17, 90]}\n", + "dfa11 = pd.DataFrame(data=dfa11, columns=dfa11.keys())\n", + "\n", + "dfc11 = {'term': [4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7],\n", + " 'n_exec': [\"0\", \"1\", \"2-3\", \"4-5\", \"6-7\", \"8-9\", \"10-11\", \"12-13\", \">=14\"] * 4,\n", + " 'count': [45,12,27,18,20,16,20,45,10,17,18,55,7,24,20,52,6,25,16,51,6,25,18,50,5,26,20,49,5,25,]}\n", + "dfc11 = pd.DataFrame(data=dfa11, columns=dfa11.keys())\n", + "\n", + "dfb11 = {'term': [4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7],\n", + " 'exectime': [\"<1\", \"1-2\", \"2-4\", \"4-10\", \"10-60\", \"60-1d\", \">=1d\"] * 4,\n", + " 'count': [18, 38, 20, 28, 0, 4, 21, 78, 0, 7, 25, 65, 0, 4, 17, 90]}\n", + "dfb11 = pd.DataFrame(data=dfa11, columns=dfa11.keys())\n", + "print(dfa11)\n", "\n" ] },