Weave.jl/examples/gadfly_sample.mdw

26 lines
459 B
Plaintext
Raw Normal View History

% Weave.jl example document: Embedding Gadfly plots
% Matti Pastell
% 20th April 2016
If you have Weave.jl installed you can run this document with output
to your working directory using:
```julia
using Weave
weave(Pkg.dir("Weave","examples","gadfly_sample.mdw"), out_path = :pwd)
```
2014-12-03 14:41:53 +01:00
<<term=true>>=
using Gadfly
x = linspace(0, 2π, 200)
plot(x=x, y = sin(x), Geom.line)
y = 20
plot(x=x, y = cos(x), Geom.line)
@
<<>>=
x = linspace(0, 200)
2014-12-03 14:41:53 +01:00
println(x)
@