# EnsembleProblem and plotly

One problem solve, next problem.

I am learning to use EnsembleProblem together with Jump Processes. The code:

``````jprob, prob = setupSystem(dgr)
@time sol = solve(jprob, SSAStepper(), saveat=0.25)

ensemble_prob = EnsembleProblem(jprob)
sim = solve(ensemble_prob, SSAStepper(), trajectories=1)
plotly()
plot(sim, linealpha=0.4)
``````

freezes when executing the `plot` command. What is worse, is that when I interrupt, the `plot` command, I do not return to the Julia client, but I am forced to restart Julia.

Here is the output to `sim`:

``````julia> sim
EnsembleSolution Solution of length 1 with uType:
ODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},Nothing,DiscreteProblem{Array{Float64,1},Tuple{Float64,Float64},true,Array{Float64,1},DiscreteFunction{true,ModelingToolkit.var"#103#104",Nothing,Array{Symbol,1}},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}},SSAStepper,DiffEqBase.ConstantInterpolation{Array{Float64,1},Array{Array{Float64,1},1}},Nothing}
``````

I must say that I love Julia, but so far, everything is a struggle. I wish the learning curve was not so steep!

Sounds like that’s a Plots.jl plotly issue with ribbons? Worth a Plots.jl issue.

What do you mean by ribbons? How to construct a MWE if I do not know the cause?

I was copying your example applied to JumProblem. I will see if I can simplify this.

Oh actually you’re not using ribbons. Maybe Plotly is just having problems for you?

I changed the number of graph nodes from 300 to 30, and plotly worked, but is slow. The gr() backend is substantially faster, but not fast on a 300 node graph. And that is only with a single trajectory!

Plotly is fairly slow in comparison to GR. It’s just a limitation of the fact that it’s interactive javascript.

1 Like

Yes, got it.

After generating `sim`, I typed: (notice the two `using` statements, and `get_timepoint` probably exists in both:

``````using DifferentialEquations.EnsembleAnalysis
using DiffEqBase.EnsembleAnalysis
a = get_timepoint(sim, 2.)
v = componentwise_vectors_timepoint(sim, 2.)
``````

Now, observe the sequence of commands and responses within REPL and the four bold lines. How is it possible that typing the name of a function twice in a row will give different results?

``````julia> get_timepoint
get_timepoint (generic function with 1 method)

julia> get_timepoint
get_timepoint (generic function with 1 method)

**julia> componentwise_vectors_timepoint**
**get_timepoint (generic function with 1 method)**

**julia> componentwise_vectors_timepoint**
**componentwise_vectors_timepoint (generic function with 1 method)**
``````