Hi Christoph! Glad to hear that you are jumping on the Julia bandwagon.
In principle it should work with PyPlot, since @manipulate works with PyPlot,
though some setup involving figure() is probably necessary, and I couldn’t
figure it out.
PyPlot is a lot slower than Gadfly (not counting compile time!!) so I
would recommend using Gadfly for animation.
If you look at my previous posts, at some point I did figure out a way to do
animation in PyPlot using pygui(true). It was a bit complicated and also slow
(the plotting was most of the computation time).
Sheehan
> On 27 Nov 2014, at 10:22 am, Christoph Ortner <[email protected]>
> wrote:
>
> Does this work with PyPlot?
> Christoph
>
>
> On Thursday, 27 November 2014 16:05:25 UTC, Sheehan Olver wrote:
> You're right, I had interact as well
>
> Sent from my iPhone
>
> On 27 Nov 2014, at 5:59 am, Cristóvão Duarte Sousa <[email protected]
> <javascript:>> wrote:
>
>> That is really nice!
>>
>> But let me alert that, at least in my case (Julia 3.2), I had to add using
>> Interact so that the plot is correctly displayed.
>>
>> Cheers,
>> Cristóvão
>>
>> On Thursday, November 27, 2014 4:59:00 AM UTC, Sheehan Olver wrote:
>> I figured out an approach that works for animation, thanks to Jiahao Chen,
>> using 2 IJulia inputs:
>>
>>
>> # In[1]
>> using ApproxFun,Gadfly,Reactive
>> x=Input(Fun(exp))
>> lift(ApproxFun.plot, x)
>>
>> # In[2]
>> for k=1:10
>> push!(x,Fun(x->cos(k*x)))
>> end
>>
>>
>>
>> On Tuesday, November 4, 2014 2:46:44 AM UTC-6, Sheehan Olver wrote:
>>
>>
>> I'm wondering whether there's an example of doing animation directly in
>> IJulia with Gadfly. Where by animation I mean plotting a sequence of
>> functions, lets say each frame is calculated from the previous frame and
>> wants to be plotted as soon as calculated.
>>
>> Its clearly possible as its possible with Interact.jl: the code below does
>> work, but is not elegant and seems to run into problems if the calculation
>> is slow. There is also the extra unneeded slide bar for k. I can't seem
>> to figure out how to get ride of the @manipulate.
>>
>> @manipulate for k=1:1, t_dt=timestamp(fps(30.))
>> # calculate plot
>> end
>>
>>