Weave.jl/test/documents/plotsjl_test.jmd

30 lines
462 B
Plaintext
Raw Normal View History

2016-04-27 14:10:26 +02:00
```julia
using Plots
pyplot()
x = linspace(0, 2*pi)
println(x)
2016-11-01 14:44:58 +01:00
p = plot(x, sin(x), size =(900,300))
2016-04-27 14:10:26 +02:00
```
```julia; term=true
2016-11-01 14:44:58 +01:00
plot(x, sin(x))
2016-04-27 14:10:26 +02:00
```
```julia
plot(rand(100) / 3,reg=true,fill=(0,:green))
scatter!(rand(100),markersize=6,c=:orange)
```
```julia; term=true
plot(rand(100) / 3,reg=true,fill=(0,:green))
scatter!(rand(100),markersize=6,c=:orange)
```
```{julia;echo=false; fig_cap="A random walk."; label="random"}
2016-11-01 14:44:58 +01:00
plot(cumsum(randn(1000, 1)))
2016-04-27 14:10:26 +02:00
```