Ouverture du journal, deux journées avec quelques infos sur python

parent 5ef144fc
{ {
"cells": [], "cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Journal de bord"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 16/01/2021\n",
"\n",
"Pour ajouter des équations dans des cellules Markdown, mettre les éléments entre des `$ $`.\\\n",
"Par exemple:\\\n",
"`$\\pi$` → $\\pi$\\\n",
"`$X^2 + Y_2$` → $X^2 + Y_2$\n",
"\n",
"Pour plus de détails, voir le [wikibook sur LaTeX](https://en.wikibooks.org/wiki/LaTeX/Mathematics)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 17/01/2021\n",
"Pour la fonction histogramme plt.hist(), bins = permet de fixer le nombre de barres, pas la largeur de l'histogramme.\\\n",
"Une façon de contourner ça:\\\n",
"`\n",
"binwidth = 2\n",
"plt.hist(x, bins=np.arange(min(x), max(x) + binwidth, binwidth\n",
"`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Pour rajouter une grille sur un graphe :\\\n",
"`\n",
"plt.grid(b= True, which = 'major', axis = 'both', linestyle = '--')\n",
"`\\\n",
"'--' permet d'avoir des pointillés.\\\n",
"Pour plus de détails, voir [Matplotlib grid](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.grid.html)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Pour définir les titres des axes et du graphe:\\\n",
"`\n",
"plt.xlabel(\"Year\")\n",
"plt.ylabel(\"Salary\")\n",
"plt.title(\"Example of Histogram Plot\")\n",
"`\\\n",
"\n",
"`\n",
"plt.show()\n",
"` pour afficher le graphe (pas nécessaire dans un notebook).\n",
"\n",
"Pour définir les clouleurs des barres et de leur contour:\\\n",
"`plt.hist(x, color='b', edgecolor='black')`"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3",
...@@ -16,10 +89,9 @@ ...@@ -16,10 +89,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.3" "version": "3.6.4"
} }
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 2
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment