Skip to content

Instantly share code, notes, and snippets.

@axsk
Created July 9, 2016 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axsk/c366bc96dc7d9c6d1730c0322c54999a to your computer and use it in GitHub Desktop.
Save axsk/c366bc96dc7d9c6d1730c0322c54999a to your computer and use it in GitHub Desktop.
@userplot PlotSolutions
@recipe function f(o::PlotSolutions)
samples = o.args[1]
species --> measuredinds
t --> 0:1/3:30
color_palette --> [colorant"steelblue"]
linewidth --> 0.1
label --> ""
seriesalpha --> 0.1
layout --> length(d[:species])
nspecies = length(d[:species])
nsamples = size(samples, 1)
subplot := repeat(collect(1:nspecies)', outer=[1, nsamples])
solutions = hcat([gync(samples[i,:] |> vec, d[:t])[:,d[:species]] for i in 1:nsamples]...)
delete!(d, :species)
#delete!(d, :t)
d[:t], solutions
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment