407 lines
61 KiB
Plaintext
407 lines
61 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import pandas as pd\n",
|
||
|
"from opytex import texenv\n",
|
||
|
"%matplotlib inline\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"import numpy as np\n",
|
||
|
"plt.style.use(\"seaborn-notebook\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import pymath as pm"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Création de graphiques pour les 5e passerelles"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Visite de villages"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 89,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[48, 15, 36, 43, 25]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 89,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"ds = pm.Dataset.random(5, distrib=\"randint\", rd_args=(10, 50))\n",
|
||
|
"ds"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 90,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"villes = [\"Chiconi\", \"Sada\", \"Kaweni\", \"Dzaoudzi\", \"Bandrele\"]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 91,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"ind = np.arange(5)\n",
|
||
|
"width = 0.5"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 92,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# Set the font dictionaries (for plot title and axis titles)\n",
|
||
|
"title_font = {'fontname':'Droid Sans Mono Slashed for Powerline', 'size':'20', 'color':'black', 'weight':'normal',\n",
|
||
|
" 'verticalalignment':'bottom'} # Bottom vertical alignment for more space\n",
|
||
|
"axis_font = {'fontname':'Droid Sans Mono Slashed for Powerline', 'size':'16', 'color':'black', 'weight':'normal'}"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 93,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAgQAAAFyCAYAAACKkcLXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcHFW5//HPlwSQTQgBAogCRmbAjeUni2siKKIoiopX\no4C4XEUBcQXRmwyoCHqJV0e8i2wRQUEEkcsOAVmusqOsGYkJyJIQhhDAEAyT5/fHqSGdTvdM10xN\nV/fM9/169au6qk6ffrqquuvpU6eqFBGYmZnZ2LZG2QGYmZlZ+ZwQmJmZmRMCMzMzc0JgZmZmOCEw\nMzMznBCYmZkZTgjMcpN0jqTHJW3ZjvW3MklTJK2QNL3sWMzGGicENqZI6sp2OJ8eoMwRWZlj6xTZ\nAtg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rLDEh2Ba4gHSIYDxwVkScIGlj\n4Fzg5cBDwAER8dQgdTkhMDOzsWT0JARFckJgZmZjTOEJQdlnGZiZmVkLcEJgZmZmTgjMzMzMCYGZ\nmZnhhMDMzMwo/0qFhenp6Sk7hGGbPHky48aNKzsMMzMbg0ZNQtDZWXYEwzWPOXOgo6Oj7EDMzGwM\nGjUJAXhHamZmNlTuQ2BmZmaNJwSSVisraX1JO0t6SbFhmZmZWTPlaSE4WdJJ/SOSXgfMA24D5mfj\nZmZm1obyJATvBOZWjP8EuB/YCbgdOL7AuMzMzKyJ8nQq3BK4D0DSa4EpwC4R8RdJJwOnjUB8ZmZm\n1gR5WgieAfr7CnwB+GNE3JmNPwu8tMjAzMzMrHnytBBcB3xb0uuBQ4CDKuZtCywqMjAzMzNrnjwt\nBF8jJRDfAn4eEb+pmPde4IYiAzMzM7PmabiFICIeBHavM/sI0iEFMzMza0OFXJgoIh6NiCElBJLW\nkHSHpN9n42dI+ls27fb
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7fca864db9b0>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fig, ax = plt.subplots()\n",
|
||
|
"bar = ax.bar(ind, ds, width) \n",
|
||
|
"\n",
|
||
|
"ax.set_title('Visites des 5e', **title_font)\n",
|
||
|
"\n",
|
||
|
"ax.set_ylabel('Nombre de visiteurs', **axis_font)\n",
|
||
|
"ax.set_yticks(np.arange(0, 61, 5))\n",
|
||
|
"ax.set_xticks(ind + width/2)\n",
|
||
|
"ax.set_xticklabels(villes, **axis_font)\n",
|
||
|
"\n",
|
||
|
"ax.yaxis.grid(True)\n",
|
||
|
"\n",
|
||
|
"ax.spines['right'].set_visible(False)\n",
|
||
|
"ax.spines['top'].set_visible(False)\n",
|
||
|
"\n",
|
||
|
"ax.yaxis.set_ticks_position('left')\n",
|
||
|
"ax.xaxis.set_ticks_position('bottom')\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"fig.savefig(\"./graph1.pdf\")\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"source": [
|
||
|
"## Sortie en mer"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 94,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[6, 17, 15, 26, 12]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 94,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"ds = pm.Dataset.random(5, distrib=\"randint\", rd_args=(5, 30))\n",
|
||
|
"ds"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 117,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"obs = [\"Boutielles\", \"Poisson \\n Clown\", \"Poisson \\n Soldat\", \"Corail \\n Branche\", \"Corail \\n Mou\"]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 109,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"ind = np.arange(5)\n",
|
||
|
"width = 0.7"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 118,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# Set the font dictionaries (for plot title and axis titles)\n",
|
||
|
"title_font = {'fontname':'Droid Sans Mono Slashed for Powerline', 'size':'20', 'color':'black', 'weight':'normal',\n",
|
||
|
" 'verticalalignment':'bottom'} # Bottom vertical alignment for more space\n",
|
||
|
"axis_font = {'fontname':'Droid Sans Mono Slashed for Powerline', 'size':'14', 'color':'black', 'weight':'normal'}"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 119,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfQAAAEtCAYAAAD+55JtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcXFWZ//HPl0SUPUwAURi2YAAhbCOgMhJWA4wI7sqo\niAuOoPCTEUVgCM6MgCCCtIMMKoiOLTrIoCIqRAKKbCJEwxoIIBBkCwlhSZAkz++Pc7pzU6nurupU\n171V/X2/XvWqOnc596lzq+rUXR9FBGZmZtbZVik7ADMzM1t57tDNzMy6gDt0MzOzLuAO3czMrAu4\nQzczM+sC7tDNzMy6gDt0qzxJp0haKmmPsmPpRpJ+JOlJSa8tOxYzGz536FYaSR+W9HtJz0p6TtIf\nJH28zqSRHzYEScdImt7kbK8B1gJeNQIhmVmbuEO3UkjqAb4L/D3wHaAHWBW4QNIFJYbW6SbT/J+f\n/YCNI+KBEYjHzNpkbNkB2OgjaS/gKGAmsHtEPJ+HnwT8H/AxST+LiCtKDLPjSFoFeAupXRsWES8B\nL41IUGbWNt5CtzJ8krQVeXxfZw4QEUuBYwEBn6kz3xhJJ0l6QNJCSfdIqjcd0L9L//p8fPjFPN9l\nkt4+wPT7SfqNpPl5+tslHSVJdaY9LB/X31bS9pKulDRP0guS/izpTXm6tfrqGiTOuyQtkLRaYdgO\nks6R9Kd8SOJFSXdKmipp1Zr5PyTpGmAuMB7YM8fW91hSZ5kfG2qaOvO8L7fngnyI5Hf12rJwzsM4\nScfm9bRQ0n2SeiStM0D9Ta2vZjW6focbf4M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mTp9qZmbWBSq3y93MzMxayB26\nmZlZF3CHbmZm1gXcoZu
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7fca8681f518>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fig, ax = plt.subplots(figsize = (8,4))\n",
|
||
|
"ax.bar(ind, ds, width, color=\"lightgray\")\n",
|
||
|
"\n",
|
||
|
"ax.set_title('Observations en mer', **title_font)\n",
|
||
|
"\n",
|
||
|
"ax.set_ylabel('Quantité', **axis_font)\n",
|
||
|
"ax.set_yticks(np.arange(0, 31, 2))\n",
|
||
|
"ax.set_xticks(ind + width/2)\n",
|
||
|
"ax.set_xlim(0, 4.8)\n",
|
||
|
"ax.set_xticklabels(obs, **axis_font)\n",
|
||
|
"\n",
|
||
|
"ax.yaxis.grid(True)\n",
|
||
|
"\n",
|
||
|
"ax.spines['right'].set_visible(False)\n",
|
||
|
"ax.spines['top'].set_visible(False)\n",
|
||
|
"\n",
|
||
|
"ax.yaxis.set_ticks_position('left')\n",
|
||
|
"ax.xaxis.set_ticks_position('bottom')\n",
|
||
|
"\n",
|
||
|
"\n",
|
||
|
"#fig.savefig(\"./fig/graph_poisson.pdf\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"source": [
|
||
|
"## Olympiades de math"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 23,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[4, 5, 18, 16, 30, 24, 19]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 23,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"ds = pm.Dataset.random(7, distrib=\"randint\", rd_args=(2, 30))\n",
|
||
|
"ds"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 28,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"villes = [\"Sada\", \"Majicavo\", \"Kaweni1\", \"Chiconi\", \"Bandrélé\", \"Bouéni\", \"Pamandzi\"]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 29,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"ind = np.arange(7)\n",
|
||
|
"width = 0.7"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 30,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# Set the font dictionaries (for plot title and axis titles)\n",
|
||
|
"title_font = {'fontname':'Droid Sans Mono Slashed for Powerline', 'size':'20', 'color':'black', 'weight':'normal',\n",
|
||
|
" 'verticalalignment':'bottom'} # Bottom vertical alignment for more space\n",
|
||
|
"axis_font = {'fontname':'Droid Sans Mono Slashed for Powerline', 'size':'14', 'color':'black', 'weight':'normal'}"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 31,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAfgAAAEcCAYAAAAr/abrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYHFW9//H3h0QBWQwG2RLWYFhkV0BRCIIIoohylZ+i\ngICioriguIACLhcQL6CMohcVxGU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9VCfIemXpMeJ1iRdBW1Hurp5ovC1u3Jz9U3Ag6Ty3DN/\n5+iyBVbLMOW/VdcAy5MOyvWa6Jv6var8gtTkfZmki0jrPSEiPl41X6OOYsNdPh1d32b3l0G2n/tZ\nulPkRaQWtjdLuozUE36dnO/LC8smp99V+8uYMtLP6fmv9T/gANLLLx4n3bO+DjioxnyVZ3UXNvg7\nps4yXkI6AC0E9qyT9kJSpVwZdy/w58LwWcALheHKc7S7kV7CMYfU8/hW4MPtyD/watLz/vNJHXsu\nJDUf7pLnX6fGcj5Gaq5cANxH6uW8Kunq5ks15t8S+DnpALQg/78C+CxVzzmTXtrx15yX/5BeAvNn\n4B1t3B46lv8m83EPA5+bfgD4W9XvX/0cfNO/V2H7/B9Sf5MFpI50F1bN09Rz282UTyvb/zCsb0v7\nO+ntl3eQ9sW7SW/FfFtOq3r/WoPU2fY+0tX5LaSr/a2GUp7Dub+MhT/lwjSrS9IdpDPoSVF4fncI\n6R1LegzmDRFxxVDTM7POkLQPqVXhuIj4ykjnx5rje/DWkKTXkHrln92Oyt3MRpV2xCWwEeIK3upS\nemD5y6QmsiF32jMzs+HjTna2FEmnkDrAvQHYgXT/7cGRzZWZmTXDFbzVsg/pZRJzgc9FxP+McH7M\nbOQEQ3vttY2QYe9kJ2l
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7efcd85736a0>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"fig, ax = plt.subplots(figsize = (8,4))\n",
|
||
|
"ax.bar(ind, ds, width, color=\"lightgray\")\n",
|
||
|
"\n",
|
||
|
"ax.set_title('Olympiades de Mathématiques', **title_font)\n",
|
||
|
"\n",
|
||
|
"ax.set_ylabel('Nombre de médailles', **axis_font)\n",
|
||
|
"ax.set_yticks(np.arange(0, max(ds)+2, 2))\n",
|
||
|
"ax.set_xticks(ind + width/2)\n",
|
||
|
"ax.set_xlim(0, 6.8)\n",
|
||
|
"ax.set_xticklabels(villes, **axis_font)\n",
|
||
|
"\n",
|
||
|
"ax.yaxis.grid(True)\n",
|
||
|
"\n",
|
||
|
"ax.spines['right'].set_visible(False)\n",
|
||
|
"ax.spines['top'].set_visible(False)\n",
|
||
|
"\n",
|
||
|
"ax.yaxis.set_ticks_position('left')\n",
|
||
|
"ax.xaxis.set_ticks_position('bottom')\n",
|
||
|
"\n",
|
||
|
"fig.savefig(\"./fig/graph_medailles.pdf\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"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.5.1"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 0
|
||
|
}
|