Closed stardiviner closed 8 years ago
@stardiviner have you reached a solution?
@larrasket Try this:
#+begin_src julia :results graphics file :file "data/images/result-inline-image.png"
p(x) = 4*x - 5*x^3 + x^5;
xs = linspace(-2.25, 2.25); ys = map(p, xs);
using Gadfly
# fig1 = plot(x = xs, y = ys, Geom.line)
# draw(SVG("gadfly.svg", 4inch, 2inch), fig1)
fig2 = plot([p, x->2*x^2], -2.25, 2.25)
draw(PNG("data/images/result-inline-image.png", 6inch, 3inch), fig2)
#+end_src
I use Gadfly graphics library.
And with a julia code block like this:
I tried different header arguments like
:results graphics
, or without header arguments. Both did not work. How to do this?