I want to display PyPlot figures and relevant text sequentially in an iJuia notebook.
using PyPlot
for i=1:10
println(i) #Relevant text info
fig = figure(figsize=(4,1))
plot(1:10,rand(10));title(i)
end
This returns figures together, placed at a varying stage of the text output. i.e. something like:
1 2 3 4 5 6 [fig 1] ... [fig 10] 7 8 9 10
Alternatively I've tried using display(fig)
:
using PyPlot
for i=1:10
println(i) #Relevant text info
fig = figure(figsize=(4,1))
plot(1:10,rand(10))
title(i)
display(fig)
end
But this returns [fig 1] 1 [fig 2] 2 [fig 3] 3 [fig 4] 4 .... [fig 9] 9 [fig 10] [fig 1] ... [fig 10] 10
(duplicating the figures all together at the end)
Is there a way to use display(fig)
sequentially without duplication?