Commit b50bdbcd by Victor

### minor changes

parent f063c59a
 ... @@ -14,12 +14,12 @@ It should correspond to an integer, as it indexes the column to plot ... @@ -14,12 +14,12 @@ It should correspond to an integer, as it indexes the column to plot @recipe function plot(world::Array{U},p;what=["x","H"],trait = 1,tplot = 0) where U <: Union{Missing,Agent} @recipe function plot(world::Array{U},p;what=["x","H"],trait = 1,tplot = 0) where U <: Union{Missing,Agent} tot_dim = size(world,2)*size(world,1) tot_dim = size(world,2)*size(world,1) # We reduce time interval if it is too big # We reduce time interval if it is too big if tot_dim > 1e6 && size(world,2) >= 200 # if tot_dim > 1e6 && size(world,2) >= 200 p = copy(p) # p = copy(p) idx_reduced = floor.(Int,range(1,size(world,2),length = 200)) # idx_reduced = floor.(Int,range(1,size(world,2),length = 200)) p["tspan" ] = p["tspan"][idx_reduced] # p["tspan" ] = p["tspan"][idx_reduced] world = world[:,idx_reduced] # world = world[:,idx_reduced] end # end if count(ismissing,world) > 0 if count(ismissing,world) > 0 tspan_ar = vcat([p["tspan"][i]*ones(Int(p["NMax"] - count(ismissing,world[:,i]))) for i in 1:length(p["tspan"]) ]...); tspan_ar = vcat([p["tspan"][i]*ones(Int(p["NMax"] - count(ismissing,world[:,i]))) for i in 1:length(p["tspan"]) ]...); else else ... @@ -39,7 +39,7 @@ It should correspond to an integer, as it indexes the column to plot ... @@ -39,7 +39,7 @@ It should correspond to an integer, as it indexes the column to plot markercolor := eth_grad_small[d_i ./ maximum(d_i)] markercolor := eth_grad_small[d_i ./ maximum(d_i)] # markercolor := :blue # markercolor := :blue markerstrokewidth := 0 markerstrokewidth := 0 alpha :=1. seriesalpha :=1. xlabel := "time" xlabel := "time" ylabel := "trait value" ylabel := "trait value" label := "" label := "" ... @@ -65,12 +65,12 @@ It should correspond to an integer, as it indexes the column to plot ... @@ -65,12 +65,12 @@ It should correspond to an integer, as it indexes the column to plot markercolor := eth_grad_small[d_i ./ maximum(d_i)] markercolor := eth_grad_small[d_i ./ maximum(d_i)] # markercolor := :blue # markercolor := :blue markerstrokewidth := 0 markerstrokewidth := 0 alpha := 1. seriesalpha := 1. xaxis := "geographical position" xaxis := "geographical position" yaxis := "trait value" yaxis := "trait value" label := "" label := "" grid := false grid := false markersize := 10 # markersize := 10 x1_array[:],xt_array[:] x1_array[:],xt_array[:] end end end end ... @@ -80,7 +80,7 @@ It should correspond to an integer, as it indexes the column to plot ... @@ -80,7 +80,7 @@ It should correspond to an integer, as it indexes the column to plot seriestype := :scatter seriestype := :scatter markercolor := "blue" markercolor := "blue" markerstrokewidth := 0 markerstrokewidth := 0 alpha :=.1 seriesalpha :=.1 xlabel := "time" xlabel := "time" ylabel := "trait value" ylabel := "trait value" label := "" label := "" ... @@ -95,7 +95,7 @@ It should correspond to an integer, as it indexes the column to plot ... @@ -95,7 +95,7 @@ It should correspond to an integer, as it indexes the column to plot seriestype := :scatter3d seriestype := :scatter3d markercolor := "blue" markercolor := "blue" markerstrokewidth := 0 markerstrokewidth := 0 alpha :=.1 seriesalpha :=.1 xlabel := "time" xlabel := "time" ylabel := "geotrait" ylabel := "geotrait" zlabel := "trait value" zlabel := "trait value" ... @@ -111,7 +111,7 @@ It should correspond to an integer, as it indexes the column to plot ... @@ -111,7 +111,7 @@ It should correspond to an integer, as it indexes the column to plot seriestype := :scatter3d seriestype := :scatter3d markercolor := "blue" markercolor := "blue" markerstrokewidth := 0 markerstrokewidth := 0 alpha :=.1 seriesalpha :=.1 xlabel := "time" xlabel := "time" ylabel := "position" ylabel := "position" zlabel := "trait value" zlabel := "trait value" ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!