Weave.jl/test/documents/plotsjl_test_gr.jmd

26 lines
358 B
Plaintext
Raw Normal View History

2016-12-13 20:23:57 +01:00
```julia
using Plots
gr()
2018-08-14 11:32:51 +02:00
x = range(0, stop=2π, length=50)
2016-12-13 20:23:57 +01:00
println(x)
2018-01-02 14:54:55 +01:00
p = plot(x, sin.(x), size =(900,300))
p
2016-12-13 20:23:57 +01:00
```
```julia
2018-01-02 14:54:55 +01:00
plot(x, sin.(x))
2016-12-13 20:23:57 +01:00
```
2018-01-02 14:54:55 +01:00
```julia
2016-12-13 20:23:57 +01:00
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"}
2018-08-14 11:32:51 +02:00
plot(cumsum(randn(1000, 1), dims=1))
2016-12-13 20:23:57 +01:00
```