Giter Site home page Giter Site logo

Comments (6)

tbreloff avatar tbreloff commented on May 16, 2024

So is there some reason why this pattern wouldn't work?

@gif for j=1:num_steps
    #  TODO update the atom progress
    timeseries = [ts[j] for ts in sol.timeSeries]
    plotfunc(sol.femMesh.node[:,1], sol.femMesh.node[:,2], timeseries)
end

And then you'd create either/both of "type recipes" and "user recipes" depending on what you need.

from differentialequations.jl.

tbreloff avatar tbreloff commented on May 16, 2024

I've never actually tried switching backends mid-recipe. It might work???

from differentialequations.jl.

ChrisRackauckas avatar ChrisRackauckas commented on May 16, 2024

I am still not quite sure how to make the @gif command be in a recipe. Do you just put it at the bottom, and so the recipe is returning an animation instead of a plot?

I was just following your example with the backend thing. The reuse=true is necessary, and if that's the case it's nice to have it in the animation call, but I am wondering if it could grab the current backend and add that, and then after the animation is made turn it back to the way it was?

from differentialequations.jl.

ChrisRackauckas avatar ChrisRackauckas commented on May 16, 2024

FYI the tests fail after removing the checkout calls from the tests. Has the METADATA just not updated or something? It fails because the keyword plottrue that I defined for some recipes is not found, which is an issue only when called on an older version of Plots.

from differentialequations.jl.

tbreloff avatar tbreloff commented on May 16, 2024

What are the types on these:

sol.femMesh.node[:,1],sol.femMesh.node[:,2],sol.timeSeries[i][j]

I am still not quite sure how to make the @gif command be in a recipe. Do you just put it at the bottom, and so the recipe is returning an animation instead of a plot?

The recipes would be called from within the plotfunc call. You wouldn't add any animation logic to a recipe.

You made me realize an important point (that I was already pondering but chose to ignore), that recipes aren't used when pushing/updating data. I think it would make sense to process "type recipes" inside push!/setindex! methods, but other recipes would be tricky to get right generically. If you're pushing data into a histogram recipe, for example, you'd want to update the bins accordingly, which involved changing the original data and then re-processing the recipe. This is certainly do-able, but might be a "0.8 feature".

from differentialequations.jl.

tbreloff avatar tbreloff commented on May 16, 2024

Though looking at your animation function, it seems like you're just rebuilding a plot for each frame, so things would work fine.

from differentialequations.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.