Commit 8f7dc86d authored by Aitor Perez's avatar Aitor Perez

final version

parent 3ade434b
......@@ -186,13 +186,13 @@ A / C # Elementwise division
np.dot(A, B) # Matrix product
# And lots of other built-in functions!
# %% Slide: Matplotlib
# %% Slide: Matplotlib I
import numpy as np
import matplotlib.pyplot as plt
# Import the packages
x = np.arange(0, 3 * np.pi, 0.1)
x = np.linspace(0, 3*np.pi, num=100)
sinx = np.sin(x)
cosx = np.cos(x)
# We generate the data we want to visualize
......@@ -206,6 +206,17 @@ plt.legend(['sin(x)', 'cos(x)']) # Adds a legend
plt.show() # Actually shows the plot
# %% Slide: Matplotlib II
import numpy as np
import matplotlib.pyplot as plt
# Import the packages
x = np.linspace(0, 3*np.pi, num=100)
sinx = np.sin(x)
cosx = np.cos(x)
# We generate the data we want to visualize
# We can also display several plots at once:
plt.subplot(2, 1, 1) # 2x1 grid, select the first as active
plt.plot(x, sinx)
......
presentation/img/code-numpy2.png

159 KB | W: | H:

presentation/img/code-numpy2.png

157 KB | W: | H:

presentation/img/code-numpy2.png
presentation/img/code-numpy2.png
presentation/img/code-numpy2.png
presentation/img/code-numpy2.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
......@@ -163,7 +163,7 @@
\begin{frame}{Basic variables types and operations}
% \pythonCode
Slide codes at:
\href{https://gitlab.unige.ch/Thibaut.Lunet/python-math/tree/master/examples/code-examples}{python-math/examples/code-examples.py}
\href{https://gitlab.unige.ch/Thibaut.Lunet/python-math/tree/master/examples/code-examples.py}{python-math/examples/code-examples.py}
\vspace*{5pt}
\includegraphics[width=0.9\linewidth]{code-basic-variables}
......@@ -349,8 +349,8 @@
\begin{block}{Scipy examples :}
\begin{itemize}
\item Block matrix computation with non-commutative elements
\item Compute interpolation formula for non-structured grid
\item Latex translation of symbolic formula
\item Compute general midpoint interpolation formula
\item Find solutions for differential equations
\end{itemize}
\end{block}
\vspace*{-7pt}
......
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