mirror of https://github.com/mpastell/Weave.jl
75 lines
1.0 KiB
Plaintext
75 lines
1.0 KiB
Plaintext
|
|
|
|
|
|
|
|
````julia
|
|
using PyPlot
|
|
x = linspace(0, 2π, 200)
|
|
plot(x, sin(x))
|
|
````
|
|
|
|
|
|
````
|
|
1-element Array{Any,1}:
|
|
PyObject <matplotlib.lines.Line2D object at 0x7f5326a4a290>
|
|
````
|
|
|
|
|
|
![sin(x) function.](figures/pyplot_formats_sin_fun_1.png)
|
|
|
|
|
|
|
|
````
|
|
1-element Array{Any,1}:
|
|
PyObject <matplotlib.lines.Line2D object at 0x7f5326a56c10>
|
|
````
|
|
|
|
|
|
![cos(x) function.](figures/pyplot_formats_2_1.png)
|
|
|
|
|
|
|
|
````
|
|
1-element Array{Any,1}:
|
|
PyObject <matplotlib.lines.Line2D object at 0x7f5326d76350>
|
|
````
|
|
|
|
|
|
![](figures/pyplot_formats_cos2_fun_1.png)
|
|
|
|
|
|
|
|
````julia
|
|
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 0x7f5326de8c10>
|
|
julia> y = 20
|
|
|
|
20
|
|
julia> plot(x, cos(x))
|
|
1-element Array{Any,1}:
|
|
PyObject <matplotlib.lines.Line2D object at 0x7f5326de8e50>
|
|
````
|
|
|
|
|
|
![](figures/pyplot_formats_4_1.png)
|
|
|
|
|
|
|
|
````julia
|
|
x = randn(100, 100)
|
|
contourf(x)
|
|
````
|
|
|
|
|
|
````
|
|
PyObject <matplotlib.contour.QuadContourSet object at 0x7f53346d2910>
|
|
````
|
|
|
|
|
|
![](figures/pyplot_formats_5_1.png)
|