mirror of https://github.com/mpastell/Weave.jl
55 lines
1008 B
TeX
55 lines
1008 B
TeX
|
|
|
|
|
|
|
|
\begin{juliacode}
|
|
using PyPlot
|
|
x = linspace(0, 2π, 200)
|
|
plot(x, sin(x))
|
|
\end{juliacode}
|
|
\begin{figure}[ht]
|
|
\center
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_sin_fun_1.pdf}
|
|
\caption{sin(x) function.}
|
|
\label{fig:sin_fun}
|
|
\end{figure}
|
|
|
|
|
|
|
|
\begin{figure}[htpb]
|
|
\center
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_2_1.pdf}
|
|
\caption{cos(x) function.}
|
|
\end{figure}
|
|
|
|
|
|
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_cos2_fun_1.pdf}
|
|
|
|
|
|
|
|
\begin{juliaterm}
|
|
julia> x = linspace(0, 2π, 200)
|
|
|
|
linspace(0.0,6.283185307179586,200)
|
|
julia> plot(x, sin(x))
|
|
|
|
1-element Array{Any,1}:
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe56f7ac978>
|
|
julia> y = 20
|
|
|
|
20
|
|
julia> plot(x, cos(x))
|
|
1-element Array{Any,1}:
|
|
PyObject <matplotlib.lines.Line2D object at 0x7fe56f7b29b0>
|
|
\end{juliaterm}
|
|
\includegraphics[width=\linewidth]{figures/pyplot_formats_4_1.pdf}
|
|
|
|
|
|
|
|
\begin{juliacode}
|
|
x = randn(100, 100)
|
|
contourf(x)
|
|
\end{juliacode}
|
|
\includegraphics[width=15cm]{figures/pyplot_formats_5_1.pdf}
|