I use GLPlot.jl for 3D, which is very fast as the update manipulates
the data on the GPU directly, I believe.
It’s a bit finicky to setup and rough around the edges though. I tried
to set it up on another persons computer and it failed.
If you want example usage, see
ApproxFun/src/plot/GLPlot.jl
glsurf(xx::Array,yy::Array,vals::Matrix) on line 52 shows the setup for a
non-tensor grid (which you want if your grid corresponds to a triangular mesh).
This returns a tuple (obj,window) that is updated by
glsurfupdate(vals::Matrix,obj,window) on line 24. This assumes the grid is
fixed.
> On 27 Nov 2014, at 3:05 pm, Christoph Ortner <[email protected]>
> wrote:
>
> Hi Sheehan,
>
> Thanks - I did see your post, and that is how I am currently using it. But
> I'd prefer to do animations in the notebook if at all possible.
>
> I'm happy to switch to Gadfly for 2D; what do you use for 3D plotting though?
>
> Christoph
>
> On Thursday, 27 November 2014 17:18:31 UTC, Sheehan Olver wrote:
>
> 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]
>> <javascript:>> 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] <>>
>> 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
>>>
>>>
>