title: Julia pyplot from script (not interactive)
body: <p>I just installed PyPlot in Julia. It's working fine when I run it from julia's interactive environment. But when I make a .jl script an run from bash the plot graphics does not displays. </p>
  
  <p>I'm familiear with matplotlib (pylab) where <em>show()</em> command is used to view the figures. I probably don't undestand the readme of PyPlot here <a href="https://github.com/stevengj/PyPlot.jl" rel="nofollow">https://github.com/stevengj/PyPlot.jl</a></p>
  
  <blockquote>
    <p>You can get the current figure as a Figure object (a wrapper around
    matplotlib.pyplot.Figure) by calling gcf(). The Figure type supports
    Julia's multimedia I/O API, so you can use display(fig) to show a
    fig::PyFigure</p>
  </blockquote>
  
  <p>If I run this script:</p>
  
  <pre><code>using PyPlot
  x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x));
  plot(x, y, color="red", linewidth=2.0, linestyle="--")
  title("A sinusoidally modulated sinusoid")
  fig1 = gcf()
  display(fig1)
  </code></pre>
  
  <p>I get no graphics on the screen, just text output with address of the figure object </p>
  
  <pre><code>$ julia pyplottest.jl
  Loading help data...
  Figure(PyObject &lt;matplotlib.figure.Figure object at 0x761dd10&gt;)
  </code></pre>
  
  <p>I'm also not sure why it take so long time and what "<em>Loading help data...</em>" does mean</p>
  
  <p>if I run the same script from inside of Julia evironment using <em>include("pyplottest.jl")</em> the plot does shows fine</p>