Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
6870d61c58e6946ec72c57da6f214d2e
mooc-rr
Commits
96558d04
Commit
96558d04
authored
Jan 17, 2021
by
6870d61c58e6946ec72c57da6f214d2e
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ouverture du journal, deux journées avec quelques infos sur python
parent
5ef144fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
3 deletions
+75
-3
exercice.ipynb
module2/exo4/exercice.ipynb
+75
-3
No files found.
module2/exo4/exercice.ipynb
View file @
96558d04
{
{
"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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment