Comments (6)
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.
I've never actually tried switching backends mid-recipe. It might work???
from differentialequations.jl.
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.
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.
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.
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)
- "Interrupted. Larger maxiters is needed." warning when garbage collection is added HOT 7
- LoadError: TypeError: in setfield! HOT 1
- oneunit(::Type{Any} HOT 1
- Failed to precompile LoadError: UndefVarError: `OperatorAssumptions` not defined HOT 2
- ImplicitEuler fails to solve a nonlinear spring-damper problem HOT 5
- Plotting ODESolution using plot(sol) fails when using ODEFunction in combination with 'syms' keyword HOT 4
- SciML UDE tutorial code breaks in Julia 1.10 HOT 1
- PDEProblem is exported but has no docstring HOT 1
- Kuramoto model as DDE: Results don't converge when constant_lags are specified HOT 2
- Separate all automatic algorithm selection functionalities from their packages HOT 1
- taking too long time first using the package HOT 2
- LoadError during precompilation of DifferentialEquations on 1.9.3 HOT 8
- matrix SDE problem with non-diagonal noise HOT 1
- My ODE peoblems is always Aborting Help!!! HOT 13
- Compatibility with DynamicQuantities.jl – use `oneunit(::T)` instead of `oneunit(::Type{T})` HOT 3
- Error when mixing datatypes while differentiating using ForwardDiff and using FunctionWrapperSpecialize HOT 2
- feature request: Solve time parameter specification for SteadyStateProblem
- PDE and PDAE interface HOT 2
- callbacks_buckExample HOT 11
- Templates for Issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from differentialequations.jl.