On Friday, February 13, 2015 at 4:58:44 AM UTC-5, gdmsl wrote:
>
> julia> plot(rand(10),rand(10));
> Figure(PyObject <matplotlib.figure.Figure object at 0x7f7979d24dd8>)
> Figure(PyObject <matplotlib.figure.Figure object at 0x7f7979d24dd8>)
>
> I really need to suppress output like "Figure(PyObject
> <matplotlib.figure.Figure object at 0x7f7979d24dd8>)"
>
The plot command (and similar) displays its output as a side effect (think
of it as a "println" statement, but via "display"). In the REPL, the
default "display" backend just calls `print`. You can suppress this in
two ways:
1) You could define your own display backend that silently ignores `Figure`
objects, and push it onto the display stack (see the Multimedia I/O section
of the manual.
2) You could wrap your plot commands in withfig:
f = figure()
withfig(f) do
.... plot commands ...
end;
The withfig command converts the plot results from a side effect into a
return value (which you can suppress with a semicolon). It was intended
for use with the Interact package, but should work as well here.