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

90 lines
14 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"import pandas as pd\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"x = np.array([500, 1000, 5000, 10000, 25000, 50000, 75000, 100000])\n",
"y_tmp = np.array([34933, 18122, 3916, 2125, 940, 533, 366, 269])\n",
"y = y_tmp/720 # Dividing by 60 (results in minutes) x 12 (number of threads)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# Convert to pandas dataframe\n",
"d = {'x' : x, 'y' :y}\n",
"data = pd.DataFrame(d)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEMCAYAAAA1VZrrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAkcklEQVR4nO3de3QU5f0/8PfM5rq5kOyy7C4BRVExll+5JF5PrQWEICyBWio0B9RyO8rB4lHsQYEEpRQDlhYPIFARvypHvuIFmohQa+y3R4QWFPREkCgiDeTKJoHcQ3ae3x+bLAm57Cwws8nO+3XKMZlnZ+bz2Mg7z8wzz0hCCAEiIqJuyMEugIiIej6GBRER+cWwICIivxgWRETkF8OCiIj8YlgQEZFfYXqdaPTo0YiIiEBkZCQAYNGiRbj33ntx9OhRZGZmorGxEUlJSVizZg2sVqteZRERkQqSXs9ZjB49Gps2bcItt9zi26YoCtLS0rBq1SqkpqZi48aNKCwsxKpVqwI6dmVlLRRFfTes1li43TUBnSMUGLHf7LMxsM+Bk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ezmTyYTHHnssJFad5ciCiMi/KwoLANi/f79vUcHeivcsiIjUUXUZ6r777msXDPX19WhqakJWVpZmhenBJEtQhIAQotcHHxGRllSFxZo1a9p9Hx0djRtuuAGxsYE/39CTyLI3IBQhYGJYEBF1SVVY3HHHHVrXERSmlrDweARMV3xBjogo9KkKi6qqKrz22ms4fvw46urq2rVt375dk8L0ILeMJniTm4ioe6rC4umnn0Z
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# plot using lineplot\n",
"sns.set(style='darkgrid')\n",
"plot = sns.lineplot(x='x', y='y', data=data)\n",
"plot.set_xlabel(' value')\n",
"plot.set_ylabel('Time (minutes)')\n",
"plt.savefig('movies_time.png', dpi=300)\n"
]
}
],
"metadata": {
"interpreter": {
"hash": "31f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6"
},
"kernelspec": {
"display_name": "Python 3.9.7 64-bit",
"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.9.7"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}