Skip to content

Commit

Permalink
tutorials added
Browse files Browse the repository at this point in the history
  • Loading branch information
pryn-kb committed Oct 11, 2024
1 parent 5ddecec commit 92dcd8d
Show file tree
Hide file tree
Showing 164 changed files with 21,834 additions and 1,868 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified _build/.doctrees/_to_be_deleted_later/admonition_boxes.doctree
Binary file not shown.
Binary file modified _build/.doctrees/_to_be_deleted_later/intro_old.doctree
Binary file not shown.
Binary file modified _build/.doctrees/_to_be_deleted_later/markdown-notebooks.doctree
Binary file not shown.
Binary file modified _build/.doctrees/_to_be_deleted_later/markdown.doctree
Binary file not shown.
Binary file modified _build/.doctrees/_to_be_deleted_later/notebooks.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/01_data_types.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/02_variables_and_assignment.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/03_type_conversion.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/04_built-in_functions.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/05_lists.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/06_for_loops.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/07_conditionals.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/part1.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/101/part2.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/_test/2024_ods.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/_test/regex_and_frankenstein.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/dictionaries.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/dictionary_101.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/dictionary_pandas.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/help_and_documentation.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/interact.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/interact_original.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/jupyterlab.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/jupyterlab_1.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/jupyterlab_2.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/setup.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/howto/sign_up.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/intro.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/pandas/00_pandas_start.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/pandas/01_pandas_dataframe.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/pandas/02_Pandas_tabular_data.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/pandas/03_Pandas_subsets.doctree
Binary file not shown.
Binary file not shown.
Binary file modified _build/.doctrees/docs/pandas/05_pandas_plot.doctree
Binary file not shown.
Binary file modified _build/.doctrees/docs/pandas/getting_started.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added _build/.doctrees/docs/tutorials/numpy.doctree
Binary file not shown.
Binary file added _build/.doctrees/docs/tutorials/tutorials.doctree
Binary file not shown.
Binary file modified _build/.doctrees/environment.pickle
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
203 changes: 203 additions & 0 deletions _build/html/_sources/docs/tutorials/full_quick_start_guide.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Quick start guide\n",
"\n",
"This tutorial covers some basic usage patterns and best practices to help you get started with Matplotlib.\n",
"\n",
"Matplotlib is a versatile library for creating static, animated, and interactive visualizations in Python."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## A simple example\n",
"\n",
"Matplotlib graphs your data on [Figure](https://matplotlib.org/stable/api/figure_api.html#matplotlib.figure.Figure)s, each containing one or more [Axes](https://matplotlib.org/stable/api/axes_api.html#matplotlib.axes.Axes), where data is plotted."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots() # Create a figure containing a single Axes.\n",
"ax.plot([1, 2, 3, 4], [1, 4, 2, 3]) # Plot some data on the Axes.\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Parts of a Figure\n",
"\n",
"Here are the components of a Matplotlib Figure:\n",
"\n",
"- The **Figure** keeps track of all the child [Axes](https://matplotlib.org/stable/api/axes_api.html).\n",
"- An **Axes** is a region where data is plotted. Each `Axes` has an x-label, y-label, and title."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Types of inputs to plotting functions\n",
"\n",
"Matplotlib plotting functions expect `numpy.array` or objects that can be converted to `numpy.asarray`.\n",
"For example, to convert a `numpy.matrix`:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"b = np.matrix([[1, 2], [3, 4]])\n",
"b_asarray = np.asarray(b)\n",
"b_asarray"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Coding styles\n",
"\n",
"Matplotlib supports both the object-oriented (OO) style and the pyplot style.\n",
"See the [Matplotlib documentation](https://matplotlib.org/stable/tutorials/introductory/usage.html) for more details."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x = np.linspace(0, 2, 100)\n",
"fig, ax = plt.subplots()\n",
"ax.plot(x, x, label='linear')\n",
"ax.plot(x, x**2, label='quadratic')\n",
"ax.plot(x, x**3, label='cubic')\n",
"ax.set_xlabel('x label')\n",
"ax.set_ylabel('y label')\n",
"ax.set_title('Simple Plot')\n",
"ax.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x = np.linspace(0, 2, 100)\n",
"plt.figure()\n",
"plt.plot(x, x, label='linear')\n",
"plt.plot(x, x**2, label='quadratic')\n",
"plt.plot(x, x**3, label='cubic')\n",
"plt.xlabel('x label')\n",
"plt.ylabel('y label')\n",
"plt.title('Simple Plot')\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Styling Artists\n",
"\n",
"Most plotting methods have styling options for the Artists, accessible either when a plotting method is called or from a \"setter\" on the Artist."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
"x = np.arange(0, 10, 0.1)\n",
"y = np.sin(x)\n",
"ax.plot(x, y, color='blue', linewidth=2, linestyle='--')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Working with multiple Figures and Axes\n",
"\n",
"You can open multiple Figures with multiple calls to `fig = plt.figure()` or `fig, ax = plt.subplots()`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
"x = np.linspace(0, 2 * np.pi, 400)\n",
"y = np.sin(x ** 2)\n",
"ax.plot(x, y)\n",
"ax.set_title('Simple Sine Wave')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Using mathematical expressions in text\n",
"\n",
"Matplotlib accepts TeX equation expressions in any text expression. For example, to write the expression $\\sigma_i=15$ in the title:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
"ax.set_title(r'$\\sigma_i=15$')\n",
"ax.plot([1, 2, 3], [1, 4, 2])\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.x"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
1,266 changes: 1,266 additions & 0 deletions _build/html/_sources/docs/tutorials/matplotlib.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 92dcd8d

Please sign in to comment.