2014-12-09 14:32:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-12 16:08:29 +02:00
|
|
|
\begin{juliacode}
|
|
|
|
using PyPlot
|
2014-12-09 14:32:41 +01:00
|
|
|
x = linspace(0, 2π, 200)
|
|
|
|
plot(x, sin(x))
|
|
|
|
\end{juliacode}
|
2016-04-27 20:24:44 +02:00
|
|
|
\begin{juliaout}
|
|
|
|
1-element Array{Any,1}:
|
|
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe847179cd0>
|
|
|
|
\end{juliaout}
|
2016-04-12 16:08:29 +02:00
|
|
|
\begin{figure}[ht]
|
|
|
|
\center
|
|
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_sin_fun_1.pdf}
|
|
|
|
\caption{sin(x) function.}
|
|
|
|
\label{fig:sin_fun}
|
|
|
|
\end{figure}
|
2014-12-09 14:32:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-27 20:24:44 +02:00
|
|
|
\begin{juliaout}
|
|
|
|
1-element Array{Any,1}:
|
|
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe846fb2950>
|
|
|
|
\end{juliaout}
|
2016-04-12 16:08:29 +02:00
|
|
|
\begin{figure}[htpb]
|
|
|
|
\center
|
|
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_2_1.pdf}
|
|
|
|
\caption{cos(x) function.}
|
|
|
|
\end{figure}
|
2014-12-09 14:32:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-27 20:24:44 +02:00
|
|
|
\begin{juliaout}
|
|
|
|
1-element Array{Any,1}:
|
|
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe839790510>
|
|
|
|
\end{juliaout}
|
2016-04-12 16:08:29 +02:00
|
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_cos2_fun_1.pdf}
|
2014-12-09 14:32:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\begin{juliaterm}
|
|
|
|
julia> x = linspace(0, 2π, 200)
|
|
|
|
|
2016-04-11 21:08:41 +02:00
|
|
|
linspace(0.0,6.283185307179586,200)
|
2014-12-09 14:32:41 +01:00
|
|
|
julia> plot(x, sin(x))
|
|
|
|
|
2016-04-11 21:08:41 +02:00
|
|
|
1-element Array{Any,1}:
|
2016-04-27 20:24:44 +02:00
|
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe8396c8110>
|
2014-12-09 14:32:41 +01:00
|
|
|
julia> y = 20
|
|
|
|
|
2016-04-11 21:08:41 +02:00
|
|
|
20
|
2014-12-09 14:32:41 +01:00
|
|
|
julia> plot(x, cos(x))
|
|
|
|
1-element Array{Any,1}:
|
2016-04-27 20:24:44 +02:00
|
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe8396c8310>
|
2014-12-09 14:32:41 +01:00
|
|
|
\end{juliaterm}
|
2016-04-12 16:08:29 +02:00
|
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_4_1.pdf}
|
2014-12-09 14:32:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-12 16:08:29 +02:00
|
|
|
\begin{juliacode}
|
|
|
|
x = randn(100, 100)
|
2014-12-09 14:32:41 +01:00
|
|
|
contourf(x)
|
|
|
|
\end{juliacode}
|
2016-04-27 20:24:44 +02:00
|
|
|
\begin{juliaout}
|
|
|
|
PyObject <matplotlib.contour.QuadContourSet object at 0x7fe8395fc390>
|
|
|
|
\end{juliaout}
|
2016-04-12 16:08:29 +02:00
|
|
|
\includegraphics[width=15cm]{figures/pyplot_formats_5_1.pdf}
|